• 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.

Add Staff Online into Members Online

Status
Not open for further replies.
Is anyone using this in the center column of XenPorta? When I do so the height is stretched and was wondering how to remove that behavior.
 
The site has not launched yet so I only have a screenshot. We hope to go live this weekend so if needed I'll post a link next week. As seen in the attachment, the members section of the module is pushed down below the end of the left column.

members_online2.webp
 
The site has not launched yet so I only have a screenshot. We hope to go live this weekend so if needed I'll post a link next week. As seen in the attachment, the members section of the module is pushed down below the end of the left column.


I'll be up at the lake near me all weekend but when I get back I can duplicate this scenario and see what I can find out. Is the default box with no edits doing the same behavior?
 
Okay I don't know if it is just me but when I put these codes in two headers for the block appear:
Users Online Now and underneath Members Online Now - is there a way to reduce that to just the main header?
 
With this code, is there a way to put a space in between staff online? right now, my staff members are listed side by side and running into each other.

Thanks
 
With this code, is there a way to put a space in between staff online? right now, my staff members are listed side by side and running into each other.

Thanks

Do you have a link to your site or a screenshot? Appears fine even in 1.1
 
Must have been a slight display issue with safari...looks fine now. Thanks for your quick response.
 
I see what is happening now - after two staff logon is when the issue occurs. see file I uploaded.
 

Attachments

  • staff-online.webp
    staff-online.webp
    5.8 KB · Views: 23
That's a poorly edited template, which has omitted the separator (, ) between the names.
 
You're also missing the avatars as well. Did you replace the entire template for the edit?
 
I used the code on pg 1 of this thread ad it replaced the sidebar_online_users...also I did not want avatars, hence this code:

<xen:edithint template="sidebar.css" />

<!-- block: sidebar_online_staff -->
<!-- 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 class="staffonlinelist">
<xen:contentcheck>
<xen:foreach loop="$onlineUsers.records" value="$user">
<xen:if is="{$user.is_moderator} OR {$user.is_admin}">
<li title="{$user.username}">
<a href="{xen:link members, $user}">{$user.username}</a>
</li>
</xen:if>
</xen:foreach>
</xen:contentcheck>
</ul>
<div style="clear:both;"></div>
</xen:if>

<xen:if is="{$onlineUsers.records}">
<h4 class="minorHeading"><a href="{xen:link members}">{xen:phrase members}:</a></h4>
<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_staff -->
<!-- end block: sidebar_online_users -->
 
I used the code on pg 1 of this thread ad it replaced the sidebar_online_users...also I did not want avatars, hence this code:

snip
Try this
Code:
<xen:edithint template="sidebar.css" />
 
<!-- block: sidebar_online_staff -->
<!-- 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 class="staffonlinelist">
                <xen:contentcheck>
                    <xen:foreach loop="$onlineUsers.records" value="$user">
                        <xen:if is="{$user.is_moderator} OR {$user.is_admin}">
                            <li title="{$user.username}">
                                <a href="{xen:link members, $user}">{$user.username}</a>
                            </li>
                        </xen:if>
                    </xen:foreach>
                </xen:contentcheck>
            </ul>
<div style="clear:both;"></div>
</xen:if>
 
        <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>
                </xen:if>
            </xen:if>
                <h4 class="minorHeading"><a href="{xen:link members}">{xen:phrase members}:</a></h4>
            <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_staff -->
<!-- end block: sidebar_online_users -->
 
OK - thanks Russ! will let you know. Also...once this forum increases its members, I would like to separate the staff online from the members online, like XF does. Is there a way to do this? I thought I saw it somewhere. thanks..
 
No this code is still not working correctly...the members aspect works, but not the staff online. As Brogan said, "has omitted the separator (, ) between the names."

Thanks
 
Status
Not open for further replies.
Top Bottom