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
  #52  
Old 12-23-2009, 01:05 AM
Warlord's Avatar
Warlord Warlord is offline
 
Join Date: Jan 2002
Location: TN, USA
Posts: 668
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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&amp;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>
Reply With Quote
  #53  
Old 12-24-2009, 12:28 AM
choccyclaire choccyclaire is offline
 
Join Date: Jan 2008
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #54  
Old 12-26-2009, 02:52 AM
Warlord's Avatar
Warlord Warlord is offline
 
Join Date: Jan 2002
Location: TN, USA
Posts: 668
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by choccyclaire View Post
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>
Good idea, not sure why I didn't think of that. One problem though, any users that aren't a member of the usergroup id 2 (Registered Users) or usergroup id 8 (Banned Users) will have neither option appear. If you want to include the ban option to other usergroups (like disgruntled staff members etc).

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>
To this:

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>
Now one of the two options will appear for everyone.
Reply With Quote
  #55  
Old 01-06-2010, 03:57 PM
choccyclaire choccyclaire is offline
 
Join Date: Jan 2008
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^ Thanks, did not think of that since I only have default usergroups.
Reply With Quote
  #56  
Old 01-08-2010, 02:22 PM
chrisvonc's Avatar
chrisvonc chrisvonc is offline
 
Join Date: Apr 2002
Location: Austin, TX
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed without issue. Thank you!
Reply With Quote
  #57  
Old 07-06-2010, 12:40 PM
HolyKiller HolyKiller is offline
 
Join Date: Dec 2006
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Used on vB3, but is there any update or similar mod for vB4 ?
Reply With Quote
  #58  
Old 11-30-2010, 04:24 PM
TheInsaneManiac TheInsaneManiac is offline
 
Join Date: Feb 2008
Posts: 1,360
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vB4 Bump =]
Reply With Quote
  #59  
Old 12-01-2010, 04:48 AM
TheInsaneManiac TheInsaneManiac is offline
 
Join Date: Feb 2008
Posts: 1,360
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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&amp;u={vb:raw memberinfo.userid}" rel='nofollow'>
				{vb:rawphrase send_email}
			</a>
</li>
		</vb:if>
After Add:
Code:
		<vb:if condition="in_array($bbuserinfo['usergroupid'], array(6,7))">
		<li class="left">
<br />
<b>&nbsp;&nbsp;&nbsp;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>
Attached Images
File Type: jpg Extra Options.jpg (50.1 KB, 0 views)
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:52 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.08323 seconds
  • Memory Usage 2,359KB
  • Queries Executed 24 (?)
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
  • (5)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
  • (2)pagenav_pagelink
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (2)postbit_attachment
  • (9)postbit_onlinestatus
  • (9)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