![]() |
More Questions About Conditionals
I am having some trouble with conditionals. I am trying to display my Google Ads to everyone, except those of certian usergroups.
EG: So everyone in groups: 1,2,3,5 would see the ad. While everyone in groups: 4,6, and 7 would not. What exactly should I put? Since there is no realy simple guide (that I could find) about using the conditionals... I am at a loss! lol. I can get it to only show for one group, but that is it. Please help! Much appreciated. :) |
Code:
<if condition="$bbuserinfo[usergroupid] != 4 && $bbuserinfo[usergroupid] != 6 && $bbuserinfo[usergroupid] != 7"> |
Modin, that only checks the user's primary usergroup.
Use the is_member_of function, it's one of the few you can call in a template That function also checks ALL of the users groups, primary and secondary. HTML Code:
<if condtion="!is_member_of($bbuserinfo, 4) AND !is_member_of($bbuserinfo, 6)"> |
nice tip mate, thanks :)
|
Alright, that did the trick. Thanks!
|
got this from http://www.theadminzone.com - good site for find a bit of info on maybe a few possibilities for forum admins.. Keeps the ad from displaying on certain pages..
HTML Code:
<if condition="THIS_SCRIPT != 'register' AND THIS_SCRIPT != 'search' AND THIS_SCRIPT != 'usercp' AND THIS_SCRIPT != 'sendmessage' AND THIS_SCRIPT != 'profile' AND THIS_SCRIPT != 'private' AND THIS_SCRIPT != 'subscriptions' AND THIS_SCRIPT != 'subscription' AND THIS_SCRIPT != 'member' AND THIS_SCRIPT != 'memberlist' AND THIS_SCRIPT != 'faq'"> |
@disciple
would it not be simpler to put that information into an array and then make a condition? |
All times are GMT. The time now is 10:54 PM. |
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:
|