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)

GlamRockTalk 01-28-2009 02:01 PM

Quote:

Originally Posted by Hugo Holbling (Post 1725655)
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! :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

Quote:

Originally Posted by K-Bar (Post 1728521)
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

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.

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 ?

rrudeboy 06-12-2009 11:41 AM

Quote:

Originally Posted by GeorgeB85 (Post 1820988)
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:

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 ? :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

Quote:

Originally Posted by rrudeboy (Post 1828522)
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 ? :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
Quote:

OR is_member_of($post, 19)
added, which is why it is not showing up.

rrudeboy 06-13-2009 01:27 AM

Quote:

Originally Posted by GeorgeB85 (Post 1828714)
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.


All times are GMT. The time now is 08:21 PM.

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.01168 seconds
  • Memory Usage 1,760KB
  • 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
  • (5)bbcode_code_printable
  • (6)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