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

Staff online , "Group name" online?

#1
Hello , i was trying today to add a new block to my sidebar below the "Staff Online" block. The new block would be just like "Staff Online" , however, it would show if any members of a custom group is online. We have assistant ranks in our forum and i want to create a seperate block to allow users to see if any assistants are online at that time.

I've tried to create a template called "assist_on" which includes these codes:

Code:
    <div class="section assistOnline avatarList">
        <div class="secondaryContent">
            <h3>{xen:phrase assist_online_now}</h3>
            <ul>
             
                    <xen:foreach loop="$onlineUsers.records" value="$user">
                                                <xen:if is="{xen:helper ismemberof, $user, 9}">
                            <li>
                                <xen:avatar user="$user" size="s" img="true" />
                                <xen:username user="$user" rich="true" />
                                <div class="userTitle">{xen:helper userTitle, $user}</div>
                            </li>
                        </xen:if>
                    </xen:foreach>
             
            </ul>
        </div>
    </div>
The 9 in the line " <xen:if is="{xen:helper ismemberof, $user, 9}">" is the group ID of the assistants group.

Then in PAGE_CONTAINER i've added this line under sidebar:

Code:
<xen:include template="assist_on" />
In the end it did show a block much like the "Staff_Online" block. However it just doesn't show when an assistant is online. Any idea how i could fix this? Thanks! :]