Welcome Guest, Not a member yet? Register   Sign In
HELP needed with CometChat and CI intergration!!
#1

[eluser]Unknown[/eluser]
Hi guys!!!

I have try to use cometchat (chat like facebook) in an application that I'm creating!!!
The problem is that I must load the script trough CI, and not as stand along, in order to use the encrypted sessions, and the database functions!!!

Does anyone have done this before, or know how to implement???

Regards
George
#2

[eluser]Unknown[/eluser]
Hi, did you find any solutions yet? I'm also doing a school project using CI, and want to integrate cometchat, which I can really alter the code, but want to see if there's already someone who has done it Smile
#3

[eluser]Nonox[/eluser]
Hi, do you have any feeback? where can I get the cometchat?

Bye
NB
#4

[eluser]intractve[/eluser]
You can get cometchat at cometchat.com it's really awesome
#5

[eluser]KaBaDaBrA[/eluser]
Anyone got Cometchat working yet with CI?
#6

[eluser]ghadban[/eluser]
i implemented in cakephp framework, i added in webroot directory.
I'm new in codeIgniter is ther webroot directory in CI similar to cakephp
#7

[eluser]Costos[/eluser]
Hi,
this is my steps after installing cometchat in root application

1. make a controler chat.php
Code:
<?php
if (!defined('BASEPATH'))
    exit ('No direct script access allowed');
class Chat extends Controller {
    function index() {
        require BASEPATH . '/../cometchat/cometchatjs.php';
    }
    function cometchatcss() {
    require BASEPATH . '/../cometchat/cometchatcss.php';
    }
}
?>

2. in the view file
- on header
Code:
<!-- CometChat Code Start -->
<link type="text/css" rel="stylesheet" media="all" href="<?=base_url();?>chat/cometchatcss" charset="utf-8" />
<_script type="text/javascript">jqcc=jQuery.noConflict(true);<_/script>
&lt;!-- CometChat Code End --&gt;

- before &lt;/body&gt;
Code:
&lt;!-- CometChat Footer Code Start --&gt;
<_script type="text/javascript" src="&lt;?=base_url();?&gt;chat/" charset="utf-8"><_/script>
&lt;!-- CometChat Footer Code End --&gt;

3. edit the config file with your data for user and password. After that change getUserID function with
Quote:function getUserID() {
$userid = $this->session->userdata('user_id'); //your user_id session variable
return $userid;
}

4. in the cometchat/themes/default/cometchat.css, replace url(/themes/ with url(../cometchat/themes/


This works for me.

* remove the _ from the script tags and Sorry for my bad English
#8

[eluser]KaBaDaBrA[/eluser]
Hey Costos,

Which version of Cometchat are you using? 1.5+?

Does it work fine with CodeIgniter? Remembering sessions etc?
#9

[eluser]ghadban[/eluser]
it doesn't work for me too costos, remeber please if there any code we have to implement.
all what i'm received the options button on the left with javascript error of firebug:
<< $("#cometchat_optionsbutton_popup .cometchat_userstabtitle").mouseenter is not a function >>
#10

[eluser]ghadban[/eluser]
.htaccess update the rewrite condition to look like
Code:
RewriteCond $1 !^(index\.php|application/images|application/scripts|application/css|application/content|application/settings|favicon.ico|cometchat/)

cometchat/config.php set the base_url to the absolute path to cometchat:
Code:
define('BASE_URL','/../cometchat/');

css themes/default/cometchat.css
add ../cometchat to all urls example
Code:
background-image: url(../cometchat/themes/default/images/bgrepeat.png);

these issues will fix a little bit the CSS, but still cometchat not working well,
i still receive this javascript error and options button on the right
Code:
$("#cometchat_optionsbutton_popup .cometchat_userstabtitle").mouseenter is not a function
i'm sure costos there some steps or updates u missed.




Theme © iAndrew 2016 - Forum software by © MyBB