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:
    http://xenforo.com/community/threads/tlk-usergroup-legend.16197/#post-213358

    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:
    Code:
    class="username{xen:if '!{$user.visible}', ' invisible'}{xen:if {$user.followed}, ' followed'}">{$user.username},
    With this:
    Code:
    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

    Code:
                <ol class="listInline">
                    <xen:foreach loop="$onlineUsers.records" value="$user" i="$i">
                        <xen:if is="{$i} <= {$onlineUsers.limit}">
                            <li>
                            <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>
                            </li>
                        </xen:if>
                    </xen:foreach>
                    <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>
                    </xen:if>
                </ol>
     
  4. Mustek

    Mustek Member

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

    Thanks!
     
  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

    yeah
     
  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).
    screenshot.png
     
  9. grega459

    grega459 Member

    FIXED THANK YOU <3
     

Share This Page