Welcome Guest, Not a member yet? Register   Sign In
Gmail Style jQuery Chat
#1

[eluser]flash_back[/eluser]
Hi everybody Smile

I have found one great chat based on JS Smile you could download it from this page: http://anantgarg.com/2009/05/13/gmail-fa...uery-chat/

samples work fine, but I am trying 3-4 hours to integrate it whit CI for my TT portal but its look imposible mission Sad

has anyone try to do this before me? tnx and move topic if it isnt in the right place Smile
#2

[eluser]flash_back[/eluser]
integracion is OK, just having little problem with IE Smile but that should be fix soon Wink
#3

[eluser]KaBaDaBrA[/eluser]
Hey - how did you get this working? Is there a post on the forum somewhere on how you did it?
#4

[eluser]hugle[/eluser]
nice looking chatSmile
#5

[eluser]KaBaDaBrA[/eluser]
im trying to get the code working, the only problem im having and dont quite undesrtand is the following:

Code:
if (!isset($_SESSION['openChatBoxes'][$chat['from']]) && isset($_SESSION['chatHistory'][$chat['from']])) {
    $items = $_SESSION['chatHistory'][$chat['from']];
}

$chat['message'] = sanitize($chat['message']);

$items .= <<<EOD
{
    "s": "0",
    "f": "{$chat['from']}",
    "m": "{$chat['message']}"
},
EOD;

How do I take this code and use it with CodeIgniter...Ive tried the following

Code:
if ($this->session->userdata('openChatBoxes',$chat->from) != "" && $this->session->userdata('chatHistory',$chat->from) == "") {
    $charray = array($chat->from => '');
    $this->session->set_userdata('chatHistory', $charray);
    $items = $this->session->userdata('chatHistory', $chat->from);
}

//SANITIZE MESSAGE
$message = $this->Globals->sanitize($chat->message);

//SET ITEMS
$items .= <<<EOD
{
    "s": "0",
    "f": "{".$chat->from."}",
    "m": "{".$chat->message."}"
},
EOD;

Not quite sure what <<<EOD and EOD; does...can anyone assist with this?
#6

[eluser]iamjerson[/eluser]
Hi KaBaDaBrA,

I've also trying to make this in CI
I leave it for a while i was been very busy for some projects

but you change this
Code:
//SET ITEMS
$items .= <<<EOD
{
    "s": "0",
    "f": "{".$chat->from."}",
    "m": "{".$chat->message."}"
},
EOD;
to something like this:

Code:
$items.='{
    "s": "0",
    "f": "{".$chat->from."}",
    "m": "{".$chat->message."}"
},';

just try this if its works on you.
#7

[eluser]flash_back[/eluser]
Hi, I make it work, but I am short on time, I just leave chat.php without integration whit CI Smile you can see my portal in Signature // www.TuningTube.rs // it has orginal forum and gallery, I just use FreakAuth (everything else is R) for authentication library, that has been tuned by my side Smile

so I have a little time, next version is olready developing so I just leave code as it is, without any changes! In my main model I just insert if it is user active in last 15 minutes that in forum and profile show a link to chat Smile

but in v1.2 I will try to build something like FB chat, you can find it (demo) on this page // http://www.cometchat.com

between us, if you want to wait, we can build something like cometchat by us self Smile
#8

[eluser]iamjerson[/eluser]
Hi flash it really works that way i also did that but i really need it to be as a library a controller of CI.
Hope we can help each other here to make it work.
#9

[eluser]KaBaDaBrA[/eluser]
Would be great if we can incorporate this into a CI library! Smile
#10

[eluser]Jose Suarez[/eluser]
I have a problem with this chat
I insert data in the database, but there is no communication between users and do not load the history.




Theme © iAndrew 2016 - Forum software by © MyBB