Drupal ParaChat Module

Update: Drupal 7 port released

The ParaChat Drupal module embeds a ParaChat applet in your site and automatically logs in users with their Drupal username. There is access control so you can setup which roles you would like to be able to join the chat room. For added security, you can configure ParaChat to validate users from the ParaChat server before allowing them to join.

Parachat Applet

ParaChat is a great little managed chat solution with several different levels of service you can subscribe to, from free, to pretty expensive. Between free and $20+/mo you can get features from basic chat, to full audio/video streaming support.

Once you sign up for an account, you will be given access to the ParaChat control panel where you could probably spend more time than you want messing with configurations. ParaChat offers a way to validate users against an external database (Drupal) and this article will guide you through that setup.

There's 2 different control panels we will be dealing with here. The Drupal ParaChat Settings and the ParaChat Control Panel. The ParaChat Control Panel refers to the chat administration area sent to you by Parachat when you sign up.

ParaChat Control Panel

In your ParaChat Control Panel, the first thing you will want to do is go to Site Wide Limits and set Require Valid user name and Password to Enabled.

Site Wide Limits

The next thing to do is set the ParaChat applet to make a request to your Drupal site to verify the user is valid. Click Users and Databases -> External Database Connection

1. Set Use HTTP User Authentication to Enabled

2. URL of Web Authentication should be http://example.com/chat/auth if clean urls is enable. If not, it should look something like this: http://example.com/?q=chat/auth&

MAKE SURE YOU HAVE THE '&' AT THE END IF YOU'RE NOT USING CLEAN URLS!

When ParaChat sends the request to your server for authentication, it will just tack on ?user=foo&... That will screw up your URL, so you must put a & at the end of the query string if you are not using clean URLs.

External DB Connection

Drupal ParaChat Settings

Make sure the Parachat module is enabled, then navigate to Administer -> Site Configuration -> ParaChat Settings.

Drupal ParaChat Settings

The Site Administration Page parameter should be the full URL sent to you by Parachat. The module does not login for you, but uses this URL to find the Server ID. ParaChat doesn't send you this ID separately, so I thought I would just make it read it from the URL that they do send you.

The Site ID is another piece of info that ParaChat sends you.

Make sure your Default Room is valid. I believe the only room new ParaChat accounts come with is Lobby. If this room doesn't exist, your chat applet will generate an error.

Next, set External DB Authentication to enabled. This will embed a hash that represents the user. This is what ParaChat will use as the password to send back to Drupal when it validates the user. Only enable this if you are using External DB with ParaChat.

Please report any issues with the project over on the project page. If you have any comments, leave them here or there.