XF 1.4 staff online sidebar

ive found this code in sidebar_online_users
Code:
<div class="userTitle">{xen:helper userTitle, $user}</div>

now if i remove it it removes the usertitle from the staff online, what i want to do is replace that code with the user group admin,moderator so it shows there staff rank in there so instead the member can still have his usertitle as something else

does anyone know the code that would make that work?
 
you can have something like:
Code:
<div class="userTitle"><xen:if is="{$user.is_admin}">Administrator<xen:elseif is="{$user.is_moderator}">Moderator<xen:elseif is="{$user.is_staff}">Staff Member</xen:if></div>

EDIT: Ooops... looks like the above code does not work... this should do the trick:
Code:
<div class="userTitle">
   <xen:if is="{$user.is_admin}">
     Administrator
   <xen:else />
     <xen:if is="{$user.is_moderator}">
       Moderator
     <xen:else />
       Staff Member
     </xen:if>
   </xen:if>
</div>
 
Last edited:
The following error occurred:
The following templates contained errors and were not saved: sidebar_online_users: 1) Line 14: Template syntax error.


thank you for your reply but there seems to be an error
 
another quick question would you know how to make it so admin are at the top and staff ranks below instead of it going as active member.
A custom add-on will do the trick... just a 'template_create' listener for the public template PAGE_CONTAINER to order the member list as you want :)

Edit for future viewers: the templates that include the staff online sidebar are 'news_feed_page_global' and 'forum_list'... NOT PAGE_CONTAINER
 
Last edited:
Back
Top Bottom