jQuery and CodeIgniter Chat

I adapted a Javascript & AJAX tutorial off of sitepoint to work with CodeIgniter. It uses jQuery to the handiwork. It is a simple AJAX chat script, not the most advanced thing in the world. Hopefully it will get better in the future.

Here is it in action:

jQuery Chat

Download jQuery Chat

REQUIREMENTS

  1. You have Downloaded and Installed codeigniter.
  2. You may want to check for a new version of jQuery.The version of jQuery that is included is 1.2.1. You can find the current version of jQuery here.
  3. The root folder is where codeigniter is installed.
  4. You are using MySQL.

INSTRUCTIONS

  1. Open /system/application/config/autoload.php
    Verify that you are autoloading the database library. You should see ‘database’ listed in the $autoload['libraries'] array.
  2. Open /system/application/config/database.php
    Verify that you have the correct information for your database.
  3. Upload /system/application/controllers/chat.php
    to the corresponding folder on your server.
  4. Upload /system/application/views/chatty.php
    to the corresponding folder on your server.
  5. Upload /public/js/jquery.js
    to the corresponding folder on your server.
  6. Upload /public/images/blueloading.gif
    to the corresponding folder on your server.
  7. Run the sql.sql file on your server using a tool like phpMyAdmin.
  8. Open a web browser and goto http://yourdomain.com/chat or http://yourdomain.com/index.php/chat if you have not configured your htaccess file.
This entry was posted in Blog, Programming. Bookmark the permalink.

13 Responses to jQuery and CodeIgniter Chat

  1. It’s off to a good start!

  2. Nice thinks . very cool

  3. montana Flynn says:

    how would you config your htaccess?

  4. Theb says:

    not working for me… in firebug i see the chat is trying to GET "http://address/chat/backend/"
    What's that backend thing? :S

  5. It is the backend for the chat script. The data is in a XML format, but can be thought of as a web service. It displays the data from the database in a format that can be read by the frontend.

  6. bowo says:

    good tutorial, thanks

  7. galtech says:

    its not working for me.. when i submitt the button an error occured

    404 Page Not Found

    The page you requested was not found.

  8. Mohammed yusuf says:

    Hi sir,i tried to chat in my localhost codeigniter,all are properly done,if i run this program,after enter name and message if i click ok button,the project is loading long time

  9. Mohammed yusuf says:

    Hi sir,i tried to chat in my localhost codeigniter,all are properly done,if i run this program,after enter name and message if i click ok button,the project is loading long time and did not come any result

  10. komSaid says:

    in the inline javascript, add something like <?php site_url(); ?> before the “chat/backend”, that should do the trick.

blog comments powered by Disqus