When the "Who's online" block is visible it displays the user name of each person currently logged in, including the admin if the he or she is logged in to work somewhere on the site.
Is there any way to limit the list to exclude certain administrative, editorial and/or review personnel?
thanks in advance Roger
On 04/13/2012 01:24 PM, Roger wrote:
Is there any way to limit the list to exclude certain administrative, editorial and/or review personnel?
I used Views to do it. This also eludes duplicate usernames if logged in from more than one browser and you have much better controll how the list of users is presented (additional information, profile picture).
Given that there is no way to create an accurate list, I usually advise clients not to show such a list.
Nancy
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
From: steeph
On 04/13/2012 01:24 PM, Roger wrote:
Is there any way to limit the list to exclude certain administrative, editorial and/or review personnel?
I used Views to do it. This also eludes duplicate usernames if logged in from more than one browser and you have much better controll how the list of users is presented (additional information, profile picture).
On 04/13/2012 05:12 PM, Ms. Nancy Wichmann wrote:
Given that there is no way to create an accurate list, I usually advise clients not to show such a list.
How accurate is the block in core? Doesn't it still show users a few minutes after they logged out. It's not a problem to create a view with the same functionality.
You could also add more filters, like one to hide users who have chosen so in their profile settings. Without that I'd also not recomend using that block.
On Fri, Apr 13, 2012 at 11:29 AM, steeph wrote:
On 04/13/2012 05:12 PM, Ms. Nancy Wichmann wrote:
Given that there is no way to create an accurate list, I usually advise clients not to show such a list.
How accurate is the block in core? Doesn't it still show users a few minutes after they logged out. It's not a problem to create a view with the same functionality.
That was Nancy's point. There is no method to get an accurate list. What if they just leave for the night logged in, are they "online"?
You could also add more filters, like one to hide users who have chosen so in their profile settings. Without that I'd also not recomend using that block.
Yes, but it still isn't an accurate representation it is only an approximation based on stored session data. Nancy's suggestion to her clients is to prevent user frustration caused by the inaccurate representation.
I don't know if it shows people after they actually bother to log out, but it might. The fact is that the list just has no connection to reality. I don't know if actually reading the Session table would be any better either.
Nancy
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
From: steeph How accurate is the block in core? Doesn't it still show users a few minutes after they logged out. It's not a problem to create a view with the same functionality.
On 04/13/2012 05:48 PM, Ms. Nancy Wichmann wrote:
I don't know if it shows people after they actually bother to log out, but it might. The fact is that the list just has no connection to reality. I don't know if actually reading the Session table would be any better either.
That's right. But you can set an amount of minutes after the user's last activity. After this the user isn't displayed as "online" until the next page is called. Sure, it isn't reality, but most times it's not far from it.
If Roger wants to show such a block, views is my recommendation. If it's not accurate enough, I have no recommendation. But if hiding admin users is all that he wants to change about the display provided by core, that should do it.
if you have access to the system, you could probably limit the systems TCP keep alive time. If it doesn't see activity in a certain amount of time that connection is closed and the Apache thread is released. When that's closed the session should be released as well.
-Don-
On 4/13/2012 12:32 PM, steeph wrote:
On 04/13/2012 05:48 PM, Ms. Nancy Wichmann wrote:
I don't know if it shows people after they actually bother to log out, but it might. The fact is that the list just has no connection to reality. I don't know if actually reading the Session table would be any better either.
That's right. But you can set an amount of minutes after the user's last activity. After this the user isn't displayed as "online" until the next page is called. Sure, it isn't reality, but most times it's not far from it.
If Roger wants to show such a block, views is my recommendation. If it's not accurate enough, I have no recommendation. But if hiding admin users is all that he wants to change about the display provided by core, that should do it.
To clear up confusion:
The "Who's online" block determines it by querying the sessions table. It bases it from the timestamp and interval. That time can be set in the configuration for the Who's online block.
You are dealing with stateless HTTP. By it's very nature, it's always going to be like this. Once the page is downloaded, the connection is dropped. Unless you are doing some AJAX behind the scenes, the that person can keep their browser open all night, but it will drop them as being online since they haven't done any new requests from Drupal.
With the stateless stuff, the way sites like Facebook get around it is by doing long polling/server push. Basically a connection from the browser is kept open to the server. Special server software like Comet, APE or node.js is used for this. There is tricky ways you can do this with Apache and even PHP, but you better have a ton of memory on that server given Apache's heavy memory usage.
Basically the Drupal method works for a majority of the cases. It's actually the same method used by other software, such as PHPBB and vBulletin and works with all hosting. Going something more real time is going to take some custom coding and for even better real time, a server you can install custom server software on.
Jamie Holly http://www.intoxination.net http://www.hollyit.net
On 4/13/2012 12:38 PM, Don Pickerel wrote:
if you have access to the system, you could probably limit the systems TCP keep alive time. If it doesn't see activity in a certain amount of time that connection is closed and the Apache thread is released. When that's closed the session should be released as well.
-Don-
On 4/13/2012 12:32 PM, steeph wrote:
On 04/13/2012 05:48 PM, Ms. Nancy Wichmann wrote:
I don't know if it shows people after they actually bother to log out, but it might. The fact is that the list just has no connection to reality. I don't know if actually reading the Session table would be any better either.
That's right. But you can set an amount of minutes after the user's last activity. After this the user isn't displayed as "online" until the next page is called. Sure, it isn't reality, but most times it's not far from it.
If Roger wants to show such a block, views is my recommendation. If it's not accurate enough, I have no recommendation. But if hiding admin users is all that he wants to change about the display provided by core, that should do it.
Big Brother is watching.
On Fri, Apr 13, 2012 at 4:24 AM, Roger arelem@bigpond.com wrote:
When the "Who's online" block is visible it displays the user name of each person currently logged in, including the admin if the he or she is logged in to work somewhere on the site.
Is there any way to limit the list to exclude certain administrative, editorial and/or review personnel?
thanks in advance Roger -- [ Drupal support list | http://lists.drupal.org/ ]