Răsfoiți Sursa

Modules updates. Discontinued.

AntonLV 3 săptămâni în urmă
părinte
comite
457f361c2a

+ 2 - 2
modules/boonex/chat_plus/classes/BxChatPlusModule.php

@@ -40,9 +40,9 @@ class BxChatPlusModule extends BxDolModule
     public function serviceGetActions($aWidget)
     {
         $oInformer = BxDolInformer::getInstance(BxDolStudioTemplate::getInstance());
-        $oInformer->add('sys-module-discontinued', _t('_adm_txt_modules_discontinued', BX_DOL_URL_STUDIO . 'design.php?name=bx_chat_plus', _t('_bx_chat_plus_adm_stg_cpt_type')), BX_INFORMER_ALERT);
+        $oInformer->add('sys-module-discontinued', _t('_adm_txt_modules_discontinued', BX_DOL_URL_STUDIO . 'module.php?name=bx_chat_plus', _t('_bx_chat_plus_adm_stg_cpt_type')), BX_INFORMER_ALERT);
 
-        return bx_srv('system', 'get_actions', [$aWidget], 'TemplStudioDesigns');
+        return bx_srv('system', 'get_actions', [$aWidget], 'TemplStudioModules');
     }
 
     function serviceChatBlock ()

+ 51 - 0
modules/boonex/chat_plus/updates/15.0.0_15.0.1/install/config.php

@@ -0,0 +1,51 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+    'title' => 'RocketChat',
+    'version_from' => '15.0.0',
+    'version_to' => '15.0.1',
+    'vendor' => 'UNA INC',
+
+    'compatible_with' => array(
+        '15.0.0-RC2'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/chat_plus/updates/update_15.0.0_15.0.1/',
+    'home_uri' => 'chat_plus_update_1500_1501',
+
+    'module_dir' => 'boonex/chat_plus/',
+    'module_uri' => 'chat_plus',
+
+    'db_prefix' => 'bx_chat_plus_',
+    'class_prefix' => 'BxChatPlus',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 0,
+        'update_files' => 1,
+        'update_languages' => 0,
+        'clear_db_cache' => 0,
+    ),
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Chat+',
+
+    /**
+     * Files Section
+     */
+    'delete_files' => array(),
+);

+ 13 - 0
modules/boonex/chat_plus/updates/15.0.0_15.0.1/install/installer.php

@@ -0,0 +1,13 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ */
+
+class BxChatPlusUpdater extends BxDolStudioUpdater
+{
+    function __construct($aConfig)
+    {
+        parent::__construct($aConfig);
+    }
+}

+ 98 - 0
modules/boonex/chat_plus/updates/15.0.0_15.0.1/source/classes/BxChatPlusModule.php

@@ -0,0 +1,98 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    RocketChat Rocket.Chat integration module
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxChatPlusModule extends BxDolModule
+{
+    function __construct(&$aModule)
+    {
+        parent::__construct($aModule);
+    }
+
+    function actionRedirect ()
+    {
+        if (!getParam('bx_chat_plus_url')) {
+            $this->_oTemplate->displayMsg(_t('_bx_chat_plus_not_configured'));
+            return;
+        }
+
+        header("Location:" . getParam('bx_chat_plus_url'), true, 302);
+    }
+
+    function actionLogo ()
+    {
+        if (!($sLogoUrl = BxTemplFunctions::getInstance()->getMainLogoUrl())) {
+            header("HTTP/1.0 404 Not Found");
+            echo '404 Not Found';
+            return;
+        }
+
+        header("Location:" . $sLogoUrl);
+    }
+
+    public function serviceGetActions($aWidget)
+    {
+        $oInformer = BxDolInformer::getInstance(BxDolStudioTemplate::getInstance());
+        $oInformer->add('sys-module-discontinued', _t('_adm_txt_modules_discontinued', BX_DOL_URL_STUDIO . 'module.php?name=bx_chat_plus', _t('_bx_chat_plus_adm_stg_cpt_type')), BX_INFORMER_ALERT);
+
+        return bx_srv('system', 'get_actions', [$aWidget], 'TemplStudioModules');
+    }
+
+    function serviceChatBlock ()
+    {
+        if (!getParam('bx_chat_plus_url'))
+           return MsgBox(_t('_bx_chat_plus_not_configured'));
+       
+        $this->_oTemplate->addCss('main.css');
+        $s = $this->_oTemplate->parseHtmlByName('chat_block.html', array('chat_url' => getParam('bx_chat_plus_url')));
+       
+        return array(
+            'content' => $s, 
+            'menu' => array (
+                array (
+                    'title' => _t('_bx_chat_plus_open_in_separate_window'),
+                    'link' => getParam('bx_chat_plus_url'),
+                    'target' => '_blank',
+                ),
+            ),
+        );
+    }
+
+    function serviceHelpdeskCode ()
+    {
+        $sChatUrl = getParam('bx_chat_plus_url');
+        if (!getParam('bx_chat_plus_helpdesk') || !$sChatUrl)
+            return '';
+
+        if (getParam('bx_chat_plus_helpdesk_guest_only') && isLogged())
+            return '';
+
+        $aUrl = parse_url($sChatUrl);
+        $sChatUrl = $aUrl['scheme'] . '://' . $aUrl['host'] . ($aUrl['port'] ? ':' . $aUrl['port'] : '');
+
+        return <<<EOS
+
+<!-- Start of Helpdesk Livechat Script -->
+<script language="javascript">
+(function(w, d, s, u) {
+	w.RocketChat = function(c) { w.RocketChat._.push(c) }; w.RocketChat._ = []; w.RocketChat.url = u;
+	var h = d.getElementsByTagName(s)[0], j = d.createElement(s);
+	j.async = true; j.src = '{$sChatUrl}/packages/rocketchat_livechat/assets/rocket-livechat.js';
+	h.parentNode.insertBefore(j, h);
+})(window, document, 'script', '{$sChatUrl}/livechat');
+</script>
+<!-- End of Helpdesk Livechat Script -->
+
+EOS;
+
+    }
+}
+
+/** @} */

