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:
62
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]

RE: Sidebar User Name Styling

Kreedz
Just wanna Sleep with God
Level:
0
Reputation:
8
Posts:
247
Likes:
4
Credits:
0
23-12-2015, 01:45 PM
#2
Thanks for sharing , but it not working for me what i need to do :(

RE: Sidebar User Name Styling

suckling
Newbie
Level:
0
Reputation:
0
Posts:
15
Likes:
0
Credits:
19
20-05-2017, 01:05 AM
#3
thanks for share i need this info =D

RE: Sidebar User Name Styling

Tommy118
Newbie
Level:
0
Reputation:
0
Posts:
14
Likes:
0
Credits:
9
18-06-2017, 09:04 PM
#4
Thank you mate, this will make my site so much better

RE: Sidebar User Name Styling

ibo_es89
Closed Account
Level:
0
Reputation:
0
Posts:
15
Likes:
0
Credits:
15
01-08-2017, 05:50 PM
#5
thank you for that code!

RE: Sidebar User Name Styling

TAYZURRI
Lurker
Level:
0
Reputation:
0
Posts:
4
Likes:
0
Credits:
5
05-08-2017, 10:53 AM
#6
Excellent

Thanks for the share

RE: Sidebar User Name Styling

King2828
Newbie
Level:
0
Reputation:
0
Posts:
15
Likes:
0
Credits:
0
08-08-2017, 01:27 AM
#7
Thanks for share this tweaks bro!.

RE: Sidebar User Name Styling

Qifesh
Closed Account
Level:
0
Reputation:
0
Posts:
10
Likes:
0
Credits:
10
13-08-2017, 07:09 PM
#8
thanks for this bro lell

RE: Sidebar User Name Styling

johnybrava
Closed Account
Level:
0
Reputation:
0
Posts:
15
Likes:
0
Credits:
15
16-08-2017, 11:46 PM
#9
thank you my friend i need 15 post for download!

Users browsing this thread: 1 Guest(s)