The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to do an "if" on a usergroup
How do i get an image to show in the postbit of a user dependant on if they are associated with a usergroup?
Meaning If user is in usergroup 1 = dont show image if user is in usergroup 2 = do show image ? Cheers |
#2
|
||||
|
||||
PHP Code:
|
#3
|
|||
|
|||
perfic, thank you
Doesnt work I used <if condition = $bbuserinfo[usergroup] == 10>I Donated!</if> but it shows on everyone when used in the postbit I should point out that I am checking if they are a member of a SECONDARY usergroup Meaning, their primary usergroup is registered users and their secondary is 10. Any help please? |
#4
|
||||
|
||||
Oops.
$bbuserinfo is for the VIEWER. You probably want to use $post instead of $bbuserinfo, in the example i gave. |
#5
|
|||
|
|||
Didn't work either. Just prints the text on the postbit of every single user.
I just want it to print the text If they are in usergroup id 10 Any ideas? |
#6
|
||||
|
||||
Code:
<if condition="$post['usergroupid'] == X">Display This</if> |
#7
|
|||
|
|||
Thanks. Still doesn't work.
I put <if condition="$post['usergroupid'] == 10">I Donated</if> In my postbit_legacy and it does not show for anyone, not even the users that are in usergroup 2 and also associated with usergroup 10. |
#8
|
||||
|
||||
Try this:
Code:
<if condition="is_member_of($post,10)">I Donated</if> |
#9
|
|||
|
|||
Thank you so much. That one worked
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|