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

Staff Online Avatars Columns (With Overlay)

Forsaken

Well-known member
#1
Forsaken submitted a new resource:

Staff Online Avatars Columns (With Overlay) (version 1.1) - Changes the default staff online block to use just avatars with tooltip username and usertitle.

View attachment 26055

Open extra.css:

Code:
.sidebar .avatarListInline li
{
overflow: hidden; zoom: 1;
float:left;
margin: 5px 0 0 0;
width:25%;
}
Open sidebar_online_users:

Replace:

Code:
<xen:if hascontent="true">
<!-- block: sidebar_online_staff -->
<div class="section staffOnline avatarList">
<div class="secondaryContent">
<h3>{xen:phrase staff_online_now}</h3>
<ul>
<xen:contentcheck>
<xen:foreach loop="$onlineUsers.records"...
Read more about this resource...
 

Forsaken

Well-known member
#5
Use this for the last step.
Code:
<xen:if hascontent="true">
<!-- block: sidebar_online_staff -->
<div class="section staffOnline avatarListInline">
<div class="secondaryContent">
<h3>{xen:phrase staff_online_now}</h3>
<ul>
<xen:contentcheck>
<xen:foreach loop="$onlineUsers.records" value="$user">
<xen:if is="{$user.is_moderator} OR {$user.is_admin}">
<li>
<xen:avatar user="$user" size="s" text="{$user.username}" class="Tooltip" title="{$user.username}" />
</li>
</xen:if>
</xen:foreach>
</xen:contentcheck>
</ul>
<div style="clear:both;"></div>
</div>
</div>
<!-- end block: sidebar_online_staff -->
</xen:if>
 

Brad P

Active member
#6
great little template edit but how would i add a slight css to the avatar in the staff online now sidebar to show the color of there usergroup pic below to show what i mean.

If someone can do this I'll pay for there services

admin-red
moderator-blue so on
 

Attachments

Last edited:

Xyphien

Active member
#9
Use this for the last step.
Code:
<xen:if hascontent="true">
<!-- block: sidebar_online_staff -->
<div class="section staffOnline avatarListInline">
<div class="secondaryContent">
<h3>{xen:phrase staff_online_now}</h3>
<ul>
<xen:contentcheck>
<xen:foreach loop="$onlineUsers.records" value="$user">
<xen:if is="{$user.is_moderator} OR {$user.is_admin}">
<li>
<xen:avatar user="$user" size="s" text="{$user.username}" class="Tooltip" title="{$user.username}" />
</li>
</xen:if>
</xen:foreach>
</xen:contentcheck>
</ul>
<div style="clear:both;"></div>
</div>
</div>
<!-- end block: sidebar_online_staff -->
</xen:if>
This code worked, nevermind.
 

Nero

Formerly Axis
#11
Alright, so I was able to figure it out...

If you have [bd] Widget Framework installed on your XenForo, remove this.

Code:
    <ul>
        <xen:contentcheck>
            <xen:foreach loop="$onlineUsers.records" value="$user">
                <xen:if is="(isset({$user.is_staff}) AND {$user.is_staff}) OR (!isset({$user.is_staff}) AND ({$user.is_moderator} OR {$user.is_admin}))">
                    <li class="user-{$user.user_id}">
                        <xen:avatar user="$user" size="s" img="true" />
                        <xen:username user="$user" rich="true" />
                        <div class="userTitle">{xen:helper userTitle, $user}</div>
                    </li>
                </xen:if>
            </xen:foreach>
        </xen:contentcheck>
    </ul>
and add this into the template wf_widget_online_staff

Code:
<ul>
<xen:contentcheck>
<xen:foreach loop="$onlineUsers.records" value="$user">
<xen:if is="{$user.is_moderator} OR {$user.is_admin}">
<li>
<xen:avatar user="$user" size="s" text="{$user.username} ({xen:helper userTitle, $user})" class="Tooltip" title="{$user.username}, {xen:helper userTitle, $user}" />
</li>
</xen:if>
</xen:foreach>
</xen:contentcheck>
</ul>
<div style="clear:both;"></div>
Should work, I have been testing different ways of making this work.