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

Staff Online List

Discussion in 'Styling and Customization Questions' started by theArchitect, Aug 18, 2012.

  1. theArchitect

    theArchitect Member

    I have found the template and code which displays the Staff Online box (sidebar_online_users):

    PHP:
    <xen:if is="{$user.is_moderator} OR {$user.is_admin}">
    I want to add another user group to the staff list, but I can't work out which code to use. I tried the group number and the group url name:

    PHP:
    OR {$user.is_5}
    OR {
    $user.is_group-name}
    But neither worked. Any thoughts?
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Code:
    <xen:if is="{$user.is_moderator} OR {$user.is_admin} OR {xen:helper ismemberof, $user, 5}">
    
     
    theArchitect likes this.
  3. xIsabel38

    xIsabel38 Well-Known Member

    Alright, lets see if I'm reading this right. This adds user group 5 to the "Staff Online" list in the sidebar right?

    So if I have 9 Staff Members (Director- 3, Deputy Director- 6, Executive Assistant- 7, Senior Mod- 4, Mod- 5, Video Media Streams- 9, Social Media Coordinator- 11, Video Media Productions- 10, and Graphic Designer- 8) can I use this code to display them all under the "Staff Online" block?

    Code:
    <xen:if is="{$user.is_moderator} OR {$user.is_admin} OR {xen:helper ismemberof, $user, 5} OR {xen:helper ismemberof, $user, 6} OR {xen:helper ismemberof, $user, 7} OR {xen:helper ismemberof, $user, 8} OR {xen:helper ismemberof, $user, 9} OR {xen:helper ismemberof, $user, 10} OR {xen:helper ismemberof, $user, 11}">

    EDIT: Well whaddaya know, it worked. Thanks!
    This answers my question.
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Your code is not wrong, but it can be condensed:

    Code:
    <xen:if is="{$user.is_moderator} OR {$user.is_admin} OR {xen:helper ismemberof, $user, 5, 6, 7, 8, 9, 10, 11}">
    
     
    Mendo, Adam Howard and Shelley like this.
  5. xIsabel38

    xIsabel38 Well-Known Member

    Well now that does look more clean than that the eye sore I put up there doesn't it?
    Thanks again.
     

Share This Page