Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Template Modifications

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
  #12  
Old 01-28-2009, 02:01 PM
GlamRockTalk's Avatar
GlamRockTalk GlamRockTalk is offline
 
Join Date: Nov 2008
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Hugo Holbling View Post
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.
Nice job!

Might have to 'borrow' this code for my site

Thanks for sharing!
Reply With Quote
  #13  
Old 01-29-2009, 10:17 PM
K-Bar K-Bar is offline
 
Join Date: Oct 2005
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Questuion:

Does this show up next to their user name on the index page as well? That is what I am looking to do so that I can distinguish the difference between these folks who are in a different user group.

Thanks

K-bar
Reply With Quote
  #14  
Old 01-29-2009, 11:45 PM
private_ale's Avatar
private_ale private_ale is offline
 
Join Date: Dec 2007
Location: New Jersey
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by K-Bar View Post
Questuion:

Does this show up next to their user name on the index page as well? That is what I am looking to do so that I can distinguish the difference between these folks who are in a different user group.

Thanks

K-bar

No, just in the postbit.
I suppose what you could do for what you want is to simple paste
Code:
<img class="inlineimg" src="images/icons/shield.png" alt="User is a ##YOUR FORUM## Moderator" border="0" />
into the second box of the "HTML Usergroup markup" in the ACP > Usergroup manager
Reply With Quote
  #15  
Old 05-31-2009, 11:41 PM
GeorgeB85 GeorgeB85 is offline
 
Join Date: Nov 2008
Posts: 362
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

O have done this, but where do I get the image at? It is not attached, and I see a few posts that shows attached images, but I cant do anything with them....
Reply With Quote
  #16  
Old 06-12-2009, 11:40 AM
rrudeboy's Avatar
rrudeboy rrudeboy is offline
 
Join Date: May 2009
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

figured out how to do 2 shields, unfortunately... clicking on them does not yet what i want.

Code:
<if condition="is_member_of($post, 6) OR is_member_of($post, 7)"><table cellpadding="0" cellspacing="0" border="0"><tr><td><a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a> 
&nbsp;&nbsp;</td><td valign="bottom"><img src="images/icons/shield.png" alt="User is a EB.NET staff member" border="0" /></a>

<if condition="is_member_of($post, 6) OR is_member_of($post, 7)"><a href="staff.php"><img src="images/icons/shield_c.png" alt="Site supporter &amp; contributor" border="0" /></a></if>
</td></tr></table><else />

<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a></if>

				<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
				<else />
				$post[musername]
				</if>
			</div>
anyone ?
Reply With Quote
  #17  
Old 06-12-2009, 11:41 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
O have done this, but where do I get the image at? It is not attached, and I see a few posts that shows attached images, but I cant do anything with them....
right click and save the image to your pc, then upload to the directory you want them in...
Reply With Quote
  #18  
Old 06-12-2009, 07:35 PM
rrudeboy's Avatar
rrudeboy rrudeboy is offline
 
Join Date: May 2009
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

using this code:

Code:
<if condition="is_member_of($post, 6) OR is_member_of($post, 7)"><table cellpadding="0" cellspacing="0" border="0"><tr><td><a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a> 
&nbsp;&nbsp;</td><td valign="bottom"><img src="images/icons/shield.png" alt="User is a EB.NET staff member" border="0" /></a>

<if condition="is_member_of($post, 6) OR is_member_of($post, 19)"><a href="staff.php"><img src="images/icons/shield_c.png" alt="Site supporter &amp; contributor" border="0" /></a></if>
</td></tr></table><else />

<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a></if>

				<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
				<else />
				$post[musername]
				</if>
			</div>
created new usergroup (id:19), added some users to that group, as their secondary group but the shield (shield_c.png is not showing, except for the users in group 6 & 7 it does show both shields..)

what's wrong with my code ?
Reply With Quote
  #19  
Old 06-13-2009, 01:17 AM
rrudeboy's Avatar
rrudeboy rrudeboy is offline
 
Join Date: May 2009
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nobody ? i've been staring at the code for 4-5 hours with out any luck.....
Reply With Quote
  #20  
Old 06-13-2009, 01:24 AM
GeorgeB85 GeorgeB85 is offline
 
Join Date: Nov 2008
Posts: 362
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by rrudeboy View Post
using this code:

Code:
<if condition="is_member_of($post, 6) OR is_member_of($post, 7)"><table cellpadding="0" cellspacing="0" border="0"><tr><td><a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a> 
&nbsp;&nbsp;</td><td valign="bottom"><img src="images/icons/shield.png" alt="User is a EB.NET staff member" border="0" /></a>

<if condition="is_member_of($post, 6) OR is_member_of($post, 19)"><a href="staff.php"><img src="images/icons/shield_c.png" alt="Site supporter &amp; contributor" border="0" /></a></if>
</td></tr></table><else />

<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a></if>

				<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
				<else />
				$post[musername]
				</if>
			</div>
created new usergroup (id:19), added some users to that group, as their secondary group but the shield (shield_c.png is not showing, except for the users in group 6 & 7 it does show both shields..)

what's wrong with my code ?
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
Quote:
OR is_member_of($post, 19)
added, which is why it is not showing up.
Reply With Quote
  #21  
Old 06-13-2009, 01:27 AM
GeorgeB85 GeorgeB85 is offline
 
Join Date: Nov 2008
Posts: 362
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

HTML Code:
<if condition="is_member_of($post, 6) OR is_member_of($post, 7) OR is_member_of($post, 19)"><table cellpadding="0" cellspacing="0" border="0"><tr><td><a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a> 
&nbsp;&nbsp;</td><td valign="bottom"><img src="images/icons/shield.png" alt="User is a EB.NET staff member" border="0" /></a>

<if condition="is_member_of($post, 6) OR is_member_of($post, 19)"><a href="staff.php"><img src="images/icons/shield_c.png" alt="Site supporter &amp; contributor" border="0" /></a></if>
</td></tr></table><else />

<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a></if>

				<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
				<else />
				$post[musername]
				</if>
			</div>
Use the code in this post and it should give you what you want. This is how I have mine set up, and it works.
Reply With Quote
Reply

Thread Tools

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 02:06 AM.


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.04829 seconds
  • Memory Usage 2,338KB
  • Queries Executed 25 (?)
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
  • (13)bbcode_code
  • (1)bbcode_html
  • (5)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
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete