1. 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

Discussion in 'XenForo Questions and Support' started by Chimpie, Aug 9, 2014.

  1. Chimpie

    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?
  2. Brogan

    Brogan XenForo Moderator Staff Member

    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:
    .username .banned
        text-decoration: none !important;
    Divvens and Amaury like this.
  3. FredC

    FredC Well-Known Member

    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..
  4. FredC

    FredC Well-Known Member

    This is why i cant be bothered to be helpful around here.. I blame this guy.. Hes to damn quick...:eek:
  5. Chimpie

    Chimpie Well-Known Member

    I didn't already know but I like that only the staff can see it. Thanks.
  6. rafass

    rafass Well-Known Member

    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: Mar 8, 2015
  7. Joe Link

    Joe Link Well-Known Member

    Is there a way to show the line through the user name to everyone without adding banned members to a usergroup?
  8. Daniel Hood

    Daniel Hood Well-Known Member

    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?
  9. Joe Link

    Joe Link Well-Known Member

    Yeah it does! Thanks for the reply Daniel.
    Daniel Hood likes this.
  10. Amaury

    Amaury Well-Known Member

    By default, the line-through comes from this in the username_styles.css template:

    .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:

    .username .style# {
        text-decoration: line-through;
    Changing # to the ID of the user group.
  11. Joe Link

    Joe Link Well-Known Member

    Thanks for the reply. I was trying to do this without creating an additional usergroup ;)
  12. James

    James Well-Known Member

    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.
  13. Joe Link

    Joe Link Well-Known Member

    Thanks for the suggestion, I'll investigate.

Share This Page