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
  #22  
Old 06-13-2009, 01:27 AM
rrudeboy's Avatar
rrudeboy rrudeboy is offline
 
Join Date: May 2009
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by GeorgeB85 View Post
take this part of the code OR is_member_of($post, 7) and copy it and paste it right next to it, and then change the 7 to 19 and it will work.

You just don't have this part added, which is why it is not showing up.
sorry, not understanding this.... you know i want (for now) a shield for admin/mod (which works) and a different shield for VIP's (which are in usergroup 19)

thanks.
Reply With Quote
  #23  
Old 06-13-2009, 01:30 AM
GeorgeB85 GeorgeB85 is offline
 
Join Date: Nov 2008
Posts: 362
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by rrudeboy View Post
sorry, not understanding this.... you know i want (for now) a shield for admin/mod (which works) and a different shield for VIP's (which are in usergroup 19)

thanks.

For a shield for VIPs, upload the image to the same directory that you did it for the "staff" shield, and edit the code to point to the VIP shield. However, I am not that gread with coding to say exactly how to do it, but I know that is the general process.
Reply With Quote
  #24  
Old 06-13-2009, 01:48 AM
rrudeboy's Avatar
rrudeboy rrudeboy is offline
 
Join Date: May 2009
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry.... it's not working

what's your forum, can i check it out how it looks ? when i put your code in everybody has both shields and the username appears twice..
Reply With Quote
  #25  
Old 06-13-2009, 04:10 AM
GeorgeB85 GeorgeB85 is offline
 
Join Date: Nov 2008
Posts: 362
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by rrudeboy View Post
sorry.... it's not working

what's your forum, can i check it out how it looks ? when i put your code in everybody has both shields and the username appears twice..

Well that isnt the code I used. I just took your code and modified it to include what you were missing. Unfortunately I am not good with coding (still learning) so I wouldnt begin to know the code to point to your vip shield.

My webmaster should know. I sent him a link to this thread.
Reply With Quote
  #26  
Old 06-15-2009, 02:05 AM
rrudeboy's Avatar
rrudeboy rrudeboy is offline
 
Join Date: May 2009
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks....

others are welcome to jump in, would like to get this working so i can move on to the next cool mod :}

c'mon folks.
Reply With Quote
  #27  
Old 06-17-2009, 05:27 PM
rrudeboy's Avatar
rrudeboy rrudeboy is offline
 
Join Date: May 2009
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nevermind, i switched to using YAAS.
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:20 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.04096 seconds
  • Memory Usage 2,274KB
  • Queries Executed 21 (?)
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
  • (8)bbcode_code
  • (3)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
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)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