• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.3 Banned members usernames have line through them

Chimpie

Well-known member
#1
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?
 

Brogan

XenForo moderator
Staff member
#2
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;
}
 

FredC

Well-known member
#3
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..
 

rafass

Well-known member
#6
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:

Daniel Hood

Well-known member
#8
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?
 

Joe Link

Well-known member
#9
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?
Yeah it does! Thanks for the reply Daniel.
 

Amaury

Well-known member
#10
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:

Code:
.username .style# {
    text-decoration: line-through;
}
Changing # to the ID of the user group.
 

Joe Link

Well-known member
#11
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:

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 ;)
 

James

Well-known member
#12
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.