+ 70 - 0
modules/boonex/chat_plus/updates/15.0.0_15.0.1/source/install/config.php

@@ -0,0 +1,70 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    RocketChat Rocket.Chat integration module
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_chat_plus',
+    'title' => 'RocketChat',
+    'note' => 'RocketChat integration.',
+    'version' => '15.0.1',
+    'vendor' => 'UNA INC',
+    'help_url' => 'http://feed.una.io/?section={module_name}',
+
+    'compatible_with' => array(
+        '15.0.0-RC2'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/chat_plus/',
+    'home_uri' => 'chat_plus',
+
+    'db_prefix' => 'bx_chat_plus_',
+    'class_prefix' => 'BxChatPlus',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Chat+',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    ),
+    'uninstall' => array (
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable' => array(
+        'execute_sql' => 1,
+        'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(
+        //'oauth2' => 'BoonEx OAuth2 Server Module'
+    ),
+);
+
+/** @} */

+ 2 - 2
modules/boonex/datafox/classes/BxDataFoxModule.php

@@ -19,9 +19,9 @@ class BxDataFoxModule extends BxDolModule
     public function serviceGetActions($aWidget)
     {
         $oInformer = BxDolInformer::getInstance(BxDolStudioTemplate::getInstance());
-        $oInformer->add('sys-module-discontinued', _t('_adm_txt_modules_discontinued', BX_DOL_URL_STUDIO . 'design.php?name=bx_datafox', _t('_bx_datafox_adm_stg_cpt_type')), BX_INFORMER_ALERT);
+        $oInformer->add('sys-module-discontinued', _t('_adm_txt_modules_discontinued', BX_DOL_URL_STUDIO . 'module.php?name=bx_datafox', _t('_bx_datafox_adm_stg_cpt_type')), BX_INFORMER_ALERT);
 
-        return bx_srv('system', 'get_actions', [$aWidget], 'TemplStudioDesigns');
+        return bx_srv('system', 'get_actions', [$aWidget], 'TemplStudioModules');
     }
 
     function serviceIncludeCssJs()

+ 51 - 0
modules/boonex/datafox/updates/15.0.0_15.0.1/install/config.php

@@ -0,0 +1,51 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+    'title' => 'Data Fox',
+    'version_from' => '15.0.0',
+    'version_to' => '15.0.1',
+    'vendor' => 'UNA INC',
+
+    'compatible_with' => array(
+        '15.0.0-RC2'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/datafox/updates/update_15.0.0_15.0.1/',
+    'home_uri' => 'datafox_update_1500_1501',
+
+    'module_dir' => 'boonex/datafox/',
+    'module_uri' => 'datafox',
+
+    'db_prefix' => 'bx_datafox_',
+    'class_prefix' => 'BxDataFox',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 0,
+        'update_files' => 1,
+        'update_languages' => 0,
+        'clear_db_cache' => 0,
+    ),
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Data Fox',
+
+    /**
+     * Files Section
+     */
+    'delete_files' => array(),
+);

