XF 1.3 Banned members usernames have line through them

Chimpie

Well-known member
All of our banned users have a line through their name. Two questions:
How can I remove that line?
Will the result it us having to rebuild the users?
 
that line is only visible to staff members AFAIK

Yes i know that didnt answer your question but was rather a general FYI. In case you didnt already know..
 
The line is only shown to moderators, regular members don't see it.

If you want to remove it though, you can use EXTRA.css:
Code:
.username .banned
{
    text-decoration: none !important;
}
hello Brogan, do you know how to make it visible for everyone? :coffee:
I mean the banned username:
.username .banned {
text-decoration: line-through;
}
But visible to everyone.
Appreciate your help.
--
Edit, got it: https://xenforo.com/help/user-group-styling/
 
Last edited:
Is there a way to show the line through the user name to everyone without adding banned members to a usergroup?

Theoretically you could make an add-on that overwrites the XenForo_Template_Helper_Core::helperUserNameHtml() method. In that you'd check if the user is banned and then change the html output there. This seems more difficult than just adding them to the user group though?
 
By default, the line-through comes from this in the username_styles.css template:

Code:
.username .banned {
    text-decoration: line-through;
}

If you have a user group for banned members, remove that from the template and add this to EXTRA.css instead:

Rich (BB code):
.username .style# {
    text-decoration: line-through;
}

Changing # to the ID of the user group.
 
By default, the line-through comes from this in the username_styles.css template:

Code:
.username .banned {
    text-decoration: line-through;
}

If you have a user group for banned members, remove that from the template and add this to EXTRA.css instead:

Rich (BB code):
.username .style# {
    text-decoration: line-through;
}

Changing # to the ID of the user group.

Thanks for the reply. I was trying to do this without creating an additional usergroup ;)
 
Could you not just add a class to the user span that can be targeted with CSS? A template modification and a CSS class is less complicated than overwriting the template helper code.
 
Back
Top Bottom