PDA

View Full Version : You Have Been Banned (!VISUALLY!)


drumforum
06-20-2005, 11:54 PM
Hello,

when we ban a user, a clear message doesn't appear when they attempt to log in telling them they've been banned.

What I would like is is a mod that displays a box, similar to the no permission one, with a bit of text (custom?) to pop up on the index page and if possible all other pages too.

Thanks as always

Adam

Andreas
06-21-2005, 12:05 AM
Pretty easy


<if condition="$usergroupcache["$userinfo[usergroupid]"]['genericoptions'] & ISBANNEDGROUP">
<!-- Your text here -->
</if>


Please note that this will not work in Templates where $usergroupcache isn't available.

drumforum
06-21-2005, 12:13 AM
Thank you very much :)

Stupid question now.... Where do I put it?

:S

Thanks

Adam

Adrian Schneider
06-21-2005, 12:18 AM
Another method I used:

global.php:
Find: // ################################################## ###########################
// check permission to view forum

Above it add:

if (is_member_of($bbuserinfo, 8))
{
$errormessage = "Oops! It appears you aren't welcome here.";
eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
}

where 8 is your banned group

Andreas
06-21-2005, 12:20 AM
Could also be done in phlinclude_start (or hook global_start for vBulletin 3.5).

Colin F
06-21-2005, 07:39 AM
I think in 3.5 it tells you if you have been banned.