function advban_help in Advanced ban 8
Implements hook_help().
File
- ./
advban.module, line 14 - Allows to ban individual or range IP addresses.
Code
function advban_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.advban':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The Advanced Ban module allows administrators to ban visits to their site from individual or range IP addresses.') . '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dl>';
$output .= '<dt>' . t('Banning IP addresses: individual or range.') . '</dt>';
$output .= '<dt>' . t('Addig expiry dates to blocked IP addresses and unblocking them after a certain amount of time.') . '</dt>';
$output .= '<dt>' . t('Uses Blacklist or whitelist, where blacklisted IPs are denied from the site, and whitelisted are allowed. Whitelists always override blacklists.') . '</dt>';
$output .= '<dd>' . t('Administrators can enter IP addresses to ban on the <a href=":bans">IP address bans</a> page.', [
':bans' => Url::fromRoute('advban.admin_page')
->toString(),
]) . '</dd>';
$output .= '</dl>';
return $output;
case 'advban.admin_page':
return '<p>' . t('IP addresses (individual or range) listed here are banned from your site. Banned addresses are completely forbidden from accessing the site and instead see a brief message explaining the situation. Banned addresses can be unblocked after expiration.') . '</p>';
}
}