The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Can someone give me an example conditional to wrap my google ads in?
I want to remove google ads for members that have a certain user-group as their secondary. The way I have my current subscriptions set is No Change primary and secondary is whatever they subscribed to. Some member might have 2 or 3 secondaries, BUT if one of them is the user-group that removes the ads, I would like no ads to show. Can this be done? |
|
#2
|
|||
|
|||
|
Code:
<if condition="!in_array($vbulletin->userinfo['usergroupid'], array(5,6,7))">Google ads code</if> |
|
#3
|
|||
|
|||
|
Hrrrm, didn't work.
Here is another example: User "Test" belongs to primary usergroup ID 5 and secondary usergroups 8 & 9 Usergroup 9 is not suppose to see ads but 5 & 8 do. Can we keep ads from showing with his usergroups setup like that? |
|
#4
|
|||
|
|||
|
Ok, try this one
Code:
<if condition="is_member_of($bbuserinfo, 5) OR is_member_of($bbuserinfo, 6) OR is_member_of($bbuserinfo, 7)">something to display for these user groups like a thanks for subscribing message or something, or just <else />google adds code</if> |
|
#5
|
|||
|
|||
|
Boom...That worked! :banana:
Thanks M8! |
|
#6
|
|||
|
|||
|
no worries. Glad it works
|
|
#7
|
||||
|
||||
|
Quote:
|
|
#8
|
|||
|
|||
|
Quote:
|
|
#9
|
||||
|
||||
|
But that first one was just for the primary usergroups. The second one includes secondary usergroups also. Unless I'm reading them wrong, which has been known to happen.
|
|
#10
|
|||
|
|||
|
You are probably right.
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|