The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Showing graphic if user=whatever
I have set up different membership levels on my forum. If someone gets to a more advanced membership level, they get added to an additional usergroup.
Is there any code that I can do that will show me a gif but only if they are a member of a certain group? It could be one of 4 different groups and the gif would change depending on which group they are in. Thanks, Jon |
#2
|
|||
|
|||
Jon-
I believe you can set an image to be displayed based on a user's usergroup using the "Ranks" system in the Admin control panelI don't use ranks, so I can't give you specific instructions. The thing that I am confused about from your post is, do you want these only to appear for you (the admin) or for everyone to see them? -don |
#3
|
|||
|
|||
The images are for everybody to see. The idea is that it will be a plaque showing the user level. So, in a typical thread, the first post might have, in the left column below where it says "Newly Registered User", an image saying Basic User. The next post in that thread might have something similar but with an image saying VIP Member, and so on.
These are basically plaques in the same area where the Avatars are, but showing user level. Anyone know how? |
#4
|
|||
|
|||
In a template you can use something like:
Code:
<vb:if condition="is_member_of($bbuserinfo, 4)"> <img src="group4.gif"> <vb:elseif condition="is_member_of($bbuserinfo, 5)" /> <img src="group5.gif"> <vb:elseif condition="is_member_of($bbuserinfo, 6)" /> <img src="group6.gif"> </vb:if> and of course you can extend that to as many as you want. And if you only want to specify a special image for certain groups, you could have a "catch-all" by ending with an "else", like: Code:
... <vb:elseif condition="is_member_of($bbuserinfo, 6)" /> <img src="group6.gif"> <vb:else /> <img src="others.gif"> </vb:if> |
#5
|
|||
|
|||
Thank you for your reply, although I think there has been a misunderstanding.
Essentially, I want this in a thread: Post #1 User: Dave12345, Level: Basic Member. Therefore, show "Basic Member" image badge below his name. Post #2 User: Jon-Doe, Level: Paid Member. Therefore, show "Paid Member" image badge below his name. Post #3 User: JulieB, Level: Basic Member. Therefore, show "Basic Member" image badge below his name. Post #4 User: MarkStone, Level: Administrator. Therefore, show "Administrator" image badge below his name. Is that a bit clearer? Is this possible? (You code helped me with something else I wanted to do though. ) |
#6
|
|||
|
|||
I think that code will work, but to use it in the postbit template you'd want to change $bbuserinfo to $post.
|
#7
|
|||
|
|||
Yes, you are right. Thanks for that distinction. Working now.
|
#8
|
||||
|
||||
I'd still think you'd want to do this through the ranks system, where each usergroup has its own images. This would allow for the images, but not require any custom code to be added, unless I'm missing something with what you are hoping to achieve as the built in ranks system would seem to offer what you're after.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|