XF 1.5 Edited Group Styling Issue

denisx04

Active member
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

  • Untitled.webp
    Untitled.webp
    5.5 KB · Views: 7
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.
 
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.
 
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.
 
Top Bottom