XF 1.2 Ad display only for non-paying members

SW48

Active member
Is there a way to display ads only for non-paying member?

I have 3 google adsense ads displaying on my xenforo board.

Thanks in advance
 

So if I don't want to display ads for "Supporting Members", "Administrators" or "Moderators", what would the following code look like?

How can I show content to more than one user group?<xen:if is="{xen:helper ismemberof, $visitor, x, y}">
This content will show to members of user groups x or y
</xen:if>
 
So if I don't want to display ads for "Supporting Members", "Administrators" or "Moderators", what would the following code look like?

How can I show content to more than one user group?<xen:if is="{xen:helper ismemberof, $visitor, x, y}">
This content will show to members of user groups x or y
</xen:if>
What are the user group #'s you are wanting to show it to. Replace x,y with those sets of numbers and then the ad code below it.

Code:
<xen:if is="{xen:helper ismemberof, $visitor, 3,5,7,8,10}">
This would be the ad content you want to show to user groups 3, 5, 7, 8, and 10
</xen:if>
 
Use a false statement to not show it to the group IDs in the array.

How can I hide content from a specific user group?
<xen:if is="!{xen:helper ismemberof, $visitor, x}">
This content will be hidden from members of user group x
</xen:if>
 
@Brogan, if the OP is wanting to exclude Administrators and Moderators from ads plus an additional group, then wouldn't the conditional be

<xen:if is=!"{$visitor.is_admin} OR {$visitor.is_moderator} OR {xen:helper ismemberof, $visitor, x}">
This content will not show to Administrators and Moderators or group x
</xen:if>

I hope I have got this right?

I wasn't sure how to put this as an array as it uses a mix of $visitor.is_admin, $visitor.is_moderator and a group number.
 
I thank you both for your responses and feel stupid not being able to figure this out.

So I use this code:

<xen:if is="!{xen:helper ismemberof, $visitor, 1, 8, 12}">

</xen:if>

And in between is my adsense code. No ads disappear whether I am logged in or not?
 
When logged out, the system won't know which groups you are a member of.
You will be treat like any other guest.

Where do I see what group number to replace 'x' with?

"Supporting Members" is what I want for 'x' but I don't see where it shows what group number "Supporting Members" is?
 
I need some hand holding here, what is ACP?

thanks
It's the control panel when you go to yourdomain.com/admin.php. Under Users -> User Groups -> List User Groups. Click on the group and in your address bar you should see the group #. It will be the number before the /edit portion.
 
It's the control panel when you go to yourdomain.com/admin.php. Under Users -> User Groups -> List User Groups. Click on the group and in your address bar you should see the group #. It will be the number before the /edit portion.

Ok, I was looking in the xenforo admin. lol. had no idea.

unfortunately I can't access cpanel until later.
 
@Brogan, if the OP is wanting to exclude Administrators and Moderators from ads plus an additional group, then wouldn't the conditional be

<xen:if is=!"{$visitor.is_admin} OR {$visitor.is_moderator} OR {xen:helper ismemberof, $visitor, x}">
This content will not show to Administrators and Moderators or group x
</xen:if>

I hope I have got this right?

I wasn't sure how to put this as an array as it uses a mix of $visitor.is_admin, $visitor.is_moderator and a group number.

Thanks, but this give a template syntax error.
 
Top Bottom