Cometchat

gary.moncrieff
gary.moncrieff
@garymoncrieff
9 years ago
865 posts
Hey All

For those of you who have this running correctly could you please post instructions on how to fix it? My support license with Cometchat has expired and I am not at the stage of wanting to renew it as when I launch I will increase the package. But for now I would just like to get it working, however when you follow the instructions provided, no users ever show as online.
updated by @garymoncrieff: 06/08/15 03:20:47PM
alt=
@restmin
9 years ago
114 posts
I am planning to use this chat option, so will follow your thread!
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
Did you buy the chat version for self-hosted?- you'd be buying it outright, not paying monthly. The Ning version of CC (for 'networks') is the monthly one and is not the correct one for self hosted like JR sites.
Did you get the version where they guarantee installation on your server? Do you have it installed? Did you get the little snippet of code from them to insert in your template?
I'm not sure what version/type/level of CC you have. Is it very old?


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
gary.moncrieff
gary.moncrieff
@garymoncrieff
9 years ago
865 posts
Self hosted, version 5.5 simply put their integration instructions just don't work with Jamroom.
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
Did you add this code to the bottom of your active skin's meta.tpl, underneath the 'head' ?:
</head>
<link type="text/css" href="/cometchat/cometchatcss.php" rel="stylesheet" charset="utf-8">
<script type="text/javascript" src="/cometchat/cometchatjs.php" charset="utf-8"></script>



--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015

updated by @strumelia: 04/20/15 01:52:07PM
gary.moncrieff
gary.moncrieff
@garymoncrieff
9 years ago
865 posts
yes
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
Hmm...when was the last time you had this version of CC working ok on a JR site?


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
michael
@michael
9 years ago
7,714 posts
Strumelia:
Did you add this code to the bottom of your active skin's meta.tpl, underneath the 'head' ?:
</head>
<link type="text/css" href="/cometchat/cometchatcss.php" rel="stylesheet" charset="utf-8">
<script type="text/javascript" src="/cometchat/cometchatjs.php" charset="utf-8"></script>

Think that should go above the head no? because if not, its going into no-mans-land between /HEAD and the start of BODY.

Suggest that this is the correct code.
<link type="text/css" href="{$jamroom_url}/cometchat/cometchatcss.php" rel="stylesheet" charset="utf-8">
<script type="text/javascript" src="{$jamroom_url}/cometchat/cometchatjs.php" charset="utf-8"></script>
</head>

If your cometchat directory is on the same level as the rest of jamroom stuff.
/cometchat/
/data/
/modules/
/skins/

The reason you want {$jamroom_url} in there in front of it is because that will get you to the correct directory of the base of the jamroom site. It wont matter if your site is on the top level of the url like:
http://yoursite.com

but if you have jamroom in a sub-directory like
http://yoursite.com/jamroom

Then it will point to the correct location.
gary.moncrieff
gary.moncrieff
@garymoncrieff
9 years ago
865 posts
I don't believe the problem lies with the JS but rather the integration file, when I check my cometchat_users table it shows no entries while I am guessing users should be cloned into these tables from Jamroom?

zip
integration.zip  •  3KB


updated by @garymoncrieff: 04/20/15 11:28:10PM
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
Michael, yes my CC folder is at the same level as :

/cometchat/
/data/
/modules/
/skins/

But- my skin's meta.tpl doesnt have anything underneath < /head >...it ends there...thus technically there is no no-mansland 'between' head and BODY.

I could try moving my cC code up right before < /head >... but the chat is working so not sure I should experiemnt. However, I could try doing this in a recently cloned skin copy I have on the side, and then activate that simply to see how it changes anything...without making the change to my current valuable custom skin, just to be safe. Should i give that a try?


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
gary.moncrieff
gary.moncrieff
@garymoncrieff
9 years ago
865 posts
@strumelia could you please attach your cometchat/integration.php file here so I can compare it to what I have?
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
ok....

oops, I can't attach it here:
"File has an invalid extension (php) - it should be one of zip, pdf, png, jpg, gif."


.............ok here is zipped.
zip
integration.zip  •  3KB




--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015

updated by @strumelia: 04/21/15 01:22:24PM
gary.moncrieff
gary.moncrieff
@garymoncrieff
9 years ago
865 posts
zip it and then attach the zip file
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
Did.


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
I tried putting the code you suggested Michael- I put it in my meta.tpl right BEFORE the < /head> instead of after, and activated it. I found no differences in how CC was functioning. So I left it that way.
Here is a little mention of this same 'head' thing on the CC site:
http://www.cometchat.com/documentation/optimizing-performance/