+ 13 - 0
modules/boonex/datafox/updates/15.0.0_15.0.1/install/installer.php

@@ -0,0 +1,13 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ */
+
+class BxDataFoxUpdater extends BxDolStudioUpdater
+{
+    function __construct($aConfig)
+    {
+        parent::__construct($aConfig);
+    }
+}

+ 154 - 0
modules/boonex/datafox/updates/15.0.0_15.0.1/source/classes/BxDataFoxModule.php

@@ -0,0 +1,154 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    DataFox Data Fox API integration
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxDataFoxModule extends BxDolModule
+{
+    function __construct(&$aModule)
+    {
+        parent::__construct($aModule);
+    }
+
+    public function serviceGetActions($aWidget)
+    {
+        $oInformer = BxDolInformer::getInstance(BxDolStudioTemplate::getInstance());
+        $oInformer->add('sys-module-discontinued', _t('_adm_txt_modules_discontinued', BX_DOL_URL_STUDIO . 'module.php?name=bx_datafox', _t('_bx_datafox_adm_stg_cpt_type')), BX_INFORMER_ALERT);
+
+        return bx_srv('system', 'get_actions', [$aWidget], 'TemplStudioModules');
+    }
+
+    function serviceIncludeCssJs()
+    {
+        $this->_oTemplate->addCss('datafox.css');
+    }
+
+    function serviceParseText($sHtml)
+    {
+        if (false === strstr($sHtml, '<a '))
+            return $sHtml;
+        
+        $sId = 'bx-datafox-' . md5(microtime());
+
+        // load html with wrapper
+        $dom = new DOMDocument();
+        @$dom->loadHTML('<?xml encoding="UTF-8"><div id="' . $sId . '">' . $sHtml . '</div>');
+        $xpath = new DOMXpath($dom);
+
+        // grab links, also add special classes
+        $aLinks = array();
+        $oLinks = $xpath->evaluate('//a');
+        for ($i = 0; $i < $oLinks->length; $i++) {
+            $oLink = $oLinks->item($i);
+            $sIdLink = $sId . '_' . $i;
+
+            $aLinks[$sIdLink] = $oLink->getAttribute('href');
+
+            $sClasses = $oLink->getAttribute('class');
+            $sClasses = ($sClasses ? preg_replace('/\s*bx-datafox-[a-zA-Z0-9]+_[0-9]+/', '', $sClasses) . ' ' : '') . $sIdLink;
+
+            $oLink->removeAttribute('class');
+            $oLink->setAttribute("class", $sClasses);
+        }
+
+        // remove old code with references
+        $eCont = $dom->getElementById($sId);
+        foreach ($xpath->query('//div[contains(attribute::class, "bx-datafox-companies")]', $eCont) as $e)
+            $e->parentNode->removeChild($e);
+
+        // save the result 
+        if (false === ($s = $dom->saveHTML($dom->getElementsByTagName('div')->item(0)))) // in case of error return original string
+            return $sHtml;
+
+        // strip added tags
+        $sHtml = mb_substr($s, 54, -6); 
+
+        // add new code with references
+        $aCompanies = $this->apiGetCompanies($aLinks);
+
+        $sHtml .= $this->_oTemplate->parseHtmlByName('companies.html', array(
+            'bx_repeat:companies' => $aCompanies,
+            'bx_repeat:companies2' => $aCompanies,
+        ));
+
+        return $sHtml;
+    }
+
+    function apiGetCompanies($aLinks)
+    {
+        $sAccessToken = $this->apiGetAccessToken();
+        $aCompanies = array();
+        $iCounter = 0;
+        foreach ($aLinks as $sId => &$sHref) {
+            if (!($a = $this->apiGetCompanyByUrl($sAccessToken, $sHref, $aCompanies)))
+                continue;
+            $a['link_id'] = $sId;
+            $a['item_number'] = ++$iCounter;
+            unset($a['top_keywords']);
+            $aCompanies[$a['id']] = $a;
+        }
+        return array_values($aCompanies);
+    }
+
+    function apiGetAccessToken()
+    {
+        // make request for token
+        $sHttpCode = null;
+        $s = bx_file_get_contents($this->_oConfig->sApiUrl . 'oauth2/token', array(
+            'grant_type' => 'client_credentials',
+            'scope' => 'full',
+        ), 'post', array(), $sHttpCode, array(
+            'user' => getParam('bx_datafox_id'), 
+            'password' => getParam('bx_datafox_secret'),
+        ));
+
+        if (!$s)
+            return false;
+
+        $o = json_decode($s);
+
+        return $o && isset($o->access_token) ? $o->access_token : '';
+    }
+
+    function apiGetCompanyByUrl($sAccessToken, $sHref, $aCompanies)
+    {
+        $sHost = parse_url($sHref, PHP_URL_HOST);
+        if (!$sHref)
+            return false;
+
+        $a = $this->api($sAccessToken, 'companies', array('url' => $sHost));
+
+        if (!isset($a['total_count']) || !$a['total_count'] && $a['entries'])
+            return false;
+
+        $aCompany = array_pop($a['entries']);
+
+        if (isset($aCompanies[$aCompany['id']]))
+            return false;
+
+        $aCompanyFull = $this->api($sAccessToken, 'companies/' . $aCompany['id'] . '/details');
+
+        return $aCompanyFull;
+    }
+
+    function api($sAccessToken, $sUrlAppend, $aData = array())
+    {
+        $s = bx_file_get_contents($this->_oConfig->sApiUrl . $sUrlAppend, $aData, 'get', array(
+            'Authorization: Bearer ' . $sAccessToken,
+        ));
+
+        if (!$s || !($a = json_decode($s, true)) || (isset($a['object_type']) && 'error' == $a['object_type']))
+            return false;
+
+        return $a;
+    }
+
+}
+
+/** @} */

