Step 1:
Visit CometChat Administration Panel->Click on Add CometChat tab and fill the following details:

a) Site URL: Enter your domain name without http

b) Platform: Select ‘DatingScript’ from the drop-down

Click on ‘Save’ button.


Step 2:
a) Visit the ‘Add CometChat’ tab to get the HTML code that you need to add to your site’s template. Also, add the following code to your site’s template:

$user = array();
$userid = $username = $avatar = $link = "";
if ( users_helper::isLoggedin() ) {
    $user = session::section("session");
    $base_url = config::siteURL();
    $userid = $user["user_id"];
    $username = $user["username"];
    $link = $base_url.$user["slug"];
    if($user["picture_active"]) {
        $avatar = $base_url."uploads/".$user["picture_file_path"]."/".$user["picture_file_name"].".".$user["picture_file_ext"];
var chat_name = "<?php echo $username;?>";
var chat_id = "<?php echo $userid;?>";
var chat_avatar = "<?php echo $avatar;?>";
var chat_link = "<?php echo $link;?>";


b) To embed CometChat to your site, visit “Add CometChat” tab in CometChat Administration Panel and copy the HTML code displayed in the section “Embed CometChat in your site page” and paste them to the location mentioned.


Not finding what you need?

The CometChat team is here to help!