html5 + boonex: how to integrate webcam chat with boonex ?

Here is a sample code on how to add html5-chat into boonex in full screen

 

<?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('https://html5-chat.com/script/1819/5a3a6189ec749/%s/%s/%s', $user['username'], $user['gender'], base64_encode($user['avatar']));?>'></script>
</body>
</html>

2 thoughts to “html5 + boonex: how to integrate webcam chat with boonex ?”

  1. I see this code above was from 2018 (Boonex Dolphin Software). Dolphin software has been out dated for a couple years now. They now have their newest software called UNA software. Does anyone have code that will work with this UNA software?
    Today’s date is 11/26/2021

    1. Hi John,

      I am exactly where you were in 2021. I like the a html5 chat service and would like to integrate it to my UNA site. No one replied to your question, but I would like to know if you indeed solve the problem.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.