vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   Adding an Icon next to Username (https://vborg.vbsupport.ru/showthread.php?t=293504)

edytwinky 01-02-2013 06:11 AM

Adding an Icon next to Username
 
Does anybody know how to add an icon next to sombody's username if they are a member of a certain usergroup?

It used to be able to be done on vb3 I believe with some coding but I forget how.

What I would like to do is add a hat icon next to users who have a paid subscription to my site.

Thanks in advance all!

WorldCraft 01-02-2013 06:31 AM

If you put your paid users into their own usergroup, go to the Usergroup Manager and edit the usergroup. In Username HTML Markup, in the left box place your <img src="" /> html in that box and save. If you are setting this as an additional usergroup and not primary, you will need to edit each user's profile in the AdminCP and set the usergroup in the 'Display Usergroup' drop menu so the image will appear. This will make the image appear virtually everywhere where the user's name appears.

If you want it to show on posts only you can use this condition in your postbit or postbit_legacy template (depending on which one you are using) instead.

Find: {vb:raw memberaction_dropdown} and one line above this place:

HTML Code:

<vb:if condition="$post['usergroupid'] == X"><img src="" /></vb:if>
Replace X with the usergroup id of the paid users and fill in with your image.


All times are GMT. The time now is 09:12 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.00947 seconds
  • Memory Usage 1,709KB
  • 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
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete