The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
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. ![]() |
#2
|
|||
|
|||
![]() Code:
<if condition="$bbuserinfo[usergroupid] != 4 && $bbuserinfo[usergroupid] != 6 && $bbuserinfo[usergroupid] != 7"> Google Ad </if> ![]() |
#3
|
||||
|
||||
![]()
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)"> Ad </if> |
#4
|
|||
|
|||
![]()
nice tip mate, thanks
![]() |
#5
|
|||
|
|||
![]()
Alright, that did the trick. Thanks!
|
#6
|
|||
|
|||
![]()
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'"> Google AdSense Info </if> |
#7
|
||||
|
||||
![]()
@disciple
would it not be simpler to put that information into an array and then make a condition? |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|