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