vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=229)
-   -   Miscellaneous Hacks - Simple Staff Shield (https://vborg.vbsupport.ru/showthread.php?t=203019)

private_ale 01-24-2009 10:00 PM

Simple Staff Shield
 
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.

private_ale 01-25-2009 05:03 AM

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.

subzero06 01-25-2009 06:06 AM

awesome, thanks

Hugo Holbling 01-25-2009 11:14 AM

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. :)

adhmwagde 01-25-2009 04:56 PM

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

in the posts attach not yours

Sweeks 01-25-2009 08:13 PM

Quote:

Originally Posted by Hugo Holbling (Post 1724125)
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 :confused:
________
SEX TUB

echo2kk5 01-25-2009 09:34 PM

Working great for me...thanks! :up:

Hugo Holbling 01-26-2009 02:03 PM

Quote:

Originally Posted by Sweeks (Post 1724577)
Even using your code it still pops up with the popup for me :confused:

You're right - sorry about that. I'll see if I can fix the code.

Hugo Holbling 01-26-2009 10:13 PM

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.

soundbarrierpro 01-26-2009 11:29 PM

*INSTALLED*

Thank you for the neat fix.


All times are GMT. The time now is 01:29 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01343 seconds
  • Memory Usage 1,762KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (11)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete