Version: 1.00, by sketch42
Developer Last Online: Dec 2011
Version: 3.5.0 RC2
Rating:
Released: 07-27-2005
Last Update: Never
Installs: 39
Template Edits
No support by the author.
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
Code:
<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
Code:
<if condition="$post[usergroupid]!=6 AND can_moderate($forum[forumid], '', $bbuserinfo[userid])">
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.
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".
Code:
<!-- 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.