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.
  • http://bizwidgets.biz/blog/ Daniel Errante

    It’s off to a good start!

    • Masuk

      Thanks…

  • http://bizwidgets.biz/blog/ Daniel Errante

    It’s off to a good start!

  • http://llbbl.com llbbl

    Thanks :)

  • http://llbbl.com llbbl

    Thanks :)

  • http://saidur.wordpress.com Saidur Rahman

    Nice thinks . very cool

  • http://saidur.wordpress.com Saidur Rahman

    Nice thinks . very cool

  • montana Flynn

    how would you config your htaccess?

  • montana Flynn

    how would you config your htaccess?

  • Theb

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

  • Theb

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

  • http://intensedebate.com/people/llbbl Logan Lindquist

    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.

  • http://intensedebate.com/people/llbbl Logan Lindquist

    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.

  • bowo

    good tutorial, thanks

  • bowo

    good tutorial, thanks

  • galtech

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

    404 Page Not Found

    The page you requested was not found.

    • http://intensedebate.com/profiles/llbbl llbbl

      can you email me a link to where you have it installed or is it locally?

      you can contact me here: http://loganlindquist.com/

      • galtech

        i installed in a local server( localhost)

  • galtech

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

    404 Page Not Found

    The page you requested was not found.

    • http://intensedebate.com/profiles/llbbl llbbl

      can you email me a link to where you have it installed or is it locally?

      you can contact me here: http://loganlindquist.com/

      • galtech

        i installed in a local server( localhost)

  • Mohammed yusuf

    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

  • Mohammed yusuf

    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

  • komSaid

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

  • p.

    Well it’s alright. If you post something you get the data but you won’t get it without posting and that is kind of worthless, isn’t it?

  • Nick

    Could you please update the download link to include the controller function “update” which is in your javascript…thanks

  • llbbl

    The code is now on github if anyone else is looking for it. The post above is out of date. I’ll post an update later….

    https://github.com/llbbl/codeigniter-chat

  • lckamal

    I cant find the sql.sql file.

  • Wildanmuhlis

    Great!! 
    thanks :D

  • http://www.webexplorar.com/ Sumith Harshan

    Thanks for the post.
    Here is a Gmail facebook like CodeIgniter chat example with full source code and demo.
    http://webexplorar.com/codeigniter-chat-example/