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

show ads for unregistered users

Discussion in 'XenForo Questions and Support' started by multibam, Mar 30, 2013.

  1. multibam

    multibam Member

    Hello. Is there a simple way to add html/javascript advertisement to a template based on usergroup? Something like:

    if usergroup=2,3 in forum=8,9 show
    <google adsense code>
    end if
    Does anyone know if this is possible? Thanks.
  2. RobParker

    RobParker Well-Known Member

    Yep, you need template conditionals.

    Look in the manual for Brogan's guide to doing exactly that.
  3. Andrej

    Andrej Well-Known Member

  4. CyclingTribe

    CyclingTribe Well-Known Member

    If it's just for guests, use the visitor (not logged in) condition:

    <xen:if is="!{$visitor.user_id}">
    Ad code
    multibam likes this.

Share This Page