How integrate HTML5 Chat with the UNA database

Hi, i want to know if it possible to integrate HTML5 Chat service or script to a UNA website member database

html5-chat

On the website they show the code to integrate it with dolphin but it dont show it for UNA

also maybe its a good idea to add a module for this chat script... because i try rocketchat and im disapointed... dont have enough features and option that html5 chat

but of course the best option is that una come with live cam chat inside the core using WBERTC technology and html5

  • 2127
  • More
Replies (5)
    • Hello, totallyfreak , I have HTML5 chat setup on my site and it seems to work very well.

      https://www.cyclemadness.net/chat.php

      • ok and do you have a paid version of the html5 chat? and do you integrate it with your member database?

        • ok i see it's fully integrated with the member database of your website.... can you tell me how you did that? i try to create a page in UNA and add a block HTML and put the integration code that the website give for Dolphin website... but the code get messy after i save the block

          • <?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%; } { 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

              Login or Join to comment.