by asinsh 29 Jan 2011, 16:28
Not really ;)
The reason I ask is because the idle time out does not seem to work and session time seems to be constantly updated (presumably every three seconds that arrowchat phones home?). Thus, if I have a browser open to the site and I walk away for hours, I appear to others as online forever until I turn off my pc or shut the browser. This is true even if I am on a different firefox tab that is not the site. Seems like arrowchat_status session_time field is continuously updated whether I am at my computer or not so long as one of my browser tabs is on the site, and it seems that there is no idle time breakaway that takes over.
I spent some time looking at receive_buddylist.php (and functions_recieve.php) and here's what I see so far. My setup is a phpbb integration that shows as online all online users (not just friends).
1. There's a small bug in the function getOnlineList(). The call to that function includes a $time argument but the function itself uses time() rather than that argument. That will not make a material difference but it seemed odd, no?
2. That function creates a query that will return all users except those with a session_time that is older than the current time by at least (60 seconds plus the online timeout setting). In other words, if your settings are at the default where online timeout is 30 seconds, the query will return all users whose session_time is within 90 seconds of the current time. However, as I said earlier it appears that session_time gets updated every time arrowchat phones home so all users whose browsers are on the site show up even if they are absent for hours.
3. Turning to receive_buddylist.php, I see that it characterizes users with session_times between 30 and 90 seconds old as "offline" and those with session_times no more than 30 seconds old as "available".
4. However, it separately deals with people with special status:
- if the user is already "invisible" or "offline" it treats him or her as offline
- if the user is "busy " or "away" it leaves that status unchanged.
But I'm not really sure what "away" means since it has no analogue in the chat 'status' tab. Is a user who hasn't touched his pc for the idle timeout supposed automatically become "away"? That would make sense but I don't see where that happens (and as I said earlier it appears that it never happens on my setup).
I can search through the files and try to figure out where idle timeout is used and see why it isn't kicking in for me, but I figured I'd ask first in case anyone out there is ahead of me and can clue me in.
Thanks. This application really is terrific, by the way!
Btw, the last instruction in the update (the one that says to add v1.0.1 to the footer script) was unclear about whether you are supposed to do it just in the js script or also in the djs script. I figured an extra argument can't hurt even if it's not needed, but what's the right answer?