Friday, January 14, 2011

Facebook-like chat part 2

This is my old blog. You can find the updated version of the Facebook-like chat HERE






It's been a while since my first attempt at creating a facebook-style chat. Unfortunately, the original server where it was hosted was formatted, thus making some disgruntled posters(http://bostsip.blogspot.com/2009/10/facebook-like-chat.html). Sorry guys, I really just didn't have time. But to make up with this, I've made another one. I used codeigniter as the php framework and jquery for javascript.

Big thanks to this post also. It saved me time on creating a bottom menu ala-Facebook.

Here's the demo:
http://shutterbox.rockerprog.com/. Thanks to Jonee of PHPUGPH for hosting the demo.


To test:
login using different usernames on different browsers or different PCs

Download it here:
http://sourceforge.net/projects/facebook-likech/

You may also checkout(SVN) the files here:

https://facebook-likech.svn.sourceforge.net/svnroot/facebook-likech

Installation instructions:
1. extract to your http folder
2. edit system/application/config/database.php
3. change database parameters as pecified in these config variables:

$db['default']['hostname'] = "";
$db['default']['username'] = "";
$db['default']['password'] = "";
$db['default']['database'] = "";

4. edit system/application/config/config.php
5. change values in the following variables/constants:

$config['base_url'] = "http://yourwebsite/";
define('MAINSITE_URL', 'http://yourwebsite/');
//you may use .htaccess to remove index.php
define('MAINSITE_INDEX', 'http://yourwebsite/index.php/');

6. create the database by uploading the sql dump file under the sql folder
7. to create a new user, run the following query

//password is password with username as its salt, encryption uses Secure Hash Algorithm
INSERT INTO `facebookchat`.`users` (`username`, `password`, `session_id`, `created_date`, `modified_date`) VALUES ('test', SHA1('testtest'), '', CURRENT_TIMESTAMP, '0000-00-00 00:00:00');

8. have fun !

Feel free to suggest any improvements on this application guys!