• 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

Enguerran A

Well-known member
#1
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
 

Enguerran A

Well-known member
#3
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 ^^
 

Jeremy

Well-known member
#4
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 />
 

Jeremy

Well-known member
#6
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.