![]() |
Conditional statement question
In my header I have something I want displayed for everyone except one usergroup. What would be the code needed within the header template to wrap that stuff in a "if not this userid then display" sort of statement?
|
Quote:
Change x to the group you dont want it to see :) |
Thank you, I assumed that was the syntax; but wasn't positive.
my guess would have been: <if condition="$bbuserinfo['usergroupid'] != X"> Show Stuff here r</if> But I like the assurance :) btw - you don't need the single quotes around the usergroupid? also is this proper?: <if condition="($bbuserinfo[usergroupid] != X) or ($bbuserinfo[usergroupid] != Y)"> Show Stuff here r</if>"> Show Stuff here r</if> |
No, you NEVER use single quotes inside conditionals
|
Wow, you got me before my edit. Thanks for the reply again :)
|
I forgot I will be using this as a secondary usergroup. membergroupids is the variable, correct? But in an array. Is it possible to use a single conditional to do this? An "if not member of X"?
|
youll need to use !is_member_of($bbuserinfo, X) instead of what i have above
|
Quote:
http://www.vbulletin.com/docs/html/m...e_conditionals |
I attempted to use this:
<if condition="!is_member_of($bbuserinfo[membergroupids], 12)"> However, whatever is in-between the <if></if> still shows for members in the secondary group id of 12. I then took away the other secondary usergroups that the member belonged to as a test, but it still shows. |
Quote:
!is_member_of($bbuserinfo, 12) Is what you are going to use. |
All times are GMT. The time now is 09:29 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|