I've been unable to commit to this project for some time now. However, I now have a quite sophisticated node JS client/server running on my D6 implementation.

I've included the JS files for Server & Client for this. You will need to add your nodejs server url in the module and js files, (see TODO comments).

Differences between my module and DrupalChat? Probably quite a lot.. There's some cool things like synchronization between all open browser tabs etc.

I'd love if someone could mix some of my code with DrupalChat so we can get a great open source implementation.

CommentFileSizeAuthor
chat.zip233.25 KBfenda

Comments

carnau’s picture

After install, I get this error:

user warning: Table 'web.drupal_friends' doesn't exist query: SELECT uid, fid FROM drupal_friends WHERE (uid = 26 OR fid = 26) AND status = 0 in /web/htdocs/sites/all/modules/chat/chat.module on line 96

The chat.install file doesn't create any table, so when this code executes return the error:

$result = db_query("SELECT uid, fid FROM {friends} WHERE (uid = %d OR fid = %d) AND status = %d", $uid, $uid, FRIENDS_ACTIVE);

Also, this has to be integrated with flag and user relationships module, as drupalchat does.

carnau’s picture

Well, I modified the buddylist function to test.

function _chat_buddylist($uid) {	
  $result = user_relationships_load(array('name' => variable_get('drupalchat_ur_name', 'friend'), 'user' => $uid, 'approved' => 1), array(), TRUE);

  $users = array();

  foreach ($result as $friend) {
    $uid == $friend->requester_id ? $users[] = $friend->requestee_id : $users[] = $friend->requester_id;
  }
  return $users;

}

This give me an array of uids that have a relationship with me, but the chat don't show users. This array is passed through drupal_add_js function and is avaliable in js, so other things are preventing to add them to the list.

fenda’s picture

I do apologize for any errors - this module was created to work on one of my implementations. Hopefully you can iron out any installation bugs and when it's running you'll be able to make use of some of the techniques we used.

The server-side nodejs is really great by the way! :D

darklrd’s picture

Thanks a lot, drupaljoe! :)

I will work on this soon.

bhosmer’s picture

Wow, this is great. I'm glad I looked through the issues because I was just about to do the exact same thing. Do you have any plans to integrate group chat?

darklrd’s picture

Group chat is there in 7.x-1.x-dev.

bhosmer’s picture

Yes, I'm sorry, I should have more specific. Are there any plans to integrate group chat in 6.x?

darklrd’s picture

Yes, functionality from 7.x-1.x-dev will be back-ported to 6.x-2.x-dev. Thanks!

bhosmer’s picture

Cool! Thanks for your work, it is greatly appreciated.

avpaderno’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

I am closing this issue, since it is for a Drupal version that now is not supported.
Please re-open it if the issue is also relevant for other project branches that require a supported Drupal version.