• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
  • This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

"Current Visitors" for logged in members only.

Vincent

Well-known member
#1
Hello y'all.

This modification makes sure that visitors can't see your "Current Visitors" list.

current_visitors.png

Go to the template called online_list

Search
Code:
<ol class="section memberList">
Add in front of it:
Code:
<xen:if is="{$visitor.user_id}">
----------

Search
Code:
</ol>
Add after:
Code:
<xen:else />
	{xen:phrase must_be_registered}
</xen:if>
 

Brogan

XenForo moderator
Staff member
#4
The conditional to allow content for members and hide it for guests is:

<xen:if is="{$visitor.user_id}">
This content will show to logged in members only
<xen:else />
This content will show to guests only
</xen:if>

I believe the == 1 should be removed from the code posted above.