Reputation: 1085
I need to implement a chat window on my codeigniter website,and the chat option is not like facebook or gmail chat.The Live conversation is entirely between the admin and the user who has logged into the site,ie live chat for direct customer service
Thanks in advance.
Upvotes: 3
Views: 25917
Reputation: 1085
Implemented using Zopim chat widget,which is suitable for both CMS and MVC websites. https://www.zopim.com/
Upvotes: 0
Reputation: 1583
If you want messaging or chat and specially for codeigniter than use this library, Mahana-Messaging-library-for-CodeIgniter. I have used this, and i preferred you if you are learner. It have it's on database which you can manage and it will integrate in your project easily.
Upvotes: 3
Reputation: 2536
A quick search on github gives me this:
You can think of it like a thread in a forum where someone creating a thread and the other someone make replies.
Depending on how you want to customize your apps, the interaction between the OP and those who will make replies will be rapid.
Assuming that you understand how MVC works, you can have something like this:
Your DB Structure: Table User Table Session Table Message
A user can be in many Session (chat room), A message can only be posted to one chat session and a user can send many messages.
In your chat page you will have a to display the conversation, a giant text box where your user can write their message and a submit button.
When a user click the submit button, it will then make an HTTP POST to your controller, where your controller will cleanse the data (i.e. $this->form_validation->set_rules();
If the posted data is valid, send it to your model where it then be stored to your database.
Everytime the chat page is loaded what you want to do is:
Again this is an oversimplified example. You can fork the code from the github i mentioned and try to install it on your local machine.
Upvotes: 6