View Full Version : Miscellaneous Hacks - Simple Staff Shield
private_ale
01-24-2009, 10:00 PM
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:
postbit_legacyFind:
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>Replace with:
<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:
postbitFind:
<if condition="$show['infractionlink']"><a href="infraction.php?$session[sessionurl]do=report&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> </if>Add BEFORE:
<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" /> </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:<if condition="is_member_of($post, 5) OR is_member_of($post, 6)"> add or remove the 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:
<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
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:
<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 (http://www.++++tube.com/)
echo2kk5
01-25-2009, 09:34 PM
Working great for me...thanks! :up:
Hugo Holbling
01-26-2009, 02:03 PM
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.
<div class="postinfo" align="left" valign="middle">Info:
<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&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&u=$post[userid]&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.
GlamRockTalk
01-28-2009, 02:01 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.
<div class="postinfo" align="left" valign="middle">Info:
<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&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&u=$post[userid]&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! :D
Might have to 'borrow' this code for my site ;)
Thanks for sharing!
K-Bar
01-29-2009, 10:17 PM
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
private_ale
01-29-2009, 11:45 PM
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
<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
GeorgeB85
05-31-2009, 11:41 PM
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....
rrudeboy
06-12-2009, 11:40 AM
figured out how to do 2 shields, unfortunately... clicking on them does not yet what i want.
<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>
</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 & 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 ?
rrudeboy
06-12-2009, 11:41 AM
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...
rrudeboy
06-12-2009, 07:35 PM
using this 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>
</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 & 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 ? :confused:
rrudeboy
06-13-2009, 01:17 AM
nobody ? i've been staring at the code for 4-5 hours with out any luck.....
GeorgeB85
06-13-2009, 01:24 AM
using this 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>
</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 & 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 ? :confused:
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 OR is_member_of($post, 19) added, which is why it is not showing up.
rrudeboy
06-13-2009, 01:27 AM
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.
GeorgeB85
06-13-2009, 01:27 AM
<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>
</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 & 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.
GeorgeB85
06-13-2009, 01:30 AM
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.
rrudeboy
06-13-2009, 01:48 AM
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..
GeorgeB85
06-13-2009, 04:10 AM
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.
rrudeboy
06-15-2009, 02:05 AM
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.
rrudeboy
06-17-2009, 05:27 PM
nevermind, i switched to using YAAS.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.