Resource icon

Combine Members and Staff Online

Lisa

Well-known member
Azhria Lilu submitted a new resource:

Combine Members and Staff Online - From two sidebar modules into one!

Take your Who's Online modules from this:-
View attachment 52486

To This:-

View attachment 52487 View attachment 52485

To achieve this, navigate to your sidebar_online_users template and find:-

Code:
<!-- block: sidebar_online_staff -->
<xen:if hascontent="true">
    <div class="section staffOnline avatarList">
        <div class="secondaryContent">
            <h3>{xen:phrase staff_online_now}</h3>
            <ul>
                <xen:contentcheck>...

Read more about this resource...
 
Didn't know he had one. Did this one myself, no need for an entire template replacement just an edit.. and no extra css :) Also a slightly different end effect on mine.
 
Sorry didn't mean to imply it was copied or anything. Same template edit, @Russ just chose to say replace entire template rather find/replace.

Also your Staff online avatars are larger which is why Russ posted the added css. No biggie at all just was trying to help. ;)
 
Sorry didn't mean to imply it was copied or anything. Same template edit, @Russ just chose to say replace entire template rather find/replace.

Also your Staff online avatars are larger which is why Russ posted the added css. No biggie at all just was trying help. ;)
No, I didn't take it that way, no apology needed :D I've actually modified the edit to change the way it deals with the staff online, it's not a direct move of the staff online part but edited to have the mouse over effect, also shifting the positioning.. A slightly different format. But variety is good, I think :D

*edit.. just looking at Russ's.. his has the mouseover effect too.. didn't spot that.. Wish I'd known, it'd have saved me hours on figuring it out LOL
 
I always remove the staff online block whenever I'm creating a style, never did see it being anything other than useless. Agree that joining the two would be better.
 
I have used this template edit and its listing my staff members one underneath the other. How do you set it so they go side by side
 
I have used this template edit and its listing my staff members one underneath the other. How do you set it so they go side by side
Are you using it on 1.2 or 1.15? Also do you have any other modifications that may change that particular template?
 
I can't see straight at the moment, so here's my sidebar_online_users template which I know works :D

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 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>
<xen:if hascontent="true">
    <div class="section staffOnline avatarList">
            <h3>{xen:phrase staff_online_now}</h3>
            <ul>
                <xen:contentcheck>
                    <xen:foreach loop="$onlineUsers.records" value="$user">
                        <xen:if is="{$user.is_staff}">
                            <li title="{$user.username}" class="Tooltip"><xen:avatar user="$user" size="s" img="true" class="_plainImage" /></li>
                        </xen:if>
                    </xen:foreach>
                </xen:contentcheck>
            </ul>
        </div>
</xen:if>
<!-- end block: sidebar_online_staff -->       
        <div class="footnote">
            {xen:phrase online_now_x_members_y_guests_z_robots_a, 'total={xen:number $onlineUsers.total}', 'members={xen:number $onlineUsers.members}', 'guests={xen:number $onlineUsers.guests}', 'robots={xen:number $onlineUsers.robots}'}
        </div>
    </div>
</div>
<!-- end block: sidebar_online_users -->
 
Thats great thank you. Only a little problem now its removed the username colours from each username lol. You wouldnt know how to get that back would you?
 
Not unless you were using some kind of template tweak for them. My username colours work fine, since I use the css in usergroups for them :)
 
Back
Top Bottom