View Full Version : conditionals
lasto
01-19-2005, 08:49 AM
<if condition="$bbuserinfo[usergroupid] == 6">
TEXT HERE
</if>
the one above allows admins to see etc but how do i change it to allow say 2 usergroups ?
Marco van Herwaarden
01-19-2005, 09:12 AM
<if condition="$bbuserinfo[usergroupid] == 6 OR $bbuserinfo[usergroupid] == 7">
<if condition="$bbuserinfo[usergroupid] == 6 OR $bbuserinfo[usergroupid] == 7">
Or go here: https://vborg.vbsupport.ru/showthread.php?t=72556
lasto
01-19-2005, 10:32 AM
cheers m8
Michael Morris
01-19-2005, 01:40 PM
Those checks only work for PRIMARY usergroups. To check if a member has permissions to a usergroup at all you need to use the is_member_of function
<if condition="is_member_of($bbuserinfo, X)">
Where X is the group you want to check.
I find it most useful that if I want to hide or display info based on a usergroup (such as say, pain membership), create a usergroup for that specific item and use is_member_of
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.