• 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

Izagar

Active member
#1
(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;
 

Brogan

XenForo moderator
Staff member
#2
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

Active member
#3
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>
 

Brogan

XenForo moderator
Staff member
#5
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...
 

Izagar

Active member
#6
Edit: Now that would have been good for an April fool...
JERK D;. Lol I'm kidding. XD.

{xen:helper ismemberof, $user, 16}
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>