View Full Version : conditionals about groups
vauge
05-15-2005, 11:49 AM
Why does
<if condition="!is_member_of($usergroupid,38) AND !is_member_of($usergroupid,39) AND !is_member_of($usergroupid,39)">Display something here</if>
or this
<if condition="!is_member_of($usergroupid,38,39,40)">Display something here</if>
NOT work?
Secondary groups - thanks!
I want everyone but groups 38,39,and 40 to see it.
twoseven
05-15-2005, 01:34 PM
change to || (or)
vauge
05-15-2005, 02:21 PM
Thanks for reply.
<if condition="!is_member_of($usergroupid,38) || !is_member_of($usergroupid,39) || !is_member_of($usergroupid,39)">
Doesn't work either. :(
Adrian Schneider
05-15-2005, 03:07 PM
Try
<if condition="!is_member_of($bbuserinfo, 38) AND !is_member_of($bbuserinfo, 39) AND !is_member_of($bbuserinfo, 40)">
Sneaky Code Here
</if>
zetetic
05-15-2005, 03:49 PM
Look at this thread (https://vborg.vbsupport.ru/showthread.php?t=80056) for a better way of doing it. You have to do things slightly differently when dealing with secondary usergroups.
Adrian Schneider
05-15-2005, 04:15 PM
is_member_of works with secondary groups & primary :) whereas usergroupid == X is just primary.
I could be wrong but I think the link you posted is just for HTML viewing?
Also check this thread out if you want to list all the IDs at once instead of having multiple conditions:
https://vborg.vbsupport.ru/showthread.php?t=61149
vauge
05-15-2005, 05:55 PM
Try
<if condition="!is_member_of($bbuserinfo, 38) AND !is_member_of($bbuserinfo, 39) AND !is_member_of($bbuserinfo, 40)">
Sneaky Code Here
</if>
Perfection! Thank you!
zetetic
05-15-2005, 07:20 PM
is_member_of works with secondary groups & primary :) whereas usergroupid == X is just primary.
Oh, okay. I think I was just confused. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.