I am using CC version 5.5.0


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
Dazed
Dazed
@dazed
9 years ago
1,022 posts
I have had CC installed for about a year now. I just went through the email chain when I had similar issues and this may or may not help. What are your log files stating?

Please make sure the correct details are entered in the following fields in the /cometchat/integration.php file:

DB_USERTABLE // Jamroom user table
DB_USERTABLE_USERID // field which stores userid
DB_USERTABLE_NAME // field which stores username
michael
@michael
9 years ago
7,714 posts
Strumelia:
I tried putting the code you suggested Michael- I put it in my meta.tpl right BEFORE the < /head> instead of after, and activated it. I found no differences in how CC was functioning. So I left it that way.
Here is a little mention of this same 'head' thing on the CC site:
http://www.cometchat.com/documentation/optimizing-performance/

I am using CC version 5.5.0

This line from that page is a good one to follow:
Move the CometChat HTML code from just after <head> to just before </body>

Currently you have it just before:
<body>

The difference is the header vs the footer. That optimize performance page is telling you to put it in the footer rather than the header.
----

Dazed:
I have had CC installed for about a year now. I just went through the email chain when I had similar issues and this may or may not help. What are your log files stating?

Please make sure the correct details are entered in the following fields in the /cometchat/integration.php file:

DB_USERTABLE // Jamroom user table
DB_USERTABLE_USERID // field which stores userid
DB_USERTABLE_NAME // field which stores username

So cometchat needs access to the users table? users are stored in a datastore, so I'd be surprised if they have a setup to access that correctly. They really should build a module.
Dazed
Dazed
@dazed
9 years ago
1,022 posts
yes since it is tied to the login as well as user image. When I went to set this up, none of the docs were correct. Micheal if you want access to my site let me know,
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
Michael, I'm confused. My active skin's meta.tpl does not seem to have ANYTHING after its
</head>
No 'body' part at all. Same is true for the Ningja meta.tpl
You are telling me I have the cometchat code right before the body...but I'm not seeing the 'body' part.
What am i missing here? Are we looking in different templates?


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
Dazed
Dazed
@dazed
9 years ago
1,022 posts
here is how my meta looks ...


<head>
<link type="text/css" href="http://www.site.com/cometchat/cometchatcss.php" rel="stylesheet" charset="utf-8">
<script type="text/javascript" src="http://www.site.com/cometchat/cometchatjs.php" charset="utf-8"></script>
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
Dazed...you have the CC code right after the start of the head, then...?


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
Dazed
Dazed
@dazed
9 years ago
1,022 posts
yes.

let me know if you want to compare the integration.php file.
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
We might all have different versions or pricing levels of CC though, so may not be wise to interchange all the codes...but I'm not knowledgeable on that.
My CC seems to be working however.


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
Dazed
Dazed
@dazed
9 years ago
1,022 posts
glad it is working. The integration file would just be good to compare for the db connections.
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
Well, I attached a zip of my integration file above if anyone needs it.


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
gary.moncrieff
gary.moncrieff
@garymoncrieff
9 years ago
865 posts
My integration file looks to be the same as yours so no idea why its not working.
michael
@michael
9 years ago
7,714 posts
gary.moncrieff:My integration file looks to be the same as yours so no idea why its not working.

Can I take a look at the site its supposed to be active on? First guess is you have jamroom in a sub-directory and are using /come.... as the url which causes cometchat to be looked for in the wrong location.
gary.moncrieff
gary.moncrieff
@garymoncrieff
9 years ago
865 posts
I sent you an email.
michael
@michael
9 years ago
7,714 posts
I'm seeing cometchat on your site, Nobody's online, but the chat system does appear.
gary.moncrieff
gary.moncrieff
@garymoncrieff
9 years ago
865 posts
yes that is the issue I am having, no one ever appears online, as I am online at this very moment and never seen the account you logged into show as online.
michael
@michael
9 years ago
7,714 posts
It seams to be able to handle Jamroom ok, Check out their demo version:
http://www.phpchatsoftware.com/jamroom/
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
Michael, whatever you did in moving my CC code, it's working fine. Thank you! The only actual working difference I see now since you moved it is the tiny glitch I had before is fixed now: was not getting the 'clear convo' broom icon as admin, but other members had the broom fine and could use it. All good now and working fine as far as I can see and test.

