Log in

View Full Version : Quick Ban/UnBan


sketch42
07-27-2005, 10:00 PM
Since the Modcp link is gone from the bottom of the
page my moderators needed a quick way to ban a user without going
to the modcp. So this hack adds aoption to Ban a user directly from
the offending post, via the drop down menu link by the users name.
This is Moderator Forum Specific, which means moderators can only ban
users in their own forum, and not in another moderators forum. Also a
moderator can not ban any of the forum Administrators.


This Hack is Based on Erwins Warning System/Automatic Ban Hack and Magnus's Add On.

if you do not want to have the UnBan Link than just remove this line
<tr><td class="vbmenu_option"><span onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/banning.php?do=liftban&userid=$post[userid]','liftban','width=500,height=375,scrollbars=yes')"><b>Lift Ban on $post[username]</b></span></td></tr>

also if you do not want it to be forum specific for your moderators replace this
<if condition="$post[usergroupid]!=6 AND can_moderate($forum[forumid], '', $bbuserinfo[userid])">

with this
<if condition="($bbuserinfo[usergroupid]==5 || $bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==7)">

Boofo
07-28-2005, 07:46 AM
You might want to protect the Supermods from being banned , too, or does it already do that? ;)

sketch42
07-28-2005, 07:57 AM
You might want to protect the Supermods from being banned , too, or does it already do that? ;)

they are protected already... the option shows up to ban them but you will get an error message stating
You are not authorized to ban users who are not considered normal, registered users

Brinnie
07-28-2005, 08:02 AM
So it only bans them from the forum they moderate?

sketch42
07-28-2005, 08:06 AM
So it only bans them from the forum they moderate?

? no it will ban them from the forums... period.
if a user is keeps acting up in one part of the forum
chances are theyll do the same elsewhere on the site

sketch42
07-28-2005, 08:11 AM
You might want to protect the Supermods from being banned , too, or does it already do that? ;)

they are protected already... the option shows up to ban them but you will get an error message stating
You are not authorized to ban users who are not considered normal, registered users

this doesnt mean they cant ban members in custom usergroups.
any member with any kind of modertor status whether super mod or regular mod can not ban each other... only an admin can ban a mod of any kind

Boofo
07-28-2005, 08:12 AM
they are protected already... the option shows up to ban them but you will get an error message stating

But the Admin can ban them right?

Brinnie
07-28-2005, 08:18 AM
? no it will ban them from the forums... period.
if a user is keeps acting up in one part of the forum
chances are theyll do the same elsewhere on the site


I DISSAGREE (http://www.vbulletin.com/forum/showthread.php?p=927779#post927779)

Matter of act, I more than dissagree, I know for fact that users behave differently per forum... Like, at Literotica, there's some elite jerks in the Authors forum that totally need their ass kicked. People often go there to challenge these people and fights break out all the time...

I know of people who like to troll the Gay/Lesbian forums as well as Religion Forums, but they act fine in the other forums.

And then there's people like me who should be banned from General chat because I always start some riot. :o

sketch42
07-28-2005, 08:24 AM
I DISSAGREE (http://www.vbulletin.com/forum/showthread.php?p=927779#post927779)

Matter of act, I more than dissagree, I know for fact that users behave differently per forum... Like, at Literotica, there's some elite jerks in the Authors forum that totally need their ass kicked. People often go there to challenge these people and fights break out all the time...

I know of people who like to troll the Gay/Lesbian forums as well as Religion Forums, but they act fine in the other forums.

And then there's people like me who should be banned from General chat because I always start some riot. :o

i wont debate how memebrs act .. this was just my personal opinion from experiance :D

Boofo
07-28-2005, 08:25 AM
Each board is different but I agree, if they act up in one forum, don't give them the oppportunity to repeat themselves in another.

EasyTarget
07-29-2005, 06:06 AM
I agree with Brinnie, I'd like a hack to ban a member from just one forum, or so that moderators' bans don't affect the users access to other forums.

Like I have one forum that is pretty much anything goes, and then others taht have stricter guidelines, I'd like it so that mods of the more strict forums can't ban the problematic users from the other forums.

anyways.. nice hack on the quick ban.

Brinnie
08-08-2005, 06:06 AM
I agree with Brinnie, I'd like a hack to ban a member from just one forum, or so that moderators' bans don't affect the users access to other forums.

Like I have one forum that is pretty much anything goes, and then others taht have stricter guidelines, I'd like it so that mods of the more strict forums can't ban the problematic users from the other forums.

anyways.. nice hack on the quick ban. i made a feature request over at vB. One of the staff said he might do it. :)

Boofo
08-08-2005, 06:08 AM
i made a feature request over at vB. One of the staff said he might do it. :)

If you hear any more on it, I'd be curious to check it out. ;)

sketch42
08-08-2005, 02:39 PM
If you hear any more on it, I'd be curious to check it out. ;)

ive been trying to make it for 3.5 and 3.0.7
in 3.5 i cant find the right hooks though

Boofo
08-08-2005, 02:58 PM
Maybe ask Kirby? ;)

EasyTarget
08-08-2005, 04:12 PM
cool Brinnie, please keep me updated on the status, or sketch if you end up figuring out how to do it. Its definatly a feature I'm looking for.

Brinnie
08-23-2005, 06:29 PM
cool Brinnie, please keep me updated on the status, or sketch if you end up figuring out how to do it. Its definatly a feature I'm looking for.

