View Full Version : Adding an Icon next to Username
edytwinky
01-02-2013, 05:11 AM
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, 05: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:
<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.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.