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

Members Page - Highest Posting Members - How to remove staff?

ArnyVee

Well-known member
#1
So, is there an option (or would I have to place a conditional) to remove the staff (admins/mods) from the "Highest Posting Members" block on the member page?

Here: http://www.teeveetown.com/forum/index.php?members/

You can see that the block has me and Def (co-admins) and I'm trying to give props to the members (or "Citizens" of TeeVeeTown ;) ) rather than having the staff take the top spots there.

Any suggestions?
 

Lawrence

Well-known member
#2
Open: member_list template

Find:
Code:
        <div class="section activeMembers">
             <h2 class="textHeading">{xen:phrase highest_posting_members}</h2>
             <div class="secondaryContent avatarHeap">
                 <ol>
                     <xen:foreach loop="$activeUsers" value="$user">
                         <li><xen:avatar user="$user" size="s"  text="{$user.username} ({xen:number $user.message_count})"  class="Tooltip" title="{$user.username}, {xen:phrase messages}:  {xen:number $user.message_count}" /></li>
                     </xen:foreach>
                 </ol>
             </div>
         </div>
and replace with:

Code:
        <div class="section activeMembers">
            <h2 class="textHeading">{xen:phrase highest_posting_members}</h2>
            <div class="secondaryContent avatarHeap">
                <ol>
                    <xen:foreach loop="$activeUsers" value="$user">
                    <xen:if is="{$user.user_id} != 1 AND {$user.user_id} != 2">
                        <li><xen:avatar user="$user" size="s" text="{$user.username} ({xen:number $user.message_count})" class="Tooltip" title="{$user.username}, {xen:phrase messages}: {xen:number $user.message_count}" /></li>
                    </xen:if>
                    </xen:foreach>
                </ol>
            </div>
        </div>
Change the numbers in this: <xen:if is="{$user.user_id} != 1 AND {$user.user_id} != 2"> to reflect the two admins user id's.
 

Brogan

XenForo moderator
Staff member
#3
As an option, presumably those xen:if statements could be substituted with usergroups so you could remove all admins, moderators, etc. without having to enter individual userid's?
 

Lawrence

Well-known member
#4
As an option, presumably those xen:if statements could be substituted with usergroups so you could remove all admins, moderators, etc. without having to enter individual userid's?
There was only a request for 2 users to be excluded from the top poster list, so the user numbers work.

To exclude just Admins: <xen:if is="!{$user.is_admin}">
If you want to exclude all Admins and Mods: <xen:if is="!{$user.is_admin} AND !{$user.is_moderator}">
 
F

Floris

Guest
#6
I rather see a generic script that everybody can use, so in the future new admins are not showing either ..

And split the template up in 2 .. list the team members, and below list the users. If someone doesn't want that, they can remove the team block above it completely.
 

Lawrence

Well-known member
#8
The downside of using a template conditional for this is that the total displayed will be 12 - the 2 Admins, for a total of ten. You can increase the top-posters number if you are comfortable making a small edit to one of the core XF files. An addon would work much better to allow for various other options.

To manually make the change (not recommended unless you are comfortable making the change):

Open: yourforo/library/XenForo/ControllerPublic/Member.php

Find:

// most active users (highest post count)
$activeUsers = $userModel->getMostActiveUsers($criteria, array('limit' => 12));

and increase the 12 to 14 to reflect the exclusion of your 2 Admin.