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

XF 1.2 Sidebar user name styling not working?

Discussion in 'Styling and Customization Questions' started by Neszy, Sep 29, 2013.

  1. Neszy

    Neszy Member

    Hello,

    I'm using Arty's Soft Responsive skin on my forum (not sure if it changes how the code is applied - I found a thread on the Artodia forums where this fix seemed to work fine but I can't seem to get it to work), and the user name styling specified here doesn't seem to be working on my forum. Below is the default template:

    [​IMG]

    Which obviously has no effect to sidebar styling. Now, when I add the code...

    [​IMG]

    Nothing seems to change in the online now sidebar:

    [​IMG]

    Does anyone know why this is? The forum is currently inactive since it's launching relatively soon, so linking the URL for inspection isn't possible, though I can provide more information if necessary.

    Thanks.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Does it work on a default unedited style?

    If so, you will need to contact the style author for support with the custom style.
     
  3. Neszy

    Neszy Member

    It doesn't appear to be working on the default style, either.
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

  5. Amaury

    Amaury Well-Known Member

    What are you trying to change? The light blue text like Staff Online Now?
     
  6. Neszy

    Neszy Member

    Attempting to change "Members Online Now" to show username styling (as seen in "Staff Online Now").

    Still doesn't seem to be working after redoing it - I could make a temporary account if you're willing to check the code.
     
  7. Amaury

    Amaury Well-Known Member

    I don't know how to do that, either, unfortunately.

    A workaround you could do, though, is to make the link color the same color as your username. Are you the only staff, though, currently?
     
  8. Neszy

    Neszy Member

    Full template is as follows:
    Code:
    <xen:edithint template="sidebar.css" />
    
    <!-- block: sidebar_online_staff -->
    <xen:if hascontent="true">
        <div class="section staffOnline avatarList">
            <div class="secondaryContent">
                <h3>{xen:phrase staff_online_now}</h3>
                <ul>
                    <xen:contentcheck>
                        <xen:foreach loop="$onlineUsers.records" value="$user">
                            <xen:if is="{$user.is_staff}">
                                <li>
                                    <xen:avatar user="$user" size="s" img="true" />
                                    <xen:username user="$user" rich="true" />
                                    <div class="userTitle">{xen:helper userTitle, $user}</div>
                                </li>
                            </xen:if>
                        </xen:foreach>
                    </xen:contentcheck>
                </ul>
            </div>
        </div>
    </xen:if>
    <!-- end block: sidebar_online_staff -->
    
    <!-- block: sidebar_online_users -->
    <div class="section membersOnline userList">      
        <div class="secondaryContent">
            <h3><a href="{xen:link online}" title="{xen:phrase see_all_online_users}">{xen:phrase members_online_now}</a></h3>
          
            <xen:if is="{$onlineUsers.records}">
          
                <xen:if is="{$visitor.user_id}">
                    <xen:if hascontent="true">
                    <h4 class="minorHeading"><a href="{xen:link account/following}">{xen:phrase people_you_follow}:</a></h4>
                    <ul class="followedOnline">
                        <xen:contentcheck>
                            <xen:foreach loop="$onlineUsers.records" value="$user">
                                <xen:if is="{$user.followed}">
                                    <li title="{$user.username}" class="Tooltip"><xen:avatar user="$user" size="s" img="true" class="_plainImage" /></li>
                                </xen:if>
                            </xen:foreach>
                        </xen:contentcheck>
                    </ul>
                    <h4 class="minorHeading"><a href="{xen:link members}">{xen:phrase members}:</a></h4>
                    </xen:if>
                </xen:if>
              
                <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>
            </xen:if>
          
            <div class="footnote">
                {xen:phrase online_now_x_members_y_guests_z_robots_a, 'total={xen:number $onlineUsers.total}', 'members={xen:number $onlineUsers.members}', 'guests={xen:number $onlineUsers.guests}', 'robots={xen:number $onlineUsers.robots}'}
            </div>
        </div>
    </div>
    <!-- end block: sidebar_online_users -->
     
  9. Neszy

    Neszy Member

    There are multiple staff, some have red names and others have blue (both emboldened). Brogan's fix at the beginning of the OP should be working, but for some reason it's not.
     
  10. Jeremy

    Jeremy XenForo Moderator Staff Member

    Do you have the Widget framework installed? That modifies the code and prevents changes to be made to the sidebar at times.
     
  11. Neszy

    Neszy Member

    Yes, I do have Widget framework installed. Is there a workaround or is it simply one or the other?
     
  12. Jeremy

    Jeremy XenForo Moderator Staff Member

    It has it's own templates.
     
    Neszy likes this.
  13. Neszy

    Neszy Member

    Turns out there's just a tickbox in the "Users Online Now" Widget options. Thanks for the help, Jeremy.
     
  14. DarkUnderlord

    DarkUnderlord Member

    Herp-derp. Just wanted to say I've just had the same issue. I'd installed the Widget framework for another mod (which we've since disabled) and wondered why changes to those templates didn't work and seemed to have reverted.

    If anyone else has this, you're looking for templates with the prefix: wf_widget_

    EG: wf_widget_online_users
     
    Last edited: Oct 7, 2013

Share This Page