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

XF 1.1 Staff Online, Add Another Usergroup

Discussion in 'XenForo Questions and Support' started by Izagar, Apr 2, 2012.

  1. Izagar

    Izagar Active Member

    (Sorry if this has been made before)

    Is there a way where I can add another usergroup if they are not of Moderator or Admins group?

    See I have "Site Staff" which are below all moderators. They don't have forum powers, but they work on my main site.

    Any way I can include that? O-o;
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Edit the sidebar_online_users template.

    Change:
    Code:
    <xen:if is="{$user.is_moderator} OR {$user.is_admin}">
    To:
    Code:
    <xen:if is="{$user.is_moderator} OR {$user.is_admin} OR {xen:helper ismemberof, $user, x}">
    Replacing x with the group ID.
     
    Izagar likes this.
  3. Izagar

    Izagar Active Member

    PARTY! Whoo! Brogan you are so super helpful ;^; You help me so much at times. XD

    Edit: Wait. It's not working. D;

    This is what I put down:

    Code:
    <xen:contentcheck>
    					<xen:foreach loop="$onlineUsers.records" value="$user">
    						<xen:if is="{$user.is_moderator} OR {$user.is_admin} OR {xen:helper ismemberof, $visitor, 16}">
    							<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>
    				</xen:contentcheck>
     
  4. Ingenious

    Ingenious Well-Known Member

    I think it should be

    Code:
    {xen:helper ismemberof, $user, 16}
    rather than $visitor
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

    Yup, I posted the wrong parameter - it should be $user as Ingenious says.

    Using $visitor it will only show for the member in question :D

    Edit: Now that would have been good for an April fool...
     
  6. Izagar

    Izagar Active Member

    JERK D;. Lol I'm kidding. XD.

    Thanks. XD *goes off to change*

    Edit: No change... Sadface.

    Code:
    <xen:contentcheck>
    					<xen:foreach loop="$onlineUsers.records" value="$user">
    						<xen:if is="{$user.is_moderator} OR {$user.is_admin} OR {xen:helper ismemberof, $user, 16}">
    							<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>
    				</xen:contentcheck>
     
  7. Ingenious

    Ingenious Well-Known Member

    So do admin and mods show OK, but not usergroup 16? And are you sure 16 is the right usergroup ID?
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    Definitely works in my testing.
     

Share This Page