+ 68 - 0
modules/boonex/datafox/updates/15.0.0_15.0.1/source/install/config.php

@@ -0,0 +1,68 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    DataFox Data Fox API integration
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_datafox',
+    'title' => 'Data Fox',
+    'note' => 'Data Fox API integration.',
+    'version' => '15.0.1',
+    'vendor' => 'UNA INC',
+    'help_url' => 'http://feed.una.io/?section={module_name}',
+
+    'compatible_with' => array(
+        '15.0.0-RC2'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/datafox/',
+    'home_uri' => 'datafox',
+
+    'db_prefix' => 'bx_datafox_',
+    'class_prefix' => 'BxDataFox',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Data Fox',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    ),
+    'uninstall' => array (
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable' => array(
+        'execute_sql' => 1,
+        'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+);
+
+/** @} */

+ 2 - 2
modules/boonex/una_connect/classes/BxUnaConModule.php

@@ -54,9 +54,9 @@ class BxUnaConModule extends BxBaseModConnectModule
     public function serviceGetActions($aWidget)
     {
         $oInformer = BxDolInformer::getInstance(BxDolStudioTemplate::getInstance());
-        $oInformer->add('sys-module-discontinued', _t('_adm_txt_modules_discontinued', BX_DOL_URL_STUDIO . 'design.php?name=bx_unacon', _t('_bx_unacon_settings')), BX_INFORMER_ALERT);
+        $oInformer->add('sys-module-discontinued', _t('_adm_txt_modules_discontinued', BX_DOL_URL_STUDIO . 'module.php?name=bx_unacon', _t('_bx_unacon_settings')), BX_INFORMER_ALERT);
 
-        return bx_srv('system', 'get_actions', [$aWidget], 'TemplStudioDesigns');
+        return bx_srv('system', 'get_actions', [$aWidget], 'TemplStudioModules');
     }
 
     protected function _makeFriends($iProfileId)

+ 51 - 0
modules/boonex/una_connect/updates/15.0.1_15.0.2/install/config.php

@@ -0,0 +1,51 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+    'title' => 'UNA connect',
+    'version_from' => '15.0.1',
+    'version_to' => '15.0.2',
+    'vendor' => 'UNA INC',
+
+    'compatible_with' => array(
+        '15.0.0-RC2'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/una_connect/updates/update_15.0.1_15.0.2/',
+    'home_uri' => 'unacon_update_1501_1502',
+
+    'module_dir' => 'boonex/una_connect/',
+    'module_uri' => 'unacon',
+
+    'db_prefix' => 'bx_unacon_',
+    'class_prefix' => 'BxUnaCon',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 0,
+        'update_files' => 1,
+        'update_languages' => 0,
+        'clear_db_cache' => 0,
+    ),
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'UNA Connect',
+
+    /**
+     * Files Section
+     */
+    'delete_files' => array(),
+);

+ 13 - 0
modules/boonex/una_connect/updates/15.0.1_15.0.2/install/installer.php

@@ -0,0 +1,13 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ */
+
+class BxUnaConUpdater extends BxDolStudioUpdater
+{
+    function __construct($aConfig)
+    {
+        parent::__construct($aConfig);
+    }
+}

+ 87 - 0
modules/boonex/una_connect/updates/15.0.1_15.0.2/source/classes/BxUnaConModule.php

@@ -0,0 +1,87 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    UnaConnect UNA Connect
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxUnaConModule extends BxBaseModConnectModule
+{
+    function __construct(&$aModule)
+    {
+        parent::__construct($aModule);
+    }
+
+    /**
+     * Redirect to remote site login form
+     *
+     * @return n/a/ - redirect or HTML page in case of error
+     */
+    function actionStart()
+    {
+        if (isLogged())
+            $this->_redirect ($this -> _oConfig -> sDefaultRedirectUrl);
+
+        if (!$this->_oConfig->sApiID || !$this->_oConfig->sApiSecret || !$this->_oConfig->sApiUrl) {
+            require_once(BX_DIRECTORY_PATH_INC . 'design.inc.php');
+            bx_import('BxDolLanguages');
+            $sCode =  MsgBox( _t('_bx_unacon_profile_error_api_keys') );
+            $this->_oTemplate->getPage(_t('_bx_unacon'), $sCode);            
+        } 
+        else {
+
+            // define redirect URL to the remote site                
+            $sUrl = bx_append_url_params($this->_oConfig->sApiUrl . 'auth', array(
+                'response_type' => 'code',
+                'client_id' => $this->_oConfig->sApiID,
+                'redirect_uri' => $this->_oConfig->sPageHandle,
+                'scope' => $this->_oConfig->sScope,
+                'state' => $this->_genToken(),
+            ));
+            $this->_redirect($sUrl);
+        }
+    }
+
+    function actionHandle()
+    {
+        return $this->_actionHandle();
+    }
+
+    public function serviceGetActions($aWidget)
+    {
+        $oInformer = BxDolInformer::getInstance(BxDolStudioTemplate::getInstance());
+        $oInformer->add('sys-module-discontinued', _t('_adm_txt_modules_discontinued', BX_DOL_URL_STUDIO . 'module.php?name=bx_unacon', _t('_bx_unacon_settings')), BX_INFORMER_ALERT);
+
+        return bx_srv('system', 'get_actions', [$aWidget], 'TemplStudioModules');
+    }
+
+    protected function _makeFriends($iProfileId)
+    {
+        return parent::__makeFriends($iProfileId);
+    }
+
+    /**
+     * @param $aProfileInfo - remote profile info
+     * @param $sAlternativeName - suffix to add to NickName to make it unique
+     * @return profile array info, ready for the local database
+     */
+    protected function _convertRemoteFields($aProfileInfo, $sAlternativeName = '')
+    {
+        $aProfileFields = $aProfileInfo;
+
+        $aProfileFields['name'] = $aProfileInfo['profile_display_name'];
+        $aProfileFields['gender'] = isset($aProfileInfo['gender']) ? $aProfileInfo['gender'] : '';
+        $aProfileFields['birthday'] = isset($aProfileInfo['birthday']) ? $aProfileInfo['birthday'] : '';
+        $aProfileFields['fullname'] = $aProfileInfo['profile_display_name'];
+        $aProfileFields['picture'] = $aProfileInfo['picture'];
+        $aProfileFields['allow_view_to'] = getParam('bx_unacon_privacy');
+        
+        return $aProfileFields;
+    }
+}
+
+/** @} */

+ 68 - 0
modules/boonex/una_connect/updates/15.0.1_15.0.2/source/install/config.php

@@ -0,0 +1,68 @@
+<?php 
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    UnaConnect UNA Connect
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_unacon',
+    'title' => 'UNA connect',
+    'note' => 'Join the site using another UNA site account credentials.',
+    'version' => '15.0.2',
+    'vendor' => 'UNA INC',
+    'help_url' => 'http://feed.una.io/?section={module_name}',
+
+    'compatible_with' => array(
+        '15.0.0-RC2'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/una_connect/',
+    'home_uri' => 'unacon',
+
+    'db_prefix' => 'bx_unacon_',
+    'class_prefix' => 'BxUnaCon',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'UNA Connect',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    ),
+    'uninstall' => array (
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable' => array (
+        'execute_sql' => 1,
+        'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+);
+
+/** @} */