When you are about to integrate a Facebook or Gtalk style (XMPP based) chat system into your website you will need the followings:
The first two are simple. The last one is a bit harder. In most case you need to change the users database structure to be compatible with chat server. It can interfere with other part of your site, so it is not a best solution. Fortunately it is not the only way. The other solution is to make an integratable chat server control interface. In this case you need only a slight modification in the website's code and hook the user creation/modification/deletion process. In that hook simply call the interface's function. It is so simple because no need to hack/reconfigure server and user's table.
What is this and how it works?
This is a class written in PHP. Just download it, put into a working directory, and include into the user management file. See the included example in the download package.
You have to define some contants to make the connection between the interface and the server as follows: /* * URL of the Openfire's control panel */ define("SERVER_URL","http://127.0.0.1:9090"); /* * When you install Openfire you need to set the chatserver domain * write that domain here. When you create a user on server, Openfire extends * the username with this domain. That will be the "JID" of the user. */ define("SERVER_DOMAIN","deucalion"); /* * This is a default service name in Openfire. In most case you should leave it * as is. */ define("ROOMSERVICE","conference"); /* * The username and password what you use on Openfire control panel */ define("ADMIN_USER","admin"); define("ADMIN_PASS","admin");`
That's it.
If you download this to earn some money (direct or indirect way), please send me back some. :) I was spending some time to make this to spare some time for you. A small donation should be fair. :) Thanks! :)
Place your donation ($5) here: Paypal Donation