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

It's possible to custom the name of an user that is into a specifict usergroup?

Discussion in 'Styling and Customization Questions' started by Regina Ortega, Apr 9, 2013.

  1. Regina Ortega

    Regina Ortega Active Member

    It's possible to custom the name of an user that is into a specifict usergroup?

    I want to customize the colors/efects of each user depending on their usergroup (like vip user, legend user, etc. Like vbulletin.)

    Is it possible? Where i can find a guide? I saw that i can add a picture front the nickname too, how do i can do it?

    Thank you all who comment and help me !
     
  2. James

    James Well-Known Member

    You can add usergroup based styling to your members based on their usergroups, see here in the XF manual: http://xenforo.com/help/user-group-styling/

    What do you mean by add a picture in front of their name? If you want to prefix their username with a picture, you'll have to use CSS to add an image and place it there, or use an add-on to insert the picture. Can you provide a link to where you've seen this so I can clarify?
     
  3. Shelley

    Shelley Well-Known Member

    I think they mean on an individual level. per member no matter which usergroup their in. I could be reading that wrong though james.
     
  4. Shelley

    Shelley Well-Known Member

    If it is indeed to add a image/icon this is what I'm using you would apply your styling to the usergroup you are wanting.

    Code:
    background: url("styles/test/xenforo/icons/admin_markup.png") no-repeat scroll 0 0 transparent;
        color: #B93636;
        font-family: 'Helvetica';
        font-weight: bold;
        padding-left: 14px;
    
    Depending on the size of the image the padding-left will need adjusted accordingly. The output of that css and image is as follows yours would be different.
    usergroup.png
    Additonally, if you are wanting the richtext and usergroup markup to show in the members online you will need to make the following template edit.
    If you require for the markup to show in the Members Online Now listings you'll have to go into the the sidebar_online_users Template and make the following change.

    Search:
    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 with:
    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>
     
    haincha and Tracy Perry like this.
  5. James

    James Well-Known Member

    I read it that way first too, then I read "depending on their usergroup" and it seemed maybe they wanted usergroup-based styling.

    To style individual users, there are a number of ways such as creating a class and applying it to them if it matches the usergroup (manually), creating complex CSS selectors such as .userText a[href="members/james.908"]{ color: red; } or creating an add-on to do it all for you.
     
    Shelley likes this.
  6. Regina Ortega

    Regina Ortega Active Member

    What shelley did is correct, that's one of the two things that i want, the another thing is to custom their username color/effect depending its level, like vbulletin that they have Legend, vip, ultra legend whatever, their nicknames has some shining, color, some effects that make them look pretty and users want to increase their level to get them.

    Thank you!
     
  7. James

    James Well-Known Member

    Do you want to do this for individual users or for users that are a member of a group?

    For example, do you want all users who are a member of "Legend" to have the custom styling, or just specific users?

    If you want all users, the manual link above does indeed explain that: http://xenforo.com/help/user-group-styling/
     

Share This Page