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

XF 1.3 How to disable avatars & signatures in certain forums or categories?

Discussion in 'Styling and Customization Questions' started by Mian Shahid, May 17, 2014.

  1. Mian Shahid

    Mian Shahid Well-Known Member

    Hi, is their any way to hide avatars & signatures in "few" forums or even in a complete category?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    You could try using conditional statements utilising the node ID.

    It will require editing templates.
     
  3. Mian Shahid

    Mian Shahid Well-Known Member

    Thanks Brogan
    For signatures, i edited template "message" and replaced
    Code:
    <xen:if is="{$visitor.content_show_signature} && {$message.signature}">
    with
    Code:
    <xen:if is="({$forum.node_id} != 73 && {$forum.node_id} != 83) && {$visitor.content_show_signature} && {$message.signature}">
    and its working perfectly.

    Now i am trying to find same for avatars :)
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Use an array if there is more than one node ID: <xen:if is="!in_array({$forum.node_id}, array(1, 2, 3))">
     
    Mian Shahid likes this.
  5. Mian Shahid

    Mian Shahid Well-Known Member

    And for avatars, i edited template "message_user_info" and added
    Code:
    <xen:if is="{$forum.node_id} != 73 && {$forum.node_id} != 83">
    bofore
    Code:
    <xen:hook name="message_user_info_avatar" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
         <div class="avatarHolder">
           <span class="helper"></span>
           <xen:avatar user="$user" size="m" img="true" />
           <!-- slot: message_user_info_avatar -->
         </div>
       </xen:hook>
    followed by
    Code:
    </xen:if>
    this is also working perfect :)
     
  6. Mian Shahid

    Mian Shahid Well-Known Member

    Thanks, this is best because we have about 8 to 12 node IDs :)

    Will same array work for avatars?
     
  7. Mian Shahid

    Mian Shahid Well-Known Member

    Yes :) its working.
     

Share This Page