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
 
Thanks, but this give a template syntax error.
Aye, I've spotted my error. It should be (I think):

<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>
 
It is in the Xenforo admin. Like mine (on one forum) is twowheeldemon.com/admin.php.
It is the XenForo Administrative Control Panel.

I am in the xenforo administration control panel. I see no numbering of user groups.

Here are my groups:
  1. Administrative
  2. Group Info
    Moderating
  3. Group Info
    Registered
  4. Group Info
    Supporting Member
  5. Group Info
    Unregistered / Unconfirmed
so my code would look like?

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


?
 
Ok, this appears to have worked.

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


Thank you so much for your help.
DW
 
This code works only works for me. It isn't working for moderators, administrators, or supporting members?

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


Any other ideas?
 
Last edited:
This code works only works for me. It isn't working for moderators, administrators, or supporting members?

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


Any other ideas?
Check the amended code in my last post which I think should work.
 
Thanks, unfortunately that only shuts the ads off for me as well. When I login as an admin it still shows that ads.
Note that being a member of the "Administrators" and "Moderators" groups doesn't make someone an Administrator or a Moderator. You are only these if you're added as these in ACP > Users on the left hand side. The code I gave (assuming it is correct) is based on being a "proper" Admin or Mod.
 
Note that being a member of the "Administrators" and "Moderators" groups doesn't make someone an Administrator or a Moderator. You are only these if you're added as these in ACP > Users on the left hand side. The code I gave (assuming it is correct) is based on being a "proper" Admin or Mod.

It is definitely frustrating this is so difficult to get working. The moderators that have moderated my forum for a year now still show the ads with this code. I believe them to be "proper" moderators else how could they delete posts and deal with reports.
 
Having permissions typically assigned to a moderator is not the same as having moderator status.
I recommend just using the user group IDs as I explained earlier.
 
Top Bottom