Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Extra Modoptions into users posts (Ban Link, Edit Avatar, Edit sign,..) Details »»
Extra Modoptions into users posts (Ban Link, Edit Avatar, Edit sign,..)
Version: 1.00, by Sofia Sofia is offline
Developer Last Online: Aug 2012 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.8.x Rating:
Released: 05-23-2009 Last Update: Never Installs: 184
Re-useable Code Translations  
No support by the author.

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&amp;userlist=buddy&amp;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

File Type: png 1.png (59.3 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 09-20-2009, 05:41 AM
TheSupportForum TheSupportForum is offline
 
Join Date: Jan 2007
Posts: 1,158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the only reason why no ip would show in the post you want to ban the user from is very simple

there are many people who use a proxy to access the internet to hide there ip address
vbulletin does not pick up ip address behind some proxy ip address or private ip addresses

for example
i work for a companie that use
equinoxsolutions as there service provider, however to access there internet serivce you are required to input an proxy address in your broswer settings

so if your not seing an ip address related to a post, then this is the reason

if its a different issue please feel free to ask
Reply With Quote
  #43  
Old 09-20-2009, 08:15 AM
Dingo14 Dingo14 is offline
 
Join Date: Dec 2007
Posts: 182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorted this thanks
Reply With Quote
  #44  
Old 10-26-2009, 04:26 AM
need2fart need2fart is offline
 
Join Date: Aug 2009
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you so much Sofia this is the best mod and makes me feel like forum moderating is so easy. =)

Thank you for making my life so much easier!
Reply With Quote
  #45  
Old 11-09-2009, 08:08 AM
bluej bluej is offline
 
Join Date: Jan 2007
Location: U.S.A.
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

not working for me either in 3.8.4

could it have something to do with this mod?
https://vborg.vbsupport.ru/showthread.php?t=207751
Reply With Quote
  #46  
Old 11-18-2009, 09:31 AM
Dr.Customs Dr.Customs is offline
 
Join Date: Nov 2009
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i enhanced this a little bit, its still all the same links
it will only show for admins, but u can add more if u want
and it has better english (no offence)

and i recomend to add it right after
Code:
<if condition="$post['userid'] AND $show['member']">
	<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_contacts]</phrase></a></td></tr>
	</if>


Code:
<if condition="$bbuserinfo[usergroupid] == 6">
<tr><td class="thead"><strong><u>Mod Option</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')">Ban: $post[username]</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')">Unban: $post[username]</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')">Edit $post[username]'s Signature</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')">Edit $post[username]'s Avatar</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')">Edit $post[username]'s Profilpic</span></td></tr>
<tr><td class="vbmenu_option">$post[username]'s IP-Adress: $post[ip]</td></tr></if>
Reply With Quote
  #47  
Old 11-20-2009, 02:39 AM
bluej bluej is offline
 
Join Date: Jan 2007
Location: U.S.A.
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dr.Customs View Post
i enhanced this a little bit, its still all the same links
it will only show for admins, but u can add more if u want
and it has better english (no offence)

and i recomend to add it right after
Code:
<if condition="$post['userid'] AND $show['member']">
	<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_contacts]</phrase></a></td></tr>
	</if>


Code:
<if condition="$bbuserinfo[usergroupid] == 6">
<tr><td class="thead"><strong><u>Mod Option</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')">Ban: $post[username]</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')">Unban: $post[username]</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')">Edit $post[username]'s Signature</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')">Edit $post[username]'s Avatar</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')">Edit $post[username]'s Profilpic</span></td></tr>
<tr><td class="vbmenu_option">$post[username]'s IP-Adress: $post[ip]</td></tr></if>
thanks so much this worked great
Reply With Quote
  #48  
Old 11-23-2009, 11:38 PM
Fastbird's Avatar
Fastbird Fastbird is offline
 
Join Date: Aug 2005
Posts: 135
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sofia, can you please update your install instructions with the correct info. I installed this today after the fix had been discovered and had been experiencing similar issues. It would be wonderful for anyone coming in after the fixed code to have it correctly.
Reply With Quote
  #49  
Old 12-02-2009, 02:31 AM
delfost delfost is offline
 
Join Date: Aug 2007
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how i can add more usergroupid ???
Thanks


Quote:
Originally Posted by Dr.Customs View Post
i enhanced this a little bit, its still all the same links
it will only show for admins, but u can add more if u want
and it has better english (no offence)

and i recomend to add it right after
Code:
<if condition="$post['userid'] AND $show['member']">
	<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_contacts]</phrase></a></td></tr>
	</if>


Code:
<if condition="$bbuserinfo[usergroupid] == 6">
<tr><td class="thead"><strong><u>Mod Option</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')">Ban: $post[username]</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')">Unban: $post[username]</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')">Edit $post[username]'s Signature</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')">Edit $post[username]'s Avatar</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')">Edit $post[username]'s Profilpic</span></td></tr>
<tr><td class="vbmenu_option">$post[username]'s IP-Adress: $post[ip]</td></tr></if>
Reply With Quote
  #50  
Old 12-02-2009, 03:30 AM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Replace this
PHP Code:
<if condition="$bbuserinfo[usergroupid] == 6"
with this and extend for as many usergroups as you wish
PHP Code:
<if condition="is_member_of($bbuserinfo,5,6,7)"
Reply With Quote
  #51  
Old 12-07-2009, 01:48 AM
delfost delfost is offline
 
Join Date: Aug 2007
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the answer and working in vbulletin 3.8.4 Patch Level 1

Code:
<!-- / Moderacion extra Comieza -->
<if condition="is_member_of($bbuserinfo,5,6)">  
<tr><td class="thead"><strong><u>Moderaci?n - Opciones</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=640,height=480,scrollbars=yes')">Ban: $post[username]</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=640,height=480,scrollbars=yes')">Un-Ban: $post[username]</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=640,height=480,scrollbars=yes')">Editar $post[username]'s Firma</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=640,height=480,scrollbars=yes')">Editar $post[username]'s Avatar</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=640,height=480,scrollbars=yes')">Editar $post[username]'s Foto Perfil</span></td></tr>
<tr><td class="vbmenu_option">$post[username]'s Direccion-IP: $post[ip]</td></tr></if>
<!-- / Moderacion extra Finaliza -->
Btw the code is in spanish
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:33 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05329 seconds
  • Memory Usage 2,374KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (7)bbcode_code
  • (2)bbcode_html
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete