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

Reply
 
Thread Tools
Simple Staff Shield Details »»
Simple Staff Shield
Version: 1.00, by private_ale private_ale is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.7.x Rating:
Released: 01-24-2009 Last Update: Never Installs: 21
Template Edits
Re-useable Code Code Changes Additional Files  
No support by the author.

Simple Staff Shield
<:-----------------------:>

Make your staff stand out!
Simple Staff Shield adds a small 16x16 golden shield to your staff's postbit.
Simple Staff Shield helps bring authority to you and your staff like a shield does to a real life police officer!

For Postbit Legacy (vertical) Users:
Open Template:
Code:
postbit_legacy
Find:
Code:
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
Replace with:
Code:
<if condition="is_member_of($post, 5) OR is_member_of($post, 6)"><table cellpadding="0" cellspacing="0" border="0"><tr><td><a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a></td><td valign="middle"><img src="images/icons/shield.png" alt="User is a ##YOUR FORUM## Moderator" border="0" /></td></tr></table><else /><a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a></if>
For Postbit (horizontal) Users:
Open Template:
Code:
postbit
Find:
Code:
<if condition="$show['infractionlink']"><a href="infraction.php?$session[sessionurl]do=report&amp;p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/infraction.gif" alt="<phrase 1="$post[username]">$vbphrase[add_infraction_for_x]</phrase>" border="0" /></a> &nbsp;</if>
Add BEFORE:
Code:
            <if condition="is_member_of($post, 5) OR is_member_of($post, 6)"><img class="inlineimg" src="images/icons/shield.png" alt="User is a ##YOUR FORUM## Moderator" border="0" /> &nbsp;</if>
Additional Instructions:
  • Upload the "shield.png" icon to your images/icons folder
  • Change ##YOUR FORUM## to your forum's name. (only one instance per postbit)
FAQ's:
  • How can I add/remove groups that this gets assigned to?
    • In:
      Code:
      <if condition="is_member_of($post, 5) OR is_member_of($post, 6)">
      add or remove the
      Code:
      OR is_member_of($post, X)
      where X is the usergroup number.
Things to Note:
The current usergroups this is assigned to are 5 and 6 which are Super Moderators and Administrators. You can add or remove usergroups with the instructions above.

Show Your Support

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

Comments
  #2  
Old 01-25-2009, 05:03 AM
private_ale's Avatar
private_ale private_ale is offline
 
Join Date: Dec 2007
Location: New Jersey
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Although I included the shield in the first post, it is small against the screenshots, so in case anyone misses it I will include it again here.
Reply With Quote
  #3  
Old 01-25-2009, 06:06 AM
subzero06 subzero06 is offline
 
Join Date: Dec 2006
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

awesome, thanks
Reply With Quote
  #4  
Old 01-25-2009, 11:14 AM
Hugo Holbling Hugo Holbling is offline
 
Join Date: Sep 2007
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I amended this slightly to separate the icon from the javascript that opens the drop-down menu when you click on a username, and to make the icon link to my staff page (staff.php). I also added a second icon for site supporters, this time linking to the subscriptions page (payments.php). There's a not-condition included because I only want one icon to display but you could remove this. Here is the code I used, where 28 is my usergroup for subscribers and the icons were uploaded to my images/misc folder:

Code:
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
				<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
				<else />
				$post[musername]
				</if>
<if condition="is_member_of($post, 5,6,7)"><a href="staff.php"><img src="images/misc/shield.png" alt="Staff member" border="0" /></a></if>
<if condition="is_member_of($post, 28) AND !is_member_of($post, 5,6,7)"><a href="payments.php"><img src="images/misc/award_star_gold_3.png" alt="Site supporter" border="0" /></a></if>
			</div>
I hope this is useful.
Reply With Quote
  #5  
Old 01-25-2009, 04:56 PM
adhmwagde adhmwagde is offline
 
Join Date: Sep 2006
Location: Egypt
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice i like it < installed > but why i can't download in attach ?

in the posts attach not yours
Reply With Quote
  #6  
Old 01-25-2009, 08:13 PM
Sweeks Sweeks is offline
 
Join Date: Jul 2008
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Hugo Holbling View Post
I amended this slightly to separate the icon from the javascript that opens the drop-down menu when you click on a username, and to make the icon link to my staff page (staff.php). I also added a second icon for site supporters, this time linking to the subscriptions page (payments.php). There's a not-condition included because I only want one icon to display but you could remove this. Here is the code I used, where 28 is my usergroup for subscribers and the icons were uploaded to my images/misc folder:

