Hi,

I'd like to create functionalities when a user logout from system:
1 - Send a message to all users who has a chat window (with the logging out user) openned telling "User X went offline"
2- Disable the text are when window is opened and user is offline.
3- Update the panel with the online users list

To do i think it's necessary to hook on user logout (hook_user):

//drupalchat.module line 150
function drupalchat_user($op, &$edit, &$account, $category = NULL) {
	switch ($op) {
		case 'logout':
			//code goes here
			break;
	}
}

But i don't know how to make things happen at php and show them at javascript...

I know that the object $json at drupalchat_poll() is the way to send messages, but i'm not sure how the JS part will update.

So...any help how to implement these features?

Thanks

Comments

qasimzee’s picture

subscribe