XF 1.5 How can I hide the current members online from unregistered guests?

Jason M.

Member
I only want the registered members to see the list of who is currently on line. Seems simple but I don't see how to do this easily. What css would I need to add to make this work? Thanks and sorry if posted in the wrong area.
 
You can do this with a conditional statement. See this guide for more information.

Conditional Statements

As a note, I used to do this but now show members online to everyone. I thought it was better to show the site was active, guests expect to see who is online from other forum software.
 
You can do this with a conditional statement. See this guide for more information.

Conditional Statements

As a note, I used to do this but now show members online to everyone. I thought it was better to show the site was active, guests expect to see who is online from other forum software.
Thank you Martok. I'm not sure that we will implement this. I tend to agree with your opinion on activity, but a few members have asked about this ability as opposed to hiding their online visibility.
 
template sidebar_visitor_panel



<xen:if is="!{$visitor.is_admin}">
<style> .membersOnline {display:none} </style>
</xen:if>


put this code top
<xen:include template="ad_sidebar_below_visitor_panel" />
 
template sidebar_visitor_panel



<xen:if is="!{$visitor.is_admin}">
<style> .membersOnline {display:none} </style>
</xen:if>


put this code top
<xen:include template="ad_sidebar_below_visitor_panel" />
That's not the right way to do it at all, especially using display: none. Also your code would only make it available to administrators, the OP wants to hide it from guests only.

This is the correct code.

1. How can I show content just to logged in members and hide it from guests?
<xen:if is="{$visitor.user_id}">
This content will show to logged in members
</xen:if>
 
That's not the right way to do it at all, especially using display: none. Also your code would only make it available to administrators, the OP wants to hide it from guests only.

This is the correct code.

1. How can I show content just to logged in members and hide it from guests?
<xen:if is="{$visitor.user_id}">
This content will show to logged in members
</xen:if>

lol :D i put my code without change; i don't want any member show members online
 
Top Bottom