Well I was gonna go find the topic, but vB com seems to be down. :(

SuperFly
08-23-2005, 08:26 PM
Try refreshing its not down

ConqSoft
08-23-2005, 08:34 PM
You should be able to just edit access masks for problem users, and deny them access to particular forums.

Brinnie
08-23-2005, 08:43 PM
You should be able to just edit access masks for problem users, and deny them access to particular forums.


Um... Hmm. Wouldn't you need to set up like 15 permissions masks?

And how would you determine which group they go in when a mod banns them?

ConqSoft
08-23-2005, 08:45 PM
Not usergroups; access masks.

Edit a user in the AdminCP. Choose Edit Forum Permissions (Access Masks) from the dropdown at the top. Should be the first option listed. You can pick/choose which forums they have access to, per user.

You may need to enable Access Masks if you haven't already.
AdminCP->vBulletin Settings->General Settings->Access Masks.

rza733
10-15-2005, 12:32 AM
thanks much sketch.... works great

Kevlar
10-19-2005, 01:31 AM
Is there anyway I could set this up so it limited those bannings by mods to 48 hrs or less?

Telegon80
10-19-2005, 02:38 AM
installed but no workie

Flow Fusion
10-23-2005, 08:23 AM
Hack is perfect for my forum. Thanks for the hard work.

*installs*

Blind Guardian
10-25-2005, 03:38 AM
I tweaked it a little, since only my super-moderators and administrators can ban users, not regular moderators. I also added another if condition so that it'll only show "ban" if they're not banned, and if they are it'll only show "lift ban".

<!-- QUICK BAN -->
<if condition="$post[usergroupid]!=6 AND $bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==5">
<if condition="$post[usergroupid]==8 OR $post[usergroupid]==9 OR $post[usergroupid]==108">
<tr><td class="vbmenu_option"><span onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/banning.php?do=liftban&userid=$post[userid]','liftban','width=800,height=375,scrollbars=yes')"><b>Lift Ban on $post[username]</b></span></td></tr>
<else />
<tr><td class="vbmenu_option"><span onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/banning.php?do=banuser&userid=$post[userid]','ban','width=800,height=375,scrollbars=yes')"><b>Ban or Suspend $post[username]</b></span></td></tr>
</if>
</if>
<!-- /QUICK BAN -->

It's set so it won't show up on admin posts at all, but only admins and smods will see it under the dropdown. Usergroups 8, 9 and 108 are my banned, temp-banned and sig-revoked usergroups, respectively.

Other than those few minor things, I'm glad you got this up for 3.5. Thanks.

lucky64
11-01-2005, 06:46 PM
I think I'll install this today.

Telegon80
11-18-2005, 02:37 AM
what's the difference if i put it on postbit or postbit legacy.

i dont understand which i should put it into wtf...

bonjurkes
12-17-2005, 04:13 PM
if you are using Legacy (Vertical) Postbit Template you must edit postbit legacy...

utw-Mephisto
12-26-2005, 06:35 PM
Just minor, but the links look ugly ... how can I make them "normal" ?

http://img408.imageshack.us/img408/4757/untitled6fk.jpg

Parker Clack
05-15-2006, 06:38 PM
Can you write this that an email is sent to the member when they are banned with the reason, length of the ban, etc?

Smiry Kin's
05-31-2006, 04:43 PM
well this doesnt work, i donno if the codes changed, because it works perfect on my other forums... shame really..

never mind, got ti working, i think

MissKalunji
08-05-2006, 12:49 PM
will this work with 3.6?

nix
08-18-2006, 03:53 PM
I'm using it on 3.6 Gold.

MissKalunji
08-22-2006, 04:15 AM
still working on 3.6

Chicago_VLNU_4s
09-11-2006, 02:35 AM
I put it in postbit_legacy and it shows up in the drop down, but when i click it, nothin happens! What's wrong?

El Orans
10-12-2006, 03:39 PM
This code will show Admins the ban option (red) for non-banned members and the lift ban option (green) for banned members.

<if condition="$bbuserinfo[usergroupid]== <Admins>">
<if condition="$post[usergroupid] == <Banned Users>">
<tr>
<td class="vbmenu_option">
<span onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/banning.php?do=liftban&userid=$post[userid]','liftban','width=575,height=375,scrollbars=yes')" style="color:green;">Lift Ban on $post[username]</span>
</td>
</tr>
<else />
<tr>
<td class="vbmenu_option">
<span onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/banning.php?do=banuser&userid=$post[userid]','ban','width=575,height=375,scrollbars=yes')" style="color:red;">Ban $post[username]</span>
</td>
</tr>
</if>
</if>

Dannyloski
08-10-2007, 01:48 AM
Awesome, working on vB 3.6.8 ... Installed ...

Panzer Max
01-29-2008, 01:33 AM
I installed this but the moderators still cannot get it to work. They see the Ban link in the profile, but when they click it, a window appears asking them to log into the mod CP. then after the log in, tells them You are not authorized to ban users

Ideas?

I tried this using one style and editing the Postbit Legacy template. Tried it as it comes in the zip and with this piece replacing

<if condition="($bbuserinfo[usergroupid]==5 || $bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==7)">

canyildiz
05-28-2009, 09:12 PM
Also works on 3.8.2. Thanks...