-
<?php require_once( 'inc/header.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' );
bx_import('BxDolModuleDb');
function getUser() { $iUserId = getLoggedId(); if (!$iUserId) { header('Location:/'); exit; } $data = getProfileInfo($iUserId); bx_import('BxDolMemberInfo'); $sThumbSetting = getParam('sys_member_info_thumb_icon'); $o = BxDolMemberInfo::getObjectInstance($sThumbSetting); $sThumbUrl = $o ? $o->get($data) : ''; $bThumb = !empty($sThumbUrl);
$role = ($data['Role'] == 3) ? 'Administrator' : 'Member'; $gender = ($data['Sex'] == '') ? '--' : $data['Sex']; if(empty($sThumbUrl)) { $avatar = "Avatar is not available"; } else { $avatar = $sThumbUrl; } if ($data['NickName']=='admin') { $data['NickName'] = 'admin '; } return array('id'=>$iUserId, 'username'=>$data['NickName'], 'gender'=>$gender, 'avatar'=>$avatar, 'role'=>$role);
}
?>
<!doctype html>
<html lang="en">
<head> <meta charset="UTF-8"> <title>Webcam chat</title> <style> html,boby { width: 100%; }#html5ChatContainer { width: 100%; position: fixed; height:100%; } </style>
</head>
<body>
<?php $user = getUser();
?>
<script src='<?=sprintf('/script/1819/5a3a6189ec749/%s/%s/%s', $user['username'], $user['gender'], base64_encode($user['avatar']));?>'></script>
</body>
</html>is that code correct for UNA? its seams more to be for dolphin
-
Hello totallyfreak !
Yes, the given code may work in Dolphin but even there it's not so good (HTML part is better to export to the template HTML file, add the meta part via _header / footer etc). For UNA you may try to adopt the chat_plus integration as an example https://github.com/unaio/una/tree/master/modules/boonex/chat_plus
-