Help
General ArrowChat talk that doesn't fit any other forum.
User avatar
asinsh
Customer
 
Posts: 55
Joined: 02 Apr 2010, 08:22

 

by asinsh 27 Jan 2011, 18:49

I'm confused about how arrowchat determines who is online (who shows up as green or as half moon in the friends list). I know the acp has a setting for online timeout (default 30 seconds) and another setting for idle time (default 5 minutes), but I'm not really sure what those settings mean or, more generally, how arrowchat determines which friends to show as green, which friends to show as half moon and which friends not to show at all. Is there a post or some documentation that really explains all of this, or can someone try to explain it here? Thanks.
User avatar
Jason
Customer
 
Posts: 2330
Joined: 12 Dec 2009, 16:06

 

by Jason 27 Jan 2011, 18:56

Assuming you know PHP, look at the includes/receive_buddylist.php file. That is exactly how ArrowChat determines online, offline, and idle users.
User avatar
asinsh
Customer
 
Posts: 55
Joined: 02 Apr 2010, 08:22

 

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?
User avatar
Jason
Customer
 
Posts: 2330
Joined: 12 Dec 2009, 16:06

 

by Jason 29 Jan 2011, 16:47

The "away" status is idle. If a user's status is away, it should be considered idle. Every time the mouse/keyboard is moved or a new page is loaded and the status is away, it'll be updated to available. The away status is set by a jQuery plugin that detects mouse/keyboard movements.

You shouldn't have to worry about any of that though, because ArrowChat will handle it for you. You would just need to change the icon, color, text, etc. to indicate idle when a user's status is away.

Hopefully that makes sense to you.
User avatar
asinsh
Customer
 
Posts: 55
Joined: 02 Apr 2010, 08:22

 

by asinsh 29 Jan 2011, 16:53

Yes, that makes perfect sense, but it appears not to be happening. If I leave the computer on and the browser open but do not touch it for hours, I never show up as away. I am always avaiable, even though I am not touching the mouse or keyboard. I figured maybe each time it updates arrowchat (ever three seconds by default) it thinks that means I am there?
User avatar
Jason
Customer
 
Posts: 2330
Joined: 12 Dec 2009, 16:06

 

by Jason 29 Jan 2011, 17:57

asinsh wrote:Yes, that makes perfect sense, but it appears not to be happening. If I leave the computer on and the browser open but do not touch it for hours, I never show up as away. I am always avaiable, even though I am not touching the mouse or keyboard. I figured maybe each time it updates arrowchat (ever three seconds by default) it thinks that means I am there?

Your invisible? If you set your status to invisible, the idle plugin will stop running. In fact, ArrowChat will only run the idle plugin if you're "available". It doesn't make much sense to run it if the user is busy, offline, or invisible.
User avatar
asinsh
Customer
 
Posts: 55
Joined: 02 Apr 2010, 08:22

 

by asinsh 29 Jan 2011, 18:38

No, I'm available. I have a laptop right next to my pc so I can be on one user account on the laptop and another on my pc, The user on the laptop continuously shows as green (available) and will do so for hours on end. Can't figure this out because it doesn't seem to happen for all users :shock:

I can easily recode it to tie to phpbb's last activity but that would not be nearly as good as what you are describing. Any hint on why the idle plug in may sometimes not do its job?
User avatar
Staff Bot
ArrowChat Team
 
Posts: 8996
Joined: 07 Nov 2012, 13:41

 

by Staff Bot 07 Nov 2012, 12:40

This thread has been locked because the last post is greater than six months old. There is a good chance that the information in this thread is outdated. Please open a new topic if you wish to discuss this further.