Sidebar Avatars

Sidebar Avatars 1.1.0

No permission to download

Chris D

XenForo developer
Staff member
Chris D submitted a new resource:

Sidebar Avatars - Replaces usernames on the list of online users with their avatars



Thank you so much for donating. It is always appreciated!

This add-on replaces the usernames in the sidebar online users list with avatars, as below:

View attachment 74398

Tooltips on hover show you the usernames of the users. Invisible users (if you have permission to view them) have reduced opacity.

These changes will only work with a stock sidebar, i.e. they will not work with Widget Framework and others.

However, you may wish to edit the relevant WF template to achieve this.

Read more about this resource...
 
Last edited:
Just copy the code from my template to theirs.

In the wf_widget_online_users template I found:

Code:
<xen:if is="{$i} <= {$onlineUsers.limit}">
                    <li class="user-{$user.user_id}">
                    <xen:if is="{$user.user_id}">
                        <xen:username user="$user" rich="{$widget.options.rich}" class="{xen:if '!{$user.visible}', ' invisible'}{xen:if {$user.followed}, ' followed'}" /><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>

And changed it to:

Code:
<xen:require css="sidebaravatars_sidebar_online_users.css" />

<xen:if is="{$i} <= {$onlineUsers.limit}">
    <li title="{$user.username}" class="Tooltip sidebarAvatar">
        <xen:if is="{$user.user_id}">
            <xen:avatar user="$user" size="s" img="true" class="_plainImage{xen:if '!{$user.visible}', ' invisible'}{xen:if {$user.followed}, ' followed'}" />
        <xen:else />
            {xen:phrase guest}<xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
        </xen:if>
    </li>
</xen:if>

It works but the avatars are showing up as 48px by 48px, how can I get them down to 32px by 32px?
 
I don't really have enough information to help you with that.

I'd probably need full access to your Admin CP to work out why.
 
I no longer maintain the code for that add-on so you should probably ask them first.
 
Do the avatars cut off at a certain member count? If you've got 12,000 people online will it try to show 12,000 avatars? Hard to tell since I'm working on a dev forum but would be helpful to know how it behaves.
 
Top Bottom