question regarding how it is determined if somebody is online or just idle (logged in but inactive)
i have a question regarding how it is determined if a user is online. the problem is that if somebody is just logged in but not active (e.g. not physically sitting at the computer, but the site is still open in a browser window) the user is shown as online. that's a little confusion for some users and i was wondering if it was possible to measure when the last link was clicked and use that as an indicator?
that would make more sense to me.
Best Answer
-
hbf MVP
after a quick review, it looks like this js needs to be run to update the db with online status. it should get run at each refresh and also sets an internal timeout. i suggest commenting out the line
setTimeout(GetOnline, gdn.definition('WhosOnlineFrequency') * 1000);
i that very well may do what you want. give it a shot and let me know. hope it works!
1
Answers
as far as i understand there is a little ajax script that runs at the interval set in the preferences. once it runs it sets the presence information. if it hasn't run in the allotted time, the system assumes the user is offline. when a user refreshes a page or posts, it also updates the presence information.
I believe, if you wanted it to only update based on posts or interactive refreshes, you just need to stop the script from loading on the client side.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
you could try just commenting out all of the code in 'whosonline.js' im pretty sure that is the ajax script that picks up online presence of "inactive" browser session.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
thanks for the suggestion, i just tested it and it does not work. it won't show anyone online anymore when commented out..
after a quick review, it looks like this js needs to be run to update the db with online status. it should get run at each refresh and also sets an internal timeout. i suggest commenting out the line
setTimeout(GetOnline, gdn.definition('WhosOnlineFrequency') * 1000);
i that very well may do what you want. give it a shot and let me know. hope it works!
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
great, it works exactly the way i want it to! thanks so much for taking the time and helping solve this! : )
no problem. I may modify mine as well and see if my users like the results.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained