1. 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

Discussion in 'XenForo Questions and Support' started by xert77, Aug 25, 2015.

  1. xert77

    xert77 Member


    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.
  2. AndyB

    AndyB Well-Known Member

    You might like to use this add-on:

    Ad Manager

    With it you just set the User Group permission for the groups you wish to show the ads to.
    xert77 likes this.
  3. xert77

    xert77 Member

    Oh nice, thanks AndyB. Will check this out tomorrow!
  4. Jeremy

    Jeremy XenForo Moderator Staff Member

    You can accomplish this with a simple template edit around your adsense code:

    <xen:if is="!{xen:helper ismemberof, $visitor, 2}">
     ... adsense code ...
    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, Amaury and xert77 like this.
  5. Tracy Perry

    Tracy Perry Well-Known Member

    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.
    xert77 likes this.
  6. Brogan

    Brogan XenForo Moderator Staff Member

    xert77 likes this.
  7. xert77

    xert77 Member

    Thanks Brogan, I already checked the responsive one out. However Google Adsense now offer a Responsive code option when you create an advert, which means they do all the work for you.

Share This Page