XF 1.1 Staff Online Now

tekgirl

Active member
I like the separate users online and then staff online...where can I find this either as an addon or code?

Thanks
 
Well the easiest way to achieve that is by having two accounts; a regular member account and a staff account.

Otherwise you may be able to edit the template and add a condition related to your user ID: <xen:if is="{$visitor.user_id} != x">
 
Well the easiest way to achieve that is by having two accounts; a regular member account and a staff account.

Otherwise you may be able to edit the template and add a condition related to your user ID: <xen:if is="{$visitor.user_id} != x">
Thanks Brogan, seems simple but where do I put that?

The annoying thing is I know that I've found the full instructions somewhere else here but for the life of me can't find them again now :(
 
Thanks Brogan, seems simple but where do I put that?

The annoying thing is I know that I've found the full instructions somewhere else here but for the life of me can't find them again now :(


You need to edit the sidebar_online_staff block in the sidebar_online_users template. Change the user_id to whatever your is if yours isn't 1.

Rich (BB code):
<!-- block: sidebar_online_staff -->
<xen:if hascontent="true">
<div class="section staffOnline avatarList">
<div class="secondaryContent">
<h3>{xen:phrase staff_online_now}</h3>
<ul>
<xen:contentcheck>
<xen:foreach loop="$onlineUsers.records" value="$user">
<xen:if is="{$user.is_moderator} OR {$user.is_admin}">
<xen:if is="{$user.user_id} != 1">
<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:if>
</xen:foreach>
</xen:contentcheck>
</ul>
</div>
</div>
</xen:if>
<!-- end block: sidebar_online_staff -->
 
Great
I would like to add a specific group to the online staff
What would be the code / id to add ?
Thank you

Admin CP -> Appearance -> Templates -> sidebar_online_users

Add the red code:

Rich (BB code):
<!-- block: sidebar_online_staff -->
<xen:if hascontent="true">
	<div class="section staffOnline avatarList">
		<div class="secondaryContent">
			<h3>{xen:phrase staff_online_now}</h3>
			<ul>
				<xen:contentcheck>
					<xen:foreach loop="$onlineUsers.records" value="$user">
						<xen:if is="{$user.is_moderator} OR {$user.is_admin} OR {xen:helper ismemberof, $user, 4}">
							<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>
			</ul>
		</div>
	</div>
</xen:if>
<!-- end block: sidebar_online_staff -->

You need to specify the group id.
 
Top Bottom