PDA

View Full Version : quick ban?


Kevlar
02-05-2005, 09:48 PM
An idea and tell me if it's possible (or worthwhile) or not.

I want to do a if/then on the postbit page that does something like this.

If admin/mod display 'quick ban' button for particular user.

The 'quick ban' button would essentially do just that. By pushing it, it would automatically add that user to one of my banned groups (I have a readonly usergroup for troublesome users) for 24 hours. This is mostly for moderators because I didn't give them permission to the mod control panel (too much permissions).

If they have the 'quick ban' button, they can put a user into 'timeout' for 24 hours until one of the admins can review it.

I know I would need to do a if/then to check the usergroups for admins or mods.

Then I know I would have to make seperate forms for each user on postbit. It would then have to pass those form variables to the banning.php file.

Thoughts?

Andreas
02-05-2005, 09:52 PM
This is mostly for moderators because I didn't give them permission to the mod control panel (too much permissions).

Hmm ... if you set permissions correctly your mods can't do anything (except viewing load avg and searchign in mysql/php manual).

Furthermore, this is mainly a template mod - I've added such a "Quick Ban"-Button in the user profile (Template MEMBERINFO).


<if condition="can_moderate(0, 'canbanusers')">
<br />
<if condition="$usergroupcache["$userinfo[usergroupid]"][genericoptions] & ISBANNEDGROUP">
<div style="color: red; font-weight: bold; text-align: center; font-size: 18pt">This User is banned!</div>
<else />
<div style="text-align: center">
<form method="get" action="modcp/banning.php" />
<input type="hidden" name="do" value="dobanuser" />
<input type="hidden" name="period" value="PERMANENT" />
<input type="hidden" name="usergroupid" value="8" />
<input type="hidden" name="username" value="$userinfo[username]" />
<input type="submit" value="Ban User" />
</form>
</div>
</if>
</if>

Kevlar
02-08-2005, 05:45 PM
Hmm ... if you set permissions correctly your mods can't do anything (except viewing load avg and searchign in mysql/php manual).

Can you elaborate on this some as it would elminate on the quick ban need at the moment. I'd like my mods to be able to ban people (to a special user group ... not totally banned, just a read-only group I already have) for a period of 24-48 hours and no more.

I tried something similar to that button you have ... but it returns them to the banning page where they can mess around in the modcp.

Andreas
02-08-2005, 06:00 PM
Well, check your moderator permissions.
Give them only those you want them to have :)