• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ Feature Requests (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Disconnect when user leaves the page

This forum is now locked as we will no longer be developing the v1.x branch

Moderators: OldWolf, re*s.t.a.r.s.*2

Topic locked
9 posts • Page 1 of 1

Postby bitcloud » Fri May 04, 2007 2:07 pm

Hi,

I've noticed that sometimes users stay in the chat room after they've closed the window (for ages infact)

is there some javascript way that a window/tab close would signal a disconnect from the chat room?
bitcloud
New member
 
Posts: 9
Joined: Wed Apr 04, 2007 4:54 pm
Top

Postby phpfreechat » Fri May 04, 2007 4:16 pm

bitcloud wrote:is there some javascript way that a window/tab close would signal a disconnect from the chat room?

In KHTML browser (Safar, Konqueror) : Yes
In IE : No
In FF : No

Maybe it's doable, but I didn't find a way to do it... please explain to me how and I will write the code.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby bitcloud » Fri May 04, 2007 4:21 pm

... i'm drawing a blank :)

either way, is there a setting for auto timeout after x amount of inaction or something? i've got a user thats been apparently connected for the past 4 hours (long after he's logged out of the site)
bitcloud
New member
 
Posts: 9
Joined: Wed Apr 04, 2007 4:54 pm
Top

Postby bitcloud » Fri May 04, 2007 4:31 pm

also, i've tried to kick the user, but he still shows up in the "whoisonline.php" even though he is now out of the chat room... chosen nickname is now in use so the user won't be able to rejoin...

seems like theres a bug there, as well as a bug in the /kick code..
Last edited by bitcloud on Fri May 04, 2007 4:32 pm, edited 1 time in total.
bitcloud
New member
 
Posts: 9
Joined: Wed Apr 04, 2007 4:54 pm
Top

Postby phpfreechat » Fri May 04, 2007 4:35 pm

Yes there is a timeout.
By default it's 20 seconds.

If a user close his window he will be disconnected from the chat in the next 20 seconds.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby bitcloud » Fri May 04, 2007 5:16 pm

the users disappeared now finally after I added $params["quit_on_closedwindow"] = true;


he may have left the browser window open or something... i'd not worry about this one for now.. i'll see if its recurring and let you know...
bitcloud
New member
 
Posts: 9
Joined: Wed Apr 04, 2007 4:54 pm
Top

Postby bitcloud » Sun May 13, 2007 12:00 pm

Hey i'm getting this quite often actually... i'm sure the users are probably just forgetting that the window is open and leaving their computers on, but I'd really like to put in some kind of "if chat room is inactive for X amount of time disconnect users"

or "if user is inactive for x amount of time disconnect that user"

do you know how I might do this? (or do you have any plan to implement this?)
bitcloud
New member
 
Posts: 9
Joined: Wed Apr 04, 2007 4:54 pm
Top

Postby permutations » Tue Apr 29, 2008 6:59 pm

I would like this option, too. And/or an "away" signifier - something that comes up after a specified period of time to say the user is inactive.
permutations
Member
 
Posts: 88
Joined: Thu Apr 24, 2008 1:09 pm
Top

Postby permutations » Sat Nov 29, 2008 5:42 am

I finished the "away" button command. It's packaged in with a module for embedding phpFreeChat within Drupal. To get the code and bitmaps, look in the "extras" directory. The directory extras/commands has the away script. The directory extras/themes/Drupal has the interface customizations and bitmaps.

http://www.permutations.com/drupal/phpfreechat.php

This package also will be uploaded to Drupal.org in the next day or so - I'm still learning how to use CVS.
permutations
Member
 
Posts: 88
Joined: Thu Apr 24, 2008 1:09 pm
Top


Topic locked
9 posts • Page 1 of 1

Return to Feature Requests (v1.x)

Who is online

Users browsing this forum: No registered users and 6 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub