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

XF 1.2 Member Online / Staff Online

Discussion in 'XenForo Questions and Support' started by Enguerran A, Oct 3, 2013.

  1. Enguerran A

    Enguerran A Well-Known Member

    Hello,

    I added some of my member as staff member to test something but I'm facing a problem.
    My users are displayed both times, one in the Staff block from Xenporta and an other time in the online member list. Is there a way to remove the double nicknames?

    http://puu.sh/4GBHB.png
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    That's normal, see here: http://xenforo.com/community/

    Staff are shown in both the staff online and members online blocks.

    If your issue is related to an add-on then you will need to ask in the add-on discussion thread.
     
  3. Enguerran A

    Enguerran A Well-Known Member

    Well, can we change that in xenforo templates? Due to the fact that the addon is doing what I want, I'm pretty sure it's xenforo related ^^
     
  4. Jeremy

    Jeremy XenForo Moderator Staff Member

    Edit sidebar_online_users, find:
    HTML:
                            <xen:if is="{$user.user_id}">
                                <a href="{xen:link members, $user}"
                                    class="username{xen:if '!{$user.visible}', ' invisible'}{xen:if {$user.followed}, ' followed'}">{$user.username}</a><xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
                            <xen:else />
    
    Replace:
    HTML:
                            <xen:if is="{$user.user_id} AND !{$user.is_staff}">
                                <a href="{xen:link members, $user}"
                                    class="username{xen:if '!{$user.visible}', ' invisible'}{xen:if {$user.followed}, ' followed'}">{$user.username}</a><xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
                            <xen:else />
    
     
  5. Enguerran A

    Enguerran A Well-Known Member

  6. Jeremy

    Jeremy XenForo Moderator Staff Member

    Oops, misread that. here you go:
    Replace it with this:
    HTML:
    <xen:if is="!{$user.is_staff}">
                            <xen:if is="{$user.user_id}">
                                <a href="{xen:link members, $user}"
                                    class="username{xen:if '!{$user.visible}', ' invisible'}{xen:if {$user.followed}, ' followed'}">{$user.username}</a><xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
                            <xen:else />
    
    Right after <xen:else /> you'll find the guest HTML and another </xen:if>. You need to add a second </xen:if> after it.
     
  7. Enguerran A

    Enguerran A Well-Known Member

    That is awesome ! Thanks so much !!
     

Share This Page