Thats an interessting point for several elgg users I guess: Jabberintegration for Elgg! As frontend I used a bit modified version of the web based JWChat. The backend communicates with the jabber server at database level and cares about correct registrations and buddy lists.
Please Note
Its a beta version. However it would be nice if I get a lot of feedback (especially windows user / IE) so that it doesn't stay a beta for too long.
Currently there is only ejabberd 2 and MySQL support, but its scheduled to extend that.
This plugin needs access to the database used by the jabberserver.
Actually multi user chats (muc) are possible. Therefor the admins have to be hardcorded in the config file of ejabberd.
Installation
Set up ejabberd with MySQL native driver, descriped here. Adjust the additional modules mod_last, mod_offline, mod_roster and mod_vcard as well (like he descripes at the end). Tipp: Here you can download debian packages for erlang mysql support.
Make sure that either HTTP-Polling or HTTP-Binding is activated in the ejabberd config. For help please consult Google or the ejabberd doc.
Configure your webserver. How to do that is descriped in the README of JWChat (quote):
Setup your web server so that it redirects some local address like http://jabber.example.com/http-poll/ to some service that either implements HTTP Polling or HTTP Binding.
Here is an example that should work with a default ejabberd installation on the same host:
Note 1: You need to enable mod_rewrite and mod_proxy at your apache configuration. Apache2 users also need to enable the protocol specific proxy module mod_proxy_http.
Note 2: With JabberHTTPBind you don't need to do this sort of address rewriting if you're serving JWChat's files from within your servlet container directly or you're using some technique like mod_jk to mount a remote servlet engine directory transparently into your apache's domain of served addresses.
Replace 127.0.0.1 with the server address of youre ejabberd.
Now the plugin comes into play. Download and extract it, copy the jabber folder into the mod folder of the elgg installation and activate the plugin in the admin interface of elgg.
Configure the plug in in the elgg admin interface. Look at the screenshot above to get my test configuration. Note: In most instances you cannot run the jabberserver as localhost, because your user won't be able to connect to it.
The connection data to the database used by the jabberserver are not configured by admin interface (because of security issues). Instead you have to edit the file mod/jabber/config.db.php.
If all seems fine you should remove the module mod_register from the ejabberd configuration file. After that only the plugin is able to change passwords or registrate users.
Thats it! Surely its a bit nasty to come to this point, but at the end all efforts pay off :) If you have issues don't hestitate to leave a comment and I will help you as good as it is possible for me.