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

XF 1.4 staff online sidebar

Discussion in 'Styling and Customization Questions' started by Brad P, Oct 17, 2014.

  1. Brad P

    Brad P Active Member

    How would i make it so it goes in order Admin at the top and so on down please ?
     
  2. Amaury

    Amaury Well-Known Member

    You'll likely need to edit fires, as it's ordered by last activity.
     
  3. Brad P

    Brad P Active Member

    how would i go about doing that?
     
  4. Brad P

    Brad P Active Member

    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?
     
  5. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    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: Oct 18, 2014
  6. Brad P

    Brad P Active Member

    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
     
  7. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

  8. Brad P

    Brad P Active Member

  9. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known 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: Oct 18, 2014
    Brad P likes this.

Share This Page