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

How to Hide Signatures from X Forum IDs?

Discussion in 'XenForo Questions and Support' started by Veer, Feb 25, 2011.

  1. Veer

    Veer Well-Known Member

    Hi guys, Is there a way to hide signatures from a few Forum IDs?

    I found the following but that doesn't help:
    Code:
    <xen:if is="{$forum.node_id}==x">
     Code for forum x
    </xen:if>
    I want to completely disable signatures from a few forums, hope somebody knows a way.
    Thanks.
     
  2. onyxchase

    onyxchase Active Member

    Code:
    <xen:if is="{$forum.node_id} != 5 OR {$forum.node_id} != 6">
    
    
    Not sure if this would work?
     
  3. Veer

    Veer Well-Known Member

    No, it doesn't work.

    P.S. It works when you only add this for a single node:
    {$forum.node_id} != 5

    but when you put "{$forum.node_id} != 5 OR {$forum.node_id} != 6" it doesn't.
     
  4. onyxchase

    onyxchase Active Member

    Maybe it's || instead of OR? Sorry I haven't played much with the templates. :)
     
  5. Veer

    Veer Well-Known Member

    Nope :p but it works with &&

    Thanks anyway :)
     
  6. James

    James Well-Known Member

    Try using in_array() and checking the contents of the array in the conditional to exclude forum ids.
     
    Jake Bunce likes this.
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Oh yay! When did they add this? Array functions didn't work the last time I tested it.

    This is the complete conditional code for people who are interested:

    Code:
    <xen:if is="!in_array({$forum.node_id}, array(5,6))">
    	THIS CODE WILL SHOW IN ALL FORUMS EXCEPT 5 AND 6
    </xen:if>
    
    That expression is logically always true. That is the problem. Use my code above.
     
    Veer and James like this.
  8. Veer

    Veer Well-Known Member

    Very well Jake, it works perfectly.
    Thank you so much. :)
     

Share This Page