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

XF 1.2 Ad display only for non-paying members

Discussion in 'Styling and Customization Questions' started by SW48, Jan 10, 2014.

  1. SW48

    SW48 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
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. SW48

    SW48 Member

    Is there a way to reduce the size of a posters signature image?

    A max size for sig?
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Check the FAQ in my signature, it explains how to do that.
     
  5. SW48

    SW48 Member

    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>
     
  6. Tracy Perry

    Tracy Perry Well-Known Member

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

    Brogan XenForo Moderator Staff Member

    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>
     
  8. Tracy Perry

    Tracy Perry Well-Known Member

    Dang... if I hadn't of deleted my post I woulda ninja'd @Brogan! :p
    The exclusion method is easier to deal with @SW48 than the inclusion that you asked about. You would have less groups in the array.
     
  9. Martok

    Martok Well-Known Member

    @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.
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

    I assumed those were the user group names, but yes, you can also use the administrator and moderator conditions.
     
  11. SW48

    SW48 Member

    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?
     
  12. Brogan

    Brogan XenForo Moderator Staff Member

    When logged out, the system won't know which groups you are a member of.
    You will be treat like any other guest.
     
  13. SW48

    SW48 Member

    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?
     
  14. Brogan

    Brogan XenForo Moderator Staff Member

    You need to check in the ACP - hovering over or editing a user group will show the ID.
     
  15. SW48

    SW48 Member

    I need some hand holding here, what is ACP?

    thanks
     
  16. SW48

    SW48 Member

    Editing user group and hovering over "Supporting Member" doesn't do anything or show any id numbers.
     
  17. Tracy Perry

    Tracy Perry Well-Known Member

    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.
     
  18. SW48

    SW48 Member

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

    unfortunately I can't access cpanel until later.
     
  19. SW48

    SW48 Member

    Thanks, but this give a template syntax error.
     
  20. Tracy Perry

    Tracy Perry Well-Known Member

    It is in the Xenforo admin. Like mine (on one forum) is twowheeldemon.com/admin.php.
    It is the XenForo Administrative Control Panel.
     

Share This Page