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

Username color in memberlist

Discussion in 'Styling and Customization Questions' started by Mustek, Dec 22, 2011.

  1. Mustek

    Mustek Member

    Hello there,

    I'm seeing on the forums that the memberlist in the sidebar has colored names,
    yet, I don't have any. Is there any modification I need to do to enable this?

    Trying to get it like this:

    I have the username legend which does show the colors, yet the memberlist stays a montone blue.
    (FYI, I added this to the username css: color: green; )
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Edit the sidebar_online_users template.

    Replace this:
    class="username{xen:if '!{$user.visible}', ' invisible'}{xen:if {$user.followed}, ' followed'}">{$user.username},
    With this:
    class="username{xen:if '!{$user.visible}', ' invisible'}{xen:if {$user.followed}, ' followed'}">{xen:helper richUserName, $user},
  3. Mustek

    Mustek Member

    Still nothing...

    This is the sidebar code bit

                <ol class="listInline">
                    <xen:foreach loop="$onlineUsers.records" value="$user" i="$i">
                        <xen:if is="{$i} <= {$onlineUsers.limit}">
                            <xen:if is="{$user.user_id}">
                                <a href="{xen:link members, $user}"
                                    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>
                            <xen:else />
                                {xen:phrase guest}<xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
                    <xen:if is="{$onlineUsers.recordsUnseen}">
                        <li class="moreLink">... <a href="{xen:link online}" title="{xen:phrase see_all_visitors}">{xen:phrase and_x_more, 'count={xen:number $onlineUsers.recordsUnseen}'}</a></li>
  4. Mustek

    Mustek Member

    Nevermind, I'm a derp. Your solution worked.
    I was on the wrong template -_-

  5. grega459

    grega459 Member

    Nope Still Non If This Worked
  6. Tracy Perry

    Tracy Perry Well-Known Member

    Are you using [BD] Widget Framework by chance?
  7. grega459

    grega459 Member

  8. Tracy Perry

    Tracy Perry Well-Known Member

    The online user widget has the option to use rich text names in it. That code is for a default setup (not using BD Widget Framework).
  9. grega459

    grega459 Member


Share This Page