View Full Version : AdSense
Benjamin-P
03-25-2008, 07:38 PM
Hello,
I have AdSense and I would like the ads to show for everybody except one of my usergroups.
Anybody care to help me?
King Kovifor
03-25-2008, 08:41 PM
If you use templates, you can use if conditionals to exclude groups. I think the function is is_member_of(), but I am not sure off the top of my head.
Benjamin-P
03-25-2008, 09:25 PM
Im not very good when it comes to codes... I need a little more help than that.
King Kovifor
03-25-2008, 10:33 PM
<if conditional="!is_member_of(groupID)"> post code here </if>
Just make sure groupID is replaced with a number / list of numbers (1,2,3,4) and that it is the group you want to be excluded.
Benjamin-P
03-26-2008, 04:16 PM
I tried that and it still shows the ads under the navbar.
<center>
<script type="text/javascript"><!--
google_ad_client = "pub-9417028808370861";
/* 468x60, created 3/25/08 */
google_ad_slot = "6492910923";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<if conditional="!is_member_of(1,2,3,4,6,5,7,13,14)">
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</if></center><br>
Try:
<if condition="!is_member_of(groupID)">
Make sure groupID is the usergroup you want the ads to be hidden for, not the remaining usergroups.
Also, it should be <if condition not <if conditional
Benjamin-P
03-26-2008, 04:57 PM
For some strange reason, we I do as you say... and I save, I just get directed a navy blue page.... but when I remove that code and save... it directs me to the sytles etc
I have tried several times to clarify and it's every time I put it that code.
Jase2
03-26-2008, 05:44 PM
Try:
<if condition="$post[postcount] == 1 AND in_array($GLOBALS[usergroupid], array(X,Y,Z))">
Regards Jason :)
Benjamin-P
03-26-2008, 05:57 PM
I inserted it and saved well but it has removed the ads... even editing the array(X,Y,Z))">
I tried with 6 and then removed 6 and it still I dont see the ads.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.