Use a conditional statement.
Examples here: http://xenforo.com/community/resources/responsive-adsense.2084/ and here: http://xenforo.com/community/resources/conditional-statements.1604/
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.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>
<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>
When logged out, the system won't know which groups you are a member of.
You will be treat like any other guest.
You need to check in the ACP - hovering over or editing a user group will show the ID.
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.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.
@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.
It is in the Xenforo admin. Like mine (on one forum) is twowheeldemon.com/admin.php.Ok, I was looking in the xenforo admin. lol. had no idea.
unfortunately I can't access cpanel until later.
We use essential cookies to make this site work, and optional cookies to enhance your experience.