The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
"If condition "member of usergroup"
Hi,
I forget how to do this. What is the if code for displaying only to a certain usergroup? Thanks..... |
#2
|
|||
|
|||
Is it this ...
Code:
<if condition="!is_member_of($bbuserinfo,5,6,7)"> |
#3
|
|||
|
|||
Quote:
Code:
<if condition="in_array($bbuserinfo[usergroupid], array(1,2,3))"> show <else /> don't show </if> |
#4
|
||||
|
||||
UKBusiness's is the correct one (though the ! in front of it will display for members who are not in groups 5, 6, or 7.
ry215's code will not take Secondary Usergroups into account. Keep in mind as well, $bbuserinfo may not always be correct in every instance. For example, if you're using the code in the postbit template, you would use $post; in the memberinfo template, you would use $userinfo. |
#5
|
||||
|
||||
Or $prepared in that "group" of templates as well.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|