Code:
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
				<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
				<else />
				$post[musername]
				</if>
<if condition="is_member_of($post, 5,6,7)"><a href="staff.php"><img src="images/misc/shield.png" alt="Staff member" border="0" /></a></if>
<if condition="is_member_of($post, 28) AND !is_member_of($post, 5,6,7)"><a href="payments.php"><img src="images/misc/award_star_gold_3.png" alt="Site supporter" border="0" /></a></if>
			</div>
I hope this is useful.
Even using your code it still pops up with the popup for me
________
SEX TUB
Reply With Quote
  #7  
Old 01-25-2009, 09:34 PM
echo2kk5 echo2kk5 is offline
 
Join Date: Dec 2004
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Working great for me...thanks! :up:
Reply With Quote
  #8  
Old 01-26-2009, 02:03 PM
Hugo Holbling Hugo Holbling is offline
 
Join Date: Sep 2007
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Sweeks View Post
Even using your code it still pops up with the popup for me
You're right - sorry about that. I'll see if I can fix the code.
Reply With Quote
  #9  
Old 01-26-2009, 10:13 PM
Hugo Holbling Hugo Holbling is offline
 
Join Date: Sep 2007
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I played around with this idea and decided to use several icons for various functions/features and to place them all in a box below the avatar. Here's the code, where the icons are all from the famfamfam silk collection and the usergroup numbers may differ from yours. I also have a "postinfo" class to box the icons and I've moved a lot of the default or additional postbit information into the icons area, such as my photoplog images, blogs, staff page and subscriptions. Hopefully it makes sense.

Code:
<div class="postinfo" align="left" valign="middle">Info:&nbsp;
<if condition="is_member_of($post, 5,6,7)"><a href="staff.php"><img src="images/misc/usercp_icons/shield.png" alt="Staff member" border="0" /></a></if>
<if condition="is_member_of($post, 2,5,6,7)"><if condition="$show['lastactivity']"><img src="images/misc/usercp_icons/user_active.png" alt="Active member - $vbphrase[last_activity]: $post[lastactivitydate] at $post[lastactivitytime]" border="0" /></if></if>
<if condition="is_member_of($post, 29)"><if condition="$show['lastactivity']"><img src="images/misc/usercp_icons/user_inactive.png" alt="Inactive member - $vbphrase[last_activity]: $post[lastactivitydate] at $post[lastactivitytime]" border="0" /></if></if>
<a href="search.php?$session[sessionurl]do=finduser&amp;u=$post[userid]"><img src="images/misc/usercp_icons/page_white_magnify.png" alt="$vbphrase[posts]: $post[posts]" border="0" /></a>
<a href="search.php?$session[sessionurl]do=finduser&amp;u=$post[userid]&amp;starteronly=1" rel="nofollow"><img src="images/misc/usercp_icons/folder_magnify.png" alt="$vbphrase[threads]: $post[threads]" border="0" /></a>
<if condition="is_member_of($post, 28) AND is_member_of($post, 34)"><a href="payments.php"><img src="images/misc/usercp_icons/award_star_gold_3.png" alt="Site supporter and contributor" border="0" /></a></if>
<if condition="is_member_of($post, 34) AND !is_member_of($post, 28)"><a href="http://www.galilean-library.org/index.php"><img src="images/misc/usercp_icons/award_star_silver_3.png" alt="Site contributor" border="0" /></a></if>
<if condition="is_member_of($post, 28) AND !is_member_of($post, 34)"><a href="http://www.galilean-library.org/payments.php"><img src="images/misc/usercp_icons/award_star_bronze_3.png" alt="Site supporter" border="0" /></a></if>
<if condition="$post[photoplog_filecount]"><a href="/gallery/index.php?$session[sessionurl]u=$post[userid]"><img src="images/misc/usercp_icons/photos.png" alt="Gallery images: $post[photoplog_filecount]" border="0" /></a></if>
<if condition="is_member_of($post, 35)"><a href="blog.php?$session[sessionurl]u=$post[userid]"><img src="images/misc/usercp_icons/user_comment.png" alt="$vbphrase[blog_entries]: $post[entries]" border="0" /></a></if>
</div>
A screenshot is attached.
Reply With Quote
  #10  
Old 01-26-2009, 11:29 PM
soundbarrierpro soundbarrierpro is offline
 
Join Date: Nov 2007
Posts: 767
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*INSTALLED*

Thank you for the neat fix.
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 08:46 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.04286 seconds
  • Memory Usage 2,318KB
  • Queries Executed 23 (?)
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
  • (11)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete