• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 No Adverts for VIPs

#1
Hi,

I have managed to ad adsense advertisements in the blocks that were in an article on the forums here. I was just wondering how I can have it set.. If they are VIP, they don't show.

Many thanks.
 

Jeremy

Well-known member
#4
You can accomplish this with a simple template edit around your adsense code:

HTML:
<xen:if is="!{xen:helper ismemberof, $visitor, 2}">
 ... adsense code ...
</xen:if>
Replace 2 with your desired user group ID to exclude from advertisement. There is little need for an add-on's overhead just for a simple conditional.
 

Tracy Perry

Well-known member
#5
I personally prefer the template modification that Jeremy relates as you can extend it and do more than just display to all but VIP. You can have it so that it only displays in certain areas, and not display in others for example.