The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Extra Modoptions into users posts (Ban Link, Edit Avatar, Edit sign,..) Details »» | |||||||||||||||||||||||||||||
Extra Modoptions into users posts (Ban Link, Edit Avatar, Edit sign,..)
Developer Last Online: Aug 2012
Useful. This mod allows you to ban an user directly from his posts. A link appear in the dropwon menu of the member. When you click "Ban this user", it opens a popup window where you can ban ban user of the post. v2: Now you can edit signature, avatar, profilpic
v2 Special Thanks to SirHappy for this code In the template postbit and postbit_legacy, Find: HTML Code:
<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_contacts]</phrase></a></td></tr> </if> Add below: HTML Code:
<!-- / start - happy extra modoption --> <if condition="in_array($post[usergroupid], array(2))"><if condition="in_array($bbuserinfo['usergroupid'], array(6))"> <tr><td class="thead"><strong><u>Extra Modoption</u></strong></td></tr> <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=350,scrollbars=yes')"><strong>Ban: $post[username]</strong></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]','ban','width=500,height=350,scrollbars=yes')"><strong>Unban: $post[username]</strong></span></td></tr> <tr><td class="vbmenu_option"><span onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/user.php?do=editsig&userid=$post[userid]','edit','width=500,height=350,scrollbars=yes')"><strong>Edit Signature from $post[username]</strong></span></td></tr> <tr><td class="vbmenu_option"><span onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/user.php?do=avatar&userid=$post[userid]','edit','width=500,height=350,scrollbars=yes')"><strong>Edit Avatar from $post[username]</strong></span></td></tr> <tr><td class="vbmenu_option"><span onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/user.php?do=profilepic&userid=$post[userid]','edit','width=500,height=350,scrollbars=yes')"><strong>Edit Profilpic from $post[username]</strong></span></td></tr> <tr><td class="vbmenu_option"><strong>IP-Adress from $post[username]: $post[ip]</strong></td></tr></if></if> <!-- / end - happy extra modoption --> Modcp Name : If you've rename your modcp folder in your server, please change a href="modcp/ in this code. First condition : <if condition="in_array($post[usergroupid], array(2))"> Show link in menu of usergroupid specified. Don't enter admin and mod ID. If you enter "2", ban link appear in the dropdown menu of Members. Second condition : <if condition="in_array($bbuserinfo['usergroupid'], array(6,7))"> In this example, only admins and moderators are able to view ban link. Pleaser specify usergroup ID who can vien ban link. v1 ** Remove ** Please click INSTALL if you like this mod. Enjoy ! Edit by Lynne: 2009-12-12 - The comment line in the code was incorrect - it showed --!> at the end of the comment line and was supposed to be -->. I corrected that in the code above. Screenshots
Show Your Support
|
Comments |
#52
|
||||
|
||||
This code looks a bit better if you want it to match the rest of your drop down menu.
HTML Code:
<if condition="$show['admincplink']"> <tr> <td class="thead">Staff Options</td> </tr> <tr><td class="vbmenu_option"><a href="misc.php?$session[sessionurl]do=spamcleanconfirm&u=$post[userid]">$vbphrase[spammer_ban_member]</a></td></tr> <tr><td class="vbmenu_option"><span onmouseover="this.style.textDecoration='underline'"; onmouseout="this.style.textDecoration='none'"; onClick="window.open('modcp/banning.php?do=banuser&userid=$post[userid]','ban','width=500,height=350,scrollbars=yes')">Ban $post[username]</span></td></tr> <tr><td class="vbmenu_option"><span onmouseover="this.style.textDecoration='underline'"; onmouseout="this.style.textDecoration='none'"; onClick="window.open('modcp/banning.php?do=liftban&userid=$post[userid]','ban','width=500,height=350,scrollbars=yes')">Lift $post[username]'s Ban</span></td></tr> <tr><td class="vbmenu_option"><span onmouseover="this.style.textDecoration='underline'"; onmouseout="this.style.textDecoration='none'"; onClick="window.open('modcp/user.php?do=editsig&userid=$post[userid]','edit','width=500,height=350,scrollbars=yes')">Edit $post[username]'s Signature </span></td></tr> <tr><td class="vbmenu_option"><span onmouseover="this.style.textDecoration='underline'"; onmouseout="this.style.textDecoration='none'"; onClick="window.open('modcp/user.php?do=avatar&userid=$post[userid]','edit','width=500,height=350,scrollbars=yes')">Edit $post[username]'s Avatar</span></td></tr> <tr><td class="vbmenu_option"><span onmouseover="this.style.textDecoration='underline'"; onmouseout="this.style.textDecoration='none'"; onClick="window.open('modcp/user.php?do=profilepic&userid=$post[userid]','edit','width=500,height=350,scrollbars=yes')">Edit $post[username]'s Profilepic</span></td></tr> <tr><td class="vbmenu_option">$post[username]'s IP Address: $post[ip]</td></tr> </if> |
#53
|
|||
|
|||
Thanks.
I changed two lines so that the lift ban link does not show for someone who is not banned and vica versa so that the ban link does not show for a banned member: Code:
<if condition="$post[usergroupid]== 2"> <tr><td class="vbmenu_option"><span onmouseover="this.style.textDecoration='underline'"; onmouseout="this.style.textDecoration='none'"; onClick="window.open('modcp/banning.php?do=banuser&userid=$post[userid]','ban','width=500,height=350,scrollbars=yes')">Ban $post[username]</span></td></tr> </if> <if condition="$post[usergroupid]== 8"> <tr><td class="vbmenu_option"><span onmouseover="this.style.textDecoration='underline'"; onmouseout="this.style.textDecoration='none'"; onClick="window.open('modcp/banning.php?do=liftban&userid=$post[userid]','ban','width=500,height=350,scrollbars=yes')">Lift $post[username]'s Ban</span></td></tr> </if> |
#54
|
||||
|
||||
Quote:
Change this: HTML Code:
<if condition="$post[usergroupid]== 2"> <tr><td class="vbmenu_option"><span onmouseover="this.style.textDecoration='underline'"; onmouseout="this.style.textDecoration='none'"; onClick="window.open('modcp/banning.php?do=banuser&userid=$post[userid]','ban','width=500,height=350,scrollbars=yes')">Ban $post[username]</span></td></tr> </if> HTML Code:
<if condition="$post[usergroupid]!= 8"> <tr><td class="vbmenu_option"><span onmouseover="this.style.textDecoration='underline'"; onmouseout="this.style.textDecoration='none'"; onClick="window.open('modcp/banning.php?do=banuser&userid=$post[userid]','ban','width=500,height=350,scrollbars=yes')">Ban $post[username]</span></td></tr> |
#55
|
|||
|
|||
^ Thanks, did not think of that since I only have default usergroups.
|
#56
|
||||
|
||||
Installed without issue. Thank you!
|
#57
|
|||
|
|||
Used on vB3, but is there any update or similar mod for vB4 ?
|
#58
|
|||
|
|||
vB4 Bump =]
|
#59
|
|||
|
|||
I've taken the liberty and ported it to 4.0. The IP Address feature may or may not work. I had to change it a bit due to {vb:raw variable} not being possible to use with conditionals.
4.0 Standards Find in memberaction_dropdown: Code:
<vb:if condition="$show['emaillink']"> <li class="right"> <img src="{vb:stylevar imgdir_siteicons}/email.png" alt="" /> <a href="sendmessage.php?{vb:raw session.sessionurl}do=mailmember&u={vb:raw memberinfo.userid}" rel='nofollow'> {vb:rawphrase send_email} </a> </li> </vb:if> Code:
<vb:if condition="in_array($bbuserinfo['usergroupid'], array(6,7))"> <li class="left"> <br /> <b> STAFF OPTIONS</b>: </li> </vb:if> <vb:if condition="in_array($bbuserinfo['usergroupid'], array(6,7))"> <li class="left"> <img src="{vb:stylevar imgdir_siteicons}/profile.png" alt="" /> <a href="#" onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/banning.php?do=banuser&userid={vb:raw memberinfo.userid}','ban','width=500,height=350,scrollbars=yes')"><strong>Ban {vb:raw memberinfo.username}</strong></a> </li> </vb:if> <vb:if condition="in_array($bbuserinfo['usergroupid'], array(6,7))"> <li class="right"> <img src="{vb:stylevar imgdir_siteicons}/profile.png" alt="" /> <a href="#" onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/banning.php?do=liftban&userid={vb:raw memberinfo.userid}','ban','width=500,height=350,scrollbars=yes')"><strong>Unban {vb:raw memberinfo.username}</strong></a> </li> </vb:if> <vb:if condition="in_array($bbuserinfo['usergroupid'], array(6,7))"> <li class="left"> <img src="{vb:stylevar imgdir_siteicons}/profile.png" alt="" /> <a href="#" onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/user.php?do=editsig&userid={vb:raw memberinfo.userid}','ban','width=500,height=350,scrollbars=yes')"><strong>Edit Signature</strong></a> </li> </vb:if> <vb:if condition="in_array($bbuserinfo['usergroupid'], array(6,7))"> <li class="right"> <img src="{vb:stylevar imgdir_siteicons}/profile.png" alt="" /> <a href="#" onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/user.php?do=avatar&userid={vb:raw memberinfo.userid}','ban','width=500,height=350,scrollbars=yes')"><strong>Edit Avatar</strong></a> </li> </vb:if> <vb:if condition="in_array($bbuserinfo['usergroupid'], array(6,7))"> <li class="left"> <img src="{vb:stylevar imgdir_siteicons}/profile.png" alt="" /> <a href="#" onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/user.php?do=profilepic&userid={vb:raw memberinfo.userid}','ban','width=500,height=350,scrollbars=yes')"><strong>Edit Profile Pic</strong></a> </li> </vb:if> <vb:if condition="in_array($bbuserinfo['usergroupid'], array(6,7))"> <li class="right"> <img src="{vb:stylevar imgdir_siteicons}/profile.png" alt="" /> <a href="#" onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/user.php?do=doips&userid={vb:raw memberinfo.userid}&hash=82d83792b7bfa9c66c304d784b8f1700','ban','width=500,height=350,scrollbars=yes')"><strong>IP Address</strong></a> </li> </vb:if> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|