Resource icon

Staff Online Avatars Columns (With Overlay)

Forsaken

Well-known member
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...
 
What do you mean ?

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

  • Staff-Online 1.webp
    Staff-Online 1.webp
    4.9 KB · Views: 23
Last edited:
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

admin-red
moderator-blue so on
@Brogan please can you move my post to custom add-on requests ?
 
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.
 
Is there anyway of doing this also by using [bd] Widget Framework?
 
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.
 
Top Bottom