1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
    Dismiss Notice
  3. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Alternate Merging Staff Online & Members Online

Discussion in 'Template Modifications [Archive]' started by karoshio, Nov 3, 2011.

  1. karoshio

    karoshio Active Member

    Hey everyone,

    I used to use this for my original XenForo install and realized it didn't seem to work with the 1.1 BETA so I thought I would fix it up and share.

    I may be mistaken with the different version but if this doesn't work and you're running a version below 1.1 just let me know and I can put it up.


    End result:

    [​IMG]


    Go to Admin CP > Appearance > Templates > sidebar_online_users and replace the whole code with the following:

    Code:
    <xen:edithint template="sidebar.css" />
    <!-- block: sidebar_online_users -->
    <div class="section membersOnline userList">   
        <div class="secondaryContent">
            <h3><a href="{xen:link online}" title="{xen:phrase see_all_online_users}">{xen:phrase members_online_now}</a></h3>
    <xen:if hascontent="true">
    <h4 class="minorHeading">{xen:phrase staff_online_now}</h4>
           
                <ul>
                    <xen:contentcheck>
                        <xen:foreach loop="$onlineUsers.records" value="$user">
                            <xen:if is="{$user.is_moderator} OR {$user.is_admin}">
                                <li>
                               
                                    <xen:username user="$user" rich="true" />
                               
                                </li>
                            </xen:if>
                        </xen:foreach>
                    </xen:contentcheck>
                </ul>
     
    </xen:if><br />   
            <xen:if is="{$onlineUsers.records}">
       
                <xen:if is="{$visitor.user_id}">
                    <xen:if hascontent="true">
                    <h4 class="minorHeading"><a href="{xen:link account/following}">{xen:phrase people_you_follow}:</a></h4>
                    <ul class="followedOnline">
                        <xen:contentcheck>
                            <xen:foreach loop="$onlineUsers.records" value="$user">
                                <xen:if is="{$user.followed}">
                                    <li title="{$user.username}" class="Tooltip"><xen:avatar user="$user" size="s" img="true" class="_plainImage" /></li>
                                </xen:if>
                            </xen:foreach>
                        </xen:contentcheck>
                    </ul>
                    <h4 class="minorHeading"><a href="{xen:link members}">{xen:phrase members}:</a></h4>
                    </xen:if>
                </xen:if>
           
                <ol class="listInline">
                    <xen:foreach loop="$onlineUsers.records" value="$user" i="$i">
                        <xen:if is="{$i} <= {$onlineUsers.limit}">
                            <li>
                            <xen:if is="{$user.user_id}">
                                <a href="{xen:link members, $user}"
                                    class="username{xen:if '!{$user.visible}', ' invisible'}{xen:if {$user.followed}, ' followed'}">{$user.username}</a><xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
                            <xen:else />
                                {xen:phrase guest}<xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
                            </xen:if>
                            </li>
                        </xen:if>
                    </xen:foreach>
                    <xen:if is="{$onlineUsers.recordsUnseen}">
                        <li class="moreLink">... <a href="{xen:link online}" title="{xen:phrase see_all_visitors}">{xen:phrase and_x_more, 'count={xen:number $onlineUsers.recordsUnseen}'}</a></li>
                    </xen:if>
                </ol>
            </xen:if>
       
            <div class="footnote">
                {xen:phrase online_now_x_members_y_guests_z, 'total={xen:number $onlineUsers.total}', 'members={xen:number $onlineUsers.members}', 'guests={xen:number $onlineUsers.guests}'}
            </div>
        </div>
    </div>
    <!-- end block: sidebar_online_users -->
    
     
    Flengo, Brandon Sheley and RobinHood like this.

Share This Page