The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Display icon if user is n a specific user group
Can anyone help with a bit of code. I would like to add an icon in the postbit template next to a users post if the poster is in a specific user group.
Is this possible? The closest I've got so far is: Code:
<vb:if condition="is_member_of($bbuserinfo, 6)">Icon here</vb:if> |
#2
|
||||
|
||||
Try:
Code:
<vb:if condition="$post['usergroupid'] == 6">Icon</vb:if> |
#3
|
||||
|
||||
Or, how about just using Ranks?
|
#4
|
|||
|
|||
Quote:
I don't really want to use the user ranks as I want to expand this to more than just a line under the username, to include other features later down the line - but the thought did cross my mind --------------- Added [DATE]1333213891[/DATE] at [TIME]1333213891[/TIME] --------------- Ah, I think I found it! Code:
<vb:if condition="is_member_of($post,6)">Icon</vb:if> |
#5
|
||||
|
||||
For additional usergroups try $post['membergroupids']
|
#6
|
|||
|
|||
Both of those work - is either better on performance etc?
|
#7
|
||||
|
||||
I don't think either would have that much effect on performance. But your way would be tidier since that searches both the normal usergroups and additional usergroups =]
|
#8
|
|||
|
|||
Excellent, thank you very much for your help
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|