XenForo Tutorials

Sidebar User Name Styling

Submitted by Oxygen, , Thread ID: 16047

Thread Closed
Oxygen
<div class="postbit-usertitle">
Prime
Level:
0
Reputation:
35
Posts:
608
Likes:
63
Credits:
1.47K
23-12-2015, 01:34 PM
#1
Sidebar user name styling
Not my content; Don't come to me because of links not working.



In a default installation, user group user name styling does not apply to the Members Online Now block in the sidebar.
To enable styling to show in this location, the sidebar_online_users template must be edited.

Look for this line of code in the template:
Code:
class="username{xen:if '!{$user.visible}', ' invisible'}{xen:if {$user.followed}, ' followed'}">{$user.username}</a><xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>

Replace it with this:
Code:
class="username{xen:if '!{$user.visible}', ' invisible'}{xen:if {$user.followed}, ' followed'}">{xen:helper richUserName, $user}</a><xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>

You can then apply styling to the user group user names as explained in the manual here:http://xenforo.com/help/user-group-styling/

However, when hovering over a user name, the underline colour from the parent <a> will be applied and may therefore differ from the text colour applied to the user name.

To resolve that, apply this toEXTRA.css:
Code:
a.username:hover > span {
text-decoration: underline;
}
[Image: UeTXrZ5.png]

Users browsing this thread: 1 Guest(s)