View Full Version : Ban member from post
Alfa1
11-20-2006, 10:25 AM
I have searched for a hack to do this, but couldn't find it. If there is such a hack please direct me to it.
How can I enable my mods to ban a member straight from the members it's post without having to go from the post to: member profile -> modcp -> ban member
bashy
11-23-2006, 06:16 PM
Hi
Add this to the username (menu) in the postbit template
After this
<if condition="$post[usergroupid]!= 6 AND $bbuserinfo[usergroupid] == 6">
<tr><td class="vbmenu_option"><a
href="moderator.php?$session[sessionurl]do=useroptions&u=$post[userid]"><phrase
1="$post[username]">Edit User</phrase></a></td></tr>
</if>
Add this....
<if condition="($bbuserinfo[usergroupid]==5 || $bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==7)">
<tr><td class="vbmenu_option"><span onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/banning.php?do=banuser&userid=$post[userid]','ban','width=500,height=375,scrollbars=yes')"><b>Ban or Suspend $post[username]</b></span></td></tr>
<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>
</if>
I cannot remember if it was part of another hack but i dont think so!!
This is what i have and it works, Sorry i cannot help any further though!
Alfa1
11-23-2006, 09:27 PM
Where can I find this template? I have searched my postbit template, but can not find the text you refer to.
I went to: adminCP -> styles & templates -> style manager -> default style -> postbit templates -> postbit
Alfa1
12-28-2006, 11:32 PM
The above works, but Bashy made an error and I'm glad he/she did :)
The above should be placed after this:
<if condition="$post['userid'] AND $show['member']">
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&userlist=buddy&u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr>
</if>
And this:
<if condition="$post[usergroupid]!= 6 AND $bbuserinfo[usergroupid] == 6">
<tr><td class="vbmenu_option"><a
href="moderator.php?$session[sessionurl]do=useroptions&u=$post[userid]"><phrase
1="$post[username]">Edit User</phrase></a></td></tr>
</if> Should be:
<if condition="$post[usergroupid]!= 6 AND $bbuserinfo[usergroupid] == 6">
<tr><td class="vbmenu_option"><a
href="moderator.php?$session[sessionurl]do=useroptions&u=$post[userid]"><phrase 1="$post[username]">Edit User</phrase></a></td></tr>
</if>
This code does not exist in the template, but if you add this, your admins will be able to edit the users profile directly from the post. (without logging into the adminCP) I have very happy admins now.
And after that this should be added:
<if condition="($bbuserinfo[usergroupid]==5 || $bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==7)">
<tr><td class="vbmenu_option"><span onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/banning.php?do=banuser&userid=$post[userid]','ban','width=500,height=375,scrollbars=yes')"><b>Ban or Suspend $post[username]</b></span></td></tr>
<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>
</if>
Since we almost never unban members, I did not find any sense in adding the last part. So I only did this:
<if condition="($bbuserinfo[usergroupid]==5 || $bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==7)">
<tr><td class="vbmenu_option"><span onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/banning.php?do=banuser&userid=$post[userid]','ban','width=500,height=375,scrollbars=yes')"><b>Ban or Suspend $post[username]</b></span></td></tr>
</if>So now I have happy mods as well.
Smoothie
12-29-2006, 01:51 AM
Very nice!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.