osDate

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 ‘osDate’ from the drop-down

Click on ‘Save’ button.

osDateadmin

Step 2:
a) Visit the ‘Add CometChat’ tab to get the HTML code that you need to add to your site’s template. Now edit your site’s template header. Add the below code with CometChat HTML code in your index_header.tpl file just before </head> tag. This file is generally present at /templates/default/index_header.tpl.

{php}
	$chat_id = $chat_name = $chat_avatar = $chat_link = $chat_displayname = '';
	$chat_id = $_SESSION['UserId'];
	$chat_displayname = $_SESSION['FullName'];
	$chat_name = $_SESSION['UserName'];
	$chat_avatar = '//'.$_SERVER['HTTP_HOST'].'/getsnap.php?id='.$chat_id;
	$chat_link = '//'.$_SERVER['HTTP_HOST'].'/showprofile.php?id='.$chat_id;
{/php}
<script type="text/javascript">
	var chat_id = '{php} echo $chat_id; {/php}';
	var chat_name = '{php} echo $chat_name; {/php}';
	var chat_avatar = '{php} echo $chat_avatar; {/php}';
	var chat_link = '{php} echo $chat_link; {/php}';
	var chat_displayname = '{php} echo $chat_displayname; {/php}';
</script>

osDateembed

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 it to the page where you want to embed CometChat.

osDateembed

Not finding what you need?

The CometChat team is here to help!