Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Aiheen aloitti: grasfulls - joulukuu 02, 2016, 09:13:16 AP

Otsikko: Can we change default "banned" message?
Kirjoitti: grasfulls - joulukuu 02, 2016, 09:13:16 AP
Is it possible to customize the message displayed to a banned user?
"Sorry Guest, you are banned from using this forum!"

Like "Your IP is banned right now, email us at ____ if this is an error"

Thanks!
gary
Otsikko: Re: Can we change default "banned" message?
Kirjoitti: Sir Osis of Liver - joulukuu 02, 2016, 11:31:57 AP
index.english.php



$txt['your_ban'] = 'Sorry %1$s, you are banned from using this forum!';
$txt['your_ban_expires'] = 'This ban is set to expire %1$s.';
$txt['your_ban_expires_never'] = 'This ban is not set to expire.';
$txt['ban_continue_browse'] = 'You may continue to browse the forum as a guest.';


Otsikko: Re: Can we change default "banned" message?
Kirjoitti: Kindred - joulukuu 02, 2016, 12:23:07 IP
As a note, however, you should not use the SMF ban system to ban IP addresses.

If you are trying to control spam, then there are MUCH better methods of doing so, apart from the ban system
If you want to permanently ban IPs for some strange reason, then using .htaccess to control IP deny statements is the better way of doing so.

Additionally...   that message is the primary "header" message.
Each ban can have a cusotm message displayed to the user when it is triggered -- that is configured right in the ban itself -- and there is no need to change any files