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

XF 1.2 Online Staff List

Discussion in 'XenForo Questions and Support' started by JpA, Jul 17, 2013.

  1. JpA

    JpA Active Member

    How do I make it so if I set someone as a certain group and they are on the website how do I make it so their name shows up on the "Staff online now" list. Please help
     
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    In template sidebar_online_users find:
    Code:
                            <xen:if is="{$user.is_staff}">
    
    Replace with:
    Code:
                            <xen:if is="{$user.is_staff} OR {xen:helper ismemberof, $user, 2}">
    
    Change 2 (in red) to be the ID of whatever user group you'd like to display.

    You may want to read Paul Brogan's resource on conditionals:
    http://xenforo.com/community/resources/conditional-statements.1604/
     
    Maulss likes this.
  3. JpA

    JpA Active Member

    If i use the first set of code do I not change anything?
     
  4. JpA

    JpA Active Member

    Oh shoot I just noticed I was running XenForo 1.1.5...
     
  5. Jeremy

    Jeremy XenForo Moderator Staff Member

    Since you are on 1.1.5, in the same template find:
    Code:
                            <xen:if is="{$user.is_moderator} OR {$user.is_admin}">
    
    Replace with:
    Code:
                            <xen:if is="{$user.is_moderator} OR {$user.is_admin} OR {xen:helper ismemberof, $user, 2}">
    
    Still change the number to suit your needs.

    Its a find and replace.
     
  6. JpA

    JpA Active Member

    I got to appearance then templates right?
     
  7. Jeremy

    Jeremy XenForo Moderator Staff Member

    ACP -> Appearance -> (Style you want to modify) -> Templates -> sidebar_online_users (use the search in the top right of the table)
     
  8. JpA

    JpA Active Member

    okay then what do I replace the 2 with? (color red)
     
  9. Jeremy

    Jeremy XenForo Moderator Staff Member

    A user group ID. Go to:
    ACP -> Users -> User Groups -> (Group you want to show up in staff online)

    The URL will include the ID. An example (with ID highlighted) is:
    user-groups/moderating.4/edit

    Replace 2 with that ID.
     
  10. JpA

    JpA Active Member

    Okay can I keep adding OR with that same line of code but a diffrent number?
     
  11. Jeremy

    Jeremy XenForo Moderator Staff Member

    Yes. Or:

    Code:
    {xen:helper ismemberof, $user, 2, 3, 4}
    (this is my recommended way)
     
  12. JpA

    JpA Active Member

    Ah okay thank you
     
  13. Brogan

    Brogan XenForo Moderator Staff Member

    In 1.2 members can be set as staff via a checkbox on their profile in the ACP.
     
  14. JpA

    JpA Active Member

    I would use 1.2 but the theme that I want isn't updated for 1.2
     
  15. Amaury

    Amaury Well-Known Member

    If it's not compatible, you can make it compatible for 1.2 yourself if you know how styles work.
     
  16. JpA

    JpA Active Member

    I have no idea how styles work
     
  17. SatGuyScott

    SatGuyScott Active Member

    I am doing this, however for some users they only see the additional user group when they log out... If they log in that group is not shown. What am I missing?
     

Share This Page