Ver Fonte

#2005 Mobile Apps: module rename, better notifications for desktop app

Alex Trofimov há 7 anos atrás
pai
commit
9c6e629406

+ 0 - 18
modules/boonex/mobile_apps/install/langs/en.xml

@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources name="en" flag="gb" title="English">
-	<string name="_sys_module_mobileapps"><![CDATA[Mobile Apps]]></string>
-	<string name="_bx_mobileapps"><![CDATA[Mobile Apps]]></string>
-
-	<string name="_bx_mobileapps_setting"><![CDATA[Mobile Apps Setting]]></string>
-    <string name="_bx_mobileapps_adm_stg_cpt_type"><![CDATA[Mobile Apps]]></string>
-    <string name="_bx_mobileapps_adm_stg_cpt_category_general"><![CDATA[General]]></string>
-    <string name="_bx_mobileapps_option_qwerty"><![CDATA[Qwerty]]></string>
-
-	<string name="_bx_mobileapps_information"><![CDATA[Information]]></string>
-    <string name="_bx_mobileapps_information_block"><![CDATA[This module adds neccesary styles and functionalty for proper functionality of UNA mobile apps. Installing this module isn't enough, you need to get source code of mobile apps modify it for your needs and publish in Google and Apple stores.]]></string>
-
-    <string name="_bx_mobileapps_pull_to_refresh"><![CDATA[Pull to refresh]]></string> <!-- потяни, чтобы обновить -->
-    <string name="_bx_mobileapps_release_to_refresh"><![CDATA[Release to refresh]]></string> <!-- отпусти, чтобы обновить -->
-    <string name="_bx_mobileapps_refreshing"><![CDATA[Refreshing]]></string> <!-- обновление -->
-
-</resources>

+ 0 - 30
modules/boonex/mobile_apps/install/sql/enable.sql

@@ -1,30 +0,0 @@
-
--- Settings
-
-SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules');
-INSERT INTO `sys_options_types` (`group`, `name`, `caption`, `icon`, `order`) VALUES 
-('modules', 'bx_mobileapps', '_bx_mobileapps_adm_stg_cpt_type', 'bx_mobileapps@modules/boonex/mobile_apps/|std-icon.svg', IF(NOT ISNULL(@iTypeOrder), @iTypeOrder + 1, 1));
-SET @iTypeId = LAST_INSERT_ID();
-
-INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order` )  
-VALUES (@iTypeId, 'bx_mobileapps_general', '_bx_mobileapps_adm_stg_cpt_category_general', 1);
-SET @iCategId = LAST_INSERT_ID();
-
-INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
-('bx_mobileapps_option_qwerty', '123', @iCategId, '_bx_mobileapps_option_qwerty', 'digit', '', '', '', 10);
-
--- Injections
-
-INSERT INTO `sys_injections`(`name`, `page_index`, `key`, `type`, `data`, `replace`, `active`) VALUES
-('bx_mobileapps', 0, 'injection_head_begin', 'service', 'a:2:{s:6:"module";s:13:"bx_mobileapps";s:6:"method";s:20:"injection_head_begin";}', 0, 1),
-('bx_mobileapps', 0, 'injection_head', 'service', 'a:2:{s:6:"module";s:13:"bx_mobileapps";s:6:"method";s:14:"injection_head";}', 0, 1);
-
--- Alerts
-
-INSERT INTO `sys_alerts_handlers` SET `name` = 'bx_mobileapps', `class` = 'BxMobileAppsAlerts', `file` = 'modules/boonex/mobile_apps/classes/BxMobileAppsAlerts.php';
-
-SET @iHandlerId = LAST_INSERT_ID();
-
-INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
-('system', 'page_output', @iHandlerId);
-

+ 3 - 3
modules/boonex/mobile_apps/classes/BxMobileAppsAlerts.php → modules/boonex/nexus/classes/BxNexusAlerts.php

@@ -3,13 +3,13 @@
  * Copyright (c) UNA, Inc - https://una.io
  * MIT License - https://opensource.org/licenses/MIT
  *
- * @defgroup    MobileApps Mobile Apps
+ * @defgroup    Nexus Nexus - Mobile Apps and Desktop apps connector
  * @ingroup     UnaModules
  *
  * @{
  */
 
-class BxMobileAppsAlerts extends BxDolAlertsResponse
+class BxNexusAlerts extends BxDolAlertsResponse
 {
     protected $_oModule;
     function __construct()
@@ -19,7 +19,7 @@ class BxMobileAppsAlerts extends BxDolAlertsResponse
 
     public function response($o)
     {
-        if ('system' == $o->sUnit && 'page_output' == $o->sAction && 'sys_home' == $o->aExtras['page_name'] && !isLogged() && false !== strpos($_SERVER['HTTP_USER_AGENT'], 'UNAMobileApp')) {
+        if ('system' == $o->sUnit && 'page_output' == $o->sAction && 'sys_home' == $o->aExtras['page_name'] && !isLogged() && false !== strpos($_SERVER['HTTP_USER_AGENT'], 'UNANexus')) {
 
             // require_once(BX_DIRECTORY_PATH_INC . "design.inc.php");
     

+ 2 - 2
modules/boonex/mobile_apps/classes/BxMobileAppsConfig.php → modules/boonex/nexus/classes/BxNexusConfig.php

@@ -3,13 +3,13 @@
  * Copyright (c) UNA, Inc - https://una.io
  * MIT License - https://opensource.org/licenses/MIT
  *
- * @defgroup    MobileApps Mobile Apps
+ * @defgroup    Nexus Nexus - Mobile Apps and Desktop apps connector
  * @ingroup     UnaModules
  *
  * @{
  */
 
-class BxMobileAppsConfig extends BxDolModuleConfig
+class BxNexusConfig extends BxDolModuleConfig
 {
     function __construct($aModule)
     {

+ 2 - 2
modules/boonex/mobile_apps/classes/BxMobileAppsDb.php → modules/boonex/nexus/classes/BxNexusDb.php

@@ -3,13 +3,13 @@
  * Copyright (c) UNA, Inc - https://una.io
  * MIT License - https://opensource.org/licenses/MIT
  *
- * @defgroup    MobileApps Mobile Apps
+ * @defgroup    Nexus Nexus - Mobile Apps and Desktop apps connector
  * @ingroup     UnaModules
  *
  * @{
  */
 
-class BxMobileAppsDb extends BxDolModuleDb
+class BxNexusDb extends BxDolModuleDb
 {
     function __construct(&$oConfig)
     {

+ 9 - 9
modules/boonex/mobile_apps/classes/BxMobileAppsModule.php → modules/boonex/nexus/classes/BxNexusModule.php

@@ -3,13 +3,13 @@
  * Copyright (c) UNA, Inc - https://una.io
  * MIT License - https://opensource.org/licenses/MIT
  *
- * @defgroup    MobileApps Mobile Apps
+ * @defgroup    Nexus Nexus - Mobile Apps and Desktop apps connector
  * @ingroup     UnaModules
  *
  * @{
  */
 
-class BxMobileAppsModule extends BxDolModule
+class BxNexusModule extends BxDolModule
 {
     function __construct(&$aModule)
     {
@@ -17,7 +17,7 @@ class BxMobileAppsModule extends BxDolModule
     }
 
     /**
-     * Get injection code required for mobile apps
+     * Get injection code required for Nexus apps
      * @return string
      */
     public function serviceInjectionHeadBegin()
@@ -30,7 +30,7 @@ class BxMobileAppsModule extends BxDolModule
     }
     
     /**
-     * Get injection code required for mobile apps
+     * Get injection code required for Nexus apps
      * @return string with Styles and JS code
      */
     public function serviceInjectionHead()
@@ -51,17 +51,17 @@ class BxMobileAppsModule extends BxDolModule
             $iBubbles += $r['bx_if:addon']['content']['addon'];
         }
 
-        $s  = $this->_oTemplate->parseHtmlByName('mobile_apps_styles.html', array());
-        $s .= $this->_oTemplate->parseHtmlByName('mobile_apps_js.html', array(
+        $s  = $this->_oTemplate->parseHtmlByName('styles.html', array());
+        $s .= $this->_oTemplate->parseHtmlByName('js.html', array(
             'msg' => json_encode(array(
                 'loggedin' => isLogged(),                
                 'bubbles_num' => $iBubbles ? $iBubbles : '',
                 'bubbles' => $aBubbles,
                 'push_tags' => array('user' => bx_get_logged_profile_id())
             )),
-            'txt_pull_to_refresh' => bx_js_string(_t('_bx_mobileapps_pull_to_refresh')),
-            'txt_release_to_refresh' => bx_js_string(_t('_bx_mobileapps_release_to_refresh')),
-            'txt_refreshing' => bx_js_string(_t('_bx_mobileapps_refreshing')),
+            'txt_pull_to_refresh' => bx_js_string(_t('_bx_nexus_pull_to_refresh')),
+            'txt_release_to_refresh' => bx_js_string(_t('_bx_nexus_release_to_refresh')),
+            'txt_refreshing' => bx_js_string(_t('_bx_nexus_refreshing')),
         ));
 
         $this->_oTemplate->addJs('pulltorefresh.min.js');

+ 4 - 4
modules/boonex/mobile_apps/classes/BxMobileAppsStudioPage.php → modules/boonex/nexus/classes/BxNexusStudioPage.php

@@ -3,13 +3,13 @@
  * Copyright (c) UNA, Inc - https://una.io
  * MIT License - https://opensource.org/licenses/MIT
  *
- * @defgroup    MobileApps Mobile Apps
+ * @defgroup    Nexus Nexus - Mobile Apps and Desktop apps connector
  * @ingroup     UnaModules
  *
  * @{
  */
 
-class BxMobileAppsStudioPage extends BxTemplStudioModule
+class BxNexusStudioPage extends BxTemplStudioModule
 {
     function __construct($sModule = "", $sPage = "")
     {
@@ -17,13 +17,13 @@ class BxMobileAppsStudioPage extends BxTemplStudioModule
 
         $this->aMenuItems = array(
             array('name' => 'settings', 'icon' => 'cogs', 'title' => '_adm_lmi_cpt_settings'),
-            array('name' => 'help', 'icon' => 'question', 'title' => '_bx_mobileapps_information'),
+            array('name' => 'help', 'icon' => 'question', 'title' => '_bx_nexus_information'),
         );
     }
     
     function getHelp ()
     {
-        return _t('_bx_mobileapps_information_block');
+        return _t('_bx_nexus_information_block');
     }
 }
 

+ 2 - 2
modules/boonex/mobile_apps/classes/BxMobileAppsTemplate.php → modules/boonex/nexus/classes/BxNexusTemplate.php

@@ -3,13 +3,13 @@
  * Copyright (c) UNA, Inc - https://una.io
  * MIT License - https://opensource.org/licenses/MIT
  *
- * @defgroup    MobileApps Mobile Apps
+ * @defgroup    Nexus Nexus - Mobile Apps and Desktop apps connector
  * @ingroup     UnaModules
  *
  * @{
  */
 
-class BxMobileAppsTemplate extends BxDolModuleTemplate
+class BxNexusTemplate extends BxDolModuleTemplate
 {
     function __construct(&$oConfig, &$oDb)
     {

+ 9 - 9
modules/boonex/mobile_apps/install/config.php → modules/boonex/nexus/install/config.php

@@ -3,7 +3,7 @@
  * Copyright (c) UNA, Inc - https://una.io
  * MIT License - https://opensource.org/licenses/MIT
  *
- * @defgroup    MobileApps Mobile Apps
+ * @defgroup    Nexus Nexus - Mobile Apps and Desktop apps connector
  * @ingroup     UnaModules
  *
  * @{
@@ -14,9 +14,9 @@ $aConfig = array(
      * Main Section.
      */
     'type' => BX_DOL_MODULE_TYPE_MODULE,
-    'name' => 'bx_mobileapps',
-    'title' => 'Mobile Apps',
-    'note' => 'Mobile Apps.',
+    'name' => 'bx_nexus',
+    'title' => 'Nexus',
+    'note' => 'Nexus - Mobile Apps and Desktop apps connector.',
     'version' => '9.0.0.DEV',
     'vendor' => 'BoonEx',
 	'help_url' => 'http://feed.una.io/?section={module_name}',
@@ -28,16 +28,16 @@ $aConfig = array(
     /**
      * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
      */
-    'home_dir' => 'boonex/mobile_apps/',
-    'home_uri' => 'mobileapps',
+    'home_dir' => 'boonex/nexus/',
+    'home_uri' => 'nexus',
 
-    'db_prefix' => 'bx_mobileapps_',
-    'class_prefix' => 'BxMobileApps',
+    'db_prefix' => 'bx_nexus_',
+    'class_prefix' => 'BxNexus',
 
     /**
      * Category for language keys.
      */
-    'language_category' => 'Mobile Apps',
+    'language_category' => 'Nexus',
     
     /**
      * Installation/Uninstallation Section.

+ 2 - 2
modules/boonex/mobile_apps/install/installer.php → modules/boonex/nexus/install/installer.php

@@ -3,13 +3,13 @@
  * Copyright (c) UNA, Inc - https://una.io
  * MIT License - https://opensource.org/licenses/MIT
  *
- * @defgroup    MobileApps Mobile Apps
+ * @defgroup    Nexus Nexus - Mobile Apps and Desktop apps connector
  * @ingroup     UnaModules
  *
  * @{
  */
 
-class BxMobileAppsInstaller extends BxDolStudioInstaller
+class BxNexusInstaller extends BxDolStudioInstaller
 {
     function __construct($aConfig)
     {

+ 18 - 0
modules/boonex/nexus/install/langs/en.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="en" flag="gb" title="English">
+	<string name="_sys_module_nexus"><![CDATA[Nexus]]></string>
+	<string name="_bx_nexus"><![CDATA[Nexus]]></string>
+
+	<string name="_bx_nexus_setting"><![CDATA[Nexus Setting]]></string>
+    <string name="_bx_nexus_adm_stg_cpt_type"><![CDATA[Nexus]]></string>
+    <string name="_bx_nexus_adm_stg_cpt_category_general"><![CDATA[General]]></string>
+    <string name="_bx_nexus_option_qwerty"><![CDATA[Qwerty]]></string>
+
+	<string name="_bx_nexus_information"><![CDATA[Information]]></string>
+    <string name="_bx_nexus_information_block"><![CDATA[This module adds neccesary styles and functionalty for proper functionality of UNA Nexus apps. Installing this module isn't enough, you need to get source code of mobile apps then modify them for your needs then publish in Google and Apple stores.]]></string>
+
+    <string name="_bx_nexus_pull_to_refresh"><![CDATA[Pull to refresh]]></string> <!-- потяни, чтобы обновить -->
+    <string name="_bx_nexus_release_to_refresh"><![CDATA[Release to refresh]]></string> <!-- отпусти, чтобы обновить -->
+    <string name="_bx_nexus_refreshing"><![CDATA[Refreshing]]></string> <!-- обновление -->
+
+</resources>

+ 3 - 3
modules/boonex/mobile_apps/install/sql/disable.sql → modules/boonex/nexus/install/sql/disable.sql

@@ -1,15 +1,15 @@
 
 -- Settings
 
-DELETE FROM `top`, `toc`, `to` USING `sys_options_types` AS `top` LEFT JOIN `sys_options_categories` AS `toc` ON `top`.`id`=`toc`.`type_id` LEFT JOIN `sys_options` AS `to` ON `toc`.`id`=`to`.`category_id` WHERE `top`.`name` = 'bx_mobileapps';
+DELETE FROM `top`, `toc`, `to` USING `sys_options_types` AS `top` LEFT JOIN `sys_options_categories` AS `toc` ON `top`.`id`=`toc`.`type_id` LEFT JOIN `sys_options` AS `to` ON `toc`.`id`=`to`.`category_id` WHERE `top`.`name` = 'bx_nexus';
 
 -- Injections
 
-DELETE FROM `sys_injections` WHERE `name` IN('bx_mobileapps');
+DELETE FROM `sys_injections` WHERE `name` IN('bx_nexus');
 
 -- Alerts
 
-SET @iHandlerId := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_mobileapps');
+SET @iHandlerId := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_nexus');
 
 DELETE FROM `sys_alerts_handlers` WHERE `id`  = @iHandlerId;
 DELETE FROM `sys_alerts` WHERE `handler_id` =  @iHandlerId ;

+ 30 - 0
modules/boonex/nexus/install/sql/enable.sql

@@ -0,0 +1,30 @@
+
+-- Settings
+
+SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules');
+INSERT INTO `sys_options_types` (`group`, `name`, `caption`, `icon`, `order`) VALUES 
+('modules', 'bx_nexus', '_bx_nexus_adm_stg_cpt_type', 'bx_nexus@modules/boonex/nexus/|std-icon.svg', IF(NOT ISNULL(@iTypeOrder), @iTypeOrder + 1, 1));
+SET @iTypeId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order` )  
+VALUES (@iTypeId, 'bx_nexus_general', '_bx_nexus_adm_stg_cpt_category_general', 1);
+SET @iCategId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
+('bx_nexus_option_qwerty', '123', @iCategId, '_bx_nexus_option_qwerty', 'digit', '', '', '', 10);
+
+-- Injections
+
+INSERT INTO `sys_injections`(`name`, `page_index`, `key`, `type`, `data`, `replace`, `active`) VALUES
+('bx_nexus', 0, 'injection_head_begin', 'service', 'a:2:{s:6:"module";s:8:"bx_nexus";s:6:"method";s:20:"injection_head_begin";}', 0, 1),
+('bx_nexus', 0, 'injection_head', 'service', 'a:2:{s:6:"module";s:8:"bx_nexus";s:6:"method";s:14:"injection_head";}', 0, 1);
+
+-- Alerts
+
+INSERT INTO `sys_alerts_handlers` SET `name` = 'bx_nexus', `class` = 'BxNexusAlerts', `file` = 'modules/boonex/nexus/classes/BxNexusAlerts.php';
+
+SET @iHandlerId = LAST_INSERT_ID();
+
+INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
+('system', 'page_output', @iHandlerId);
+

+ 2 - 2
modules/boonex/mobile_apps/install/sql/install.sql → modules/boonex/nexus/install/sql/install.sql

@@ -3,13 +3,13 @@
 -- Studio page and widget
 
 INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
-(3, 'bx_mobileapps', '_bx_mobileapps', '_bx_mobileapps', 'bx_mobileapps@modules/boonex/mobile_apps/|std-icon.svg');
+(3, 'bx_nexus', '_bx_nexus', '_bx_nexus', 'bx_nexus@modules/boonex/nexus/|std-icon.svg');
 SET @iPageId = LAST_INSERT_ID();
 
 SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
 SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
 INSERT INTO `sys_std_widgets` (`page_id`, `module`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
-(@iPageId, 'bx_mobileapps', '{url_studio}module.php?name=bx_mobileapps', '', 'bx_mobileapps@modules/boonex/mobile_apps/|std-icon.svg', '_bx_mobileapps', '', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_actions";s:6:"params";a:0:{}s:5:"class";s:18:"TemplStudioModules";}');
+(@iPageId, 'bx_nexus', '{url_studio}module.php?name=bx_nexus', '', 'bx_nexus@modules/boonex/nexus/|std-icon.svg', '_bx_nexus', '', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_actions";s:6:"params";a:0:{}s:5:"class";s:18:"TemplStudioModules";}');
 INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
 (@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));
 

+ 1 - 1
modules/boonex/mobile_apps/install/sql/uninstall.sql → modules/boonex/nexus/install/sql/uninstall.sql

@@ -3,5 +3,5 @@
 
 DELETE FROM `tp`, `tw`, `tpw`
 USING `sys_std_pages` AS `tp`, `sys_std_widgets` AS `tw`, `sys_std_pages_widgets` AS `tpw`
-WHERE `tp`.`id` = `tw`.`page_id` AND `tw`.`id` = `tpw`.`widget_id` AND `tp`.`name` = 'bx_mobileapps';
+WHERE `tp`.`id` = `tw`.`page_id` AND `tw`.`id` = `tpw`.`widget_id` AND `tp`.`name` = 'bx_nexus';
 

+ 0 - 0
modules/boonex/mobile_apps/js/pulltorefresh.min.js → modules/boonex/nexus/js/pulltorefresh.min.js


+ 1 - 1
modules/boonex/mobile_apps/request.php → modules/boonex/nexus/request.php

@@ -3,7 +3,7 @@
  * Copyright (c) UNA, Inc - https://una.io
  * MIT License - https://opensource.org/licenses/MIT
  *
- * @defgroup    MobileApps Mobile Apps
+ * @defgroup    Nexus Nexus - Mobile Apps and Desktop apps connector
  * @ingroup     UnaModules
  *
  * @{

Diff do ficheiro suprimidas por serem muito extensas
+ 7 - 0
modules/boonex/nexus/template/images/icons/std-icon.svg


+ 0 - 0
modules/boonex/mobile_apps/template/images/icons/std-icon.svg → modules/boonex/nexus/template/images/icons/std-icon2.svg


+ 12 - 11
modules/boonex/mobile_apps/template/mobile_apps_js.html → modules/boonex/nexus/template/js.html

@@ -38,17 +38,18 @@
         ipcRenderer.send('message', __msg__);
 
         // send messenger badge
-        setInterval(function () {
-            if ('undefined' !== typeof oLiveUpdates && oLiveUpdates._aSystemsActive && 'undefined' !== typeof oLiveUpdates._aSystemsActive.bx_messenger_new_messages) {
-                sMsg = {
-                    'bubbles': {
-                        'notifications-messenger': oLiveUpdates._aSystemsActive.bx_messenger_new_messages,
-                    },
-                };
-                ipcRenderer.send('message', sMsg);
-            }
-        }, 3000);
-        
+        if (typeof window.glBxMessengerOnNotificationChange === 'undefined')
+            window.glBxMessengerOnNotificationChange = [];
+
+        window.glBxMessengerOnNotificationChange.push(function (iNewNumberOfUnreadChats) {
+            sMsg = {
+                'bubbles': {
+                    'notifications-messenger': iNewNumberOfUnreadChats,
+                },
+            };
+            ipcRenderer.send('message', sMsg);
+        });
+
         if ($.cookie('memberID')) {
             // force links to open in external browser in electron
             $(document).ready(function () {

+ 0 - 0
modules/boonex/mobile_apps/template/mobile_apps_styles.html → modules/boonex/nexus/template/styles.html


+ 24 - 0
scripts/delete_me.html

@@ -0,0 +1,24 @@
+<!-- NEW IMPLEMENETAION: Javascript install - works fine -->
+<link rel="stylesheet" href="//cdn.flowplayer.com/releases/native/stable/style/flowplayer.css">
+<script src="//cdn.flowplayer.com/releases/native/stable/flowplayer.min.js"></script>
+<div id="bx_flowplayer"></div>
+<script>
+flowplayer('#bx_flowplayer', {
+  "ima": {
+    "ads": [
+      { "time": 0, "adTag": "https://mydserver.com/path/vast.xml" },
+      { "time": 20, "adTag": "https://mydserver.com/path/vast2.xml" },
+      { "time": 300, "adTag": "https://mydserver.com/path/vast3.xml" }
+    ],
+    "parameters": { "age": 25, "location": "us" },
+    "show_all_ads_on_seek": false
+  }
+  poster: "__image__",
+  src: [
+    <bx_if:mp4>{ "src": "__mp4__", "type": "video/mp4" },</bx_if:mp4>
+    <bx_if:webm>{ "src": "__webm__", "type": "video/webm; codecs='vp8, vorbis'" },</bx_if:webm>
+    <bx_if:ogv>{ "src": "__ogv__", "type": "video/ogg" },</bx_if:ogv>
+  ],
+  token: 'eyJraWQiOiI1Y0E2QjlRZml5a3EiLCJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJjIjoie1wiYWNsXCI6NixcImlkXCI6XCI1Y0E2QjlRZml5a3FcIn0iLCJpc3MiOiJGbG93cGxheWVyIn0.uSWLyAwUCdKRL9CyKJIJbgfrRnwKhwcIwQgWgbYIB3_TxMvIgBmIQFxle6pa7RgWLUY4qE_zRawJDR0sk_hZqg'
+})
+</script>

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff