![]() |
template conditionals
How can I exclude my ads for the users in my paid subscription group ?
I used this code, but it seems like the ads got removed for everyone but unregistered Code:
<if condition="!$bbuserinfo['userid'] == 17"> |
Code:
<if condition="in_array($bbuserinfo[usergroupid], array(1,2,3,4))"> |
I tried to reverse it like this, but it wont work
Quote:
|
Works fine, remove the ! in yours.
|
I tried that, but I need to exclude it for the usergroup 17 so I thought I needed to have the ! in front
|
Code:
<if condition="!is_member_of($bbuserinfo, X)"> |
Add all the usergroups that you want to see the ads to that array, sorry wasnt paying attention, dont add 17 or any other group that you dont want to show the ads to.
Edit to add: Do what Op stated, sorry wasnt paying attention, either way will work. |
Very helpful, thank you! I'm in the process of reworking our ads system and I needed the conditional to show ads to ALL groups (we have many :D ) except for one (our paid subscribers) and this worked perfectly.
|
All times are GMT. The time now is 03:50 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:
|