PDA

View Full Version : Help with HTML/Adsense


natecoupons
03-14-2011, 04:16 PM
I'm not a code but know my way around vB pretty well after dealing with it for years.

I have been using the Adsense Sharing hack for a long time but because of the dramatic growth of our site we can no longer use it.

I need help with the following code if you would be willing! :)

What I'm trying to do: I want to display a leaderboard to specific usergroups. I don't want our staff to see the adsense ad, but want guests and registered members to see it....

I know what template to place it, I just need help with the code

I thought an "if" condition could do this, but am not sure how to write the code

I thought this could work:

<if condition="not sure what to put here to make it display to certain usergroups">
(ad code)
</if>

--------------- Added 1300124907 at 1300124907 ---------------

Would this work?

<if condition="is_member_of($vbulletin->userinfo, 1, 2, 3)">
Google Adsense Code
</if>

BirdOPrey5
03-14-2011, 05:03 PM
Yes, your condition will work. However in templates we usually try to use $bbuserinfo instead of $vbulletin->userinfo... so this will work as well:


<if condition="is_member_of($bbuserinfo, 1, 2, 3)">
Google Adsense Code
</if>