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

XF 1.4 Notable Members tabs...

Discussion in 'Styling and Customization Questions' started by Chassey Group, Dec 10, 2014.

  1. Chassey Group

    Chassey Group Member

    Can anyone tell me how we remove admin from being included in the counts on these tabs? We don't want to compete with our members for most points for example.

    Thanks!!
     
  2. Amaury

    Amaury Well-Known Member

    It'd likely require custom development.
     
    Chassey Group likes this.
  3. Brogan

    Brogan XenForo Moderator Staff Member

    Edit the member_notable template.

    Add the orange code:
    Code:
    <div class="section">
        <ol class="memberList">
            <xen:foreach loop="$users" value="$user">
                <xen:if is="!{$user.is_admin}">
                    <xen:include template="member_list_item">
                        <xen:set var="$noOverlay">1</xen:set>
                        <xen:set var="$extraTemplate"><xen:if is="{$bigKey}"><span class="bigNumber">{xen:number {$user.{$bigKey}}}</span></xen:if></xen:set>
                    </xen:include>
                </xen:if>
            </xen:foreach>
        </ol>
    </div>
    That will removed administrators from all tabs.

    If you want to keep administrators on the staff tab, but remove them from all others, use this instead:
    Code:
    <div class="section">
        <ol class="memberList">
            <xen:foreach loop="$users" value="$user">
                <xen:if is="!{$user.is_admin} OR {$type} == 'staff'">
                    <xen:include template="member_list_item">
                        <xen:set var="$noOverlay">1</xen:set>
                        <xen:set var="$extraTemplate"><xen:if is="{$bigKey}"><span class="bigNumber">{xen:number {$user.{$bigKey}}}</span></xen:if></xen:set>
                    </xen:include>
                </xen:if>
            </xen:foreach>
        </ol>
    </div>
    
     
    tonmo, Chassey Group and Amaury like this.
  4. Chassey Group

    Chassey Group Member

    Wonderful!!! Thanks so much, Brogan!!

    It worked!!
     
    Last edited: Dec 11, 2014

Share This Page