1. 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

Discussion in 'Styling and Customization Questions' started by denisx04, Dec 6, 2015.

  1. denisx04

    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
     

    Attached Files:

  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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.
     
  3. denisx04

    denisx04 Active Member

    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.
     
  4. Mike

    Mike XenForo Developer Staff Member

    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.
     

Share This Page