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

XF 1.5 How can I turn off ads for certain user groups?

#1
I want to be able to turn off ads for users with paid memberships. I know this is possible because other XF forums I'm on offer this. Does anyone know how they're accomplishing that?

My site is: www.556files.net
 
#3
Okay, I'm doing something wrong. I don't think I'm naming the user group right. Here's the code I have:

<xen:if is="!{xen:helper ismemberof, $visitor, site-sponsors}">
<div style="text-align: center;">
<ad code here>
</div>
</xen:if>

The ad is still showing up, but it's showing up for all users, including site sponsors.
 
#4
Okay, I figured it out (for anyone reading this thread in the future, user groups are named by their ID number, which is found at the end of the URL of the page you land on when you edit a user group inside the ACP).

So it would look like this:

<xen:if is="!{xen:helper ismemberof, $visitor, 10}">
<div style="text-align: center;">
<ad code here>
</div>
</xen:if>
 
#5
Brogan, I've got everything set up the way I want, and it's working fantastic. Regarding the responsive adsense thread, do I need to implement that stuff even if I'm not using adsense?

I only have one computer so I can't tell for sure, but the ad I've got in my sidebar currently seems to be autosizing. When I view it on my iphone and ipad it stays the same size relative to the other elements in the sidebar. Does that mean I'm good to go, or will it still do something funky if someone views it on a large screen?