XF 2.1 Rich usernames/Username CSS not working

wellinhouse

Member
Hey everyone,

I wanted to use the group "Username CSS" function in order to color usernames based on their group, so I set the groups' priority and CSS, but rich usernames don't seem to be working. What I mean by that, is that the CSS is sort of generated, but the class isn't applied to the username span tag.

I hope I was clear enough. Thank you for the support.
 
What is the URL?

Using the browser inspector may provide some insight.

Do you use the <xf:user /> tag in your template? e.g:
HTML:
<xf:username user="$xf.visitor" rich="true" notooltip="true" />

What did you input for the Username CSS?

I'll provide an example in order to answer your questions and better explain the problem.


  1. The template for this page (member_view) contains <xf:username user="{$user}" rich="true" href="" /> for the username, but then <span class="username " dir="auto" data-user-id="1">Sash</span> is displayed. If the class username--style3 is manually added using the browser inspector, the CSS properties are applied correctly.
  2. The user's main group is Registered (style priority 20, username CSS color: #4c58a4;). The only secondary group is Administrative (style priority 1000, username CSS color: #344d9f; font-weight: bold;).
 
Disable all add-ons and test in a default style.

Most likely there is third party code involved which is preventing the classes from being applied.
 
Top Bottom