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

XF 1.5 Edited Group Styling Issue

denisx04

Active member
#1
I went ahead and edited my sidebar_online_users and changed this

Code:
class="username{xen:if '!{$user.visible}', ' invisible'}{xen:if {$user.followed}, ' followed'}">{$user.username},
to

Code:
class="username{xen:if '!{$user.visible}', ' invisible'}{xen:if {$user.followed}, ' followed'}">{xen:helper richUserName, $user},
My staff color did change to what its suppose to be but its added an extra comma at the end of the last user online. Any idea how to remove the last comma? I tried removing the "," at the end but all that did was remove all of the commas. I attached an image to show you the last comma
 

Attachments

Jake Bunce

XenForo moderator
Staff member
#2
You need to check the iteration. In the default sidebar_online_users template you will see this code for example:

Code:
<xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
That exact code may work for you depending on which loop you are in.
 

denisx04

Active member
#3
You need to check the iteration. In the default sidebar_online_users template you will see this code for example:

Code:
<xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
That exact code may work for you depending on which loop you are in.
Not sure I understand, I do have that exact code in sidebar_online_users. Even messing around with it still gives me the added , on the last user online.
 

Mike

XenForo developer
Staff member
#4
The original template doesn't have the exact code you quoted as what you changed from -- there's no comma there, it's in an if tag (and outside an a tag). I would recommend reverting and recustomizing the template, noting the specific bit to change more closely.