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

Is this conditional statement correct?

Discussion in 'XenForo Questions and Support' started by akia, Apr 27, 2013.

  1. akia

    akia Well-Known Member

    I want to show content to only members that are logged into my site that are not members of usergroup 4 and 8, I also want to hide that content if they are viewing forums or threads in that forum with node id of 3 and 8.

    Will this statement do the trick?

    <xen:if is="{$visitor.user_id} AND !in_array({$thread.node_id}, array(3, 8)) AND !{xen:helper ismemberof, $visitor, 4, 8}">
  2. akia

    akia Well-Known Member

    Right I've worked a bit more on this and now have the following:

    <xen:if is="{$forum.node_id} != 27 AND !{xen:helper ismemberof, $visitor, 6, 8}">
    <xen:if is="{$visitor.user_id}">
    Show to membwers
    <xen:else />
    show to guests
    it seems to work

Share This Page