Welcome Guest, Not a member yet? Register   Sign In
jquery chat integrated into codeigniter
#1

[eluser]jeanv[/eluser]
hi i have been working on the integration of jquery chat into codeigniter. For those who do not know jquery chat, please have a look here.

Well, i did a controller and a modified a few things, and it's nearly working, but i cannot show new messages in the chat box, but the page title is modified when a new message is sent...

Has someone worked on a similar project and managed to make it work on codeigniter ?
#2

[eluser]iamjerson[/eluser]
thanks for sharing the link i am really looking for something like a chat in query and of course tied up with out favorite framework.

i will gonna check it too
#3

[eluser]KaBaDaBrA[/eluser]
YOu guys got this working yet?
#4

[eluser]bluepicaso[/eluser]
I'm still working on it. C'mon its been two years. Please some1 help me
#5

[eluser]KaBaDaBrA[/eluser]
I got it working a while ago...

In the js file, change any links to relative links, for example...

Code:
url: "http://localhost/test/chat.php?action=chatheartbeat

In the php file make sure your database connections are setup and that you have created the tables in the database you are using for the chat program...

Then in your template's view (or whichever view you are using) add this to the top before any html data...

Code:
<?php
session_start();
$_SESSION['username'] = 'bob';
?>
Then remember to call your chat script and css like this...

Code:
<scr*ipt type="text/javascript" src="&lt;?=base_url()?&gt;scripts/chat.js"></scr*ipt>
&lt;link rel="stylesheet" type="text/css" href="&lt;?=base_url()?&gt;css/chat.css" media="screen" /&gt;

And call a chat like this
Code:
<*a hr*ef="javas*cript:void(0)" on*click="javasc*ript:*chatWith('lucy')">Chat with Lucy</*a>

Just remove the * in the above examples

And you should be good to go Smile if you still have any problems posts it here and I can try help you out Smile
#6

[eluser]bluepicaso[/eluser]
Let me c
#7

[eluser]Akinyele Olubodun[/eluser]
[quote author="KaBaDaBrA" date="1278000703"]I got it working a while ago...

In the js file, change any links to relative links, for example...

Code:
url: "http://localhost/test/chat.php?action=chatheartbeat

In the php file make sure your database connections are setup and that you have created the tables in the database you are using for the chat program...

Then in your template's view (or whichever view you are using) add this to the top before any html data...

Code:
&lt;?php
session_start();
$_SESSION['username'] = 'bob';
?&gt;
Then remember to call your chat script and css like this...

Code:
<scr*ipt type="text/javascript" src="&lt;?=base_url()?&gt;scripts/chat.js"></scr*ipt>
&lt;link rel="stylesheet" type="text/css" href="&lt;?=base_url()?&gt;css/chat.css" media="screen" /&gt;

And call a chat like this
Code:
<*a hr*ef="javas*cript:void(0)" on*click="javasc*ript:*chatWith('lucy')">Chat with Lucy</*a>

Just remove the * in the above examples

And you should be good to go Smile if you still have any problems posts it here and I can try help you out Smile[/quote]

@KaBaDaBrA, I have done all this and got the script to show messages but the user name shows "undefined". I am so tired and frustrated. I suspect something is wrong with the javascript. The annoying thing is that the demo is working fine but I can't just get this script to work with codeigniter.
it is funny and frustrating.




Theme © iAndrew 2016 - Forum software by © MyBB