Log in

View Full Version : Google ads to only show to certain user group?


se_p800
06-14-2008, 01:54 PM
Ok well I have google ads on my forum, manually put in to the templates. Im making a new usergroup and I dont want them to be able to view the ads. For this to work what is the code I put the adsense in between? It will be an IF condition i think..? Any help would be great. Thanks

veenuisthebest
06-14-2008, 01:59 PM
<if condition="is_member_of($vbulletin->userinfo, 1, 2, 3)">
AD CODE HERE
</if>

where 1,2,3 are the usergroups to whom ads are displayed

se_p800
06-14-2008, 02:12 PM
Thanks very much I believe thats all I need :)

se_p800
06-18-2008, 06:21 AM
Ok well I have thi code:

<if condition="is_member_of($vbulletin->userinfo, 1, 2, 3, 4, 16, 6, 20, 22, 23)">

<!-- Begin: AdBrite -->
<script type="text/javascript" src="http://ads.adbrite.com/mb/text_group.php?sid=723586&br=1"></script>
<!-- End: AdBrite -->

</if>

But the moderators (groups 5, 7) are still saying they see the ads. I have tested it with the admin user group (6) on and off and it works for that. Any ideas?

EDIT: I figured out its because they also had a secondary member group which is in the IF condition. Is there anyway to change the IF condition to only work on primary user groups?