Fork me on GitHub
Current releases are 2.1 (gold) and 2.0.18.11 (security patch for 2.0)
Ready for 2.1? Find out if your favorite plugins are compatible.
The 2.0 branch will no longer receive updates after Dec 2014.

Suggestion (unless I'm doing something wrong)

edited October 2010 in Vanilla 2.0 Help
This discussion is related to the WhosOnline addon.
I noticed that it looks like this addon -- which is otherwise great by the way -- shows a user as being online even if that user has logged out. If there was a way to change this, that'd be great (and more intuitive in my opinion).

Comments

  • This has a latency "Rate of Refresh" in its settings
    what is it set to?
    e.g.. 180 seconds that is 3 minutes, until that time has elapsed
    a user will be shown as online even if they have just logged out
    live with it or adjust it, but not too short or your server will spend its time polling round searching for users rather than doing something more useful.
  • edited October 2010
    content deleted as was partial of above some ajax error possibly?, why cant we delete our own misposts?
  • This has a latency "Rate of Refresh" in its settings
    what is it set to?
    e.g.. 180 seconds that is 3 minutes, until that time has elapsed
    a user will be shown as online even if they have just logged out
    live with it or adjust it, but not too short or your server will spend its time polling round searching for users rather than doing something more useful.
    I have it set to 200. However this means that it's possible for a user who logged out ~3 minutes ago to still be shown online. 3 minutes isn't that huge of a deal... but that also means that a user who is inactive for 3 minutes but still logged in (typing a post, for example), won't be shown as being online by the WhosOnline addon even though they are.

    This could be solved by raising the rate of refresh, but the side effect of a higher rate of refresh is a user still being shown as logged on for a longer period of time after they've logged out.

    Ideally, a user wouldn't be shown as being online after X seconds of inactivity (15 minutes would be my preference, probably), *and* they also wouldn't be shown as being online if they explicitly logged out.
  • I'm afraid its not exactly possible to do what you are after. What your seeking is some sort of PUSH system, whereby any event such as someone logging out pushes the new list to the other users. However this is not how a standard web server works. The plugin will make a call every X seconds to get a list of who is still marked as online and at the same time write to the list that you are online. Therefore if someone closes the window, it takes until the next refresh for them to be shown as offline.

    The idle thing, is sort of possible by monitoring mouse events. But its not really practical and again would depend on the refresh rates.

    This is possible using other technology such as node.js or other push based server software however is well beyond the scope of this plugin.
  • Are you sure this isn't possible? It's how all of the other forums (that I know of) handle it: if a user logs off (I'd imagine the forum then marks the user as being offline in the database, or something like that), they're no longer shown as being online. Also, if they've been idle -- they haven't navigated anywhere else on the forum -- for X minutes, they aren't shown as being online either.
  • Yeah, that will happen anyway when they log off however it won't be until the next Ajax refresh call that other users will see. The only other way would be for me to make a service that can push nofifications to JavaScript so it will update immediately. Would only do that if there was a need to pay for this service.
  • @garymardell, I think that proper way would be to attach to EntryController_SingOut event and remove record from DB as user sings out. Since users have just reported me that one of them have logged out, another one logged in (from the same PC), and the first one was still in online list.
  • Oh right, well I'll have a look at it as soon as I can. I think I was assuming the problem was not if they chose to sign off but time out or just close the window. I can definitely add some code for an explicit logoff.
Sign In or Register to comment.