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
  #22  
Old 08-09-2009, 07:03 PM
Gersfan Gersfan is offline
 
Join Date: Dec 2007
Posts: 150
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by flexbuffchest View Post
i seem to be having a problem with this. i get the extra mod options to show up for me, but all the users on my forum complain that they can only see the first post in any thread after i install this?
X3!

I've just found out this problem, had it installed for 2 days,!
Reply With Quote
  #23  
Old 08-22-2009, 12:59 AM
CEO254 CEO254 is offline
 
Join Date: Feb 2008
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When I use this Mod, the Internet Explorer users can only see the first 2 posts in a thread

Please fix this.....I would love to use this mod
Reply With Quote
  #24  
Old 08-22-2009, 11:34 PM
eXoOutsider eXoOutsider is offline
 
Join Date: May 2008
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

getting same issue
Reply With Quote
  #25  
Old 08-24-2009, 05:01 AM
Faizan Faizan is offline
 
Join Date: Mar 2008
Location: fullmaza.com
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice mod...
Reply With Quote
  #26  
Old 08-26-2009, 02:22 AM
Birched Birched is offline
 
Join Date: Sep 2007
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Same problem as above (threads cut off). Uninstalled for the time being.

EDIT: Fixed it, reinstalled. The problem is that the html comment tags are wrong: They should be <!-- COMMENT --> instead of <!-- COMMENT --!>; the rest of the page is getting commented out by the non-terminated tags (behaviour is probably browser dependent)

EDIT2: Also, those two conditionals (if... if...) can be made into one statement with an && in it
Reply With Quote
  #27  
Old 09-04-2009, 09:00 PM
CEO254 CEO254 is offline
 
Join Date: Feb 2008
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, got it to working

GREAT MOD!!!
Reply With Quote
  #28  
Old 09-05-2009, 12:30 AM
RTMdotORG RTMdotORG is offline
 
Join Date: Dec 2008
Posts: 282
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This didnt show up at all for me...
using 3.8.3
Reply With Quote
  #29  
Old 09-12-2009, 07:14 PM
HolyKiller HolyKiller is offline
 
Join Date: Dec 2006
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for mod, but there is a little problem in comment tag.
Like Birched said, comment tag in HTML is NOT <!-- blabla --!> but <!-- blabla -->.

So, remove the second ! or just copy/paste this:

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 -->

Anyway, i think, better to use 640*480 popup size instead of 500*300, so here is modifed code
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=640,height=480,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=640,height=480,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=640,height=480,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=640,height=480,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=640,height=480,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 -->
Enjoy
Reply With Quote
  #30  
Old 09-14-2009, 06:30 AM
lordi lordi is offline
 
Join Date: Dec 2005
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

HolyKiller thanks 100 times man

now it's working

But I will not Install it as the Coder didn't help us

Reply With Quote
  #31  
Old 09-15-2009, 09:49 PM
SᴩiDᴇЯ SᴩiDᴇЯ is offline
 
Join Date: Sep 2009
Location: Australia
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I put it directly after this code in postbit_legacy: is anything wrong in my code?
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>
I copy and pasted this:
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 -->
The extra modoption didn't show up
using 3.8.4
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 01:03 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.05693 seconds
  • Memory Usage 2,361KB
  • 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
  • (4)bbcode_code
  • (2)bbcode_html
  • (1)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
  • (4)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