The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
help with code
I use this code below
Code:
<vb:if condition="is_member_of($post, 17)" > <img src="../images/premium.png"></img> <vb:elseif condition="is_member_of($post, 11)" /> <img src="../images/sponsor.png"></img> <vb:elseif condition="is_member_of($post, 18)" /> <img src="../images/new-member.png"></img> <vb:elseif condition="is_member_of($post, 5)" /> <img src="../images/admin.png"></img> <vb:elseif condition="is_member_of($post, 7)" /> <img src="../images/advisor.png"></img> <vb:elseif condition="is_member_of($post, 23)" /> <img src="../images/VIP.png"></img> <vb:else /> <img src="../images/member.png"></img> </vb:if> <vb:if condition="$bbuserinfo['userid'] == x> x being the members userid but it seems to search userid and if theres a member with this number returns a true value thus displaying the image to everyone rather than to his profile only. any help, pls? |
#2
|
|||
|
|||
I think you want to check $post['userid'], and if you want it to be instead of the group images for certain users then you'll want to make it part of the existing if/elseif statement, but first. So something like this:
Code:
<vb:if condition="$post[userid] == X" > <img src="../images/user_x.png"></img> <vb:elseif condition="is_member_of($post, 17)" /> <img src="../images/premium.png"></img> <vb:elseif condition="is_member_of($post, 11)" /> <img src="../images/sponsor.png"></img> <vb:elseif condition="is_member_of($post, 18)" /> <img src="../images/new-member.png"></img> <vb:elseif condition="is_member_of($post, 5)" /> <img src="../images/admin.png"></img> <vb:elseif condition="is_member_of($post, 7)" /> <img src="../images/advisor.png"></img> <vb:elseif condition="is_member_of($post, 23)" /> <img src="../images/VIP.png"></img> <vb:else /> <img src="../images/member.png"></img> </vb:if> |
#3
|
|||
|
|||
many thanks indeed
All sorted! :up: |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|