i use Gantry5 Template and want now integrate cometchat cloud.
i insert the following script to: theme.php
// Require the cometchat cloud library
include_once dirname(__FILE__).'/../custom/includes/cometchat.php';
and in cometchat.php this code to include cometchat cloud.
<?php
$chat_id = $chat_name = $chat_avatar = $chat_link = $chat_displayname = '';
$user = JFactory::getUser();
if (!$user->guest) {
$chat_id = $user->id;
$chat_name = $user->username;
$chat_displayname = $user->name;
}
?>
<script>
var chat_id = '<?php echo $chat_id; ?>';
var chat_name = '<?php echo $chat_name; ?>';
var chat_avatar = '<?php echo $chat_avatar; ?>';
var chat_link = '<?php echo $chat_link; ?>';
var chat_displayname = '<?php echo $chat_displayname; ?>';
</script>
now comes the funny thing. if i use this now. then works not the easy social notification module.
if i delete this scripts then works the notification very well.
on attachment you can see the different.
one time with code
one time without code.