I've continued to push Cometchat to work with the JR Team to make all this way easier. Not sure what the holdup is, but I'm betting it's on their end. ;)
I've been pushing them in this rather ridiculous Ning Creators thread:
http://creators.ning.com/forum/topics/cometchat-are-going-to-be-the-ones-to-save-ning
(um...like CC can 'save' ning?... don't make me laugh!)


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
derrickhand300
@derrickhand300
9 years ago
1,353 posts
Cometchat seems to be working on my site fine_ i can zip the file if anyone needs it

Cometchat finished installing the "Chat With Me" button in my profiles under the "Online Status"

Been searching templates this morning trying to find out how/what they did -took awhile but I found that they did it in the cometchat/js/extra.js file on my server

I will add the code they add here- then if you want to use it you can compare it to your extra.js file in your cometchat folder on server

My site uses custom css to create buttons so you will need to replace the part <a class=buttons.... with your button image url or whatever you are using

jqcc(document).ready(function () {  
   if(jqcc.cookie('cc_hidebar')==null){
       jqcc('#cometchat_hide').click();
   }
   setTimeout(function() {
   		var img_src = jqcc('.img_scale').attr('src').split("/");
   		var userid;
   		var username = jqcc('.online_status_user > h2 > a').html();
   		if(img_src.indexOf('gravatar')<0) {
			var div_class = jqcc('.comment_page_section').attr('id').split("_");
			userid = div_class;
			userid = userid[1];
   		} else {
	   		userid = img_src[6];
   		}
   		jqcc.ajax({
   			url: '/cometchat/js/check_user_present_in_table.php',
   			type: 'post',
   			data: {
   				userid: userid,
   				username: username
   			},
   			success: function(data) {
   				console.log(data);
   				if(data == 'present') {
   					jqcc('.row-not > .col-sm-3 .panel-default:eq(1)').append('<p><a class="btn btn-info btn-sm" role="button" style="margin-left:40px;" id="chat_with" href="javascript:void(0)" onclick="javascript:jqcc.cometchat.chatWith('+userid+');">Chat with me</a></p>');
   					jqcc(".row-not > .col-sm-3 .panel-default:eq(1) p:eq(0)").insertAfter(".row-not > .col-sm-3 .panel-default:eq(1) p:eq(1)");
   				}
   			}
   		});
   }, 3000);
});

Have to contact them when they wake up over there because the JS seems slow to load
You can check its function here on my profile even if you are logged out...http://drillingahead.com/drilling-ahead
updated by @derrickhand300: 04/22/15 07:34:12AM
gary.moncrieff
gary.moncrieff
@garymoncrieff
9 years ago
865 posts
I renewed my license this morning and still haven't heard back from cometchat on this issue.
michael
@michael
9 years ago
7,714 posts
Talking with cometchat now, they're working on a solution to make it easier for everyone. :)
gary.moncrieff
gary.moncrieff
@garymoncrieff
9 years ago
865 posts
I have told them many times now I cant give them cpanel and ftp details as I don't have them, and they are still asking for them, for petes sake. I sure as hell don't want to give out my ssh password.
michael
@michael
9 years ago
7,714 posts
They've said they're working on a moudle to go into the marketplace so once that's done I expect it should be much easier.
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
Well I hope it gets done as quickly and works as well as the typical module made by the Jamroom Team.


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
derrickhand300
@derrickhand300
9 years ago
1,353 posts
FYI
Facebook Messenger no longer works with Cometchat
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
Why do you think that is, Curtis?


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
derrickhand300
@derrickhand300
9 years ago
1,353 posts
Hello,

Facebook has removed the Chat API with the release of their new API. This API enabled us to allow users to chat from outside of Facebook. However, as Facebook has removed it, we have no option but to discontinue it. Facebook has, so far, not provided any other alternative for us to use. If they do so, we will be happy to add Facebook chat back to our product.

Since their API change from 30th April 2015, Facebook chat feature will no longer work.

We have removed it from our download package. You can download it from http://my.cometchat.com or simply replace "/cometchat/extensions/jabber" folder with attached "jabber.zip". Once done, please clear cache from CometChat Administration Panel. This will remove Facebook chat option and just show the Gtalk chat option.

Let me know if you face any issues.

Warm regards,

Akash Gupta
CometChat Team

Tags