Ver código fonte

Merge remote-tracking branch 'origin/master'

Alexander 5 anos atrás
pai
commit
cfc8d734fc
48 arquivos alterados com 14743 adições e 36 exclusões
  1. 1 1
      inc/version.inc.php
  2. 1 1
      install/index.php
  3. 1 1
      modules/boonex/albums/install/config.php
  4. 51 0
      modules/boonex/albums/updates/12.0.1_12.0.2/install/config.php
  5. 13 0
      modules/boonex/albums/updates/12.0.1_12.0.2/install/installer.php
  6. 143 0
      modules/boonex/albums/updates/12.0.1_12.0.2/source/install/config.php
  7. 24 0
      modules/boonex/albums/updates/12.0.1_12.0.2/source/template/unit_media.html
  8. 1 1
      modules/boonex/russian/install/config.php
  9. 55 0
      modules/boonex/russian/updates/12.0.2_12.0.3/install/config.php
  10. 13 0
      modules/boonex/russian/updates/12.0.2_12.0.3/install/installer.php
  11. 5 0
      modules/boonex/russian/updates/12.0.2_12.0.3/install/langs/bx_tasks/ru.xml
  12. 6 0
      modules/boonex/russian/updates/12.0.2_12.0.3/install/langs/bx_timeline/ru.xml
  13. 354 0
      modules/boonex/russian/updates/12.0.2_12.0.3/source/data/langs/bx_tasks/ru.xml
  14. 328 0
      modules/boonex/russian/updates/12.0.2_12.0.3/source/data/langs/bx_timeline/ru.xml
  15. 71 0
      modules/boonex/russian/updates/12.0.2_12.0.3/source/install/config.php
  16. 1 1
      modules/boonex/tasks/install/config.php
  17. 51 0
      modules/boonex/tasks/updates/12.0.0_12.0.1/install/config.php
  18. 13 0
      modules/boonex/tasks/updates/12.0.0_12.0.1/install/installer.php
  19. 5 0
      modules/boonex/tasks/updates/12.0.0_12.0.1/install/langs/en.xml
  20. 149 0
      modules/boonex/tasks/updates/12.0.0_12.0.1/source/install/config.php
  21. 356 0
      modules/boonex/tasks/updates/12.0.0_12.0.1/source/install/langs/en.xml
  22. 12 11
      modules/boonex/timeline/classes/BxTimelineModule.php
  23. 1 1
      modules/boonex/timeline/install/config.php
  24. 43 16
      modules/boonex/timeline/template/block_async_outline.html
  25. 54 0
      modules/boonex/timeline/updates/12.0.2_12.0.3/install/config.php
  26. 13 0
      modules/boonex/timeline/updates/12.0.2_12.0.3/install/installer.php
  27. 6 0
      modules/boonex/timeline/updates/12.0.2_12.0.3/install/langs/en.xml
  28. 12 0
      modules/boonex/timeline/updates/12.0.2_12.0.3/install/sql/enable.sql
  29. 741 0
      modules/boonex/timeline/updates/12.0.2_12.0.3/source/classes/BxTimelineConfig.php
  30. 4488 0
      modules/boonex/timeline/updates/12.0.2_12.0.3/source/classes/BxTimelineModule.php
  31. 2688 0
      modules/boonex/timeline/updates/12.0.2_12.0.3/source/classes/BxTimelineTemplate.php
  32. 135 0
      modules/boonex/timeline/updates/12.0.2_12.0.3/source/install/config.php
  33. 329 0
      modules/boonex/timeline/updates/12.0.2_12.0.3/source/install/langs/en.xml
  34. 500 0
      modules/boonex/timeline/updates/12.0.2_12.0.3/source/install/sql/enable.sql
  35. 1204 0
      modules/boonex/timeline/updates/12.0.2_12.0.3/source/js/view.js
  36. 78 0
      modules/boonex/timeline/updates/12.0.2_12.0.3/source/template/block_async_outline.html
  37. 9 3
      studio/classes/BxDolStudioOAuthOAuth2.php
  38. 9 0
      upgrade/files/12.0.0.RC1-12.0.0/check.php
  39. 192 0
      upgrade/files/12.0.0.RC1-12.0.0/files/inc/js/classes/BxDolMenuMoreAuto.js
  40. 12 0
      upgrade/files/12.0.0.RC1-12.0.0/files/inc/version.inc.php
  41. 540 0
      upgrade/files/12.0.0.RC1-12.0.0/files/template/css/cmts.css
  42. 80 0
      upgrade/files/12.0.0.RC1-12.0.0/files/template/css/report.css
  43. 101 0
      upgrade/files/12.0.0.RC1-12.0.0/files/template/css/score.css
  44. 92 0
      upgrade/files/12.0.0.RC1-12.0.0/files/template/css/view.css
  45. 383 0
      upgrade/files/12.0.0.RC1-12.0.0/files/template/css/vote.css
  46. 1369 0
      upgrade/files/12.0.0.RC1-12.0.0/files/template/scripts/BxBaseCmts.php
  47. 3 0
      upgrade/files/12.0.0.RC1-12.0.0/script.php
  48. 7 0
      upgrade/files/12.0.0.RC1-12.0.0/sql.sql

+ 1 - 1
inc/version.inc.php

@@ -7,6 +7,6 @@
  * @{
  * @{
  */
  */
 
 
-define('BX_DOL_VERSION', '12.0.0-DEV4'); ///< system files version, for DB version @see bx_get_ver, DB and files version must match
+define('BX_DOL_VERSION', '12.0.0'); ///< system files version, for DB version @see bx_get_ver, DB and files version must match
 
 
 /** @} */
 /** @} */

+ 1 - 1
install/index.php

@@ -10,7 +10,7 @@
 define ('BX_DOL_INSTALL',  true);
 define ('BX_DOL_INSTALL',  true);
 define ('BX_SKIP_INSTALL_CHECK', true);
 define ('BX_SKIP_INSTALL_CHECK', true);
 
 
-define ('BX_DOL_VER', '12.0.0-DEV4');
+define ('BX_DOL_VER', '12.0.0');
 
 
 define ('BX_INSTALL_DEFAULT_LANGUAGE', 'en');
 define ('BX_INSTALL_DEFAULT_LANGUAGE', 'en');
 
 

+ 1 - 1
modules/boonex/albums/install/config.php

@@ -18,7 +18,7 @@ $aConfig = array(
     'name' => 'bx_albums',
     'name' => 'bx_albums',
     'title' => 'Albums',
     'title' => 'Albums',
     'note' => 'Photos & videos',
     'note' => 'Photos & videos',
-    'version' => '12.0.2.DEV',
+    'version' => '12.0.3.DEV',
     'vendor' => 'BoonEx',
     'vendor' => 'BoonEx',
     'help_url' => 'http://feed.una.io/?section={module_name}',
     'help_url' => 'http://feed.una.io/?section={module_name}',
 
 

+ 51 - 0
modules/boonex/albums/updates/12.0.1_12.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' => 'Albums',
+    'version_from' => '12.0.1',
+    'version_to' => '12.0.2',
+    'vendor' => 'BoonEx',
+
+    'compatible_with' => array(
+        '12.0.0'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/albums/updates/update_12.0.1_12.0.2/',
+    'home_uri' => 'albums_update_1201_1202',
+
+    'module_dir' => 'boonex/albums/',
+    'module_uri' => 'albums',
+
+    'db_prefix' => 'bx_albums_',
+    'class_prefix' => 'BxAlbums',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 0,
+        'update_files' => 1,
+        'update_languages' => 0,
+        'clear_db_cache' => 0,
+    ),
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Albums',
+
+    /**
+     * Files Section
+     */
+    'delete_files' => array(),
+);

+ 13 - 0
modules/boonex/albums/updates/12.0.1_12.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 BxAlbumsUpdater extends BxDolStudioUpdater
+{
+    function __construct($aConfig)
+    {
+        parent::__construct($aConfig);
+    }
+}

+ 143 - 0
modules/boonex/albums/updates/12.0.1_12.0.2/source/install/config.php

@@ -0,0 +1,143 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Albums Albums
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_albums',
+    'title' => 'Albums',
+    'note' => 'Photos & videos',
+    'version' => '12.0.2',
+    'vendor' => 'BoonEx',
+    'help_url' => 'http://feed.una.io/?section={module_name}',
+
+    'compatible_with' => array(
+        '12.0.0'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/albums/',
+    'home_uri' => 'albums',
+
+    'db_prefix' => 'bx_albums_',
+    'class_prefix' => 'BxAlbums',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Albums',
+
+    /**
+     * List of page triggers.
+     */
+    'page_triggers' => array (
+    	'trigger_page_profile_view_entry',
+    ),
+
+    /**
+     * Menu triggers.
+     */
+    'menu_triggers' => array(
+    	'trigger_profile_view_submenu',
+        'trigger_group_view_submenu',
+    ),
+
+	/**
+     * Storage objects to automatically delete files from upon module uninstallation.
+     * Note. Don't add storage objects used in transcoder objects.
+     */
+    'storages' => array(
+    	'bx_albums_files'
+    ),
+
+    /**
+     * Transcoders.
+     */
+    'transcoders' => array(
+        'bx_albums_preview',
+        'bx_albums_browse',
+        'bx_albums_big',
+        'bx_albums_video_poster_browse',
+        'bx_albums_video_poster_preview',
+        'bx_albums_video_poster_big',
+        'bx_albums_video_mp4',
+        'bx_albums_video_mp4_hd',
+    ),
+
+    /**
+     * Extended Search Forms.
+     */
+    'esearches' => array(
+        'bx_albums',
+    	'bx_albums_media',
+    	'bx_albums_cmts',
+        'bx_albums_media_cmts'
+    ),
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'uninstall' => array (
+    	'process_esearches' => 1,
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    	'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+    	'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable_success' => array(
+        'process_menu_triggers' => 1,
+        'process_page_triggers' => 1,
+    	'process_esearches' => 1,
+    	'register_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable' => array (
+        'execute_sql' => 1,
+    	'update_relations' => 1,
+    	'unregister_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable_failed' => array (
+    	'register_transcoders' => 1,
+    	'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+
+    /**
+     * Connections Section
+     */
+    'relations' => array(
+    	'bx_timeline',
+    	'bx_notifications'
+    ),
+
+);
+
+/** @} */

+ 24 - 0
modules/boonex/albums/updates/12.0.1_12.0.2/source/template/unit_media.html

@@ -0,0 +1,24 @@
+<div class="__class__ bx-albums-media-wrapper bx-def-padding-sec bx-def-box-sizing">
+    <div class="bx-albums-media-cnt bx-def-box bx-def-image-bg-block bx-def-color-bg-block bx-def-border-block bx-shadow-block bx-def-padding">
+	    <div class="bx-albums-media-thumb bx-albums-unit-size bx-def-centered">
+	        <bx_if:image>
+	            <a href="__url__" title="__title_attr__">
+	                <img class="bx-albums-unit-size" src="__url_img__" alt="__title_attr__" />
+	            </a>
+	        </bx_if:image>
+	        <bx_if:video>
+	            <a href="__url__" title="__title_attr__">
+	                <img class="bx-albums-unit-size" src="__url_img__" alt="__title_attr__" />
+                        <div class="bx-albums-media-play bx-def-round-corners"><i class="sys-icon play"></i></div>
+	            </a>
+                    <bx_if:show_duration>
+                        <div class="bx-albums-media-duration bx-def-padding-sec-leftright bx-def-padding-thd-topbottom bx-def-border bx-def-round-corners bx-def-font">__duration__</div>
+                    </bx_if:show_duration>
+	        </bx_if:video>
+	    </div>
+	    <div class="bx-albums-media-caption bx-def-margin-sec-topbottom">
+                <a href="__url__" title="__title_attr__">__title__</a>
+            </div>
+	    <div class="bx-albums-media-actions bx-def-margin-sec-leftright-neg">__actions__</div>
+    </div>
+</div>

+ 1 - 1
modules/boonex/russian/install/config.php

@@ -17,7 +17,7 @@ $aConfig = array(
     'name' => 'bx_ru',
     'name' => 'bx_ru',
     'title' => 'Russian',
     'title' => 'Russian',
     'note' => 'Language file',
     'note' => 'Language file',
-    'version' => '12.0.3.DEV',
+    'version' => '12.0.4.DEV',
     'vendor' => 'Boonex',
     'vendor' => 'Boonex',
     'help_url' => 'http://feed.una.io/?section={module_name}',
     'help_url' => 'http://feed.una.io/?section={module_name}',
 
 

+ 55 - 0
modules/boonex/russian/updates/12.0.2_12.0.3/install/config.php

@@ -0,0 +1,55 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+    'title' => 'Russian',
+    'version_from' => '12.0.2',
+    'version_to' => '12.0.3',
+    'vendor' => 'BoonEx',
+
+    'compatible_with' => array(
+        '12.0.x'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/russian/updates/update_12.0.2_12.0.3/',
+    'home_uri' => 'ru_update_1202_1203',
+
+    'module_dir' => 'boonex/russian/',
+    'module_uri' => 'ru',
+
+    'db_prefix' => 'bx_rsn_',
+    'class_prefix' => 'BxRsn',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 0,
+        'update_files' => 1,
+        'update_languages' => 1,
+        'restore_languages' => 0,
+        'clear_db_cache' => 0,
+    ),
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => array(
+        array('name' => 'Tasks', 'path' => 'bx_tasks/'),
+        array('name' => 'Timeline', 'path' => 'bx_timeline/'),
+    ),
+
+    /**
+     * Files Section
+     */
+    'delete_files' => array(),
+);

+ 13 - 0
modules/boonex/russian/updates/12.0.2_12.0.3/install/installer.php

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

+ 5 - 0
modules/boonex/russian/updates/12.0.2_12.0.3/install/langs/bx_tasks/ru.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="ru" flag="ru" title="Russian">
+	<string_add name="_bx_tasks_alert_action_completed"><![CDATA[завершено]]></string_add>
+    <string_add name="_bx_tasks_alert_action_reopened"><![CDATA[открыто заново]]></string_add>
+</resources>

+ 6 - 0
modules/boonex/russian/updates/12.0.2_12.0.3/install/langs/bx_timeline/ru.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="ru" flag="ru" title="Russian">
+	<string_add name="_bx_timeline_page_content_ph_outline"><![CDATA[Лента: c заполнителем в виде сводки]]></string_add>
+
+	<string_del name="_bx_timeline_option_enable_dynamic_cards"><![CDATA[Включить динамическую загрузку карточек]]></string_del>
+</resources>

+ 354 - 0
modules/boonex/russian/updates/12.0.2_12.0.3/source/data/langs/bx_tasks/ru.xml

@@ -0,0 +1,354 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="ru" flag="ru" title="Russian">
+
+    <string name="_bx_tasks"><![CDATA[Задания]]></string>
+    <string name="_bx_tasks_cmts"><![CDATA[Задания - Комментарии]]></string>
+    <string name="_bx_tasks_reactions"><![CDATA[Задания - Реакции]]></string>
+
+    <string name="_bx_tasks_option_summary_chars"><![CDATA[Количество символов в автогенерируемой сводке к публикациям]]></string>
+    <string name="_bx_tasks_option_plain_summary_chars"><![CDATA[Количество символов в описании публикации при отсутствующей картинке публикации]]></string>
+    <string name="_bx_tasks_option_per_page_browse"><![CDATA[Количество элементов на странице]]></string>
+    <string name="_bx_tasks_option_per_page_profile"><![CDATA[Количество элементов на странице профайла]]></string>
+    <string name="_bx_tasks_option_rss_num"><![CDATA[Количество элементов в ленте RSS]]></string>
+    <string name="_bx_tasks_option_searchable_fields"><![CDATA[Поля для поиска]]></string>
+    <string name="_bx_tasks_option_auto_activation_for_categories"><![CDATA[Автоактивация для категорий]]></string>
+  
+    <string name="_bx_tasks_form_entry"><![CDATA[Задания]]></string>
+    <string name="_bx_tasks_form_entry_display_add"><![CDATA[Добавить Задание]]></string>
+    <string name="_bx_tasks_form_entry_display_edit"><![CDATA[Редактировать Задание]]></string>
+    <string name="_bx_tasks_form_entry_display_delete"><![CDATA[Удалить Задание]]></string>
+    <string name="_bx_tasks_form_entry_display_view"><![CDATA[Просмотреть Задание]]></string>
+    <string name="_bx_tasks_form_entry_input_author"><![CDATA[Автор]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_do_submit"><![CDATA[Выполнить]]></string>
+    <string name="_bx_tasks_form_entry_input_do_submit"><![CDATA[Выполнить]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_do_publish"><![CDATA[Опубликовать]]></string>
+    <string name="_bx_tasks_form_entry_input_do_publish"><![CDATA[Опубликовать]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_do_cancel"><![CDATA[Отменить]]></string>
+    <string name="_bx_tasks_form_entry_input_do_cancel"><![CDATA[Отменить]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_tasks_form_entry_input_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_tasks_form_entry_input_title_err"><![CDATA[Заголовок обязателен. Пожалуйста, заполните это поле]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_cat"><![CDATA[Категория]]></string>
+    <string name="_bx_tasks_form_entry_input_cat"><![CDATA[Категория]]></string>
+    <string name="_bx_tasks_form_entry_input_cat_err"><![CDATA[Нужно обязательно выбрать категорию]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_multicat"><![CDATA[Категории]]></string>
+    <string name="_bx_tasks_form_entry_input_multicat"><![CDATA[Категории]]></string>
+    <string name="_bx_tasks_form_entry_input_multicat_err"><![CDATA[Нужно обязательно выбрать категорию]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_text"><![CDATA[Текст]]></string>
+    <string name="_bx_tasks_form_entry_input_text"><![CDATA[Текст]]></string>
+    <string name="_bx_tasks_form_entry_input_text_err"><![CDATA[Поле для Текста не может быть пустым]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_delete_confirm"><![CDATA[Удалить подтверждение]]></string>
+    <string name="_bx_tasks_form_entry_input_delete_confirm"><![CDATA[Я уверен(а), что хочу удалить это задание]]></string>
+    <string name="_bx_tasks_form_entry_input_delete_confirm_info"><![CDATA[Это действие не может быть отменено]]></string>
+    <string name="_bx_tasks_form_entry_input_delete_confirm_error"><![CDATA[Пожалуйста, отметьте этот флажок, если действительно хотите удалить задание]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_covers"><![CDATA[Изображение заголовка]]></string>
+    <string name="_bx_tasks_form_entry_input_covers"><![CDATA[Изображение заголовка]]></string>
+    <string name="_bx_tasks_form_entry_input_covers_uploader_simple_title"><![CDATA[Загрузить]]></string>
+    <string name="_bx_tasks_form_entry_input_covers_uploader_html5_title"><![CDATA[Загрузить]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_pictures"><![CDATA[Изображения]]></string>
+    <string name="_bx_tasks_form_entry_input_pictures"><![CDATA[]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_videos"><![CDATA[Видео]]></string>
+    <string name="_bx_tasks_form_entry_input_videos"><![CDATA[]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_files"><![CDATA[Файлы]]></string>
+    <string name="_bx_tasks_form_entry_input_files"><![CDATA[]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_allow_view_to"><![CDATA[Видимость]]></string>
+    <string name="_bx_tasks_form_entry_input_allow_view_to"><![CDATA[Видимость]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_date_added"><![CDATA[Создано]]></string>
+    <string name="_bx_tasks_form_entry_input_date_added"><![CDATA[Создано]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_date_changed"><![CDATA[Обновлено]]></string>
+    <string name="_bx_tasks_form_entry_input_date_changed"><![CDATA[Обновлено]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_date_published"><![CDATA[Время публикации]]></string>
+    <string name="_bx_tasks_form_entry_input_date_published"><![CDATA[Время публикации]]></string>
+    <string name="_bx_tasks_form_entry_input_date_published_info"><![CDATA[Оставьте пустым, чтобы опубликовать немедленно.]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_attachments"><![CDATA[Вложения]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_disable_comments"><![CDATA[Запретить комментарии]]></string>
+    <string name="_bx_tasks_form_entry_input_disable_comments"><![CDATA[Запретить комментарии]]></string>
+	
+	<string name="_bx_tasks_form_entry_input_sys_tasks_list"><![CDATA[Список заданий]]></string>
+	<string name="_bx_tasks_form_entry_input_tasks_list"><![CDATA[Список заданий]]></string>
+	<string name="_bx_tasks_form_profile_input_sys_initial_members"><![CDATA[Назначить на]]></string>
+	<string name="_bx_tasks_form_profile_input_initial_members"><![CDATA[Назначить на]]></string>
+	<string name="_bx_tasks_form_entry_input_sys_date_due_date"><![CDATA[Срок]]></string>
+	<string name="_bx_tasks_form_entry_input_date_due_date"><![CDATA[Срок]]></string>
+	
+	<string name="_bx_tasks_form_list_entry"><![CDATA[Списки заданий]]></string>
+	<string name="_bx_tasks_form_list_entry_display_add"><![CDATA[Добавить Список заданий]]></string>
+	<string name="_bx_tasks_form_list_entry_display_edit"><![CDATA[Редактировать Список заданий]]></string>
+	<string name="_bx_tasks_form_list_entry_input_do_submit"><![CDATA[Выполнить]]></string>
+	<string name="_bx_tasks_form_list_entry_input_sys_do_submit"><![CDATA[Выполнить]]></string>
+	<string name="_bx_tasks_form_list_entry_input_sys_title"><![CDATA[Заголовок]]></string>
+	<string name="_bx_tasks_form_list_entry_input_title"><![CDATA[Заголовок]]></string>
+	<string name="_bx_tasks_form_list_entry_input_title_err"><![CDATA[Заголовок обязателен. Пожалуйста, заполните это поле]]></string>
+
+    <string name="_bx_tasks_category_form_entry"><![CDATA[Форма Категории]]></string>
+    <string name="_bx_tasks_category_display_add"><![CDATA[Добавить категорию]]></string>
+    <string name="_bx_tasks_category_display_edit"><![CDATA[Редактировать категорию]]></string>
+    <string name="_bx_tasks_category_form_entry_input_sys_value"><![CDATA[Значение]]></string>
+    <string name="_bx_tasks_category_form_entry_input_value"><![CDATA[Значение]]></string>>
+    <string name="_bx_tasks_category_form_entry_input_value_err"><![CDATA[Значение обязательно. Пожалуйста, заполните это поле]]></string>
+    <string name="_bx_tasks_lmi_cpt_categories"><![CDATA[Категории]]></string>
+
+  <string name="_bx_tasks_acl_action_create_entry"><![CDATA[Создать Задание]]></string>
+    <string name="_bx_tasks_acl_action_delete_entry"><![CDATA[Удалить Задание]]></string>
+    <string name="_bx_tasks_acl_action_view_entry"><![CDATA[Просмотреть Задание]]></string>
+    <string name="_bx_tasks_acl_action_set_thumb"><![CDATA[Назначить изображение заголовка публикации]]></string>
+    <string name="_bx_tasks_acl_action_edit_any_entry"><![CDATA[Редактировать Любое Задание]]></string>
+
+    <string name="_bx_tasks_page_title_sys_create_entry"><![CDATA[Новое Задание]]></string>
+    <string name="_bx_tasks_page_title_create_entry"><![CDATA[Новое Задание]]></string>
+    <string name="_bx_tasks_page_block_title_create_entry"><![CDATA[Новое Задание]]></string>
+    <string name="_bx_tasks_page_title_sys_edit_entry"><![CDATA[Редактировать]]></string>
+    <string name="_bx_tasks_page_title_edit_entry"><![CDATA[Редактировать]]></string>
+    <string name="_bx_tasks_page_block_title_edit_entry"><![CDATA[Редактировать]]></string>
+    <string name="_bx_tasks_page_title_sys_delete_entry"><![CDATA[Удалить]]></string>
+    <string name="_bx_tasks_page_title_delete_entry"><![CDATA[Удалить]]></string>
+    <string name="_bx_tasks_page_block_title_delete_entry"><![CDATA[Удалить]]></string>
+    <string name="_bx_tasks_page_title_sys_view_entry"><![CDATA[Просмотреть Задание]]></string>
+    <string name="_bx_tasks_page_title_view_entry"><![CDATA[{title}]]></string>
+    <string name="_bx_tasks_page_block_title_entry_text"><![CDATA[Текст Задания]]></string>
+    <string name="_bx_tasks_page_title_browse"><![CDATA[Задания]]></string>
+    <string name="_bx_tasks_page_title_search_results"><![CDATA[Задания, соответствующие "{0}"]]></string>
+    <string name="_bx_tasks_page_title_browse_by_author"><![CDATA[Задания от {display_name}]]></string>
+    <string name="_bx_tasks_page_title_browse_by_context"><![CDATA[Задания в {display_name}]]></string>
+    <string name="_bx_tasks_page_title_browse_featured"><![CDATA[Продвинутые Задания]]></string>
+    <string name="_bx_tasks_page_title_browse_recent"><![CDATA[Недавние Задания]]></string>
+    <string name="_bx_tasks_page_title_browse_popular"><![CDATA[Популярные Задания]]></string>
+    <string name="_bx_tasks_page_title_browse_top"><![CDATA[Топ Заданий]]></string>
+    <string name="_bx_tasks_page_title_browse_updated"><![CDATA[Обновлённые Задания]]></string>
+    <string name="_bx_tasks_page_title_sys_home"><![CDATA[Задания - Домой]]></string>
+    <string name="_bx_tasks_page_title_home"><![CDATA[Задания]]></string>
+    <string name="_bx_tasks_page_block_title_featured_entries_view_extended"><![CDATA[Продвинутые Задания]]></string>
+    <string name="_bx_tasks_page_block_title_recent_entries"><![CDATA[Недавние Задания (Галерея)]]></string>
+    <string name="_bx_tasks_page_block_title_recent_entries_view_extended"><![CDATA[Недавние Задания]]></string>
+    <string name="_bx_tasks_page_block_title_recent_entries_view_full"><![CDATA[Последние Задания (Full Полный просмотр)]]></string>
+    <string name="_bx_tasks_page_block_title_entry_social_sharing"><![CDATA[Поделиться]]></string>
+    <string name="_bx_tasks_page_block_title_entry_author"><![CDATA[Автор]]></string>
+	<string name="_bx_tasks_page_block_title_entry_assignments"><![CDATA[Назначенные]]></string>
+    <string name="_bx_tasks_page_block_title_entry_actions"><![CDATA[Действия]]></string>
+    <string name="_bx_tasks_page_block_title_entry_comments"><![CDATA[Комментарии]]></string>
+    <string name="_bx_tasks_page_block_title_entry_comments_link"><![CDATA[Комментарии к <a href="{entry_link}">{title}</a>]]></string>
+    <string name="_bx_tasks_page_block_title_entry_attachments"><![CDATA[Прикрепления]]></string>
+    <string name="_bx_tasks_page_block_title_entry_all_actions"><![CDATA[Все действия]]></string>
+    <string name="_bx_tasks_page_title_sys_entries_popular"><![CDATA[Популярные Задания]]></string>
+    <string name="_bx_tasks_page_title_entries_popular"><![CDATA[Популярные Задания]]></string>
+    <string name="_bx_tasks_page_title_sys_entries_top"><![CDATA[Топ Заданий]]></string>
+    <string name="_bx_tasks_page_title_entries_top"><![CDATA[Топ Заданий]]></string>
+    <string name="_bx_tasks_page_title_sys_entries_updated"><![CDATA[Обновлённые Задания]]></string>
+    <string name="_bx_tasks_page_title_entries_updated"><![CDATA[Обновлённые Задания]]></string>
+    <string name="_bx_tasks_page_title_sys_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_tasks_page_title_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_tasks_page_block_title_search_form"><![CDATA[Форма поиска]]></string>
+    <string name="_bx_tasks_page_block_title_search_results"><![CDATA[Результаты поиска]]></string>
+    <string name="_bx_tasks_page_block_title_search_form_cmts"><![CDATA[Форма поиска комментариев]]></string>
+    <string name="_bx_tasks_page_block_title_search_results_cmts"><![CDATA[Результаты поиска комментариев]]></string>
+    <string name="_bx_tasks_page_block_title_popular_entries"><![CDATA[Популярные Задания]]></string>
+    <string name="_bx_tasks_page_block_title_popular_entries_view_extended"><![CDATA[Популярные Задания (Расширенный просмотр)]]></string>
+    <string name="_bx_tasks_page_block_title_popular_entries_view_full"><![CDATA[Популярные Задания (Полный просмотр)]]></string>
+    <string name="_bx_tasks_page_block_title_top_entries"><![CDATA[Top Заданий]]></string>
+    <string name="_bx_tasks_page_block_title_updated_entries"><![CDATA[Обновлённые Задания]]></string>
+    <string name="_bx_tasks_page_title_sys_view_entry_comments"><![CDATA[Задание Комментарии]]></string>
+    <string name="_bx_tasks_page_title_view_entry_comments"><![CDATA[Комментарии к {title}]]></string>
+    <string name="_bx_tasks_page_title_sys_entries_of_author"><![CDATA[Задания автора]]></string>
+    <string name="_bx_tasks_page_title_entries_of_author"><![CDATA[Задания от {display_name}]]></string>
+    <string name="_bx_tasks_page_title_sys_entries_in_context"><![CDATA[Задания в контексте]]></string>
+    <string name="_bx_tasks_page_title_entries_in_context"><![CDATA[Задания в {display_name}]]></string>
+    <string name="_bx_tasks_page_block_title_favorites_of_author"><![CDATA[Избранное <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_tasks_page_block_title_sys_favorites_of_author"><![CDATA[Избранное автора]]></string>
+    <string name="_bx_tasks_page_block_title_entries_of_author"><![CDATA[Задания от  <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_tasks_page_block_title_sys_entries_of_author"><![CDATA[Задания от автора]]></string>
+    <string name="_bx_tasks_page_block_title_entries_in_context"><![CDATA[Задания в <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_tasks_page_block_title_sys_entries_in_context"><![CDATA[Задания в контексте]]></string>
+    <string name="_bx_tasks_page_block_title_entries_actions"><![CDATA[Задания - Действия]]></string>
+    <string name="_bx_tasks_page_block_title_browse_cmts"><![CDATA[Задания - Комментарии]]></string>
+    <string name="_bx_tasks_page_title_sys_manage"><![CDATA[Управление собственными заданиями]]></string>
+    <string name="_bx_tasks_page_title_sys_manage_administration"><![CDATA[Управление всеми заданиями]]></string>
+    <string name="_bx_tasks_page_title_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_tasks_page_block_title_system_manage"><![CDATA[Управление собственными заданиями]]></string>
+    <string name="_bx_tasks_page_block_title_system_manage_administration"><![CDATA[Управление всеми заданиями]]></string>
+    <string name="_bx_tasks_page_block_title_manage"><![CDATA[Управление]]></string>    
+    <string name="_bx_tasks_page_block_title_popular_keywords"><![CDATA[Популярные хэштеги]]></string>
+    <string name="_bx_tasks_page_block_title_cats"><![CDATA[Задания Категории]]></string>
+    <string name="_bx_tasks_page_block_title_sys_multicats"><![CDATA[Задания Категории(Мульти)]]></string>
+    <string name="_bx_tasks_page_block_title_multicats"><![CDATA[Задания Категории]]></string>
+    <string name="_bx_tasks_page_block_title_entry_info"><![CDATA[Инфо]]></string>
+    <string name="_bx_tasks_page_block_title_my_entries"><![CDATA[Мои Задания]]></string>
+    <string name="_bx_tasks_page_block_title_sys_recent_entries_view_showcase"><![CDATA[Последние Задания (Витринный просмотр)]]></string>
+    <string name="_bx_tasks_page_block_title_recent_entries_view_showcase"><![CDATA[Последние Задания]]></string>
+    <string name="_bx_tasks_page_block_title_sys_popular_entries_view_showcase"><![CDATA[Популярные Задания (Витринный просмотр)]]></string>
+    <string name="_bx_tasks_page_block_title_popular_entries_view_showcase"><![CDATA[Популярные Задания]]></string>
+    <string name="_bx_tasks_page_block_title_sys_featured_entries_view_showcase"><![CDATA[Продвинутые Задания (Витринный просмотр)]]></string>
+    <string name="_bx_tasks_page_block_title_featured_entries_view_showcase"><![CDATA[Продвинутые Задания]]></string>
+    <string name="_bx_tasks_page_block_title_sys_entry_context"><![CDATA[Опубликовано в]]></string>
+    <string name="_bx_tasks_page_block_title_entry_context"><![CDATA[Опубликовано в]]></string>
+	<string name="_bx_tasks_page_block_title_sys_calendar_in_context"><![CDATA[Календарь]]></string>
+	<string name="_bx_tasks_page_block_title_calendar_in_context"><![CDATA[Календарь]]></string>
+	<string name="_bx_tasks_page_block_title_sys_calendar_of_author"><![CDATA[Календарь]]></string>
+	<string name="_bx_tasks_page_block_title_calendar_of_author"><![CDATA[Календарь]]></string>
+
+    <string name="_bx_tasks_menu_title_entry_attachments"><![CDATA[Форма - Прикрепления]]></string>
+    <string name="_bx_tasks_menu_set_title_entry_attachments"><![CDATA[Форма - Прикрепления]]></string>
+    <string name="_bx_tasks_menu_item_title_system_cpa_photo_simple"><![CDATA[Добавить фото (один)]]></string>
+    <string name="_bx_tasks_menu_item_title_cpa_photo_simple"><![CDATA[Добавить фото]]></string>
+    <string name="_bx_tasks_menu_item_title_system_cpa_photo_html5"><![CDATA[Добавить фото (много)]]></string>
+    <string name="_bx_tasks_menu_item_title_cpa_photo_html5"><![CDATA[Добавить Photos]]></string>
+    <string name="_bx_tasks_menu_item_title_system_cpa_video_simple"><![CDATA[Добавить видео (один)]]></string>
+    <string name="_bx_tasks_menu_item_title_cpa_video_simple"><![CDATA[Добавить видео]]></string>
+    <string name="_bx_tasks_menu_item_title_system_cpa_video_html5"><![CDATA[Добавить видео (много)]]></string>
+    <string name="_bx_tasks_menu_item_title_cpa_video_html5"><![CDATA[Добавить Видео]]></string>
+    <string name="_bx_tasks_menu_item_title_system_cpa_file_simple"><![CDATA[Добавить файл (один)]]></string>
+    <string name="_bx_tasks_menu_item_title_cpa_file_simple"><![CDATA[Добавить файл]]></string>
+    <string name="_bx_tasks_menu_item_title_system_cpa_file_html5"><![CDATA[Добавить файл (много)]]></string>
+    <string name="_bx_tasks_menu_item_title_cpa_file_html5"><![CDATA[Добавить Файлы]]></string>
+
+    <string name="_bx_tasks_menu_set_title_view_entry"><![CDATA[Задание - Действия]]></string>
+    <string name="_bx_tasks_menu_title_view_entry"><![CDATA[Задание - Действия]]></string>
+    <string name="_bx_tasks_menu_title_submenu"><![CDATA[Задания - Подменю]]></string>
+    <string name="_bx_tasks_menu_set_title_submenu"><![CDATA[Задания - Подменю]]></string>
+    <string name="_bx_tasks_menu_item_title_system_create_entry"><![CDATA[Задание]]></string>
+    <string name="_bx_tasks_menu_item_title_create_entry"><![CDATA[Задание]]></string>
+    <string name="_bx_tasks_menu_item_title_system_edit_entry"><![CDATA[Редактировать]]></string>
+    <string name="_bx_tasks_menu_item_title_edit_entry"><![CDATA[Редактировать]]></string>
+    <string name="_bx_tasks_menu_item_title_system_delete_entry"><![CDATA[Удалить]]></string>
+    <string name="_bx_tasks_menu_item_title_delete_entry"><![CDATA[Удалить]]></string>
+    <string name="_bx_tasks_menu_item_title_system_view_entry"><![CDATA[Просмотреть Задание]]></string>
+    <string name="_bx_tasks_menu_item_title_system_entries_home"><![CDATA[Задания]]></string>
+    <string name="_bx_tasks_menu_item_title_entries_home"><![CDATA[Задания]]></string>
+    <string name="_bx_tasks_menu_item_title_system_entries_public"><![CDATA[Последние]]></string>
+    <string name="_bx_tasks_menu_item_title_entries_public"><![CDATA[Последние]]></string>
+    <string name="_bx_tasks_menu_item_title_system_entries_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_tasks_menu_item_title_entries_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_tasks_menu_item_title_system_entries_popular"><![CDATA[Популярные]]></string>
+    <string name="_bx_tasks_menu_item_title_entries_popular"><![CDATA[Популярные]]></string>
+    <string name="_bx_tasks_menu_item_title_system_entries_top"><![CDATA[Топ]]></string>
+    <string name="_bx_tasks_menu_item_title_entries_top"><![CDATA[Топ]]></string>
+    <string name="_bx_tasks_menu_item_title_system_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_tasks_menu_item_title_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_tasks_menu_title_view_entry_submenu"><![CDATA[Просмотреть Задание - Подменю]]></string>
+    <string name="_bx_tasks_menu_set_title_view_entry_submenu"><![CDATA[Просмотреть Задание - Подменю]]></string>
+    <string name="_bx_tasks_menu_item_title_view_entry_submenu_entry"><![CDATA[Задание]]></string>
+    <string name="_bx_tasks_menu_item_title_view_entry_submenu_comments"><![CDATA[Комментарии]]></string>
+    <string name="_bx_tasks_menu_item_title_system_view_entry_comments"><![CDATA[Задание Комментарии]]></string>
+    <string name="_bx_tasks_menu_item_title_system_view_entries_author"><![CDATA[Задания]]></string>
+    <string name="_bx_tasks_menu_item_title_view_entries_author"><![CDATA[Задания]]></string>
+    <string name="_bx_tasks_menu_item_title_system_view_entries_in_context"><![CDATA[Задания]]></string>
+    <string name="_bx_tasks_menu_item_title_view_entries_in_context"><![CDATA[Задания]]></string>
+    <string name="_bx_tasks_menu_title_entries_my"><![CDATA[Мои Задания  - Меню действий]]></string>
+    <string name="_bx_tasks_menu_set_title_entries_my"><![CDATA[Мои Задания Меню]]></string>
+	<string name="_bx_tasks_menu_item_title_system_manage_my_tasks"><![CDATA[Мои Задания]]></string>
+    <string name="_bx_tasks_menu_item_title_manage_my_tasks"><![CDATA[Задания]]></string>
+    <string name="_bx_tasks_menu_set_title_manage_tools"><![CDATA[Инструменты управления - Подменю]]></string>
+    <string name="_bx_tasks_menu_title_manage_tools"><![CDATA[Инструменты управления - Подменю]]></string>
+    <string name="_bx_tasks_menu_item_title_system_manage_account"><![CDATA[Управление аккаунтом]]></string>
+    <string name="_bx_tasks_menu_item_title_manage_account"><![CDATA[Управление аккаунтом]]></string>
+	<string name="_bx_tasks_menu_item_title_system_admt_tasks"><![CDATA[Задания]]></string>
+	<string name="_bx_tasks_menu_item_title_admt_tasks"><![CDATA[Задания]]></string>
+	<string name="_bx_tasks_menu_item_title_manage_my"><![CDATA[Мои Задания]]></string>
+	<string name="_bx_tasks_menu_item_title_manage_all"><![CDATA[Все Задания]]></string>
+	
+	<string name="_bx_tasks_menu_item_title_system_set_completed"><![CDATA[Завершить]]></string>
+	<string name="_bx_tasks_menu_item_title_set_completed"><![CDATA[Завершить]]></string>
+	<string name="_bx_tasks_menu_item_title_system_set_uncompleted"><![CDATA[Открыть заново]]></string>
+	<string name="_bx_tasks_menu_item_title_set_uncompleted"><![CDATA[Открыть заново]]></string>
+
+	<string name="_bx_tasks_grid_filter_item_title_adm_select_one_filter1"><![CDATA[Все статусы]]></string>
+	<string name="_bx_tasks_grid_filter_item_title_adm_active"><![CDATA[Активные]]></string>
+	<string name="_bx_tasks_grid_filter_item_title_adm_hidden"><![CDATA[Спрятанные]]></string>
+	<string name="_bx_tasks_grid_column_title_adm_active"><![CDATA[Активные]]></string>
+    <string name="_bx_tasks_grid_column_title_adm_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_tasks_grid_action_title_adm_audit_content"><![CDATA[Аудит действий]]></string>
+    <string name="_bx_tasks_grid_column_title_adm_added"><![CDATA[Добавленные]]></string>
+    <string name="_bx_tasks_grid_column_title_adm_author"><![CDATA[Автор]]></string>>
+    <string name="_bx_tasks_grid_action_title_adm_add"><![CDATA[Добавить]]></string>
+    <string name="_bx_tasks_grid_action_title_adm_edit"><![CDATA[Редактировать]]></string>
+    <string name="_bx_tasks_grid_action_title_adm_delete"><![CDATA[Удалить]]></string>
+    <string name="_bx_tasks_grid_action_title_adm_more_actions"><![CDATA[Дополнительные Действия]]></string>
+    <string name="_bx_tasks_grid_action_err_delete"><![CDATA[Невозможно удалить выбранную(ные) заданиие(ния).]]></string>
+    <string name="_bx_tasks_grid_txt_account_manager"><![CDATA[Перенаправить в Управление аккаунтом.]]></string>
+
+    <string name="_bx_tasks_chart_growth"><![CDATA[Tasks: Growth]]></string>
+    <string name="_bx_tasks_chart_growth_speed"><![CDATA[Tasks: Growth Speed]]></string>
+
+    <string name="_bx_tasks_search_extended"><![CDATA[Задания Поиск]]></string>
+    <string name="_bx_tasks_search_extended_cmts"><![CDATA[Задания Комментарии Поиск]]></string>
+
+    <string name="_bx_tasks_pre_lists_cats"><![CDATA[Категории заданий]]></string>
+	<string name="_bx_tasks_cat_Animals_Pets"><![CDATA[Животные]]></string>
+    <string name="_bx_tasks_cat_Architecture"><![CDATA[Архитектура]]></string>
+    <string name="_bx_tasks_cat_Art"><![CDATA[Искусство]]></string>
+    <string name="_bx_tasks_cat_Cars_Motorcycles"><![CDATA[Авто и мото]]></string>
+    <string name="_bx_tasks_cat_Celebrities"><![CDATA[Знаменитости]]></string>
+    <string name="_bx_tasks_cat_Design"><![CDATA[Дизайн]]></string>
+    <string name="_bx_tasks_cat_DIY_Crafts"><![CDATA[Сделай сам]]></string>
+    <string name="_bx_tasks_cat_Education"><![CDATA[Образование]]></string>
+    <string name="_bx_tasks_cat_Film_Music_Books"><![CDATA[Фильмы, музыка и книги]]></string>
+    <string name="_bx_tasks_cat_Food_Drink"><![CDATA[Еда и напитки]]></string>
+    <string name="_bx_tasks_cat_Gardening"><![CDATA[Сад и огород]]></string>
+    <string name="_bx_tasks_cat_Geek"><![CDATA[Гик]]></string>
+    <string name="_bx_tasks_cat_Hair_Beauty"><![CDATA[Причёски и макияж]]></string>
+    <string name="_bx_tasks_cat_Health_Fitness"><![CDATA[Здоровье и фитнесс]]></string>
+    <string name="_bx_tasks_cat_History"><![CDATA[История]]></string>
+    <string name="_bx_tasks_cat_Holidays_Events"><![CDATA[Праздники и события]]></string>
+    <string name="_bx_tasks_cat_Home_Decor"><![CDATA[Интерьер]]></string>
+    <string name="_bx_tasks_cat_Humor"><![CDATA[Юмор]]></string>
+    <string name="_bx_tasks_cat_Illustrations_Posters"><![CDATA[Иллюстрации и постеры]]></string>
+    <string name="_bx_tasks_cat_Kids_Parenting"><![CDATA[Дети и родители]]></string>
+    <string name="_bx_tasks_cat_Mens_Fashion"><![CDATA[Мужская мода]]></string>
+    <string name="_bx_tasks_cat_Outdoors"><![CDATA[Туризм]]></string>
+    <string name="_bx_tasks_cat_Photography"><![CDATA[Фотография]]></string>
+    <string name="_bx_tasks_cat_Products"><![CDATA[Продукты]]></string>
+    <string name="_bx_tasks_cat_Quotes"><![CDATA[Цитаты]]></string>
+    <string name="_bx_tasks_cat_Science_Nature"><![CDATA[Наука и природа]]></string>
+    <string name="_bx_tasks_cat_Sports"><![CDATA[Спорт]]></string>
+    <string name="_bx_tasks_cat_Tattoos"><![CDATA[Татуеровки]]></string>
+    <string name="_bx_tasks_cat_Technology"><![CDATA[Технологии]]></string>
+    <string name="_bx_tasks_cat_Travel"><![CDATA[Путешествия]]></string>
+    <string name="_bx_tasks_cat_Weddings"><![CDATA[Свадьба]]></string>
+    <string name="_bx_tasks_cat_Womens_Fashion"><![CDATA[Женская мода]]></string>
+
+    <string name="_bx_tasks_txt_all_entries_in"><![CDATA[<a href="{0}">Все Задания в {1} ({2})</a>]]></string>
+    <string name="_bx_tasks_txt_all_entries_by"><![CDATA[{0} заданий]]></string>
+    <string name="_bx_tasks_txt_sample_single"><![CDATA[задание]]></string>
+    <string name="_bx_tasks_txt_sample_single_with_article"><![CDATA[задание]]></string>
+    <string name="_bx_tasks_txt_action_completed"><![CDATA[выполнено]]></string>
+    <string name="_bx_tasks_txt_action_reopened"><![CDATA[открыто заново]]></string>
+    <string name="_bx_tasks_txt_sample_comment_single"><![CDATA[комментарий к заданию]]></string>
+    <string name="_bx_tasks_txt_sample_vote_single"><![CDATA[голос за задание]]></string>
+    <string name="_bx_tasks_txt_sample_reaction_single"><![CDATA[реакция '{0}' к заданию]]></string>
+    <string name="_bx_tasks_txt_sample_score_up_single"><![CDATA[голос за задание]]></string>
+    <string name="_bx_tasks_txt_sample_score_down_single"><![CDATA[голос против задания]]></string>
+    <string name="_bx_tasks_txt_processing_awaiting"><![CDATA[Задание будет опубликовано как только сконвертируется видео.]]></string>
+    <string name="_bx_tasks_txt_processing_failed"><![CDATA[Задание не была опубликовано, тк произошла ошибка при конвертации видео. Обновите видео, чтобы решить проблему.]]></string>
+    <string name="_bx_tasks_txt_scheduled_awaiting"><![CDATA[Дата публикации:  {date_publish_uf}]]></string>
+	
+    <string name="_bx_tasks_txt_new_task_list"><![CDATA[Новый Список заданий]]></string>
+    <string name="_bx_tasks_txt_new_task"><![CDATA[Новое Задание]]></string>
+    <string name="_bx_tasks_txt_filter_all"><![CDATA[Все Задания]]></string>
+    <string name="_bx_tasks_txt_filter_completed"><![CDATA[Завершенные Задания]]></string>
+    <string name="_bx_tasks_txt_filter_uncompleted"><![CDATA[Незавершенные Задания]]></string>
+    <string name="_bx_tasks_txt_err_cannot_perform_action"><![CDATA[Невозможно выполнить действие. Пожалуйста, оповестите нас об этой проблеме.]]></string>
+    <string name="_bx_tasks_confirm_tasklist_deletion"><![CDATA[Вы удалите все задания, которые содержатся в этом списке заданий. Вы уверены?]]></string>
+  
+
+    <!-- Notifications -->
+    <string name="_bx_tasks_alert_action_completed_personal"><![CDATA[Задание завершено]]></string>
+    <string name="_bx_tasks_alert_action_completed_follow_member"><![CDATA[Задание завершено]]></string>
+    <string name="_bx_tasks_alert_action_completed_follow_context"><![CDATA[Задание завершено]]></string>
+    <string name="_bx_tasks_alert_action_reopened_personal"><![CDATA[Задание открыто заново]]></string>
+    <string name="_bx_tasks_alert_action_reopened_follow_member"><![CDATA[Задание открыто заново]]></string>
+    <string name="_bx_tasks_alert_action_reopened_follow_context"><![CDATA[Задание открыто заново]]></string>
+    <string name="_bx_tasks_alert_action_expired_personal"><![CDATA[Задание устарело]]></string>
+    <string name="_bx_tasks_alert_action_assigned_personal"><![CDATA[Задание назначено]]></string>
+
+    <string name="_bx_tasks_txt_notification_completed"><![CDATA[<b class="bx-ntfs-content-entry">{entry_caption}</b> {entry_sample} было завершено]]></string>
+    <string name="_bx_tasks_txt_notification_completed_in_context"><![CDATA[<b class="bx-ntfs-content-profile">{owner_name}</b>'s {entry_sample} <b class="bx-ntfs-content-entry">{entry_caption}</b> было завершено]]></string>
+    <string name="_bx_tasks_txt_notification_reopened"><![CDATA[<b class="bx-ntfs-content-entry">{entry_caption}</b> {entry_sample} было открыто заново]]></string>
+    <string name="_bx_tasks_txt_notification_reopened_in_context"><![CDATA[<b class="bx-ntfs-content-profile">{owner_name}</b>'s {entry_sample} <b class="bx-ntfs-content-entry">{entry_caption}</b> было открыто заново]]></string>
+    <string name="_bx_tasks_txt_notification_expired"><![CDATA[<b class="bx-ntfs-content-entry">{entry_caption}</b> {entry_sample} устарело]]></string>
+    <string name="_bx_tasks_txt_notification_expired_in_context"><![CDATA[<b class="bx-ntfs-content-profile">{owner_name}</b>'s {entry_sample} <b class="bx-ntfs-content-entry">{entry_caption}</b> устарело]]></string>
+    <string name="_bx_tasks_txt_notification_assigned"><![CDATA[<b class="bx-ntfs-content-entry">{entry_caption}</b> {entry_sample} было назначено на <b class="bx-ntfs-content-profile">{entry_author_name}</b>]]></string>
+    <string name="_bx_tasks_txt_notification_assigned_in_context"><![CDATA[<b class="bx-ntfs-content-profile">{owner_name}</b>'s {entry_sample} <b class="bx-ntfs-content-entry">{entry_caption}</b> было назначено на <b class="bx-ntfs-content-profile">{entry_author_name}</b>]]></string>
+
+    <!-- Timeline -->
+    <string name="_bx_tasks_alert_action_completed"><![CDATA[завершено]]></string>
+    <string name="_bx_tasks_alert_action_reopened"><![CDATA[открыто заново]]></string>
+</resources>

+ 328 - 0
modules/boonex/russian/updates/12.0.2_12.0.3/source/data/langs/bx_timeline/ru.xml

@@ -0,0 +1,328 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="ru" flag="ru" title="Russian">
+    <string name="_bx_timeline"><![CDATA[Лента]]></string>
+    <string name="_bx_timeline_cmts"><![CDATA[Лента - Комментарии]]></string>
+    <string name="_bx_timeline_reactions"><![CDATA[Лента - Реакции]]></string>
+
+    <string name="_bx_timeline_options_category_general"><![CDATA[Общие]]></string>
+    <string name="_bx_timeline_options_category_browse"><![CDATA[Просмотр]]></string>
+    <string name="_bx_timeline_options_category_card"><![CDATA[Карточка]]></string>
+    <string name="_bx_timeline_options_category_cache"><![CDATA[Кэш]]></string>
+    <string name="_bx_timeline_options_category_post"><![CDATA[Создание сообщения]]></string>
+
+    <string name="_bx_timeline_option_enable_edit"><![CDATA[Разрешить пользователю изменять собственные сообщения]]></string>
+    <string name="_bx_timeline_option_enable_delete"><![CDATA[Разрешить владельцу ленты удалять сообщения]]></string>
+    <string name="_bx_timeline_option_enable_show_all"><![CDATA[Показывать все сообщения в 'Общей хронике', включая те, что были написаны в персональных Хрониках]]></string>
+    <string name="_bx_timeline_option_enable_count_all_views"><![CDATA[Считать просмотры для всех событий в хронике]]></string>
+    <string name="_bx_timeline_option_events_per_page_profile"><![CDATA[Количество элементов на странице профайла]]></string>
+    <string name="_bx_timeline_option_events_per_page_account"><![CDATA[Количество элементов на странице "панель аккаунта"]]></string>
+    <string name="_bx_timeline_option_events_per_page_home"><![CDATA[Количество элементов на главной странице сайта]]></string>
+    <string name="_bx_timeline_option_events_per_page"><![CDATA[Количество элементов на странице]]></string>
+    <string name="_bx_timeline_option_enable_infinite_scroll"><![CDATA[Включить 'Бесконечную прокрутку' (экспериментально)]]></string>
+    <string name="_bx_timeline_option_events_per_preload"><![CDATA[Бесконечная прокрутка: Количество элементов, получаемых при авто-подгрузке]]></string>
+    <string name="_bx_timeline_option_auto_preloads"><![CDATA[Бесконечная прокрутка: Количество авто-подгрузок]]></string>
+    <string name="_bx_timeline_option_rss_length"><![CDATA[Количество элементов в RSS-ленте]]></string>
+    <string name="_bx_timeline_option_events_hide"><![CDATA[Показывать события]]></string>
+    <string name="_bx_timeline_option_enable_brief_cards"><![CDATA[Включить лаконичные карточки]]></string>
+    <string name="_bx_timeline_option_videos_autoplay"><![CDATA[Автоматически проигрывать видео ролики (доступно только для Ленты)]]></string>
+    <string name="_bx_timeline_option_videos_autoplay_off"><![CDATA[Отключено]]></string>
+    <string name="_bx_timeline_option_videos_autoplay_on_mute"><![CDATA[Включено (без звука)]]></string>
+    <string name="_bx_timeline_option_videos_autoplay_on"><![CDATA[Включено (cо звуком)]]></string>
+    <string name="_bx_timeline_option_preload_comments"><![CDATA[Количество предварительно загруженных комментариев (до 7 штук)]]></string>
+    <string name="_bx_timeline_option_enable_jump_to_switcher"><![CDATA[Показывать переключатель 'Перейти к']]></string>
+    <string name="_bx_timeline_option_attachments_layout"><![CDATA[Показывать вложения как]]></string>
+    <string name="_bx_timeline_option_attachments_layout_gallery"><![CDATA[Галерея]]></string>
+    <string name="_bx_timeline_option_attachments_layout_showcase"><![CDATA[Витрина]]></string>
+    <string name="_bx_timeline_option_enable_hot"><![CDATA[Включить сбор данных для листа 'горячих' сообщений]]></string>
+    <string name="_bx_timeline_option_hot_interval"><![CDATA[Интервал времени (в часах) для получения 'горячих' сообщений]]></string>
+    <string name="_bx_timeline_option_enable_cache_item"><![CDATA[Включить кэш элемента]]></string>
+    <string name="_bx_timeline_option_cache_item_engine"><![CDATA[Механизм кэширования элемента (отличный от FileHtml может потребовать дополнительную настройку сервера)]]></string>
+    <string name="_bx_timeline_option_cache_item_lifetime"><![CDATA[Время жизни кэша элемента]]></string>
+    <string name="_bx_timeline_option_enable_cache_list"><![CDATA[Включить кэш хроники]]></string>
+    <string name="_bx_timeline_option_enable_editor_toolbar"><![CDATA[Включить панель инструментов в форме создания сообщения]]></string>
+
+    <string name="_bx_timeline_form_post"><![CDATA[Сообщение]]></string>
+    <string name="_bx_timeline_form_post_display_add"><![CDATA[Написать сообщение]]></string>
+    <string name="_bx_timeline_form_post_display_add_public"><![CDATA[Написать публичное сообщение]]></string>
+    <string name="_bx_timeline_form_post_display_add_profile"><![CDATA[Написать сообщение в профиль]]></string>
+    <string name="_bx_timeline_form_post_display_edit"><![CDATA[Изменить сообщение]]></string>
+    <string name="_bx_timeline_form_post_display_view"><![CDATA[Просмотреть сообщение (для индивидуальных полей)]]></string>
+    <string name="_bx_timeline_form_post_input_sys_owner_id"><![CDATA[ID владельца]]></string>
+    <string name="_bx_timeline_form_post_input_owner_id_own"><![CDATA[Собственный профиль]]></string>
+    <string name="_bx_timeline_form_post_input_owner_id_following_group"><![CDATA[{0}]]></string>
+    <string name="_bx_timeline_form_post_input_sys_action"><![CDATA[Действие]]></string>
+    <string name="_bx_timeline_form_post_input_sys_type"><![CDATA[Тип]]></string>
+    <string name="_bx_timeline_form_post_input_sys_text"><![CDATA[Содержимое]]></string>
+    <string name="_bx_timeline_form_post_input_text"><![CDATA[]]></string>
+    <string name="_bx_timeline_form_post_input_sys_object_privacy_view"><![CDATA[Видимость]]></string>
+    <string name="_bx_timeline_form_post_input_object_privacy_view"><![CDATA[Видимость]]></string>
+    <string name="_bx_timeline_form_post_input_sys_date"><![CDATA[Создано]]></string>
+    <string name="_bx_timeline_form_post_input_date"><![CDATA[Создано]]></string>
+    <string name="_bx_timeline_form_post_input_sys_date_published"><![CDATA[Время публикации]]></string>
+    <string name="_bx_timeline_form_post_input_date_published"><![CDATA[Время публикации]]></string>
+    <string name="_bx_timeline_form_post_input_date_published_info"><![CDATA[Оставьте пустым, чтобы опубликовать немедленно.]]></string>
+    <string name="_bx_timeline_form_post_input_sys_link"><![CDATA[Ссылка]]></string>
+    <string name="_bx_timeline_form_post_input_link_alt"><![CDATA[Добавить ссылку]]></string>
+    <string name="_bx_timeline_form_post_input_link_err_delete"><![CDATA[Невозможно удалить ссылку. Пожалуйста, оповестите нас о проблеме.]]></string>
+    <string name="_bx_timeline_form_post_input_sys_photo"><![CDATA[Фото]]></string>
+    <string name="_bx_timeline_form_post_input_photo"><![CDATA[]]></string>
+    <string name="_bx_timeline_form_post_input_photo_alt"><![CDATA[Добавить фото]]></string>
+    <string name="_bx_timeline_form_post_input_sys_video"><![CDATA[Видео]]></string>
+    <string name="_bx_timeline_form_post_input_video"><![CDATA[]]></string>
+    <string name="_bx_timeline_form_post_input_video_alt"><![CDATA[Добавить видео]]></string>
+    <string name="_bx_timeline_form_post_input_sys_attachments"><![CDATA[Прикрепления]]></string>
+    <string name="_bx_timeline_form_post_input_sys_do_submit"><![CDATA[Создать]]></string>
+    <string name="_bx_timeline_form_post_input_do_submit"><![CDATA[Создать]]></string>
+    <string name="_bx_timeline_form_post_input_sys_do_cancel"><![CDATA[Отмена]]></string>
+    <string name="_bx_timeline_form_post_input_do_cancel"><![CDATA[Отмена]]></string>
+
+    <string name="_bx_timeline_form_attach_link"><![CDATA[Прикрепить ссылку]]></string>
+    <string name="_bx_timeline_form_attach_link_display_add"><![CDATA[Прикрепить ссылку]]></string>
+    <string name="_bx_timeline_form_attach_link_input_sys_event_id"><![CDATA[ID события]]></string>
+    <string name="_bx_timeline_form_attach_link_input_sys_url"><![CDATA[Url]]></string>
+    <string name="_bx_timeline_form_attach_link_input_url"><![CDATA[Добавить ссылку]]></string>
+    <string name="_bx_timeline_form_attach_link_input_url_err"><![CDATA[Необходима правильная ссылка. Пожалуйста, заполните это поле.]]></string>
+    <string name="_bx_timeline_form_attach_link_input_sys_do_submit"><![CDATA[Добавить]]></string>
+    <string name="_bx_timeline_form_attach_link_input_do_submit"><![CDATA[Добавить]]></string>
+    <string name="_bx_timeline_form_attach_link_input_do_cancel"><![CDATA[Закрыть]]></string>
+
+    <string name="_bx_timeline_privacy_view"><![CDATA[Просматривать события]]></string>
+
+    <string name="_bx_timeline_acl_action_post"><![CDATA[Писать сообщения]]></string>
+    <string name="_bx_timeline_acl_action_edit"><![CDATA[Изменять любое сообщение]]></string>
+    <string name="_bx_timeline_acl_action_delete"><![CDATA[Удалять любое сообщение]]></string>
+    <string name="_bx_timeline_acl_action_vote"><![CDATA[Голосовать]]></string>
+    <string name="_bx_timeline_acl_action_repost"><![CDATA[Делать репост]]></string>
+    <string name="_bx_timeline_acl_action_send"><![CDATA[Послать]]></string>
+    <string name="_bx_timeline_acl_action_pin"><![CDATA['Приколоть тут' любое сообщение]]></string>
+    <string name="_bx_timeline_acl_action_stick"><![CDATA['Приколоть для всех' любое сообщение]]></string>
+    <string name="_bx_timeline_acl_action_promote"><![CDATA[Рекламировать любое сообщение]]></string>
+
+    <!-- Pages -->
+    <string name="_bx_timeline_page_title_sys_view"><![CDATA[Хроника новостей профайла]]></string>
+    <string name="_bx_timeline_page_title_view"><![CDATA[Хроника новостей профайла]]></string>
+    <string name="_bx_timeline_page_title_sys_view_home"><![CDATA[Общая хроника новостей]]></string>
+    <string name="_bx_timeline_page_title_view_home"><![CDATA[Общая хроника новостей]]></string>
+    <string name="_bx_timeline_page_title_sys_view_hot"><![CDATA[Хроника 'горячих' новостей]]></string>
+    <string name="_bx_timeline_page_title_view_hot"><![CDATA[Хроника 'горячих' новостей]]></string>
+    <string name="_bx_timeline_page_title_sys_item"><![CDATA[Элемент хроники]]></string>
+    <string name="_bx_timeline_page_title_item"><![CDATA[Элемент хроники]]></string>
+    <string name="_bx_timeline_page_title_sys_item_brief"><![CDATA[Предпросмотр элемента хроники]]></string>
+    <string name="_bx_timeline_page_title_item_brief"><![CDATA[Предпросмотр элемента хроники]]></string>
+    <string name="_bx_timeline_page_title_sys_account"><![CDATA[Хроника новостей]]></string>
+    <string name="_bx_timeline_page_title_sys_manage_administration"><![CDATA[Управление всеми событями ленты]]></string>
+    <string name="_bx_timeline_page_title_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_timeline_page_title_account"><![CDATA[Хроника новостей]]></string>
+    <string name="_bx_timeline_page_block_title_system_post_profile"><![CDATA[Создать публикацию (в контекст)]]></string>
+    <string name="_bx_timeline_page_block_title_post_profile"><![CDATA[Создать публикацию]]></string>
+    <string name="_bx_timeline_page_block_title_system_view_profile"><![CDATA[Хроника новостей профайла (лента)]]></string>
+    <string name="_bx_timeline_page_block_title_view_profile"><![CDATA[Хроника новостей профайла]]></string>
+    <string name="_bx_timeline_page_block_title_system_view_profile_outline"><![CDATA[Хроника новостей профайла (сводка)]]></string>
+    <string name="_bx_timeline_page_block_title_view_profile_outline"><![CDATA[Хроника новостей профайла]]></string>
+    <string name="_bx_timeline_page_block_title_item"><![CDATA[Элемент]]></string>
+    <string name="_bx_timeline_page_block_title_item_content"><![CDATA[Содержимое]]></string>
+    <string name="_bx_timeline_page_block_title_item_info"><![CDATA[Информация]]></string>
+    <string name="_bx_timeline_page_block_title_item_comments"><![CDATA[Комментарии]]></string>
+    <string name="_bx_timeline_page_block_title_system_post_account"><![CDATA[Создать публикацию]]></string>
+    <string name="_bx_timeline_page_block_title_post_account"><![CDATA[Создать публикацию]]></string>
+    <string name="_bx_timeline_page_block_title_system_view_account"><![CDATA[Хроника новостей (лента)]]></string>
+    <string name="_bx_timeline_page_block_title_view_account"><![CDATA[Хроника новостей]]></string>
+    <string name="_bx_timeline_page_block_title_system_view_account_outline"><![CDATA[Хроника новостей (сводка)]]></string>
+    <string name="_bx_timeline_page_block_title_view_account_outline"><![CDATA[Хроника новостей]]></string>
+    <string name="_bx_timeline_page_block_title_system_views_timeline"><![CDATA[Все хроники (лента)]]></string>
+    <string name="_bx_timeline_page_block_title_views_timeline"><![CDATA[Хроники]]></string>
+    <string name="_bx_timeline_page_block_title_system_views_outline"><![CDATA[Все хроники (сводка)]]></string>
+    <string name="_bx_timeline_page_block_title_views_outline"><![CDATA[Хроники]]></string>
+    <string name="_bx_timeline_page_block_title_system_post_home"><![CDATA[Создать публичную публикацию]]></string>
+    <string name="_bx_timeline_page_block_title_post_home"><![CDATA[Создать публикацию]]></string>
+    <string name="_bx_timeline_page_block_title_system_view_home"><![CDATA[Общая хроника новостей (лента)]]></string>
+    <string name="_bx_timeline_page_block_title_view_home"><![CDATA[Общая хроника новостей]]></string>
+    <string name="_bx_timeline_page_block_title_system_view_home_outline"><![CDATA[Общая хроника новостей (сводка)]]></string>
+    <string name="_bx_timeline_page_block_title_view_home_outline"><![CDATA[Общая хроника новостей]]></string>
+    <string name="_bx_timeline_page_block_title_system_view_hot"><![CDATA[Хроника 'горячих' новостей (лента)]]></string>
+    <string name="_bx_timeline_page_block_title_view_hot"><![CDATA[Хроника 'горячих' новостей]]></string>
+    <string name="_bx_timeline_page_block_title_system_view_hot_outline"><![CDATA[Хроника 'горячих' новостей (сводка)]]></string>
+    <string name="_bx_timeline_page_block_title_view_hot_outline"><![CDATA[Хроника 'горячих' новостей]]></string>
+    <string name="_bx_timeline_page_block_title_browse_cmts"><![CDATA[Хроника новостей - Комментарии]]></string>
+
+    <string name="_bx_timeline_page_title_sys_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_timeline_page_title_manage"><![CDATA[Управление лентой]]></string>
+    <string name="_bx_timeline_page_block_title_system_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_timeline_page_block_title_system_manage_administration"><![CDATA[Управление всеми событями ленты]]></string>
+    <string name="_bx_timeline_page_block_title_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_timeline_page_block_title_muted"><![CDATA[Отключенные]]></string>
+
+    <string name="_bx_timeline_page_content_ph_timeline"><![CDATA[Лента: c заполнителем в виде ленты]]></string>
+    <string name="_bx_timeline_page_content_ph_outline"><![CDATA[Лента: c заполнителем в виде сводки]]></string>
+
+
+    <!-- Menus -->
+    <string name="_bx_timeline_menu_title_view"><![CDATA[Просмотр]]></string>
+    <string name="_bx_timeline_menu_set_title_view"><![CDATA[Просмотр]]></string>
+    <string name="_bx_timeline_menu_item_title_system_channels"><![CDATA[Каналы]]></string>
+    <string name="_bx_timeline_menu_item_title_channels"><![CDATA[Каналы]]></string>
+    <string name="_bx_timeline_menu_item_title_system_feed"><![CDATA[Хроника]]></string>
+    <string name="_bx_timeline_menu_item_title_feed"><![CDATA[Хроника]]></string>
+    <string name="_bx_timeline_menu_item_title_system_public"><![CDATA[Публичное]]></string>
+    <string name="_bx_timeline_menu_item_title_public"><![CDATA[Публичное]]></string>
+    <string name="_bx_timeline_menu_item_title_system_hot"><![CDATA[Популярное]]></string>
+    <string name="_bx_timeline_menu_item_title_hot"><![CDATA[Популярное]]></string>
+
+    <string name="_bx_timeline_menu_item_view_all"><![CDATA[Все сообщения]]></string>
+    <string name="_bx_timeline_menu_item_view_owner"><![CDATA[Сообщения от {0}]]></string>
+    <string name="_bx_timeline_menu_item_view_other"><![CDATA[Сообщения от других]]></string>
+    <string name="_bx_timeline_menu_item_get_rss"><![CDATA[RSS]]></string>
+
+    <string name="_bx_timeline_menu_title_item_share"><![CDATA[Поделиться]]></string>
+    <string name="_bx_timeline_menu_set_title_item_share"><![CDATA[Поделиться]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_repost"><![CDATA[Сделать репост]]></string>
+    <string name="_bx_timeline_menu_item_title_item_repost"><![CDATA[Сделать репост]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_send"><![CDATA[Послать]]></string>
+    <string name="_bx_timeline_menu_item_title_item_send"><![CDATA[Послать другу]]></string>
+    <string name="_bx_timeline_menu_item_title_system_admt_timeline"><![CDATA[Лента]]></string>
+    <string name="_bx_timeline_menu_item_title_admt_timeline"><![CDATA[Лента]]></string>
+
+    <string name="_bx_timeline_menu_title_item_manage"><![CDATA[Элемент - Управление]]></string>
+    <string name="_bx_timeline_menu_set_title_item_manage"><![CDATA[Элемент - Управление]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_pin"><![CDATA[Приколоть тут]]></string>
+    <string name="_bx_timeline_menu_item_title_item_pin"><![CDATA[Приколоть тут]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_unpin"><![CDATA[Отколоть тут]]]]></string>
+    <string name="_bx_timeline_menu_item_title_item_unpin"><![CDATA[Отколоть тут]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_stick"><![CDATA[Приколоть для всех]]></string>
+    <string name="_bx_timeline_menu_item_title_item_stick"><![CDATA[Приколоть для всех]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_unstick"><![CDATA[Отколоть для всех]]></string>
+    <string name="_bx_timeline_menu_item_title_item_unstick"><![CDATA[Отколоть для всех]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_promote"><![CDATA[Рекламировать]]></string>
+    <string name="_bx_timeline_menu_item_title_item_promote"><![CDATA[Рекламировать]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_unpromote"><![CDATA[Не рекламировать]]></string>
+    <string name="_bx_timeline_menu_item_title_item_unpromote"><![CDATA[Не рекламировать]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_edit"><![CDATA[Изменить]]></string>
+    <string name="_bx_timeline_menu_item_title_item_edit"><![CDATA[Изменить]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_delete"><![CDATA[Удалить]]></string>
+    <string name="_bx_timeline_menu_item_title_item_delete"><![CDATA[{delete_title}]]></string>
+    <string name="_bx_timeline_menu_item_title_item_delete_common"><![CDATA[Удалить]]></string>  
+    <string name="_bx_timeline_menu_item_title_item_delete_system"><![CDATA[Скрыть из хроник]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_mute"><![CDATA[Отключить автора]]></string>
+    <string name="_bx_timeline_menu_item_title_item_mute"><![CDATA[Отключить автора]]></string>
+
+    <string name="_bx_timeline_menu_title_item_actions"><![CDATA[Элемент - Действия]]></string>
+    <string name="_bx_timeline_menu_set_title_item_actions"><![CDATA[Элемент - Действия]]></string>
+    <string name="_bx_timeline_menu_title_item_actions_all"><![CDATA[Элемент - Все действия]]></string>
+    <string name="_bx_timeline_menu_set_title_item_actions_all"><![CDATA[Элемент - Все действия]]></string>
+    <string name="_bx_timeline_menu_title_item_counters"><![CDATA[Элемент - Счетчики]]></string>
+    <string name="_bx_timeline_menu_set_title_item_counters"><![CDATA[Элемент - Счетчики]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_comment"><![CDATA[Комментарий]]></string>
+    <string name="_bx_timeline_menu_item_title_item_comment"><![CDATA[Прокомментировать]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_view"><![CDATA[Посмотреть]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_vote"><![CDATA[Голосовать (Нравится)]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_score"><![CDATA[Голосовать (За/Против)]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_reaction"><![CDATA[Отреагировать]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_share"><![CDATA[Поделиться]]></string>
+    <string name="_bx_timeline_menu_item_title_item_share"><![CDATA[Поделиться]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_report"><![CDATA[Пожаловаться]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_more"><![CDATA[Дополнительные действия]]></string>
+    <string name="_bx_timeline_menu_item_title_item_more"><![CDATA[]]></string>
+
+    <string name="_bx_timeline_menu_title_post_attachments"><![CDATA[Форма - Прикрепления]]></string>
+    <string name="_bx_timeline_menu_set_title_post_attachments"><![CDATA[Форма - Прикрепления]]></string>
+    <string name="_bx_timeline_menu_item_title_system_add_emoji"><![CDATA[Добавить Emoji]]></string>
+    <string name="_bx_timeline_menu_item_title_add_emoji"><![CDATA[Добавить Emoji]]></string>
+    <string name="_bx_timeline_menu_item_title_system_add_link"><![CDATA[Добавить ссылку]]></string>
+    <string name="_bx_timeline_menu_item_title_add_link"><![CDATA[Добавить ссылку]]></string>
+    <string name="_bx_timeline_menu_item_title_system_add_photo_simple"><![CDATA[Добавить фото (Обычная загрузка)]]></string>
+    <string name="_bx_timeline_menu_item_title_system_add_photo_html5"><![CDATA[Добавить фото (Множественная загрузка)]]></string>
+    <string name="_bx_timeline_menu_item_title_add_photo"><![CDATA[Добавить фото]]></string>
+    <string name="_bx_timeline_menu_item_title_system_add_video_simple"><![CDATA[Добавить видео (Обычная загрузка)]]></string>
+    <string name="_bx_timeline_menu_item_title_system_add_video_html5"><![CDATA[Добавить видео (Множественная загрузка)]]></string>
+    <string name="_bx_timeline_menu_item_title_add_video"><![CDATA[Добавить видео]]></string>
+    <string name="_bx_timeline_menu_item_title_system_add_video_record"><![CDATA[Записать видео]]></string>
+    <string name="_bx_timeline_menu_item_title_add_video_record"><![CDATA[Записать видео]]></string>
+    <string name="_bx_timeline_menu_item_title_system_timeline"><![CDATA[Лента]]></string>
+    <string name="_bx_timeline_menu_item_title_timeline"><![CDATA[Лента]]></string>
+    <string name="_bx_timeline_menu_item_title_system_create_entry"><![CDATA[Статус]]></string>
+    <string name="_bx_timeline_menu_item_title_create_entry"><![CDATA[Статус]]></string>
+    <string name="_bx_timeline_menu_item_title_system_view_timeline_view"><![CDATA[Лента]]></string>
+    <string name="_bx_timeline_menu_item_title_view_timeline_view"><![CDATA[Лента]]></string>
+
+    <string name="_bx_timeline_menu_item_title_system_manage_my_timeline"><![CDATA[Лента]]></string>
+    <string name="_bx_timeline_menu_item_title_manage_my_timeline"><![CDATA[Лента]]></string>
+
+    <string name="_bx_timeline_grid_column_title_adm_active"><![CDATA[Активные]]></string>
+    <string name="_bx_timeline_grid_column_title_adm_description"><![CDATA[Событие]]></string>
+    <string name="_bx_timeline_grid_column_title_adm_added"><![CDATA[Добавлено]]></string>
+    <string name="_bx_timeline_grid_column_title_adm_author"><![CDATA[Автор]]></string>
+    <string name="_bx_timeline_grid_action_title_adm_delete"><![CDATA[Удалить]]></string>
+    <string name="_bx_timeline_grid_action_title_adm_audit_content"><![CDATA[Аудит действий]]></string>
+    <string name="_bx_timeline_grid_action_err_delete"><![CDATA[Невозможно удалить выбранную(ные) событие(я) ленты.]]></string>
+    <string name="_bx_timeline_grid_txt_account_manager"><![CDATA[Перенаправить в Управление аккаунтом.]]></string>
+
+    <string name="_bx_timeline_alert_module_timeline_common_post"><![CDATA[Лента (разместить)]]></string>
+    <string name="_bx_timeline_alert_module_timeline_common_repost"><![CDATA[Лента (сделать репост)]]></string>
+    <string name="_bx_timeline_alert_action_added"><![CDATA[добавить]]></string>
+    <string name="_bx_timeline_alert_action_post_common"><![CDATA[добавить сообщение]]></string>
+    <string name="_bx_timeline_alert_action_repost"><![CDATA[добавить репост]]></string>
+    <string name="_bx_timeline_alert_action_post_common_personal"><![CDATA[Новый контент]]></string>
+    <string name="_bx_timeline_alert_action_post_common_follow_member"><![CDATA[Новый контент]]></string>
+    <string name="_bx_timeline_alert_action_post_common_follow_context"><![CDATA[Новый контент]]></string>
+    <string name="_bx_timeline_alert_action_repost_follow_member"><![CDATA[Новый репост контента]]></string>
+    <string name="_bx_timeline_alert_action_repost_follow_context"><![CDATA[Новый репост контента]]></string>
+
+    <string name="_bx_timeline_txt_msg_no_results"><![CDATA[Пусто]]></string>
+    <string name="_bx_timeline_txt_msg_performed_action"><![CDATA[Действие было успешно выполнено.]]></string>
+    <string name="_bx_timeline_txt_msg_posted"><![CDATA[Успешно опубликовано.]]></string>
+    <string name="_bx_timeline_txt_err_cannot_perform_action"><![CDATA[Невозможно выполнить действие. Пожалуйста, оповестите нас об этой проблеме.]]></string>
+    <string name="_bx_timeline_txt_err_empty_post"><![CDATA[Сообщение пусто.]]></string>
+
+    <string name="_bx_timeline_txt_to"><![CDATA[в]]></string>
+    <string name="_bx_timeline_txt_load_more"><![CDATA[Загрузить ещё]]></string>
+    <string name="_bx_timeline_txt_loading"><![CDATA[Загрузка...]]></string>
+    <string name="_bx_timeline_txt_loading_complete"><![CDATA[Загрузка завершена]]></string>
+    <string name="_bx_timeline_txt_or_jump_to"><![CDATA[... или перейти к:]]></string>
+    <string name="_bx_timeline_txt_jump_to_n_year"><![CDATA[Перейти к {0} году]]></string>
+    <string name="_bx_timeline_txt_jump_to_recent"><![CDATA[Перейти к недавним сообщениям]]></string>
+    <string name="_bx_timeline_txt_status_deleted"><![CDATA[Удалено]]></string>
+    <string name="_bx_timeline_txt_hot"><![CDATA['Горячее' событие]]></string>
+    <string name="_bx_timeline_txt_pinned"><![CDATA[Приколотое событие]]></string>
+    <string name="_bx_timeline_txt_sticked"><![CDATA[Событие приколотое для всех]]></string>
+    <string name="_bx_timeline_txt_promoted"><![CDATA[Рекламируемое]]></string>
+    <string name="_bx_timeline_txt_note_scheduled_awaiting"><![CDATA[Дата публикации: {0}]]></string>
+    <string name="_bx_timeline_txt_note_processing_awaiting"><![CDATA[Обновление будет опубликована как только сконвертируется видео.]]></string>
+    <string name="_bx_timeline_txt_note_processing_failed"><![CDATA[Обновление не было опубликовано, тк произошла ошибка при конвертации видео. Обновите видео, чтобы решить проблему.]]></string>
+    <string name="_bx_timeline_txt_rss_caption"><![CDATA[Лента {0}]]></string>
+    <string name="_bx_timeline_txt_added_sample"><![CDATA[Добавил {0}]]></string>
+    <string name="_bx_timeline_txt_user_added_sample"><![CDATA[{0} добавил {1}]]></string>
+    <string name="_bx_timeline_txt_user_repost"><![CDATA[Репост от {0}]]></string>
+    <string name="_bx_timeline_txt_user_reposted_user_sample"><![CDATA[{0} сделал репост {1} {2}]]></string>
+    <string name="_bx_timeline_txt_sample"><![CDATA[сообщение]]></string>
+    <string name="_bx_timeline_txt_sample_with_article"><![CDATA[сообщение]]></string>
+    <string name="_bx_timeline_txt_sample_ext"><![CDATA[сообщение в ленте]]></string>
+    <string name="_bx_timeline_txt_sample_comment_single"><![CDATA[комментарий к сообщению в ленте]]></string>
+    <string name="_bx_timeline_txt_sample_vote_single"><![CDATA[голос за сообщение в ленте]]></string>
+    <string name="_bx_timeline_txt_sample_reaction_single"><![CDATA[реакция '{0}' к сообщению в ленте]]></string>
+    <string name="_bx_timeline_txt_sample_score_up_single"><![CDATA[голос за сообщение в ленте]]></string>
+    <string name="_bx_timeline_txt_sample_score_down_single"><![CDATA[голос против сообщения в ленте]]></string>
+    <string name="_bx_timeline_txt_sample_with_link"><![CDATA[со ссылкой]]></string>
+    <string name="_bx_timeline_txt_sample_with_image"><![CDATA[с изображением]]></string>
+    <string name="_bx_timeline_txt_sample_with_video"><![CDATA[с видео]]></string>
+    <string name="_bx_timeline_txt_sample_with_media"><![CDATA[с медиа]]></string>
+    <string name="_bx_timeline_txt_today"><![CDATA[Сегодня]]></string>
+    <string name="_bx_timeline_txt_some_text_here"><![CDATA[Поделитесь своими мыслями]]></string>
+    <string name="_bx_timeline_txt_show"><![CDATA[Показать]]></string>
+    <string name="_bx_timeline_txt_new_content"><![CDATA[Новый контент]]></string>
+
+    <string name="_bx_timeline_txt_do_repost"><![CDATA[Сделать репост]]></string>
+    <string name="_bx_timeline_txt_reposted"><![CDATA[Сделал репост {0} {1}.]]></string>
+    <string name="_bx_timeline_txt_reposted_by"><![CDATA[Сделал репост]]></string>
+    <string name="_bx_timeline_txt_err_cannot_repost"><![CDATA[Невозможно сделать репост. Пожалуйста, сообщите нам об этой проблеме.]]></string>
+    <string name="_bx_timeline_txt_err_already_reposted"><![CDATA[Вы уже сделали репост этого элемента.]]></string>
+    <string name="_bx_timeline_txt_msg_success_repost"><![CDATA[Репост данного элемента был сделан успешно.]]></string>
+    <string name="_bx_timeline_txt_object_reposted"><![CDATA[<b class="bx-ntfs-content-profile">{owner_name}</b> - {entry_sample} <b class="bx-ntfs-content-entry">{entry_caption}</b>]]> (репост)</string>
+
+    <!-- EMAIL TEMPLATES -->
+    <string name="_bx_timeline_et_txt_name_send"><![CDATA[Послать другу.]]></string>
+    <string name="_bx_timeline_et_txt_subject_send"><![CDATA[Это может быть интересно для вас.]]></string>
+    <string name="_bx_timeline_et_txt_body_send"><![CDATA[{email_header}
+<p>Привет.</p>
+<p>Взгляните на <a href="{ViewLink}">это сообщение</a>, оно может быть интересно для вас.</p>
+{email_footer}]]></string>
+</resources>

+ 71 - 0
modules/boonex/russian/updates/12.0.2_12.0.3/source/install/config.php

@@ -0,0 +1,71 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Russian Russian language
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_LANGUAGE,
+    'name' => 'bx_ru',
+    'title' => 'Russian',
+    'note' => 'Language file',
+    'version' => '12.0.3',
+    'vendor' => 'Boonex',
+    'help_url' => 'http://feed.una.io/?section={module_name}',
+
+    'compatible_with' => array(
+        '12.0.x'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/russian/',
+    'home_uri' => 'ru',
+
+    'db_prefix' => 'bx_rsn_',
+    'class_prefix' => 'BxRsn',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'BoonEx Russian',
+
+    /**
+     * Installation/Uninstallation Section.
+     * NOTE. The sequence of actions is critical. Don't change the order.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'install_language' => 1,
+        'clear_db_cache' => 1
+    ),
+    'uninstall' => array (
+        'update_languages' => 1,
+        'execute_sql' => 1,
+        'clear_db_cache' => 1
+    ),
+    'enable' => array(
+        'execute_sql' => 1
+    ),
+    'disable' => array(
+        'execute_sql' => 1
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+
+);
+
+/** @} */

+ 1 - 1
modules/boonex/tasks/install/config.php

@@ -17,7 +17,7 @@ $aConfig = array(
     'name' => 'bx_tasks',
     'name' => 'bx_tasks',
     'title' => 'Tasks',
     'title' => 'Tasks',
     'note' => 'Tasks module.',
     'note' => 'Tasks module.',
-    'version' => '12.0.1.DEV',
+    'version' => '12.0.2.DEV',
     'vendor' => 'BoonEx',
     'vendor' => 'BoonEx',
     'help_url' => 'http://feed.una.io/?section={module_name}',
     'help_url' => 'http://feed.una.io/?section={module_name}',
 
 

+ 51 - 0
modules/boonex/tasks/updates/12.0.0_12.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' => 'Tasks',
+    'version_from' => '12.0.0',
+    'version_to' => '12.0.1',
+    'vendor' => 'BoonEx',
+
+    'compatible_with' => array(
+        '12.0.0'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/tasks/updates/update_12.0.0_12.0.1/',
+    'home_uri' => 'tasks_update_1200_1201',
+
+    'module_dir' => 'boonex/tasks/',
+    'module_uri' => 'tasks',
+
+    'db_prefix' => 'bx_tasks_',
+    'class_prefix' => 'BxTasks',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 0,
+        'update_files' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 0,
+    ),
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Tasks',
+
+    /**
+     * Files Section
+     */
+    'delete_files' => array(),
+);

+ 13 - 0
modules/boonex/tasks/updates/12.0.0_12.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 BxTasksUpdater extends BxDolStudioUpdater
+{
+    function __construct($aConfig)
+    {
+        parent::__construct($aConfig);
+    }
+}

+ 5 - 0
modules/boonex/tasks/updates/12.0.0_12.0.1/install/langs/en.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="en" flag="gb" title="English">
+	<string_add name="_bx_tasks_alert_action_completed"><![CDATA[completed]]></string_add>
+    <string_add name="_bx_tasks_alert_action_reopened"><![CDATA[reopened]]></string_add>
+</resources>

+ 149 - 0
modules/boonex/tasks/updates/12.0.0_12.0.1/source/install/config.php

@@ -0,0 +1,149 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT 
+ * @defgroup    Tasks Tasks
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_tasks',
+    'title' => 'Tasks',
+    'note' => 'Tasks module.',
+    'version' => '12.0.1',
+    'vendor' => 'BoonEx',
+    'help_url' => 'http://feed.una.io/?section={module_name}',
+
+    'compatible_with' => array(
+        '12.0.0'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/tasks/',
+    'home_uri' => 'tasks',
+
+    'db_prefix' => 'bx_tasks_',
+    'class_prefix' => 'BxTasks',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Tasks',
+
+    /**
+     * List of page triggers.
+     */
+    'page_triggers' => array (
+    	'trigger_page_profile_view_entry',
+    ),
+    
+    /**
+     * Menu triggers.
+     */
+    'menu_triggers' => array(
+        'trigger_profile_view_submenu',
+        'trigger_group_view_submenu',
+    ),
+
+    /**
+     * Storage objects to automatically delete files from upon module uninstallation.
+     * Note. Don't add storage objects used in transcoder objects.
+     */
+    'storages' => array(
+        'bx_tasks_covers',
+    	'bx_tasks_photos',
+        'bx_tasks_videos',
+        'bx_tasks_files'
+    ),
+
+    /**
+     * Transcoders.
+     */
+    'transcoders' => array(
+        'bx_tasks_preview',
+        'bx_tasks_gallery',
+        'bx_tasks_cover',
+
+        'bx_tasks_preview_photos',
+        'bx_tasks_gallery_photos', 
+
+        'bx_tasks_videos_poster',
+        'bx_tasks_videos_poster_preview',
+        'bx_tasks_videos_mp4',
+        'bx_tasks_videos_mp4_hd',
+
+        'bx_tasks_preview_files',
+        'bx_tasks_gallery_files'
+    ),
+
+    /**
+     * Extended Search Forms.
+     */
+    'esearches' => array(
+        'bx_tasks',
+    	'bx_tasks_cmts'
+    ),
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'uninstall' => array (
+    	'process_esearches' => 1,
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+        'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable_success' => array(
+        'process_menu_triggers' => 1,
+        'process_page_triggers' => 1,
+    	'process_esearches' => 1,
+        'register_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable' => array (
+        'execute_sql' => 1,
+        'update_relations' => 1,
+        'unregister_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable_failed' => array (
+        'register_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+
+    /**
+     * Relations Section
+     */
+    'relations' => array(
+    	'bx_timeline',
+    	'bx_notifications'
+    ),
+
+);
+
+/** @} */

+ 356 - 0
modules/boonex/tasks/updates/12.0.0_12.0.1/source/install/langs/en.xml

@@ -0,0 +1,356 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="en" flag="gb" title="English">
+
+    <string name="_bx_tasks"><![CDATA[Tasks]]></string>
+    <string name="_bx_tasks_cmts"><![CDATA[Tasks' Comments]]></string>
+    <string name="_bx_tasks_reactions"><![CDATA[Tasks' Reactions]]></string>
+
+    <string name="_bx_tasks_option_summary_chars"><![CDATA[Number of characters in auto-cropped task summary]]></string>
+    <string name="_bx_tasks_option_plain_summary_chars"><![CDATA[Number of characters in plain task description when task hasn't thumb]]></string>
+    <string name="_bx_tasks_option_per_page_browse"><![CDATA[Number of items per page]]></string>
+    <string name="_bx_tasks_option_per_page_profile"><![CDATA[Number of items on profile/group page]]></string>
+    <string name="_bx_tasks_option_rss_num"><![CDATA[Number of items in RSS feed]]></string>
+    <string name="_bx_tasks_option_searchable_fields"><![CDATA[Searchable fields for keyword search]]></string>
+    <string name="_bx_tasks_option_auto_activation_for_categories"><![CDATA[Auto-Activation For Categories]]></string>
+  
+    <string name="_bx_tasks_form_entry"><![CDATA[Tasks]]></string>
+    <string name="_bx_tasks_form_entry_display_add"><![CDATA[Add Task]]></string>
+    <string name="_bx_tasks_form_entry_display_edit"><![CDATA[Edit Task]]></string>
+    <string name="_bx_tasks_form_entry_display_delete"><![CDATA[Delete Task]]></string>
+    <string name="_bx_tasks_form_entry_display_view"><![CDATA[View Task]]></string>
+    <string name="_bx_tasks_form_entry_input_author"><![CDATA[Author]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_do_submit"><![CDATA[Submit]]></string>
+    <string name="_bx_tasks_form_entry_input_do_submit"><![CDATA[Submit]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_do_publish"><![CDATA[Publish]]></string>
+    <string name="_bx_tasks_form_entry_input_do_publish"><![CDATA[Publish]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_do_cancel"><![CDATA[Cancel]]></string>
+    <string name="_bx_tasks_form_entry_input_do_cancel"><![CDATA[Cancel]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_title"><![CDATA[Title]]></string>
+    <string name="_bx_tasks_form_entry_input_title"><![CDATA[Title]]></string>
+    <string name="_bx_tasks_form_entry_input_title_err"><![CDATA[Title is essential. Please, fill in this field]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_cat"><![CDATA[Category]]></string>
+    <string name="_bx_tasks_form_entry_input_cat"><![CDATA[Category]]></string>
+    <string name="_bx_tasks_form_entry_input_cat_err"><![CDATA[Please select category]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_multicat"><![CDATA[Categories]]></string>
+    <string name="_bx_tasks_form_entry_input_multicat"><![CDATA[Categories]]></string>
+    <string name="_bx_tasks_form_entry_input_multicat_err"><![CDATA[Please select category]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_text"><![CDATA[Text]]></string>
+    <string name="_bx_tasks_form_entry_input_text"><![CDATA[Text]]></string>
+    <string name="_bx_tasks_form_entry_input_text_err"><![CDATA[Text field can't be empty]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_delete_confirm"><![CDATA[Delete confirmation]]></string>
+    <string name="_bx_tasks_form_entry_input_delete_confirm"><![CDATA[I am sure I want to delete this task]]></string>
+    <string name="_bx_tasks_form_entry_input_delete_confirm_info"><![CDATA[This action can not be undone]]></string>
+    <string name="_bx_tasks_form_entry_input_delete_confirm_error"><![CDATA[Please check this checkbox if you really want to delete the task]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_covers"><![CDATA[Header Image]]></string>
+    <string name="_bx_tasks_form_entry_input_covers"><![CDATA[Header Image]]></string>
+    <string name="_bx_tasks_form_entry_input_covers_uploader_simple_title"><![CDATA[Upload]]></string>
+    <string name="_bx_tasks_form_entry_input_covers_uploader_html5_title"><![CDATA[Upload]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_pictures"><![CDATA[Images]]></string>
+    <string name="_bx_tasks_form_entry_input_pictures"><![CDATA[]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_videos"><![CDATA[Videos]]></string>
+    <string name="_bx_tasks_form_entry_input_videos"><![CDATA[]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_files"><![CDATA[Files]]></string>
+    <string name="_bx_tasks_form_entry_input_files"><![CDATA[]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_allow_view_to"><![CDATA[Visibility]]></string>
+    <string name="_bx_tasks_form_entry_input_allow_view_to"><![CDATA[Visibility]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_date_added"><![CDATA[Created]]></string>
+    <string name="_bx_tasks_form_entry_input_date_added"><![CDATA[Created]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_date_changed"><![CDATA[Updated]]></string>
+    <string name="_bx_tasks_form_entry_input_date_changed"><![CDATA[Updated]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_date_published"><![CDATA[Publishing time]]></string>
+    <string name="_bx_tasks_form_entry_input_date_published"><![CDATA[Publishing time]]></string>
+    <string name="_bx_tasks_form_entry_input_date_published_info"><![CDATA[Leave empty to publish immediately.]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_attachments"><![CDATA[Attachments]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_disable_comments"><![CDATA[Disable comments]]></string>
+    <string name="_bx_tasks_form_entry_input_disable_comments"><![CDATA[Disable comments]]></string>
+	
+	<string name="_bx_tasks_form_entry_input_sys_tasks_list"><![CDATA[Task list]]></string>
+	<string name="_bx_tasks_form_entry_input_tasks_list"><![CDATA[Task list]]></string>
+	<string name="_bx_tasks_form_profile_input_sys_initial_members"><![CDATA[Assign to]]></string>
+	<string name="_bx_tasks_form_profile_input_initial_members"><![CDATA[Assign to]]></string>
+	<string name="_bx_tasks_form_entry_input_sys_date_due_date"><![CDATA[Due date]]></string>
+	<string name="_bx_tasks_form_entry_input_date_due_date"><![CDATA[Due date]]></string>
+	
+	<string name="_bx_tasks_form_list_entry"><![CDATA[Tasklists]]></string>
+	<string name="_bx_tasks_form_list_entry_display_add"><![CDATA[Add Tasklist]]></string>
+	<string name="_bx_tasks_form_list_entry_display_edit"><![CDATA[Edit Tasklist]]></string>
+	<string name="_bx_tasks_form_list_entry_input_do_submit"><![CDATA[Submit]]></string>
+	<string name="_bx_tasks_form_list_entry_input_sys_do_submit"><![CDATA[Submit]]></string>
+	<string name="_bx_tasks_form_list_entry_input_sys_title"><![CDATA[Title]]></string>
+	<string name="_bx_tasks_form_list_entry_input_title"><![CDATA[Title]]></string>
+	<string name="_bx_tasks_form_list_entry_input_title_err"><![CDATA[Title is essential. Please, fill in this field]]></string>
+
+    <string name="_bx_tasks_category_form_entry"><![CDATA[Categories Form]]></string>
+    <string name="_bx_tasks_category_display_add"><![CDATA[Add category]]></string>
+    <string name="_bx_tasks_category_display_edit"><![CDATA[Edit category]]></string>
+    <string name="_bx_tasks_category_form_entry_input_sys_value"><![CDATA[Value]]></string>
+    <string name="_bx_tasks_category_form_entry_input_value"><![CDATA[Value]]></string>>
+    <string name="_bx_tasks_category_form_entry_input_value_err"><![CDATA[Value is essential. Please, fill in this field]]></string>
+    <string name="_bx_tasks_lmi_cpt_categories"><![CDATA[Categories]]></string>
+
+  <string name="_bx_tasks_acl_action_create_entry"><![CDATA[Create Task]]></string>
+    <string name="_bx_tasks_acl_action_delete_entry"><![CDATA[Delete Task]]></string>
+    <string name="_bx_tasks_acl_action_view_entry"><![CDATA[View Task]]></string>
+    <string name="_bx_tasks_acl_action_set_thumb"><![CDATA[Set Task Header Image]]></string>
+    <string name="_bx_tasks_acl_action_edit_any_entry"><![CDATA[Edit Any Task]]></string>
+
+    <string name="_bx_tasks_page_title_sys_create_entry"><![CDATA[New Task]]></string>
+    <string name="_bx_tasks_page_title_create_entry"><![CDATA[New Task]]></string>
+    <string name="_bx_tasks_page_block_title_create_entry"><![CDATA[New Task]]></string>
+    <string name="_bx_tasks_page_title_sys_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_tasks_page_title_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_tasks_page_block_title_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_tasks_page_title_sys_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_tasks_page_title_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_tasks_page_block_title_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_tasks_page_title_sys_view_entry"><![CDATA[View Task]]></string>
+    <string name="_bx_tasks_page_title_view_entry"><![CDATA[{title}]]></string>
+    <string name="_bx_tasks_page_block_title_entry_text"><![CDATA[Task Text]]></string>
+    <string name="_bx_tasks_page_title_browse"><![CDATA[Tasks]]></string>
+    <string name="_bx_tasks_page_title_search_results"><![CDATA[Tasks matching "{0}"]]></string>
+    <string name="_bx_tasks_page_title_browse_by_author"><![CDATA[Tasks of {display_name}]]></string>
+    <string name="_bx_tasks_page_title_browse_by_context"><![CDATA[Tasks in {display_name}]]></string>
+    <string name="_bx_tasks_page_title_browse_featured"><![CDATA[Featured Tasks]]></string>
+    <string name="_bx_tasks_page_title_browse_recent"><![CDATA[Latest Tasks]]></string>
+    <string name="_bx_tasks_page_title_browse_popular"><![CDATA[Popular Tasks]]></string>
+    <string name="_bx_tasks_page_title_browse_top"><![CDATA[Top Tasks]]></string>
+    <string name="_bx_tasks_page_title_browse_updated"><![CDATA[Updated Tasks]]></string>
+    <string name="_bx_tasks_page_title_sys_home"><![CDATA[Tasks Home]]></string>
+    <string name="_bx_tasks_page_title_home"><![CDATA[Tasks]]></string>
+    <string name="_bx_tasks_page_block_title_featured_entries_view_extended"><![CDATA[Featured Tasks]]></string>
+    <string name="_bx_tasks_page_block_title_recent_entries"><![CDATA[Latest Tasks (Gallery View)]]></string>
+    <string name="_bx_tasks_page_block_title_recent_entries_view_extended"><![CDATA[Latest Tasks]]></string>
+    <string name="_bx_tasks_page_block_title_recent_entries_view_full"><![CDATA[Latest Tasks (Full View)]]></string>
+    <string name="_bx_tasks_page_block_title_entry_social_sharing"><![CDATA[Share]]></string>
+    <string name="_bx_tasks_page_block_title_entry_author"><![CDATA[Author]]></string>
+	<string name="_bx_tasks_page_block_title_entry_assignments"><![CDATA[Assignments]]></string>
+    <string name="_bx_tasks_page_block_title_entry_actions"><![CDATA[Actions]]></string>
+    <string name="_bx_tasks_page_block_title_entry_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_tasks_page_block_title_entry_comments_link"><![CDATA[Comments to <a href="{entry_link}">{title}</a>]]></string>
+    <string name="_bx_tasks_page_block_title_entry_attachments"><![CDATA[Attachments]]></string>
+    <string name="_bx_tasks_page_block_title_entry_all_actions"><![CDATA[All Actions]]></string>
+    <string name="_bx_tasks_page_title_sys_entries_popular"><![CDATA[Popular Tasks]]></string>
+    <string name="_bx_tasks_page_title_entries_popular"><![CDATA[Popular Tasks]]></string>
+    <string name="_bx_tasks_page_title_sys_entries_top"><![CDATA[Top Tasks]]></string>
+    <string name="_bx_tasks_page_title_entries_top"><![CDATA[Top Tasks]]></string>
+    <string name="_bx_tasks_page_title_sys_entries_updated"><![CDATA[Updated Tasks]]></string>
+    <string name="_bx_tasks_page_title_entries_updated"><![CDATA[Updated Tasks]]></string>
+    <string name="_bx_tasks_page_title_sys_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_tasks_page_title_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_tasks_page_block_title_search_form"><![CDATA[Search Form]]></string>
+    <string name="_bx_tasks_page_block_title_search_results"><![CDATA[Search Results]]></string>
+    <string name="_bx_tasks_page_block_title_search_form_cmts"><![CDATA[Comments Search Form]]></string>
+    <string name="_bx_tasks_page_block_title_search_results_cmts"><![CDATA[Comments Search Results]]></string>
+    <string name="_bx_tasks_page_block_title_popular_entries"><![CDATA[Popular Tasks]]></string>
+    <string name="_bx_tasks_page_block_title_popular_entries_view_extended"><![CDATA[Popular Tasks (Extended View)]]></string>
+    <string name="_bx_tasks_page_block_title_popular_entries_view_full"><![CDATA[Popular Tasks (Full View)]]></string>
+    <string name="_bx_tasks_page_block_title_top_entries"><![CDATA[Top Tasks]]></string>
+    <string name="_bx_tasks_page_block_title_updated_entries"><![CDATA[Updated Tasks]]></string>
+    <string name="_bx_tasks_page_title_sys_view_entry_comments"><![CDATA[Task Comments]]></string>
+    <string name="_bx_tasks_page_title_view_entry_comments"><![CDATA[Comments to {title}]]></string>
+    <string name="_bx_tasks_page_title_sys_entries_of_author"><![CDATA[Tasks of author]]></string>
+    <string name="_bx_tasks_page_title_entries_of_author"><![CDATA[Tasks by {display_name}]]></string>
+    <string name="_bx_tasks_page_title_sys_entries_in_context"><![CDATA[Tasks in context]]></string>
+    <string name="_bx_tasks_page_title_entries_in_context"><![CDATA[Tasks in {display_name}]]></string>
+    <string name="_bx_tasks_page_block_title_favorites_of_author"><![CDATA[Favorites by <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_tasks_page_block_title_sys_favorites_of_author"><![CDATA[Favorites of author]]></string>
+    <string name="_bx_tasks_page_block_title_entries_of_author"><![CDATA[Tasks by <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_tasks_page_block_title_sys_entries_of_author"><![CDATA[Tasks of author]]></string>
+    <string name="_bx_tasks_page_block_title_entries_in_context"><![CDATA[Tasks in <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_tasks_page_block_title_sys_entries_in_context"><![CDATA[Tasks in context]]></string>
+    <string name="_bx_tasks_page_block_title_entries_actions"><![CDATA[Tasks actions]]></string>
+    <string name="_bx_tasks_page_block_title_browse_cmts"><![CDATA[Tasks' Comments]]></string>
+    <string name="_bx_tasks_page_title_sys_manage"><![CDATA[Manage Own]]></string>
+    <string name="_bx_tasks_page_title_sys_manage_administration"><![CDATA[Manage All]]></string>
+    <string name="_bx_tasks_page_title_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_tasks_page_block_title_system_manage"><![CDATA[Manage Own]]></string>
+    <string name="_bx_tasks_page_block_title_system_manage_administration"><![CDATA[Manage All]]></string>
+    <string name="_bx_tasks_page_block_title_manage"><![CDATA[Manage]]></string>    
+    <string name="_bx_tasks_page_block_title_popular_keywords"><![CDATA[Popular Hashtags]]></string>
+    <string name="_bx_tasks_page_block_title_cats"><![CDATA[Tasks Categories]]></string>
+    <string name="_bx_tasks_page_block_title_sys_multicats"><![CDATA[Tasks Categories(Multi)]]></string>
+    <string name="_bx_tasks_page_block_title_multicats"><![CDATA[Tasks Categories]]></string>
+    <string name="_bx_tasks_page_block_title_entry_info"><![CDATA[Info]]></string>
+    <string name="_bx_tasks_page_block_title_my_entries"><![CDATA[My Tasks]]></string>
+    <string name="_bx_tasks_page_block_title_sys_recent_entries_view_showcase"><![CDATA[Latest Tasks (Showcase View)]]></string>
+    <string name="_bx_tasks_page_block_title_recent_entries_view_showcase"><![CDATA[Latest Tasks]]></string>
+    <string name="_bx_tasks_page_block_title_sys_popular_entries_view_showcase"><![CDATA[Popular Tasks (Showcase View)]]></string>
+    <string name="_bx_tasks_page_block_title_popular_entries_view_showcase"><![CDATA[Popular Tasks]]></string>
+    <string name="_bx_tasks_page_block_title_sys_featured_entries_view_showcase"><![CDATA[Featured Tasks (Showcase View)]]></string>
+    <string name="_bx_tasks_page_block_title_featured_entries_view_showcase"><![CDATA[Featured Tasks]]></string>
+    <string name="_bx_tasks_page_block_title_sys_entry_context"><![CDATA[Posted in]]></string>
+    <string name="_bx_tasks_page_block_title_entry_context"><![CDATA[Posted in]]></string>
+	<string name="_bx_tasks_page_block_title_sys_calendar_in_context"><![CDATA[Calendar]]></string>
+	<string name="_bx_tasks_page_block_title_calendar_in_context"><![CDATA[Calendar]]></string>
+	<string name="_bx_tasks_page_block_title_sys_calendar_of_author"><![CDATA[Calendar]]></string>
+	<string name="_bx_tasks_page_block_title_calendar_of_author"><![CDATA[Calendar]]></string>
+
+    <string name="_bx_tasks_menu_title_entry_attachments"><![CDATA[Form Attachments]]></string>
+    <string name="_bx_tasks_menu_set_title_entry_attachments"><![CDATA[Form Attachments]]></string>
+    <string name="_bx_tasks_menu_item_title_system_cpa_photo_simple"><![CDATA[Add Photo (simple)]]></string>
+    <string name="_bx_tasks_menu_item_title_cpa_photo_simple"><![CDATA[Add Photo]]></string>
+    <string name="_bx_tasks_menu_item_title_system_cpa_photo_html5"><![CDATA[Add Photo (html5)]]></string>
+    <string name="_bx_tasks_menu_item_title_cpa_photo_html5"><![CDATA[Add Photos]]></string>
+    <string name="_bx_tasks_menu_item_title_system_cpa_video_simple"><![CDATA[Add Video (simple)]]></string>
+    <string name="_bx_tasks_menu_item_title_cpa_video_simple"><![CDATA[Add Video]]></string>
+    <string name="_bx_tasks_menu_item_title_system_cpa_video_html5"><![CDATA[Add Video (html5)]]></string>
+    <string name="_bx_tasks_menu_item_title_cpa_video_html5"><![CDATA[Add Videos]]></string>
+    <string name="_bx_tasks_menu_item_title_system_cpa_video_record"><![CDATA[Record Video]]></string>
+    <string name="_bx_tasks_menu_item_title_cpa_video_record"><![CDATA[Record Video]]></string>
+    <string name="_bx_tasks_menu_item_title_system_cpa_file_simple"><![CDATA[Add File (simple)]]></string>
+    <string name="_bx_tasks_menu_item_title_cpa_file_simple"><![CDATA[Add File]]></string>
+    <string name="_bx_tasks_menu_item_title_system_cpa_file_html5"><![CDATA[Add File (html5)]]></string>
+    <string name="_bx_tasks_menu_item_title_cpa_file_html5"><![CDATA[Add Files]]></string>
+
+    <string name="_bx_tasks_menu_set_title_view_entry"><![CDATA[Task Actions]]></string>
+    <string name="_bx_tasks_menu_title_view_entry"><![CDATA[Task Actions]]></string>
+    <string name="_bx_tasks_menu_title_submenu"><![CDATA[Tasks Submenu]]></string>
+    <string name="_bx_tasks_menu_set_title_submenu"><![CDATA[Tasks Submenu]]></string>
+    <string name="_bx_tasks_menu_item_title_system_create_entry"><![CDATA[Task]]></string>
+    <string name="_bx_tasks_menu_item_title_create_entry"><![CDATA[Task]]></string>
+    <string name="_bx_tasks_menu_item_title_system_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_tasks_menu_item_title_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_tasks_menu_item_title_system_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_tasks_menu_item_title_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_tasks_menu_item_title_system_view_entry"><![CDATA[View Task]]></string>
+    <string name="_bx_tasks_menu_item_title_system_entries_home"><![CDATA[Tasks]]></string>
+    <string name="_bx_tasks_menu_item_title_entries_home"><![CDATA[Tasks]]></string>
+    <string name="_bx_tasks_menu_item_title_system_entries_public"><![CDATA[Latest]]></string>
+    <string name="_bx_tasks_menu_item_title_entries_public"><![CDATA[Latest]]></string>
+    <string name="_bx_tasks_menu_item_title_system_entries_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_tasks_menu_item_title_entries_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_tasks_menu_item_title_system_entries_popular"><![CDATA[Popular]]></string>
+    <string name="_bx_tasks_menu_item_title_entries_popular"><![CDATA[Popular]]></string>
+    <string name="_bx_tasks_menu_item_title_system_entries_top"><![CDATA[Top]]></string>
+    <string name="_bx_tasks_menu_item_title_entries_top"><![CDATA[Top]]></string>
+    <string name="_bx_tasks_menu_item_title_system_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_tasks_menu_item_title_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_tasks_menu_title_view_entry_submenu"><![CDATA[View Task Submenu]]></string>
+    <string name="_bx_tasks_menu_set_title_view_entry_submenu"><![CDATA[View Task Submenu]]></string>
+    <string name="_bx_tasks_menu_item_title_view_entry_submenu_entry"><![CDATA[Task]]></string>
+    <string name="_bx_tasks_menu_item_title_view_entry_submenu_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_tasks_menu_item_title_system_view_entry_comments"><![CDATA[Task Comments]]></string>
+    <string name="_bx_tasks_menu_item_title_system_view_entries_author"><![CDATA[Tasks]]></string>
+    <string name="_bx_tasks_menu_item_title_view_entries_author"><![CDATA[Tasks]]></string>
+    <string name="_bx_tasks_menu_item_title_system_view_entries_in_context"><![CDATA[Tasks]]></string>
+    <string name="_bx_tasks_menu_item_title_view_entries_in_context"><![CDATA[Tasks]]></string>
+    <string name="_bx_tasks_menu_title_entries_my"><![CDATA[My Tasks Action Menu]]></string>
+    <string name="_bx_tasks_menu_set_title_entries_my"><![CDATA[My Tasks Menu]]></string>
+	<string name="_bx_tasks_menu_item_title_system_manage_my_tasks"><![CDATA[My tasks]]></string>
+    <string name="_bx_tasks_menu_item_title_manage_my_tasks"><![CDATA[Tasks]]></string>
+    <string name="_bx_tasks_menu_set_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_tasks_menu_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_tasks_menu_item_title_system_manage_account"><![CDATA[Manage account]]></string>
+    <string name="_bx_tasks_menu_item_title_manage_account"><![CDATA[Manage account]]></string>
+	<string name="_bx_tasks_menu_item_title_system_admt_tasks"><![CDATA[Tasks]]></string>
+	<string name="_bx_tasks_menu_item_title_admt_tasks"><![CDATA[Tasks]]></string>
+	<string name="_bx_tasks_menu_item_title_manage_my"><![CDATA[My Tasks]]></string>
+	<string name="_bx_tasks_menu_item_title_manage_all"><![CDATA[All Tasks]]></string>
+	
+	<string name="_bx_tasks_menu_item_title_system_set_completed"><![CDATA[Complete]]></string>
+	<string name="_bx_tasks_menu_item_title_set_completed"><![CDATA[Complete]]></string>
+	<string name="_bx_tasks_menu_item_title_system_set_uncompleted"><![CDATA[Re-open]]></string>
+	<string name="_bx_tasks_menu_item_title_set_uncompleted"><![CDATA[Re-open]]></string>
+
+	<string name="_bx_tasks_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
+	<string name="_bx_tasks_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
+	<string name="_bx_tasks_grid_filter_item_title_adm_hidden"><![CDATA[Hidden]]></string>
+	<string name="_bx_tasks_grid_column_title_adm_active"><![CDATA[Active]]></string>
+    <string name="_bx_tasks_grid_column_title_adm_title"><![CDATA[Title]]></string>
+    <string name="_bx_tasks_grid_action_title_adm_audit_content"><![CDATA[Audit actions]]></string>
+    <string name="_bx_tasks_grid_column_title_adm_added"><![CDATA[Added]]></string>
+    <string name="_bx_tasks_grid_column_title_adm_author"><![CDATA[Author]]></string>>
+    <string name="_bx_tasks_grid_action_title_adm_add"><![CDATA[Add]]></string>
+    <string name="_bx_tasks_grid_action_title_adm_edit"><![CDATA[Edit]]></string>
+    <string name="_bx_tasks_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
+    <string name="_bx_tasks_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
+    <string name="_bx_tasks_grid_action_err_delete"><![CDATA[Cannot delete the selected task(s).]]></string>
+    <string name="_bx_tasks_grid_txt_account_manager"><![CDATA[Redirect to manage account.]]></string>
+
+    <string name="_bx_tasks_chart_growth"><![CDATA[Tasks: Growth]]></string>
+    <string name="_bx_tasks_chart_growth_speed"><![CDATA[Tasks: Growth Speed]]></string>
+
+    <string name="_bx_tasks_search_extended"><![CDATA[Tasks Search]]></string>
+    <string name="_bx_tasks_search_extended_cmts"><![CDATA[Tasks Comments Search]]></string>
+
+    <string name="_bx_tasks_pre_lists_cats"><![CDATA[Task categories]]></string>
+    <string name="_bx_tasks_cat_Animals_Pets"><![CDATA[Animals & Pets]]></string>
+    <string name="_bx_tasks_cat_Architecture"><![CDATA[Architecture]]></string>
+    <string name="_bx_tasks_cat_Art"><![CDATA[Art]]></string>
+    <string name="_bx_tasks_cat_Cars_Motorcycles"><![CDATA[Cars & Motorcycles]]></string>
+    <string name="_bx_tasks_cat_Celebrities"><![CDATA[Celebrities]]></string>
+    <string name="_bx_tasks_cat_Design"><![CDATA[Design]]></string>
+    <string name="_bx_tasks_cat_DIY_Crafts"><![CDATA[DIY & Crafts]]></string>
+    <string name="_bx_tasks_cat_Education"><![CDATA[Education]]></string>
+    <string name="_bx_tasks_cat_Film_Music_Books"><![CDATA[Film, Music & Books]]></string>
+    <string name="_bx_tasks_cat_Food_Drink"><![CDATA[Food & Drink]]></string>
+    <string name="_bx_tasks_cat_Gardening"><![CDATA[Gardening]]></string>
+    <string name="_bx_tasks_cat_Geek"><![CDATA[Geek]]></string>
+    <string name="_bx_tasks_cat_Hair_Beauty"><![CDATA[Hair & Beauty]]></string>
+    <string name="_bx_tasks_cat_Health_Fitness"><![CDATA[Health & Fitness]]></string>
+    <string name="_bx_tasks_cat_History"><![CDATA[History]]></string>
+    <string name="_bx_tasks_cat_Holidays_Events"><![CDATA[Holidays & Events]]></string>
+    <string name="_bx_tasks_cat_Home_Decor"><![CDATA[Home Decor]]></string>
+    <string name="_bx_tasks_cat_Humor"><![CDATA[Humor]]></string>
+    <string name="_bx_tasks_cat_Illustrations_Posters"><![CDATA[Illustrations & Posters]]></string>
+    <string name="_bx_tasks_cat_Kids_Parenting"><![CDATA[Kids & Parenting]]></string>
+    <string name="_bx_tasks_cat_Mens_Fashion"><![CDATA[Men's Fashion]]></string>
+    <string name="_bx_tasks_cat_Outdoors"><![CDATA[Outdoors]]></string>
+    <string name="_bx_tasks_cat_Photography"><![CDATA[Photography]]></string>
+    <string name="_bx_tasks_cat_Products"><![CDATA[Products]]></string>
+    <string name="_bx_tasks_cat_Quotes"><![CDATA[Quotes]]></string>
+    <string name="_bx_tasks_cat_Science_Nature"><![CDATA[Science & Nature]]></string>
+    <string name="_bx_tasks_cat_Sports"><![CDATA[Sports]]></string>
+    <string name="_bx_tasks_cat_Tattoos"><![CDATA[Tattoos]]></string>
+    <string name="_bx_tasks_cat_Technology"><![CDATA[Technology]]></string>
+    <string name="_bx_tasks_cat_Travel"><![CDATA[Travel]]></string>
+    <string name="_bx_tasks_cat_Weddings"><![CDATA[Weddings]]></string>
+    <string name="_bx_tasks_cat_Womens_Fashion"><![CDATA[Women's Fashion]]></string>
+
+    <string name="_bx_tasks_txt_all_entries_in"><![CDATA[<a href="{0}">All Tasks in {1} ({2})</a>]]></string>
+    <string name="_bx_tasks_txt_all_entries_by"><![CDATA[{0} tasks]]></string>
+    <string name="_bx_tasks_txt_sample_single"><![CDATA[task]]></string>
+    <string name="_bx_tasks_txt_sample_single_with_article"><![CDATA[a task]]></string>
+    <string name="_bx_tasks_txt_action_completed"><![CDATA[completed]]></string>
+    <string name="_bx_tasks_txt_action_reopened"><![CDATA[reopened]]></string>
+    <string name="_bx_tasks_txt_sample_comment_single"><![CDATA[comment to task]]></string>
+    <string name="_bx_tasks_txt_sample_vote_single"><![CDATA[vote to task]]></string>
+    <string name="_bx_tasks_txt_sample_reaction_single"><![CDATA['{0}' reaction to task]]></string>
+    <string name="_bx_tasks_txt_sample_score_up_single"><![CDATA[score up vote to task]]></string>
+    <string name="_bx_tasks_txt_sample_score_down_single"><![CDATA[score down vote to task]]></string>
+    <string name="_bx_tasks_txt_processing_awaiting"><![CDATA[Scheduled for publishing as soon as video conversion is complete.]]></string>
+    <string name="_bx_tasks_txt_processing_failed"><![CDATA[Task isn't published because video conversion failed, edit video to fix the issue.]]></string>
+    <string name="_bx_tasks_txt_scheduled_awaiting"><![CDATA[Task publishing date is {date_publish_uf}]]></string>
+	
+    <string name="_bx_tasks_txt_new_task_list"><![CDATA[New TaskList]]></string>
+    <string name="_bx_tasks_txt_new_task"><![CDATA[New Task]]></string>
+    <string name="_bx_tasks_txt_filter_all"><![CDATA[All Tasks]]></string>
+    <string name="_bx_tasks_txt_filter_completed"><![CDATA[Completed Tasks]]></string>
+    <string name="_bx_tasks_txt_filter_uncompleted"><![CDATA[Uncompleted Tasks]]></string>
+    <string name="_bx_tasks_txt_err_cannot_perform_action"><![CDATA[Cannot perform action. Please report.]]></string>
+    <string name="_bx_tasks_confirm_tasklist_deletion"><![CDATA[You will delete all tasks that are contained in this tasklist. Are you sure?]]></string>
+  
+
+    <!-- Notifications -->
+    <string name="_bx_tasks_alert_action_completed_personal"><![CDATA[Complete task]]></string>
+    <string name="_bx_tasks_alert_action_completed_follow_member"><![CDATA[Complete task]]></string>
+    <string name="_bx_tasks_alert_action_completed_follow_context"><![CDATA[Complete task]]></string>
+    <string name="_bx_tasks_alert_action_reopened_personal"><![CDATA[Reopen task]]></string>
+    <string name="_bx_tasks_alert_action_reopened_follow_member"><![CDATA[Reopen task]]></string>
+    <string name="_bx_tasks_alert_action_reopened_follow_context"><![CDATA[Reopen task]]></string>
+    <string name="_bx_tasks_alert_action_expired_personal"><![CDATA[Expire task]]></string>
+    <string name="_bx_tasks_alert_action_assigned_personal"><![CDATA[Assign task]]></string>
+
+    <string name="_bx_tasks_txt_notification_completed"><![CDATA[<b class="bx-ntfs-content-entry">{entry_caption}</b> {entry_sample} was completed]]></string>
+    <string name="_bx_tasks_txt_notification_completed_in_context"><![CDATA[<b class="bx-ntfs-content-profile">{owner_name}</b>'s {entry_sample} <b class="bx-ntfs-content-entry">{entry_caption}</b> was completed]]></string>
+    <string name="_bx_tasks_txt_notification_reopened"><![CDATA[<b class="bx-ntfs-content-entry">{entry_caption}</b> {entry_sample} was reopened]]></string>
+    <string name="_bx_tasks_txt_notification_reopened_in_context"><![CDATA[<b class="bx-ntfs-content-profile">{owner_name}</b>'s {entry_sample} <b class="bx-ntfs-content-entry">{entry_caption}</b> was reopened]]></string>
+    <string name="_bx_tasks_txt_notification_expired"><![CDATA[<b class="bx-ntfs-content-entry">{entry_caption}</b> {entry_sample} expired]]></string>
+    <string name="_bx_tasks_txt_notification_expired_in_context"><![CDATA[<b class="bx-ntfs-content-profile">{owner_name}</b>'s {entry_sample} <b class="bx-ntfs-content-entry">{entry_caption}</b> expired]]></string>
+    <string name="_bx_tasks_txt_notification_assigned"><![CDATA[<b class="bx-ntfs-content-entry">{entry_caption}</b> {entry_sample} was assigned to <b class="bx-ntfs-content-profile">{entry_author_name}</b>]]></string>
+    <string name="_bx_tasks_txt_notification_assigned_in_context"><![CDATA[<b class="bx-ntfs-content-profile">{owner_name}</b>'s {entry_sample} <b class="bx-ntfs-content-entry">{entry_caption}</b> was assigned to <b class="bx-ntfs-content-profile">{entry_author_name}</b>]]></string>
+
+    <!-- Timeline -->
+    <string name="_bx_tasks_alert_action_completed"><![CDATA[completed]]></string>
+    <string name="_bx_tasks_alert_action_reopened"><![CDATA[reopened]]></string>
+</resources>

+ 12 - 11
modules/boonex/timeline/classes/BxTimelineModule.php

@@ -2897,17 +2897,18 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
             );
             );
 
 
             //--- Process Privacy ---//
             //--- Process Privacy ---//
-            $iObjectPrivacyView = (int)$oForm->getCleanValue('object_privacy_view');
-            $iObjectPrivacyViewDefault = $this->_oConfig->getPrivacyViewDefault('object');
-            if(empty($iObjectPrivacyView))
-                $aValsToAdd = array_merge($aValsToAdd, array(
-                    'object_privacy_view' => $iObjectPrivacyViewDefault
-                ));
-            else if($iObjectPrivacyView < 0) 
-                $aValsToAdd = array_merge($aValsToAdd, array(
-                    'owner_id' => abs($iObjectPrivacyView),
-                    'object_privacy_view' => $iObjectPrivacyViewDefault
-                ));
+            if(isset($oForm->aInputs[$CNF['FIELD_OBJECT_PRIVACY_VIEW']])) {
+                $iObjectPrivacyView = (int)$oForm->getCleanValue('object_privacy_view');
+                $iObjectPrivacyViewDefault = $this->_oConfig->getPrivacyViewDefault('object');
+                if(empty($iObjectPrivacyView))
+                    $aValsToAdd = array_merge($aValsToAdd, array(
+                        'object_privacy_view' => $iObjectPrivacyViewDefault
+                    ));
+                else if($iObjectPrivacyView < 0) 
+                    $aValsToAdd = array_merge($aValsToAdd, array(
+                        'owner_id' => abs($iObjectPrivacyView)
+                    ));
+            }
 
 
             //--- Process Link ---//
             //--- Process Link ---//
             $aLinkIds = $oForm->getCleanValue($CNF['FIELD_LINK']);
             $aLinkIds = $oForm->getCleanValue($CNF['FIELD_LINK']);

+ 1 - 1
modules/boonex/timeline/install/config.php

@@ -17,7 +17,7 @@ $aConfig = array(
     'name' => 'bx_timeline',
     'name' => 'bx_timeline',
     'title' => 'Timeline',
     'title' => 'Timeline',
     'note' => 'Timeline module.',
     'note' => 'Timeline module.',
-    'version' => '12.0.3.DEV',
+    'version' => '12.0.4.DEV',
     'vendor' => 'BoonEx',
     'vendor' => 'BoonEx',
     'help_url' => 'http://feed.una.io/?section={module_name}',
     'help_url' => 'http://feed.una.io/?section={module_name}',
 
 

+ 43 - 16
modules/boonex/timeline/template/block_async_outline.html

@@ -5,28 +5,51 @@
         -webkit-justify-content: space-between;
         -webkit-justify-content: space-between;
         justify-content: space-between;
         justify-content: space-between;
     }
     }
-
     .bx-tl-cont-ph-boxes .bx-def-box {
     .bx-tl-cont-ph-boxes .bx-def-box {
         width: 30%;
         width: 30%;
     }
     }
+
+    .bx-cont-ph-u {
+        display: -webkit-flex;
+        display: flex;
+        -webkit-align-items: center;
+        align-items: center;
+    }
+    .bx-cont-ph-ut {
+        -webkit-flex: 0 0 auto;
+        -ms-flex: 0 0 auto;
+        flex: 0 0 auto;
+    }
+    .bx-cont-ph-ui {
+        -webkit-flex: 1 1 auto;
+        -ms-flex: 1 1 auto;
+        flex: 1 1 auto;
+    }
+    
 </style>
 </style>
 <div class="bx-tl-cont-ph-boxes">
 <div class="bx-tl-cont-ph-boxes">
     <div class="bx-def-box bx-def-padding-topbottom bx-def-round-corners bx-def-color-bg-box bx-def-margin-bottom">
     <div class="bx-def-box bx-def-padding-topbottom bx-def-round-corners bx-def-color-bg-box bx-def-margin-bottom">
-        <div class="bx-clearfix">
-            <div class="bx-cont-ph bx-def-thumb-size bx-def-thumb bx-def-box-sizing bx-def-margin" style="float:left;">&nbsp;</div>
-            <span class="bx-cont-ph-inline bx-def-margin-top" style="width:10rem;">&nbsp;</span><br />
-            <span class="bx-cont-ph-inline bx-def-margin-thd-top bx-def-font-small" style="width:7rem;">&nbsp;</span>
+        <div class="bx-cont-ph-u bx-def-padding">
+            <div class="bx-cont-ph-ut bx-cont-ph bx-def-thumb-size bx-def-thumb bx-def-box-sizing">&nbsp;</div>
+            <div class="bx-cont-ph-ui bx-def-margin-left">
+                <span class="bx-cont-ph-inline" style="width:100%;">&nbsp;</span><br />
+                <span class="bx-cont-ph-inline bx-def-margin-thd-top bx-def-font-small" style="width:70%;">&nbsp;</span>
+            </div>
         </div>
         </div>
         <div class="bx-cont-ph" style="height:20rem;"></div>
         <div class="bx-cont-ph" style="height:20rem;"></div>
-        <span class="bx-cont-ph-inline bx-def-margin bx-def-font-h3" style="width:18rem;">&nbsp;</span>
+        <div class="bx-def-padding-lefttopright">
+            <span class="bx-cont-ph-inline bx-def-font-h3" style="width:85%;">&nbsp;</span>
+        </div>
     </div>
     </div>
     <div class="bx-def-box bx-def-padding-topbottom bx-def-round-corners bx-def-color-bg-box bx-def-margin-bottom">
     <div class="bx-def-box bx-def-padding-topbottom bx-def-round-corners bx-def-color-bg-box bx-def-margin-bottom">
-        <div class="bx-clearfix">
-            <div class="bx-cont-ph bx-def-thumb-size bx-def-thumb bx-def-box-sizing bx-def-margin" style="float:left;">&nbsp;</div>
-            <span class="bx-cont-ph-inline bx-def-margin-top" style="width:10rem;">&nbsp;</span><br />
-            <span class="bx-cont-ph-inline bx-def-margin-thd-top bx-def-font-small" style="width:7rem;">&nbsp;</span>
+        <div class="bx-cont-ph-u bx-def-padding">
+            <div class="bx-cont-ph-ut bx-cont-ph bx-def-thumb-size bx-def-thumb bx-def-box-sizing">&nbsp;</div>
+            <div class="bx-cont-ph-ui bx-def-margin-left">
+                <span class="bx-cont-ph-inline" style="width:100%;">&nbsp;</span><br />
+                <span class="bx-cont-ph-inline bx-def-margin-thd-top bx-def-font-small" style="width:70%;">&nbsp;</span>
+            </div>
         </div>
         </div>
-        <div class="bx-def-padding">
+        <div class="bx-def-padding-rightbottomleft">
             <div class="bx-cont-ph bx-def-margin-thd-bottom">&nbsp;</div>
             <div class="bx-cont-ph bx-def-margin-thd-bottom">&nbsp;</div>
             <div class="bx-cont-ph bx-def-margin-thd-bottom">&nbsp;</div>
             <div class="bx-cont-ph bx-def-margin-thd-bottom">&nbsp;</div>
             <div class="bx-cont-ph bx-def-margin-thd-bottom">&nbsp;</div>
             <div class="bx-cont-ph bx-def-margin-thd-bottom">&nbsp;</div>
@@ -34,13 +57,17 @@
         </div>
         </div>
     </div>
     </div>
     <div class="bx-def-box bx-def-padding-topbottom bx-def-round-corners bx-def-color-bg-box bx-def-margin-bottom">
     <div class="bx-def-box bx-def-padding-topbottom bx-def-round-corners bx-def-color-bg-box bx-def-margin-bottom">
-        <div class="bx-clearfix">
-            <div class="bx-cont-ph bx-def-thumb-size bx-def-thumb bx-def-box-sizing bx-def-margin" style="float:left;">&nbsp;</div>
-            <span class="bx-cont-ph-inline bx-def-margin-top" style="width:10rem;">&nbsp;</span><br />
-            <span class="bx-cont-ph-inline bx-def-margin-thd-top bx-def-font-small" style="width:7rem;">&nbsp;</span>
+        <div class="bx-cont-ph-u bx-def-padding">
+            <div class="bx-cont-ph-ut bx-cont-ph bx-def-thumb-size bx-def-thumb bx-def-box-sizing">&nbsp;</div>
+            <div class="bx-cont-ph-ui bx-def-margin-left">
+                <span class="bx-cont-ph-inline" style="width:100%;">&nbsp;</span><br />
+                <span class="bx-cont-ph-inline bx-def-margin-thd-top bx-def-font-small" style="width:70%;">&nbsp;</span>
+            </div>
         </div>
         </div>
         <div class="bx-cont-ph" style="height:20rem;"></div>
         <div class="bx-cont-ph" style="height:20rem;"></div>
-        <span class="bx-cont-ph-inline bx-def-margin bx-def-font-h3" style="width:18rem;">&nbsp;</span>
+        <div class="bx-def-padding-lefttopright">
+            <span class="bx-cont-ph-inline bx-def-font-h3" style="width:85%;">&nbsp;</span>
+        </div>
     </div>
     </div>
 </div>
 </div>
 <script>
 <script>

+ 54 - 0
modules/boonex/timeline/updates/12.0.2_12.0.3/install/config.php

@@ -0,0 +1,54 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+    'title' => 'Timeline',
+    'version_from' => '12.0.2',
+    'version_to' => '12.0.3',
+    'vendor' => 'BoonEx',
+
+    'compatible_with' => array(
+        '12.0.0'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/timeline/updates/update_12.0.2_12.0.3/',
+    'home_uri' => 'timeline_update_1202_1203',
+
+    'module_dir' => 'boonex/timeline/',
+    'module_uri' => 'timeline',
+
+    'db_prefix' => 'bx_timeline_',
+    'class_prefix' => 'BxTimeline',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_files' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Timeline',
+
+    /**
+     * Files Section
+     */
+    'delete_files' => array(
+        'template/item_outline_sample.html',
+        'template/item_timeline_sample.html',
+    ),
+);

+ 13 - 0
modules/boonex/timeline/updates/12.0.2_12.0.3/install/installer.php

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

+ 6 - 0
modules/boonex/timeline/updates/12.0.2_12.0.3/install/langs/en.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="en" flag="gb" title="English">
+	<string_add name="_bx_timeline_page_content_ph_outline"><![CDATA[Timeline: with outline placeholder]]></string_add>
+
+	<string_del name="_bx_timeline_option_enable_dynamic_cards"><![CDATA[Enable dynamic cards loading]]></string_del>
+</resources>

+ 12 - 0
modules/boonex/timeline/updates/12.0.2_12.0.3/install/sql/enable.sql

@@ -0,0 +1,12 @@
+SET @sName = 'bx_timeline';
+
+
+-- CONTENT PLACEHOLDERS
+DELETE FROM `sys_pages_content_placeholders` WHERE `module`=@sName AND `title`='_bx_timeline_page_content_ph_outline';
+SET @iCPHOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_pages_content_placeholders` ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_content_placeholders` (`module`, `title`, `template`, `order`) VALUES
+('bx_timeline', '_bx_timeline_page_content_ph_outline', 'block_async_outline.html', @iCPHOrder + 1);
+
+
+-- SETTINGS
+DELETE FROM `sys_options` WHERE `name`='bx_timeline_enable_dynamic_cards';

+ 741 - 0
modules/boonex/timeline/updates/12.0.2_12.0.3/source/classes/BxTimelineConfig.php

@@ -0,0 +1,741 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Timeline Timeline
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+bx_import('BxDolPrivacy');
+
+class BxTimelineConfig extends BxBaseModNotificationsConfig
+{
+    protected $_aTypeToFormDisplay;
+
+    protected $_bAllowEdit;
+    protected $_bAllowDelete;
+    protected $_bShowAll;
+    protected $_bCountAllViews;
+
+    protected $_bCacheItem;
+    protected $_sCacheItemEngine;
+    protected $_iCacheItemLifetime;
+    protected $_bCacheList;
+    protected $_aCacheListExceptions;
+
+    protected $_bInfScroll;
+    protected $_iInfScrollAutoPreloads;
+
+    protected $_iRssLength;
+    protected $_iLiveUpdateLength;
+    protected $_iCharsDisplayMinTitle;
+    protected $_iCharsDisplayMaxTitle;
+
+    protected $_bBriefCards;
+    protected $_aBriefCardsTags;
+    protected $_sVideosAutoplay;
+    protected $_iPreloadComments;
+    protected $_iPreloadCommentsMax;
+    protected $_bJumpTo;
+    protected $_sAttachmentsLayout;
+
+    protected $_bHot;
+    protected $_iHotInterval;
+    protected $_aHotList;
+
+    protected $_bEditorToolbar;
+    protected $_bUnhideRestored;
+
+    protected $_sStorageObject;
+    protected $_sTranscoderObjectPreview;
+    protected $_sTranscoderObjectView;
+    protected $_aPhotoUploaders;
+    protected $_aVideoUploaders;
+    protected $_aItemToUploader;
+
+    protected $_sMenuItemManage;
+    protected $_sMenuItemActions;
+
+    protected $_aRepostDefaults;
+
+    protected $_iTimelineVisibilityThreshold;
+    protected $_aPregPatterns;
+
+    /**
+     * Constructor
+     */
+    public function __construct($aModule)
+    {
+        parent::__construct($aModule);
+
+        $this->CNF = array (
+            'ICON' => 'far clock col-green1',
+
+            // database tables
+            'TABLE_ENTRIES' => $aModule['db_prefix'] . 'events',
+
+            // database fields
+            'FIELD_ID' => 'id',
+            'FIELD_OWNER_ID' => 'owner_id',
+            'FIELD_SYSTEM' => 'system',
+            'FIELD_OBJECT_ID' => 'object_id', //Note. For 'Direct Timeline Posts' ('system' db field == 0) this field contains post's author profile ID.
+            'FIELD_OBJECT_PRIVACY_VIEW' => 'object_privacy_view',
+            'FIELD_ADDED' => 'date',
+            'FIELD_PUBLISHED' => 'published',
+            'FIELD_TITLE' => 'title',
+            'FIELD_TEXT' => 'description',
+            'FIELD_ATTACHMENTS' => 'attachments',
+            'FIELD_LINK' => 'link',
+            'FIELD_PHOTO' => 'photo',
+            'FIELD_VIDEO' => 'video',
+            'FIELD_STATUS' => 'status',
+            'FIELD_STICKED' => 'sticked',
+            'FIELD_DATE' => 'date',
+            'FIELD_ANONYMOUS' => 'anonymous',
+            'FIELD_CONTROLS' => 'controls',
+            'FIELD_LOCATION' => 'location',
+            'FIELD_LOCATION_PREFIX' => 'location',
+            'FIELDS_DELAYED_PROCESSING' => 'video', // can be array of fields or comma separated string of field names
+
+            // page URIs
+            'URI_VIEW_LIST' => 'timeline-view',
+            'URI_VIEW_ENTRY' => 'item',
+
+            'URL_HOME' => 'page.php?i=timeline-view-home',
+
+            // objects
+            'OBJECT_STORAGE' => $this->_sName . '_photos',
+            'OBJECT_STORAGE_VIDEOS' => $this->_sName . '_videos',
+            'OBJECT_IMAGES_TRANSCODER_PREVIEW' => $this->_sName . '_photos_preview',
+            'OBJECT_VIDEOS_TRANSCODERS' => array(
+                'poster' => 'bx_timeline_videos_poster', 
+            	'mp4' => 'bx_timeline_videos_mp4', 
+            	'mp4_hd' => 'bx_timeline_videos_mp4_hd'
+            ),
+            'OBJECT_UPLOADER_PHOTO_SIMPLE' => $this->_sName . '_simple_photo',
+            'OBJECT_UPLOADER_PHOTO_HTML5' => $this->_sName . '_html5_photo',
+            'OBJECT_UPLOADER_VIDEO_SIMPLE' => $this->_sName . '_simple_video',
+            'OBJECT_UPLOADER_VIDEO_HTML5' => $this->_sName . '_html5_video',
+            'OBJECT_UPLOADER_VIDEO_RECORD' => $this->_sName . '_record_video',
+            'OBJECT_GRID_ADMINISTRATION' => $this->_sName . '_administration',
+            'OBJECT_GRID_MUTE' => $this->_sName . '_mute',
+            'OBJECT_MENU_ENTRY_ATTACHMENTS' => $this->_sName . '_menu_post_attachments',
+            'OBJECT_METATAGS' => $this->_sName,
+            'OBJECT_COMMENTS' => $this->_sName,
+            'OBJECT_VIEWS' => $this->_sName,
+            'OBJECT_VOTES' => $this->_sName,
+            'OBJECT_REACTIONS' => $this->_sName . '_reactions',
+            'OBJECT_SCORES' => $this->_sName,
+            'OBJECT_REPORTS' => $this->_sName,
+            'OBJECT_PRIVACY_VIEW' => $this->_sName . '_privacy_view',
+            'OBJECT_CONNECTIONS_MUTE' => $this->_sName . '_mute',
+
+            // some language keys
+            'T' => array (
+                'txt_status_deleted' => '_bx_timeline_txt_status_deleted',
+                'txt_sample_single' => '_bx_timeline_txt_sample',
+                'txt_sample_single_ext' => '_bx_timeline_txt_sample_ext',
+            	'txt_sample_comment_single' => '_bx_timeline_txt_sample_comment_single',
+                'txt_sample_vote_single' => '_bx_timeline_txt_sample_vote_single',
+                'txt_sample_reaction_single' => '_bx_timeline_txt_sample_reaction_single',
+                'txt_sample_score_up_single' => '_bx_timeline_txt_sample_score_up_single',
+                'txt_sample_score_down_single' => '_bx_timeline_txt_sample_score_down_single',
+                'txt_sample_with_link' => '_bx_timeline_txt_sample_with_link',
+                'txt_sample_with_image' => '_bx_timeline_txt_sample_with_image',
+                'txt_sample_with_video' => '_bx_timeline_txt_sample_with_video',
+                'txt_sample_with_media' => '_bx_timeline_txt_sample_with_media',
+                'grid_action_err_delete' => '_bx_timeline_grid_action_err_delete', 
+                'grid_txt_account_manager' => '_bx_timeline_grid_txt_account_manager',
+                'form_input_title_object_privacy_view' => '_bx_timeline_form_post_input_object_privacy_view',
+                'option_vap_off' => '_bx_timeline_option_videos_autoplay_off',
+                'option_vap_on_mute' => '_bx_timeline_option_videos_autoplay_on_mute',
+                'option_vap_on' => '_bx_timeline_option_videos_autoplay_on',
+                'option_al_gallery' => '_bx_timeline_option_attachments_layout_gallery',
+                'option_al_showcase' => '_bx_timeline_option_attachments_layout_showcase'
+            ),
+        );
+
+        $this->_aTypeToFormDisplay = array(
+            BX_BASE_MOD_NTFS_TYPE_OWNER => 'form_display_post_add_profile',
+            BX_BASE_MOD_NTFS_TYPE_PUBLIC => 'form_display_post_add_public',
+            BX_TIMELINE_TYPE_CHANNELS => 'form_display_post_add',
+            BX_TIMELINE_TYPE_FEED => 'form_display_post_add',
+            BX_TIMELINE_TYPE_OWNER_AND_CONNECTIONS => 'form_display_post_add'
+        );
+
+        $this->_aPrefixes = array(
+            'style' => 'bx-tl',
+            'language' => '_bx_timeline',
+            'option' => 'bx_timeline_',
+            'common_post' => 'timeline_common_',
+            'cache_list_hot' => 'bx_timeline_list_hot',
+            'cache_item' => 'bx_timeline_item_'
+        );
+
+        $this->_aObjects = array_merge($this->_aObjects, array(
+            'comment' => $this->CNF['OBJECT_COMMENTS'],
+            'view' => $this->CNF['OBJECT_VIEWS'],
+            'vote' => $this->CNF['OBJECT_VOTES'],
+            'reaction' => $this->CNF['OBJECT_REACTIONS'],
+            'score' => $this->CNF['OBJECT_SCORES'],
+            'report' => $this->CNF['OBJECT_REPORTS'],
+            'privacy_view' => $this->CNF['OBJECT_PRIVACY_VIEW'],
+            'metatags' => $this->_sName,
+
+            'storage_photos' => $this->CNF['OBJECT_STORAGE'],
+            'storage_videos' => $this->CNF['OBJECT_STORAGE_VIDEOS'],
+            'transcoder_photos_preview' => $this->CNF['OBJECT_IMAGES_TRANSCODER_PREVIEW'],
+            'transcoder_photos_view' => $this->_sName . '_photos_view',
+            'transcoder_photos_medium' => $this->_sName . '_photos_medium',
+            'transcoder_photos_big' => $this->_sName . '_photos_big',
+            'transcoder_videos_poster' => $this->CNF['OBJECT_VIDEOS_TRANSCODERS']['poster'],
+            'transcoder_videos_mp4' => $this->CNF['OBJECT_VIDEOS_TRANSCODERS']['mp4'],
+            'transcoder_videos_mp4_hd' => $this->CNF['OBJECT_VIDEOS_TRANSCODERS']['mp4_hd'],
+
+            'page_item_brief' => $this->_sName . '_item_brief',
+
+            'menu_view' => $this->_sName . '_menu_view',
+            'menu_item_manage' => $this->_sName . '_menu_item_manage',
+            'menu_item_actions' => $this->_sName . '_menu_item_actions',
+            'menu_item_actions_all' => $this->_sName . '_menu_item_actions_all',
+            'menu_item_counters' => $this->_sName . '_menu_item_counters',
+            'menu_item_meta' => $this->_sName . '_menu_item_meta',
+            'menu_post_attachments' => $this->CNF['OBJECT_MENU_ENTRY_ATTACHMENTS'],
+
+            'form_post' => $this->_sName . '_post',
+            'form_attach_link' => $this->_sName . '_attach_link',
+            'form_display_post_add' => $this->_sName . '_post_add',
+            'form_display_post_add_public' => $this->_sName . '_post_add_public',
+            'form_display_post_add_profile' => $this->_sName . '_post_add_profile',
+            'form_display_post_edit' => $this->_sName . '_post_edit',
+            'form_display_post_view' => $this->_sName . '_post_view',
+            'form_display_attach_link_add' => $this->_sName . '_attach_link_add',
+
+            'grid_mute' => $this->CNF['OBJECT_GRID_MUTE'],
+
+            'connection_mute' => $this->CNF['OBJECT_CONNECTIONS_MUTE'],
+        ));
+
+        $this->_aHandlerDescriptor = array('module_name' => '', 'module_method' => '', 'module_class' => '', 'groupable' => '', 'group_by' => '');
+        $this->_sHandlersMethod = 'get_timeline_data';
+
+        $this->_aPhotoUploaders = array($this->CNF['OBJECT_UPLOADER_PHOTO_SIMPLE']);
+        $this->_aVideoUploaders = array($this->CNF['OBJECT_UPLOADER_VIDEO_SIMPLE']);
+
+        $this->_aItemToUploader = array(
+            'add-photo-simple' => $this->CNF['OBJECT_UPLOADER_PHOTO_SIMPLE'],
+            'add-photo-html5' => $this->CNF['OBJECT_UPLOADER_PHOTO_HTML5'],
+            'add-video-simple' => $this->CNF['OBJECT_UPLOADER_VIDEO_SIMPLE'],
+            'add-video-html5' => $this->CNF['OBJECT_UPLOADER_VIDEO_HTML5'],
+            'add-video-record' => $this->CNF['OBJECT_UPLOADER_VIDEO_RECORD'],
+        );
+
+        $this->_bJsMode = false;
+        $this->_aJsClasses = array(
+            'main' => 'BxTimelineMain',
+            'view' => 'BxTimelineView',
+            'post' => 'BxTimelinePost',
+            'repost' => 'BxTimelineRepost',
+            'manage_tools' => 'BxTimelineManageTools'
+        );
+        $this->_aJsObjects = array(
+            'view' => 'oTimelineView',
+            'post' => 'oTimelinePost',
+            'repost' => 'oTimelineRepost',
+            'manage_tools' => 'oBxTimelineManageTools'
+        );
+
+        $this->_aGridObjects = array(
+            'administration' => $this->CNF['OBJECT_GRID_ADMINISTRATION']
+        );
+
+        $sHp = str_replace('_', '-', $this->_sName);
+        $sHpT = BX_TIMELINE_VIEW_TIMELINE;
+        $sHpO = BX_TIMELINE_VIEW_OUTLINE;
+        $this->_aHtmlIds = array(
+            'view' => array(
+                'edit_form' => $sHp . '-edit-',
+
+                'menu_popup' => $sHp . '-menu-popup-',
+
+                'video_iframe' => $sHp . '-video-iframe-',
+                'video' => $sHp . '-video-',
+
+                'live_update_popup' => $sHp . '-live-update-popup-',
+            ),
+            'post' => array(
+                'attach_link_popup' =>  $sHp . '-attach-link-popup',
+                'attach_link_form_field' => $sHp . '-attach-link-form-field-',
+                'attach_link_item' => $sHp . '-attach-link-item-',
+                'textarea' => $sHp . '-textarea-',
+
+                'main_' . $sHpT => $sHp . '-' . $sHpT,
+                'main_' . $sHpO => $sHp . '-' . $sHpO,
+            ),
+            'repost' => array(
+                'main' => $sHp . '-repost-',
+                'counter' => $sHp . '-repost-counter-',
+                'by_popup' => $sHp . '-repost-by-',
+            )
+        );
+
+        $this->_aRepostDefaults = array(
+            'show_do_repost_as_button' => false,
+            'show_do_repost_as_button_small' => false,
+            'show_do_repost_image' => false,
+            'show_do_repost_icon' => true,
+            'show_do_repost_text' => false,
+            'show_counter' => true,
+
+            //--- Images
+            'image_do_repost' => '',
+
+            //--- Icons
+            'icon_do_repost' => 'sync-alt',
+
+            //--- Texts
+            'text_do_repost' => '_bx_timeline_txt_do_repost',
+
+            //--- Templates
+            'template_do_repost_label' => '',
+            'template_do_repost_label_name' => 'repost_do_repost_label.html',
+        );
+
+        $this->_iTimelineVisibilityThreshold = 0;
+
+        $this->_aPregPatterns = array(
+            "meta_title" => "/<title>(.*)<\/title>/",
+            "meta_description" => "/<meta[\s]+[^>]*?name[\s]?=[\s\"\']+description[\s\"\']+content[\s]?=[\s\"\']+(.*?)[\"\']+.*?>/",
+            "url" => "/(([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-_!]*)?\??(?:[\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w]*))?/"
+        );
+
+        $this->_aBriefCardsTags = array('a', 'b', 'i');
+    }
+
+    public function init(&$oDb)
+    {
+    	parent::init($oDb);
+
+    	$sOptionPrefix = $this->getPrefix('option');
+    	$this->_bAllowEdit = getParam($sOptionPrefix . 'enable_edit') == 'on';
+        $this->_bAllowDelete = getParam($sOptionPrefix . 'enable_delete') == 'on';
+        $this->_bShowAll = getParam($sOptionPrefix . 'enable_show_all') == 'on';
+        $this->_bCountAllViews = getParam($sOptionPrefix . 'enable_count_all_views') == 'on';
+
+        $this->_bCacheItem = getParam($sOptionPrefix . 'enable_cache_item') == 'on';
+        $this->_sCacheItemEngine = getParam($sOptionPrefix . 'cache_item_engine');
+        $this->_iCacheItemLifetime = (int)getParam($sOptionPrefix . 'cache_item_lifetime');
+        $this->_bCacheList = getParam($sOptionPrefix . 'enable_cache_list') == 'on';
+        $this->_aCacheListExceptions = array(BX_TIMELINE_TYPE_HOT);
+
+        $this->_aPerPage = array(
+            'default' => (int)getParam($sOptionPrefix . 'events_per_page'),
+            'profile' => (int)getParam($sOptionPrefix . 'events_per_page_profile'),
+            'account' => (int)getParam($sOptionPrefix . 'events_per_page_account'),
+            'home' => (int)getParam($sOptionPrefix . 'events_per_page_home'),
+            'preload' => (int)getParam($sOptionPrefix . 'events_per_preload')
+    	);
+
+        $this->_bInfScroll = getParam($sOptionPrefix . 'enable_infinite_scroll') == 'on';
+        $this->_iInfScrollAutoPreloads = (int)getParam($sOptionPrefix . 'auto_preloads');
+
+        $this->_iRssLength = (int)getParam($sOptionPrefix . 'rss_length');
+        $this->_iLiveUpdateLength = 10;
+        $this->_iCharsDisplayMinTitle = 32;
+        $this->_iCharsDisplayMaxTitle = 64;
+
+        $this->_bBriefCards = getParam($sOptionPrefix . 'enable_brief_cards') == 'on';
+
+        $this->_sVideosAutoplay = getParam($sOptionPrefix . 'videos_autoplay');
+
+        $this->_iPreloadCommentsMax = 7;
+        $this->_iPreloadComments = (int)getParam($sOptionPrefix . 'preload_comments');
+        if($this->_iPreloadComments > $this->_iPreloadCommentsMax)
+            $this->_iPreloadComments = $this->_iPreloadCommentsMax;
+
+        $this->_bJumpTo = getParam($sOptionPrefix . 'enable_jump_to_switcher') == 'on';
+        $this->_sAttachmentsLayout = getParam($sOptionPrefix . 'attachments_layout');
+
+        $this->_bHot = getParam($sOptionPrefix . 'enable_hot') == 'on';
+        $this->_iHotInterval = (int)getParam($sOptionPrefix . 'hot_interval');
+        $this->_aHotList = $this->_bHot ? $this->_oDb->getHot() : array();
+
+        $this->_bEditorToolbar = getParam($sOptionPrefix . 'enable_editor_toolbar') == 'on';
+
+        $this->_bUnhideRestored = false;
+    }
+
+    /**
+     * Generate name from parameters.
+     * 
+     * @param type $aParams - parameters whose values will be used during generation.
+     * @param type $aRules - generation rules.
+     * @return string
+     */
+    protected function getNameView($aParams, $aRules = array())
+    {
+        $bWithView = !isset($aRules['with_view']) || $aRules['with_view'] === true;
+        $bWithType = !isset($aRules['with_type']) || $aRules['with_type'] === true;
+        $bWithOwner = isset($aRules['with_owner']) && $aRules['with_owner'] === true;
+        $sGlue = !empty($aRules['glue']) ? $aRules['glue'] : '_';
+
+        $aAddons = array();
+        if(!empty($aParams['name']))
+            $aAddons[] = $aParams['name'];
+        else {
+            if($bWithView && !empty($aParams['view']))
+                $aAddons[] = $aParams['view'];
+
+            if($bWithType && !empty($aParams['type']))
+                $aAddons[] = $aParams['type'];
+        }
+
+        if($bWithOwner)
+            $aAddons[] = $aParams['owner_id'];
+
+        return !empty($aAddons) ? implode($sGlue, $aAddons) : '';
+    }
+
+    /**
+     * Generates unique JS object name for View events block.
+     * 
+     * @param array $aParams - an array with browsing params received in View block service method
+     * @return string with JS object name
+     */
+    public function getJsObjectView($aParams = array())
+    {
+        return parent::getJsObject('view') . bx_gen_method_name($this->getNameView($aParams));
+    }
+
+    public function getHtmlIdView($sKey, $aParams, $aRules = array())
+    {
+        $bWhole = !isset($aRules['whole']) || $aRules['whole'] === true;
+        $sGlue = !empty($aRules['glue']) ? $aRules['glue'] : '_';
+
+        return str_replace($sGlue, '-', $this->_sName  . $sGlue . $sKey . $sGlue . $this->getNameView($aParams, $aRules) . (!$bWhole ? $sGlue : ''));
+    }
+
+    public function isAllowEdit()
+    {
+        return $this->_bAllowEdit;
+    }
+
+    public function isAllowDelete()
+    {
+        return $this->_bAllowDelete;
+    }
+
+    public function isInfiniteScroll()
+    {
+        return $this->_bInfScroll;
+    }
+
+    public function isShowAll()
+    {
+        return $this->_bShowAll;
+    }
+
+    public function isCountAllViews()
+    {
+        return $this->_bCountAllViews;
+    }
+
+    public function isBriefCards()
+    {
+        return $this->_bBriefCards;
+    }
+
+    public function isJumpTo()
+    {
+        return $this->_bJumpTo;
+    }
+
+    public function isHot()
+    {
+        return $this->_bHot;
+    }
+
+    public function isHotEvent($iEventId)
+    {
+        return in_array($iEventId, $this->_aHotList);
+    }
+
+    public function isEmoji()
+    {
+        $oMenu = BxDolMenu::getObjectInstance($this->getObject('menu_post_attachments'));
+        if(!$oMenu)
+            return false;
+
+        return $oMenu->isMenuItem('add-emoji');
+    }
+
+    public function isEditorToolbar()
+    {
+    	return $this->_bEditorToolbar;
+    }
+
+    public function isUnhideRestored()
+    {
+        return $this->_bUnhideRestored;
+    }
+
+    public function isCacheItem()
+    {
+        return $this->_bCacheItem;
+    }
+
+    public function isCacheList()
+    {
+        return $this->_bCacheList;
+    }
+
+    public function isCacheListException($sType)
+    {
+        return in_array($sType, $this->_aCacheListExceptions);
+    }
+
+    public function getCacheItemEngine()
+    {
+        return $this->_sCacheItemEngine;
+    }
+
+    public function getCacheItemLifetime()
+    {
+        return $this->_iCacheItemLifetime;
+    }
+
+    public function getCacheItemKey($iId, $sPostfix = '')
+    {
+        return $this->getPrefix('cache_item') . $iId . (bx_is_mobile() ? '_m' : '') . '_r' . bx_get_device_pixel_ratio() . '_' . (!empty($sPostfix) ? '_' . $sPostfix : '') . '.php';
+    }
+
+    public function getCacheHotKey()
+    {
+        return $this->getPrefix('cache_list_hot');
+    }
+
+    public function getPostFormDisplay($sType)
+    {
+        if(empty($sType) || !array_key_exists($sType, $this->_aTypeToFormDisplay))
+            $sType = BX_TIMELINE_TYPE_DEFAULT;
+
+        return $this->_aTypeToFormDisplay[$sType];
+    }
+
+    public function getUploaders($sField)
+    {
+        $aResult = array();
+
+        switch($sField) {
+            case 'photo':
+                $aResult = $this->_aPhotoUploaders;
+                break;
+            case 'video':
+                $aResult = $this->_aVideoUploaders;
+                break;
+        }
+
+        return $aResult;
+    }
+
+    public function getUploaderByMenuItem($sMenuItem)
+    {
+        if(!isset($this->_aItemToUploader[$sMenuItem]))
+            return false;
+    
+        return $this->_aItemToUploader[$sMenuItem];
+    }
+
+    public function getPerPage($sType = 'default')
+    {
+        if($this->isInfiniteScroll())
+            $sType = 'preload';
+
+        return parent::getPerPage($sType);
+    }
+
+    public function getAutoPreloads()
+    {
+        return $this->_iInfScrollAutoPreloads;
+    }
+
+    public function getRssLength()
+    {
+        return $this->_iRssLength;
+    }
+
+    public function getLiveUpdateLength()
+    {
+        return $this->_iLiveUpdateLength;
+    }
+
+    public function getCharsDisplayMinTitle()
+    {
+        return $this->_iCharsDisplayMinTitle;
+    }
+
+    public function getCharsDisplayMaxTitle()
+    {
+        return $this->_iCharsDisplayMaxTitle;
+    }
+
+    public function getBriefCardsTags($bAsString = false)
+    {
+        return !$bAsString ? $this->_aBriefCardsTags : '<' . implode('><', $this->_aBriefCardsTags) . '>';
+    }
+
+    public function getVideosAutoplay()
+    {
+        return $this->_sVideosAutoplay;
+    }
+
+    public function getPreloadComments()
+    {
+        return $this->_iPreloadComments;
+    }
+
+    public function getAttachmentsLayout()
+    {
+        return $this->_sAttachmentsLayout;
+    }
+
+    public function getHotInterval()
+    {
+        return $this->_iHotInterval;
+    }
+
+    public function getRepostDefaults()
+    {
+        return $this->_aRepostDefaults;
+    }
+
+    public function getPregPattern($sType)
+    {
+        return $this->_aPregPatterns[$sType];
+    }
+
+    /**
+     * Ancillary functions
+     */
+    public function getTitle($s, $mixedProfile = false, $sMethodLength = 'getCharsDisplayMaxTitle')
+    {
+        if(get_mb_substr($s, 0, 1) == '_' && strcmp($s, _t($s)) != 0)
+            return $s;
+
+        if($mixedProfile !== false) {
+            if(is_numeric($mixedProfile))
+                $mixedProfile = BxDolProfile::getInstanceMagic((int)$mixedProfile);
+
+            if($mixedProfile instanceof BxDolProfile)
+                $s = bx_replace_markers($s, array(
+                    'profile_name' => $mixedProfile->getDisplayName()
+                ));
+        }
+
+        if(!method_exists($this, $sMethodLength))
+            $sMethodLength = 'getCharsDisplayMaxTitle';
+
+        return strmaxtextlen($s, $this->$sMethodLength(), '...');
+    }
+
+    public function getTitleShort($s, $mixedProfile = false)
+    {
+        return $this->getTitle($s, $mixedProfile, 'getCharsDisplayMinTitle');
+    }
+
+    public function getTitleDefault($bL, $bP, $bV)
+    {
+        $sResult = '';
+
+        if($bL && !$bP && !$bV)
+            $sResult = 'link';
+        else if(!$bL && $bP && !$bV)
+            $sResult = 'image';
+        else if(!$bL && !$bP && $bV)
+            $sResult = 'video';
+        else 
+            $sResult = 'media';
+
+        return $this->CNF['T']['txt_sample_with_' . $sResult];
+    }
+
+    public function getViewUrl($iOwnerId)
+    {
+        return BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php', array(
+        	'i' => $this->CNF['URI_VIEW_LIST'], 
+        	'id' => $iOwnerId
+        ));
+    }
+
+    public function getHomeViewUrl()
+    {
+        return BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($this->CNF['URL_HOME']);
+    }
+
+    public function getItemViewUrl($aEvent)
+    {
+        return BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php', array(
+        	'i' => $this->CNF['URI_VIEW_ENTRY'], 
+        	'id' => $aEvent['id']
+        ));
+    }
+
+    public function getLiveUpdateKey($aParams)
+    {
+        return $this->getName() . '_live_update_' . $this->getNameView($aParams, array('with_owner' => true));
+    }
+
+    //TODO: isCommon and isSystem can be updated to use new 'system' db field.
+    public function isCommon($sType, $sAction)
+    {
+        return !$this->isSystem($sType, $sAction);
+    }
+
+    public function isSystem($sType, $sAction)
+    {
+        $sPrefix = $this->getPrefix('common_post');
+        return strpos($sType, $sPrefix) === false && !empty($sAction);
+    }
+
+    public function getSystemData(&$aEvent, $aBrowseParams = array())
+    {
+        $aHandler = $this->getHandler($aEvent);
+        if($aHandler === false)
+            return false;
+
+        return BxDolService::call($aHandler['module_name'], $aHandler['module_method'], array($aEvent, $aBrowseParams), $aHandler['module_class']);
+    }
+
+    public function getSystemDataByDescriptor($sType, $sAction, $iObjectId)
+    {
+    	$aDescriptor = array(
+            'type' => $sType, 
+            'action' => $sAction,
+            'object_id' => $iObjectId
+    	);
+    	return $this->getSystemData($aDescriptor);
+    }
+
+    public function isEqualUrls($sUrl1, $sUrl2)
+    {
+        $sUrl1 = trim($sUrl1, "/");
+        $sUrl2 = trim($sUrl2, "/");
+
+        return strncmp($sUrl1, $sUrl2, strlen($sUrl1)) === 0;
+    }
+
+    public function addBrowseParams($sUrl, $aParams, $sKey = 'bp')
+    {
+        return bx_append_url_params($sUrl, array($sKey => urlencode(base64_encode(serialize($aParams)))));
+    }
+
+    public function getBrowseParams($sValue)
+    {
+        return unserialize(base64_decode(urldecode($sValue)));
+    }
+}
+
+/** @} */

+ 4488 - 0
modules/boonex/timeline/updates/12.0.2_12.0.3/source/classes/BxTimelineModule.php

@@ -0,0 +1,4488 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Timeline Timeline
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+bx_import('BxDolAcl');
+bx_import('BxBaseModNotificationsModule');
+
+define('BX_TIMELINE_TYPE_ITEM', 'view_item');
+define('BX_TIMELINE_TYPE_OWNER_AND_CONNECTIONS', 'owner_and_connections');
+define('BX_TIMELINE_TYPE_CHANNELS', 'channels'); //--- Followed channels only.
+define('BX_TIMELINE_TYPE_FEED', 'feed'); //--- Owner and folloved contexts excluding channels.
+define('BX_TIMELINE_TYPE_HOT', 'hot'); //--- Aggrigated hot content.
+define('BX_TIMELINE_TYPE_DEFAULT', BX_BASE_MOD_NTFS_TYPE_OWNER);
+
+define('BX_TIMELINE_VIEW_ITEM', 'item');
+define('BX_TIMELINE_VIEW_TIMELINE', 'timeline');
+define('BX_TIMELINE_VIEW_OUTLINE', 'outline');
+define('BX_TIMELINE_VIEW_SEARCH', 'search');
+define('BX_TIMELINE_VIEW_DEFAULT', BX_TIMELINE_VIEW_OUTLINE);
+
+define('BX_TIMELINE_FILTER_ALL', 'all');
+define('BX_TIMELINE_FILTER_OWNER', 'owner');
+define('BX_TIMELINE_FILTER_OTHER', 'other');
+define('BX_TIMELINE_FILTER_OTHER_VIEWER', 'other_viewer');
+
+define('BX_TIMELINE_PARSE_TYPE_POST', 'post');
+define('BX_TIMELINE_PARSE_TYPE_REPOST', 'repost');
+define('BX_TIMELINE_PARSE_TYPE_DEFAULT', BX_TIMELINE_PARSE_TYPE_POST);
+
+define('BX_TIMELINE_STATUS_ACTIVE', 'active');
+define('BX_TIMELINE_STATUS_AWAITING', 'awaiting');
+define('BX_TIMELINE_STATUS_FAILED', 'failed');
+define('BX_TIMELINE_STATUS_HIDDEN', 'hidden');
+define('BX_TIMELINE_STATUS_DELETED', 'deleted');
+
+//--- Video Auto Play 
+define('BX_TIMELINE_VAP_OFF', 'off');
+define('BX_TIMELINE_VAP_ON_MUTE', 'on_mute');
+define('BX_TIMELINE_VAP_ON', 'on');
+
+//--- Media Layouts
+define('BX_TIMELINE_ML_SINGLE', 'single');
+define('BX_TIMELINE_ML_GALLERY', 'gallery');
+define('BX_TIMELINE_ML_SHOWCASE', 'showcase');
+
+//--- Default Attachments Media Layout
+define('BX_TIMELINE_AML_DEFAULT', BX_TIMELINE_ML_GALLERY);
+
+class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolContentInfoService
+{
+    protected $_sJsPostObject;
+    protected $_sJsViewObject;
+    protected $_aPostElements;
+    protected $_sJsOutlineObject;
+
+    protected $_sDividerTemplate;
+    protected $_sBalloonTemplate;
+    protected $_sCmtPostTemplate;
+    protected $_sCmtViewTemplate;
+    protected $_sCmtTemplate;
+
+    /**
+     * Constructor
+     */
+    function __construct($aModule)
+    {
+        parent::__construct($aModule);
+    }
+
+    /**
+     * ACTION METHODS
+     */
+    public function actionVideo($iEventId, $iVideoId)
+    {
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iEventId));
+        if(empty($aEvent) || !is_array($aEvent))
+            return;
+
+        $aData = $this->_oTemplate->getDataCached($aEvent);
+        if($aData === false || !isset($aData['content']['videos'][$iVideoId]))
+            return;
+
+        $oTemplate = BxDolTemplate::getInstance();
+        $oTemplate->addJs(array(
+            'embedly-player.min.js'
+        ));
+        $oTemplate->setPageNameIndex (BX_PAGE_EMBED);
+        $oTemplate->setPageContent ('page_main_code', $this->_oTemplate->getVideo($aEvent, $aData['content']['videos'][$iVideoId]));
+        $oTemplate->getPageCode();
+    }
+
+    public function actionPost()
+    {
+        $this->_iOwnerId = bx_process_input(bx_get('owner_id'), BX_DATA_INT);
+
+        $mixedAllowed = $this->isAllowedPost(true);
+        if($mixedAllowed !== true)
+            return echoJson(array('message' => strip_tags($mixedAllowed)));
+
+        echoJson($this->getFormPost());
+    }
+
+    public function actionEdit($iId)
+    {
+        $this->_iOwnerId = bx_process_input(bx_get('owner_id'), BX_DATA_INT);
+
+        $aBrowseParams = array();
+        if(bx_get('bp') !== false)
+            $aBrowseParams = $this->_oConfig->getBrowseParams(bx_process_input(bx_get('bp')));
+
+        $mixedAllowed = $this->isAllowedPost(true);
+        if($mixedAllowed !== true)
+            return echoJson(array('message' => strip_tags($mixedAllowed)));
+
+        echoJson($this->getFormEdit($iId, array('dynamic_mode' => true), $aBrowseParams));
+    }
+
+    function actionPin()
+    {
+        $iId = bx_process_input(bx_get('id'), BX_DATA_INT);
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iId));
+        if(empty($aEvent) || !is_array($aEvent))
+            return echoJson(array('code' => 1));
+
+        $aParams = $this->_prepareParamsGet();
+        $this->_iOwnerId = $aParams['owner_id'];
+        
+        $mixedAllowed = $this->{'isAllowed' . ((int)$aEvent['pinned'] == 0 ? 'Pin' : 'Unpin')}($aEvent, true);
+        if($mixedAllowed !== true)
+            return echoJson(array('code' => 2, 'message' => strip_tags($mixedAllowed)));
+
+        $aEvent['pinned'] = (int)$aEvent['pinned'] == 0 ? time() : 0;
+        if(!$this->_oDb->updateEvent(array('pinned' => $aEvent['pinned']), array('id' => $iId)))
+            return echoJson(array('code' => 3));
+
+        $this->_oDb->deleteCache(array('context_id' => $this->_iOwnerId)); //--- Delete cache for context
+
+        echoJson(array(
+            'code' => 0, 
+            'id' => $iId, 
+            'eval' => $this->_oConfig->getJsObjectView($aParams) . '.onPinPost(oData)'
+        ));
+    }
+
+    function actionStick()
+    {
+    	$iId = bx_process_input(bx_get('id'), BX_DATA_INT);
+    	$aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iId));
+        if(empty($aEvent) || !is_array($aEvent))
+            return echoJson(array('code' => 1));
+
+        $aParams = $this->_prepareParamsGet();
+        $this->_iOwnerId = $aParams['owner_id'];
+
+    	$mixedAllowed = $this->{'isAllowed' . ((int)$aEvent['sticked'] == 0 ? 'Stick' : 'Unstick')}($aEvent, true);
+    	if($mixedAllowed !== true)
+            return echoJson(array('code' => 2, 'message' => strip_tags($mixedAllowed)));
+
+    	$aEvent['sticked'] = (int)$aEvent['sticked'] == 0 ? time() : 0;
+    	if(!$this->_oDb->updateEvent(array('sticked' => $aEvent['sticked']), array('id' => $iId)))
+            return echoJson(array('code' => 3));
+
+        $this->_oDb->deleteCache(array('context_id' => 0)); //--- Delete cache for Public feed
+        $this->_oDb->deleteCache(array('context_id' => $this->_iOwnerId)); //--- Delete cache for context
+
+        bx_audit(
+            $iId, 
+            $this->getName(), 
+            '_sys_audit_action_' . ((int)$aEvent['sticked'] == 0 ? 'stick' : 'unstick'),  
+            $this->_prepareAuditParams($aEvent, false)
+        );
+        
+    	echoJson(array(
+            'code' => 0,
+            'id' => $iId,
+            'eval' => $this->_oConfig->getJsObjectView($aParams) . '.onStickPost(oData)'
+        ));
+    }
+
+    function actionPromote()
+    {
+        $this->_iOwnerId = bx_process_input(bx_get('owner_id'), BX_DATA_INT);
+
+        $iId = bx_process_input(bx_get('id'), BX_DATA_INT);
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iId));
+
+        $sAction = (int)$aEvent['promoted'] == 0 ? 'promote' : 'unpromote';
+
+        $mixedAllowed = $this->{'isAllowed' . ucfirst($sAction)}($aEvent, true);
+        if($mixedAllowed !== true)
+            return echoJson(array('code' => 1, 'message' => strip_tags($mixedAllowed)));
+
+        $aEvent['promoted'] = (int)$aEvent['promoted'] == 0 ? time() : 0;
+        if(!$this->_oDb->updateEvent(array('promoted' => $aEvent['promoted']), array('id' => $iId)))
+            return echoJson(array('code' => 2));
+
+        $this->_oDb->deleteCache(array('context_id' => 0)); //--- Delete cache for Public feed
+        $this->_oDb->deleteCache(array('context_id' => $this->_iOwnerId)); //--- Delete cache for context
+
+        bx_alert($this->_oConfig->getObject('alert'), $sAction . 'd', $iId, (int)$this->getUserId(), array(
+            'owner_id' => $aEvent['owner_id'],
+            'object_id' => $aEvent['object_id'],
+            'object_author_id' => $this->_oConfig->isSystem($aEvent['type'], $aEvent['action']) ? $aEvent['owner_id'] : $aEvent['object_id']
+        ));
+        
+        bx_audit(
+            $iId, 
+            $this->getName(), 
+            '_sys_audit_action_' . ((int)$aEvent['promoted'] == 0 ? 'promote' : 'unpromote'),  
+            $this->_prepareAuditParams($aEvent, false)
+        );
+
+        echoJson(array(
+            'code' => 0, 
+            'message' => _t('_bx_timeline_txt_msg_performed_action')
+        ));
+    }
+
+    function actionMute()
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $this->_iOwnerId = bx_process_input(bx_get('owner_id'), BX_DATA_INT);
+
+        $iId = bx_process_input(bx_get('id'), BX_DATA_INT);
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iId));
+
+        $mixedAllowed = $this->isAllowedMute($aEvent, true);
+        if($mixedAllowed !== true)
+            return echoJson(array('code' => 1, 'message' => strip_tags($mixedAllowed)));
+
+        $iAuthor = (int)$aEvent[$CNF['FIELD_OWNER_ID']];
+        if(!$this->_oConfig->isSystem($aEvent['type'], $aEvent['action']))
+            $iAuthor = (int)$aEvent[$CNF['FIELD_OBJECT_ID']];
+
+        if(!$this->getConnectionMuteObject()->addConnection($this->_iProfileId, $iAuthor))
+            return echoJson(array('code' => 2));
+
+        $this->_oDb->deleteCache(array('context_id' => 0)); //--- Delete cache for Public feed
+        $this->_oDb->deleteCache(array('context_id' => $this->_iOwnerId)); //--- Delete cache for context
+
+        bx_alert($this->_oConfig->getObject('alert'), 'muted', $iAuthor, $this->_iProfileId, array(
+            'owner_id' => $aEvent['owner_id'],
+            'object_id' => $aEvent['object_id'],
+            'object_author_id' => $this->_oConfig->isSystem($aEvent['type'], $aEvent['action']) ? $aEvent['owner_id'] : $aEvent['object_id']
+        ));
+
+        echoJson(array('code' => 0, 'message' => _t('_bx_timeline_txt_msg_performed_action'), 'reload' => 1));
+    }
+
+    function actionDelete()
+    {
+        $iId = bx_process_input(bx_get('id'), BX_DATA_INT);
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iId));
+        if(empty($aEvent) || !is_array($aEvent))
+            return echoJson(array('code' => 1));
+
+        $aParams = $this->_prepareParamsGet();
+        $this->_iOwnerId = $aParams['owner_id'];
+
+        $mixedAllowed = $this->isAllowedDelete($aEvent, true);
+        if($mixedAllowed !== true)
+            return echoJson(array('code' => 2, 'message' => strip_tags($mixedAllowed)));
+
+        if(!$this->deleteEvent($aEvent))
+            return echoJson(array('code' => 3));
+
+        $this->_oDb->deleteCache(array('event_id' => $iId));
+
+        echoJson(array(
+            'code' => 0, 
+            'id' => $aEvent['id'], 
+            'eval' => $this->_oConfig->getJsObjectView($aParams) . '.onDeletePost(oData)'
+        ));
+    }
+
+    public function actionRepost()
+    {
+    	$iAuthorId = $this->getUserId();
+        $iOwnerId = bx_process_input(bx_get('owner_id'), BX_DATA_INT);
+        $sType = bx_process_input(bx_get('type'), BX_DATA_TEXT);
+        $sAction = bx_process_input(bx_get('action'), BX_DATA_TEXT);
+        $iObjectId = bx_process_input(bx_get('object_id'), BX_DATA_INT);
+
+        $aResult = $this->serviceRepost($iAuthorId, $iOwnerId, $sType, $sAction, $iObjectId);
+        if(!empty($aResult) && is_array($aResult))
+            return echoJson($aResult);
+
+        $aReposted = $this->_oDb->getReposted($sType, $sAction, $iObjectId);
+        $sCounter = $this->_oTemplate->getRepostCounter($aReposted);
+
+        echoJson(array(
+            'code' => 0, 
+            'message' => _t('_bx_timeline_txt_msg_success_repost'), 
+            'count' => $aReposted['reposts'], 
+            'countf' => (int)$aReposted['reposts'] > 0 ? $this->_oTemplate->getRepostCounterLabel($aReposted['reposts']) : '',
+            'counter' => $sCounter,
+            'disabled' => true
+        ));
+    }
+
+    function actionGetView()
+    {
+        $aParams = $this->_prepareParamsGet();
+        $aParams['js_init_view'] = false;
+
+        $sConten = $this->_oTemplate->getViewBlock($aParams);
+        if(empty($sConten))
+            return echoJson(array());
+
+        echoJson(array(
+            'code' => 0, 
+            'content' => $sConten,
+        ));
+    }
+
+    function actionGetPost()
+    {
+        $aParams = $this->_prepareParamsGet();
+        $aParams['dynamic_mode'] = true;
+
+        $this->_iOwnerId = $aParams['owner_id'];
+
+        $sJsObject = ''; 
+        if(bx_get('js_object') !== false)
+            $sJsObject = bx_process_input(bx_get('js_object'));
+        if(empty($sJsObject))
+            $sJsObject = $this->_oConfig->getJsObject('post');
+
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => bx_process_input(bx_get('id'), BX_DATA_INT)));
+        if(empty($aEvent) || !is_array($aEvent))
+            return echoJson(array());
+
+        /**
+         * Note. Disabled for now, because Own posts on Timelines of Following members 
+         * became visible on posts' author Dashboard Timeline.
+         */
+        /*
+        $bAfpsLoading = (int)bx_get('afps_loading') === 1;
+        if($bAfpsLoading && $this->_iOwnerId != $aEvent['owner_id'])
+            return echoJson(array('message' => _t('_bx_timeline_txt_msg_posted')));
+        */
+
+        echoJson(array(
+            'id' => $aEvent['id'],
+            'name' => $aParams['name'],
+            'view' => $aParams['view'],
+            'type' => $aParams['type'],
+            'item' => $this->_oTemplate->getPost($aEvent, $aParams),
+            'eval' => $sJsObject . "._onGetPost(oData)"
+        ));
+    }
+
+    function actionGetPosts()
+    {
+        $aParams = $this->_prepareParamsGet();
+        list($sItems, $sLoadMore, $sBack, $sEmpty, $iEvent, $bEventsToLoad) = $this->_oTemplate->getPosts($aParams);
+
+        echoJson(array(
+            'view' => $aParams['view'],
+            'items' => $sItems,
+            'load_more' => $sLoadMore, 
+            'back' => $sBack,
+            'empty' => $sEmpty,
+            'events_to_load' => $bEventsToLoad,
+            'eval' => $this->_oConfig->getJsObjectView($aParams) . "._onGetPosts(oData)"
+        ));
+    }
+
+    public function actionGetPostForm()
+    {
+        $this->_iOwnerId = bx_process_input(bx_get('owner_id'), BX_DATA_INT);
+        $sType = bx_process_input(bx_get('type'));
+
+        echoJson($this->getFormPost(array(
+            'type' => $sType,
+            'form_display' => $this->_oConfig->getPostFormDisplay($sType)
+        )));
+    }
+
+    public function actionGetEditForm($iId)
+    {
+        $aParams = $this->_prepareParamsGet();
+        $this->_iOwnerId = $aParams['owner_id'];
+
+        echoJson($this->getFormEdit($iId, array('dynamic_mode' => true), $aParams));
+    }
+
+    public function actionGetComments()
+    {
+        $this->_iOwnerId = bx_process_input(bx_get('owner_id'), BX_DATA_INT);
+
+        $sSystem = bx_process_input(bx_get('system'), BX_DATA_TEXT);
+        $iId = bx_process_input(bx_get('id'), BX_DATA_INT);
+        $sComments = $this->_oTemplate->getComments($sSystem, $iId, array('dynamic_mode' => true));
+
+        echoJson(array('content' => $sComments));
+    }
+
+    public function actionAddAttachLink()
+    {
+        $sUrl = bx_process_input(bx_get('url'));
+        if(empty($sUrl))
+            return echoJson(array());
+
+        $sHeader = 'Content-Type';
+        $aHeaders = get_headers($sUrl, 1);
+        if(!empty($aHeaders) && is_array($aHeaders) && !empty($aHeaders[$sHeader])) {
+            $mixedContentType = $aHeaders[$sHeader];
+            if(!is_array($mixedContentType))
+                $mixedContentType = array($mixedContentType);
+
+            foreach($mixedContentType as $sContentType)
+                if(strpos($sContentType, 'image') !== false) 
+                    return echoJson(array());
+        }
+
+        $iEventId = 0;
+        if(bx_get('event_id') !== false)
+            $iEventId = (int)bx_get('event_id');
+
+        echoJson($this->addAttachLink(array(
+            'event_id' => $iEventId,
+            'url' => $sUrl
+        )));
+    }
+
+    public function actionDeleteAttachLink()
+    {
+    	$iUserId = $this->getUserId();
+        $iLinkId = bx_process_input(bx_get('id'), BX_DATA_INT);
+        if(empty($iLinkId))
+            return echoJson(array());
+
+        $aLink = $this->_oDb->getLinksBy(array('type' => 'id', 'id' => $iLinkId, 'profile_id' => $iUserId));
+    	if(empty($aLink) || !is_array($aLink))
+            return echoJson(array());
+
+        if(!empty($aLink['media_id']))
+            BxDolStorage::getObjectInstance($this->_oConfig->getObject('storage_photos'))->deleteFile($aLink['media_id']);
+
+        $aResult = array();
+        if($this->_oDb->deleteLink($iLinkId))
+            $aResult = array('code' => 0);
+        else
+            $aResult = array('code' => 1, 'message' => _t('_bx_timeline_form_post_input_link_err_delete'));
+
+        echoJson($aResult);
+    }
+
+    public function actionGetAttachLinkForm()
+    {
+        $iEventId = 0;
+        if(bx_get('event_id') !== false)
+            $iEventId = (int)bx_get('event_id');
+
+        echo $this->_oTemplate->getAttachLinkForm($iEventId);
+    }
+
+    public function actionSubmitAttachLinkForm()
+    {
+        echoJson($this->getFormAttachLink());
+    }
+
+    public function actionGetRepostedBy()
+    {
+        $iRepostedId = bx_process_input(bx_get('id'), BX_DATA_INT);
+
+        echo $this->_oTemplate->getRepostedBy($iRepostedId);
+    }
+
+    public function actionGetItemBrief()
+    {
+        $iEvent = bx_process_input(bx_get('id'), BX_DATA_INT);
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iEvent));
+        if(empty($aEvent) || !is_array($aEvent)) {
+            echo MsgBox(_t('_Empty'));
+            return;
+        }
+
+        if(!$this->isAllowedView($aEvent)) {
+            echo MsgBox(_t('_sys_access_denied_to_private_content'));
+            return;
+        }        
+
+        echo BxDolPage::getObjectInstance($this->_oConfig->getObject('page_item_brief'), $this->_oTemplate)->getCodeDynamic();
+    }
+
+    public function actionGetJumpTo()
+    {
+        $aParams = $this->_prepareParamsGet();
+        $this->_iOwnerId = $aParams['owner_id'];
+
+        $sJsObjectView = $this->_oConfig->getJsObjectView($aParams);
+
+        echoJson(array(
+            'content' => $this->_oTemplate->getJumpTo($aParams),
+            'eval' => $sJsObjectView . '.onGetJumpTo(oData)'
+        ));
+    }
+
+    public function actionResumeLiveUpdate()
+    {
+        $aParams = $this->_prepareParamsGet();
+    	$sKey = $this->_oConfig->getLiveUpdateKey($aParams);
+
+    	bx_import('BxDolSession');
+    	BxDolSession::getInstance()->unsetValue($sKey);
+    }
+
+    public function actionPauseLiveUpdate()
+    {
+        $aParams = $this->_prepareParamsGet();
+    	$sKey = $this->_oConfig->getLiveUpdateKey($aParams);
+
+    	bx_import('BxDolSession');
+    	BxDolSession::getInstance()->setValue($sKey, 1);
+    }
+
+    function actionRss()
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $aArgs = func_get_args();
+
+        $sType = array_shift($aArgs);
+        $iOwnerId = 0;
+
+        switch($sType) {
+            case BX_BASE_MOD_NTFS_TYPE_OWNER:
+                $iOwnerId = array_shift($aArgs);
+                $sOwnerName = $this->getObjectUser($iOwnerId)->getDisplayName();
+
+                $sRssCaption = _t('_bx_timeline_txt_rss_caption', $sOwnerName);
+                $sRssLink = $this->_oConfig->getViewUrl($iOwnerId);
+                break;
+
+            case BX_BASE_MOD_NTFS_TYPE_PUBLIC:
+                $sRssCaption = _t('_bx_timeline_page_title_view_home');
+                $sRssLink = $this->_oConfig->getHomeViewUrl();
+                break;
+        }
+
+        $aParams = $this->_prepareParams(array(
+            'view' => BX_TIMELINE_VIEW_DEFAULT,
+            'type' => $sType,
+            'owner_id' => $iOwnerId,
+            'start' => 0, 
+            'per_page' => $this->_oConfig->getRssLength(), 
+            'timeline' => 0, 
+            'filter' => '', 
+            'modules' => array()
+        ));
+        $aEvents = $this->_oDb->getEvents($aParams);
+
+        $oPrivacy = BxDolPrivacy::getObjectInstance($this->_oConfig->getObject('privacy_view'));
+
+        $aRssData = array();
+        foreach($aEvents as $aEvent) {
+            if(empty($aEvent['title'])) 
+                continue;
+
+            $iEventId = (int)$aEvent[$CNF['FIELD_ID']];
+            $sEventFieldAuthor = $this->_oConfig->isSystem($aEvent['type'], $aEvent['action']) ? 'owner_id' : 'object_id';
+
+            if($oPrivacy) {
+                $oPrivacy->setTableFieldAuthor($sEventFieldAuthor);
+                if(!$oPrivacy->check($iEventId))
+                    continue;
+            }
+
+            $iOwner = $aEvent[$sEventFieldAuthor];
+            $oOwner = BxDolProfile::getInstanceMagic($iOwner);
+
+            $aRssData[$iEventId] = array(
+               'UnitID' => $iEventId,
+               'UnitTitle' => $aEvent['title'],
+               'UnitLink' => $this->_oConfig->getItemViewUrl($aEvent),
+               'UnitDesc' => bx_replace_markers($aEvent['description'], array(
+                    'profile_name' => $oOwner->getDisplayName()
+                )),
+               'UnitDateTimeUTS' => $aEvent['date'],
+            );
+        }
+
+        $oRss = new BxDolRssFactory();
+
+        header('Content-Type: application/xml; charset=utf-8');
+        echo $oRss->GenRssByData($aRssData, $sRssCaption, $sRssLink);
+    }
+
+
+    /**
+     * SERVICE METHODS
+     */
+
+    public function serviceGetSafeServices()
+    {
+        $a = parent::serviceGetSafeServices();
+        return array_merge($a, array (
+            'GetCreatePostForm' => '',
+            'GetSearchResultUnit' => '',
+            'GetBlockPost' => '',
+            'GetBlockPostProfile' => '',
+            'GetBlockPostHome' => '',
+            'GetBlockPostAccount' => '',
+            'GetBlockView' => '',
+            'GetBlockViewOutline' => '',
+            'GetBlockViewProfile' => '',
+            'GetBlockViewProfileOutline' => '',
+            'GetBlockViewsTimeline' => '',
+            'GetBlockViewsOutline' => '',
+            'GetBlockViewHome' => '',
+            'GetBlockViewHomeOutline' => '',
+            'GetBlockViewHot' => '',
+            'GetBlockViewHotOutline' => '',
+            'GetBlockViewAccount' => '',
+            'GetBlockViewAccountOutline' => '',
+        ));
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_content_owner_profile_id get_content_owner_profile_id
+     * 
+     * @code bx_srv('bx_timeline', 'get_content_owner_profile_id', [...]); @endcode
+     * 
+     * Get event's owner profile id.
+     * 
+     * @param $mixedEvent integer value with event ID or an array with event info.
+     * @return event's owner profile id.
+     * 
+     * @see BxTimelineModule::serviceGetContentOwnerProfileId
+     */
+    /** 
+     * @ref bx_timeline-get_content_owner_profile_id "get_content_owner_profile_id"
+     */
+    public function serviceGetContentOwnerProfileId($mixedEvent)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $iProfile = (int)bx_get_logged_profile_id();
+        if(empty($mixedEvent))
+            return $iProfile;
+
+        if(!is_array($mixedEvent))
+            $mixedEvent = $this->_oDb->getContentInfoById((int)$mixedEvent);
+
+        if(empty($mixedEvent) || !is_array($mixedEvent) || !isset($mixedEvent[$CNF['FIELD_SYSTEM']]))
+            return $iProfile;
+
+        if((int)$mixedEvent[$CNF['FIELD_SYSTEM']] == 0)
+            return (int)$mixedEvent[$CNF['FIELD_OBJECT_ID']];
+
+        if(!empty($mixedEvent['object_owner_id']))
+            return (int)$mixedEvent['object_owner_id'];
+
+        if(!empty($mixedEvent['content'])) {
+            $aContent = unserialize($mixedEvent['content']);
+
+            if(!empty($aContent) && is_array($aContent) && !empty($aContent['object_author_id']))
+                return (int)$aContent['object_author_id'];
+        }
+
+        $aEventData = $this->_oTemplate->getData($mixedEvent);
+        if(!empty($aEventData) && is_array($aEventData) && !empty($aEventData['object_owner_id']))
+            return (int)$aEventData['object_owner_id'];
+
+        return $iProfile;
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_create_post_form get_create_post_form
+     * 
+     * @code bx_srv('bx_timeline', 'get_create_post_form', [...]); @endcode
+     * 
+     * Get form code for add content. Is needed for United Post Form.
+     * 
+     * @param $aParams optional array with parameters(display name, etc)
+     * @return form code or error
+     * 
+     * @see BxTimelineModule::serviceGetCreatePostForm
+     */
+    /** 
+     * @ref bx_timeline-get_create_post_form "get_create_post_form"
+     */
+    public function serviceGetCreatePostForm($aParams = array())
+    {
+    	$aParams = array_merge($this->_aFormParams, $aParams);
+
+        $bContext = $aParams['context_id'] !== false;
+        $this->_iOwnerId = $bContext ? abs($aParams['context_id']) : 0;
+
+    	$oForm = $this->serviceGetObjectForm('add', $aParams);
+    	if(!$oForm)
+            return '';
+
+        $aParams['type'] = BX_BASE_MOD_NTFS_TYPE_PUBLIC;
+        $aParams['form_display'] = 'form_display_post_add_public';
+        if($bContext) {
+            if($aParams['context_id'] < 0) {
+                $aParams['type'] = BX_BASE_MOD_NTFS_TYPE_OWNER;
+                $aParams['form_display'] = 'form_display_post_add_profile';
+            }
+            else {
+                $aParams['type'] = BX_TIMELINE_TYPE_FEED;
+                $aParams['form_display'] = 'form_display_post_add';
+            }
+        }
+
+        if(!empty($aParams['display']))
+            $aParams['form_display'] = $aParams['display'];
+
+    	$aResult = $this->getFormPost($aParams);
+    	if(!empty($aResult['form'])) {
+            $bDynamicMode = isset($aParams['dynamic_mode']) && $aParams['dynamic_mode'];
+
+            $sCode = '';
+            $sCode .= $this->_oTemplate->getJsCodePost($this->_iOwnerId, $aParams, true, $bDynamicMode);
+            $sCode .= $aResult['form'];
+            return $sCode;
+        }
+
+        if(!empty($aResult['message']))
+            return $aResult['message'];
+
+        return '';
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_object_form get_object_form
+     * 
+     * @code bx_srv('bx_timeline', 'get_object_form', [...]); @endcode
+     * 
+     * Get form object for add, edit, view or delete the content.
+     * 
+     * @param $sType 'add' is supported only 
+     * @param $aParams optional array with parameters(display name, etc)
+     * @return form object or false on error
+     * 
+     * @see BxTimelineModule::serviceGetObjectForm
+     */
+    /** 
+     * @ref bx_timeline-get_object_form "get_object_form"
+     */
+    public function serviceGetObjectForm ($sType, $aParams = array())
+    {
+    	if(!in_array($sType, array('add')))
+            return false;
+
+        $bContext = $aParams['context_id'] !== false;
+        if($bContext && ($oContextProfile = BxDolProfile::getInstance(abs($aParams['context_id']))) !== false)
+            if($oContextProfile->checkAllowedPostInProfile() !== CHECK_ACTION_RESULT_ALLOWED)
+                return false;
+
+        $aParams['type'] = BX_BASE_MOD_NTFS_TYPE_PUBLIC;
+        $aParams['form_display'] = 'form_display_post_add_public';
+        if($bContext) {
+            if($aParams['context_id'] < 0) {
+                $aParams['type'] = BX_BASE_MOD_NTFS_TYPE_OWNER;
+                $aParams['form_display'] = 'form_display_post_add_profile';
+            }
+            else {
+                $aParams['type'] = BX_TIMELINE_TYPE_OWNER_AND_CONNECTIONS;
+                $aParams['form_display'] = 'form_display_post_add';
+            }
+        }
+
+        if(!empty($aParams['display']))
+            $aParams['form_display'] = $aParams['display'];
+
+        $oForm = $this->getFormPostObject($aParams);
+
+        bx_alert('system', 'get_object_form', 0, 0, array(
+            'module' => $this->_oConfig->getName(),
+            'type' => $sType,
+            'params' => $aParams,
+            'form' => &$oForm
+        ));
+
+    	return $oForm;
+    }
+    
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection get_timeline_post
+     * @see BxTimelineModule::serviceGetTimelinePost
+     *
+     * Get Timeline post. It's needed for Timeline module.
+     * 
+     * @param $aEvent timeline event array from Timeline module
+     * @return array in special format which is needed specifically for Timeline module to display the data.
+     */
+    public function serviceGetTimelinePost($aEvent, $aBrowseParams = array())
+    {
+        $aContentInfo = $this->_oDb->getContentInfoById($aEvent['object_id']);
+        if(empty($aContentInfo) || !is_array($aContentInfo))
+            return false;
+
+        $aEvent = array_merge($aEvent, array(
+            'owner_id' => $aContentInfo['owner_id'],
+            'object_privacy_view' => $aContentInfo['object_privacy_view']
+        ));
+
+        /*
+         * Note. For 'Direct Timeline Posts' FIELD_OBJECT_ID contains post's author profile ID.
+         */
+        $this->_oConfig->CNF['FIELD_AUTHOR'] = $this->_oConfig->CNF['FIELD_OBJECT_ID'];
+        return parent::serviceGetTimelinePost($aEvent, $aBrowseParams);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection get_timeline_post
+     * @see BxTimelineModule::serviceGetTimelinePostAllowedView
+     *
+     * Check Timeline post's visibility. It's needed for Timeline module, when its events 
+     * are accessed and checked from outside. For example, when they are referenced 
+     * from Channels module.
+     * 
+     * @param $aEvent timeline event array from Timeline module
+     * @return mixed value: CHECK_ACTION_RESULT_ALLOWED or text of some error message.
+     */
+    public function serviceGetTimelinePostAllowedView($aEvent)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $iOwnerId = (int)$aEvent[$CNF['FIELD_OWNER_ID']];
+        if($iOwnerId == 0)
+            return CHECK_ACTION_RESULT_ALLOWED;
+
+        $oOwner = BxDolProfile::getInstance($iOwnerId);
+        if(!$oOwner)
+            return CHECK_ACTION_RESULT_ALLOWED;
+
+        $sModule = $oOwner->getModule();
+        $aOwnerInfo = BxDolService::call($sModule, 'get_info', array($oOwner->getContentId(), false));
+        if(empty($aOwnerInfo) || !is_array($aOwnerInfo))
+            return CHECK_ACTION_RESULT_ALLOWED;
+
+        return BxDolService::call($sModule, 'check_allowed_view_for_profile', array($aOwnerInfo));
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_author get_author
+     * 
+     * @code bx_srv('bx_timeline', 'get_author', [...]); @endcode
+     * 
+     * Get author ID from content info by content ID. Is used in "Content Info Objects" system.
+     * 
+     * @param $iContentId integer value with content ID.
+     * @return integer value with author ID.
+     * 
+     * @see BxTimelineModule::serviceGetAuthor
+     */
+    /** 
+     * @ref bx_timeline-get_author "get_author"
+     */
+    public function serviceGetAuthor ($iContentId)
+    {
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iContentId));
+        if(empty($aEvent) || !is_array($aEvent))
+            return 0;
+
+        return $this->_oConfig->isSystem($aEvent['type'], $aEvent['action']) ? (int)$aEvent['owner_id'] : (int)$aEvent['object_id'];
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_date_changed get_date_changed
+     * 
+     * @code bx_srv('bx_timeline', 'get_date_changed', [...]); @endcode
+     * 
+     * Get date when the content was changed last time. Is used in "Content Info Objects" system.
+     * Note. In case of Timeline event 0 is returned everytime.
+     * 
+     * @param $iContentId integer value with content ID.
+     * @return integer value with changing date.
+     * 
+     * @see BxTimelineModule::serviceGetDateChanged
+     */
+    /** 
+     * @ref bx_timeline-get_date_changed "get_date_changed"
+     */
+    public function serviceGetDateChanged ($iContentId)
+    {
+        return 0;
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_link get_link
+     * 
+     * @code bx_srv('bx_timeline', 'get_link', [...]); @endcode
+     * 
+     * Get content view page link. Is used in "Content Info Objects" system.
+     * 
+     * @param $iContentId integer value with content ID.
+     * @return string value with view page link.
+     * 
+     * @see BxTimelineModule::serviceGetLink
+     */
+    /** 
+     * @ref bx_timeline-get_link "get_link"
+     */
+    public function serviceGetLink ($iContentId)
+    {
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iContentId));
+        if(empty($aEvent) || !is_array($aEvent))
+            return '';
+
+        return $this->_oConfig->getItemViewUrl($aEvent);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_thumb get_thumb
+     * 
+     * @code bx_srv('bx_timeline', 'get_thumb', [...]); @endcode
+     * 
+     * Get content thumbnail link. Is used in "Content Info Objects" system.
+     * Note. In case of Timeline event an empty string is returned everytime.
+     * 
+     * @param $iContentId integer value with content ID.
+     * @param $sTranscoder (optional) string value with transcoder name which should be applied to thumbnail image.
+     * @return string value with thumbnail link.
+     * 
+     * @see BxTimelineModule::serviceGetThumb
+     */
+    /** 
+     * @ref bx_timeline-get_thumb "get_thumb"
+     */
+    public function serviceGetThumb ($iContentId, $sTranscoder = '') 
+    {
+        return '';
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_info get_info
+     * 
+     * @code bx_srv('bx_timeline', 'get_info', [...]); @endcode
+     * 
+     * Get content info by content ID. Is used in "Content Info Objects" system.
+     * 
+     * @param $iContentId integer value with content ID.
+     * @param $bSearchableFieldsOnly (optional) boolean value determining all info or "searchable fields" only will be returned.
+     * @return an array with content info. Empty array is returned if something is wrong.
+     * 
+     * @see BxTimelineModule::serviceGetInfo
+     */
+    /** 
+     * @ref bx_timeline-get_info "get_info"
+     */
+    public function serviceGetInfo ($iContentId, $bSearchableFieldsOnly = true)
+    {
+        $aContentInfo = $this->_oDb->getEvents(array(
+        	'browse' => 'id', 
+        	'value' => $iContentId)
+        );
+
+        return BxDolContentInfo::formatFields($aContentInfo);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_search_result_unit get_search_result_unit
+     * 
+     * @code bx_srv('bx_timeline', 'get_search_result_unit', [...]); @endcode
+     * 
+     * Get search result unit by content ID. Is used in "Content Info Objects" system.
+     * 
+     * @param $iContentId integer value with content ID.
+     * @param $sUnitTemplate (optional) string value with template name.
+     * @return HTML string with search result unit. Empty string is returned if something is wrong.
+     * 
+     * @see BxTimelineModule::serviceGetSearchResultUnit
+     */
+    /** 
+     * @ref bx_timeline-get_search_result_unit "get_search_result_unit"
+     */
+    public function serviceGetSearchResultUnit ($iContentId, $sUnitTemplate = '')
+    {
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iContentId));
+        if(empty($aEvent) || !is_array($aEvent))
+            return '';
+
+        if(empty($sUnitTemplate))
+            $sUnitTemplate = 'unit.html';
+
+        return $this->_oTemplate->unit($aEvent, true, $sUnitTemplate);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_post get_block_post
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_post', [...]); @endcode
+     * 
+     * Get Post block for a separate page.
+     *
+     * @param $iProfileId (optional) profile ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockPost
+     */
+    /** 
+     * @ref bx_timeline-get_block_post "get_block_post"
+     */
+    public function serviceGetBlockPost($iProfileId = 0)
+    {
+    	if(empty($iProfileId) && bx_get('profile_id') !== false)
+            $iProfileId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
+
+        if(empty($iProfileId) && isLogged())
+            $iProfileId = bx_get_logged_profile_id();
+
+        if(!$iProfileId)
+            return array();
+
+        $sType = BX_BASE_MOD_NTFS_TYPE_OWNER;
+        return $this->_getBlockPost($iProfileId, array(
+            'type' => $sType,
+            'form_display' => $this->_oConfig->getPostFormDisplay($sType)
+        ));
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_post_profile get_block_post_profile
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_post_profile', [...]); @endcode
+     * 
+     * Get Post block for the Profile page.
+     *
+     * @param $sProfileModule (optional) string value with profile based module name. Persons module is used by default.
+     * @param $iProfileContentId (optional) profile's content ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockPostProfile
+     */
+    /** 
+     * @ref bx_timeline-get_block_post_profile "get_block_post_profile"
+     */
+    public function serviceGetBlockPostProfile($sProfileModule = 'bx_persons', $iProfileContentId = 0)
+    {
+        if(empty($sProfileModule))
+            return array();
+
+    	if(empty($iProfileContentId) && bx_get('id') !== false)
+            $iProfileContentId = bx_process_input(bx_get('id'), BX_DATA_INT);
+
+        $oProfile = BxDolProfile::getInstanceByContentAndType($iProfileContentId, $sProfileModule);
+        if(empty($oProfile))
+            return array();
+
+        $iProfileId = $oProfile->id();
+        $sType = BX_BASE_MOD_NTFS_TYPE_OWNER;
+        return $this->_getBlockPost($iProfileId, array(
+            'type' => $sType,
+            'form_display' => $this->_oConfig->getPostFormDisplay($sType)
+        ));
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_post_home get_block_post_home
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_post_home', [...]); @endcode
+     * 
+     * Get Post block for site's Home page.
+     *
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockPostHome
+     */
+    /** 
+     * @ref bx_timeline-get_block_post_home "get_block_post_home"
+     */
+    public function serviceGetBlockPostHome()
+    {
+        $iProfileId = 0;
+        $sType = BX_BASE_MOD_NTFS_TYPE_PUBLIC;
+        return $this->_getBlockPost($iProfileId, array(
+            'type' => $sType,
+            'form_display' => $this->_oConfig->getPostFormDisplay($sType)
+        ));
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_post_account get_block_post_account
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_post_account', [...]); @endcode
+     * 
+     * Get Post block for the Dashboard page.
+     *
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockPostAccount
+     */
+    /** 
+     * @ref bx_timeline-get_block_post_account "get_block_post_account"
+     */
+    public function serviceGetBlockPostAccount()
+    {
+        if(!isLogged())
+            return '';
+
+        $iProfileId = $this->getProfileId();
+        $sType = BX_TIMELINE_TYPE_FEED;
+        return $this->_getBlockPost($iProfileId, array(
+            'type' => $sType,
+            'form_display' => $this->_oConfig->getPostFormDisplay($sType)
+        ));
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view get_block_view
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view', [...]); @endcode
+     * 
+     * Get Timeline View block for a separate page.
+     *
+     * @param $iProfileId (optional) profile ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockView
+     */
+    /** 
+     * @ref bx_timeline-get_block_view "get_block_view"
+     */
+    public function serviceGetBlockView($iProfileId = 0)
+    {
+    	return $this->_serviceGetBlockView($iProfileId, array(
+            'view' => BX_TIMELINE_VIEW_TIMELINE, 
+            'type' => BX_BASE_MOD_NTFS_TYPE_OWNER, 
+            'start' => -1, 
+            'per_page' => -1, 
+            'per_page_default' => $this->_oConfig->getPerPage('profile'), 
+            'timeline' => -1, 
+            'filter' => '', 
+            'modules' => array()
+        ));
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view_outline get_block_view_outline
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view_outline', [...]); @endcode
+     * 
+     * Get Outline View block for a separate page.
+     * 
+     * @param $iProfileId (optional) profile ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockViewOutline
+     */
+    /** 
+     * @ref bx_timeline-get_block_view_outline "get_block_view_outline"
+     */
+    public function serviceGetBlockViewOutline($iProfileId = 0)
+    {
+        return $this->_serviceGetBlockView($iProfileId, array(
+            'view' => BX_TIMELINE_VIEW_OUTLINE, 
+            'type' => BX_BASE_MOD_NTFS_TYPE_OWNER, 
+            'start' => -1, 
+            'per_page' => -1, 
+            'per_page_default' => $this->_oConfig->getPerPage('profile'), 
+            'timeline' => -1, 
+            'filter' => '', 
+            'modules' => array()
+        ));
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view_profile get_block_view_profile
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view_profile', [...]); @endcode
+     * 
+     * Get Timeline View block for the Profile page.
+     * 
+     * @param $sProfileModule (optional) string value with profile based module name. Persons module is used by default.
+     * @param $iProfileContentId (optional) profile's content ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @param $iStart (optional) integer value with a page number. Is used in pagination.
+     * @param $iPerPage (optional) integer value with a number of items per page. Is used in pagination. 
+     * @param $sFilter (optional) string value with filter name.
+     * @param $aModules (optional) an array of modules from which the events should be displayed. All available modules are used by default.
+     * @param $iTimeline (optional) integer value determining whether the timeline should be displayed or not.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockViewProfile
+     */
+    /** 
+     * @ref bx_timeline-get_block_view_profile "get_block_view_profile"
+     */
+    public function serviceGetBlockViewProfile($sProfileModule = 'bx_persons', $iProfileContentId = 0, $iStart = -1, $iPerPage = -1, $sFilter = '', $aModules = array(), $iTimeline = -1)
+    {
+        return $this->_serviceGetBlockViewProfile($sProfileModule, $iProfileContentId, array(
+            'view' => BX_TIMELINE_VIEW_TIMELINE, 
+            'type' => BX_BASE_MOD_NTFS_TYPE_OWNER, 
+            'start' => $iStart, 
+            'per_page' => $iPerPage, 
+            'per_page_default' => $this->_oConfig->getPerPage('profile'), 
+            'timeline' => $iTimeline, 
+            'filter' => $sFilter, 
+            'modules' => $aModules
+        ));
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view_profile_outline get_block_view_profile_outline
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view_profile_outline', [...]); @endcode
+     * 
+     * Get Outline View block for the Profile page.
+     * 
+     * @param $sProfileModule (optional) string value with profile based module name. Persons module is used by default.
+     * @param $iProfileContentId (optional) profile's content ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @param $iStart (optional) integer value with a page number. Is used in pagination.
+     * @param $iPerPage (optional) integer value with a number of items per page. Is used in pagination. 
+     * @param $sFilter (optional) string value with filter name.
+     * @param $aModules (optional) an array of modules from which the events should be displayed. All available modules are used by default.
+     * @param $iTimeline (optional) integer value determining whether the timeline should be displayed or not.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockViewProfileOutline
+     */
+    /** 
+     * @ref bx_timeline-get_block_view_profile_outline "get_block_view_profile_outline"
+     */
+    public function serviceGetBlockViewProfileOutline($sProfileModule = 'bx_persons', $iProfileContentId = 0, $iStart = -1, $iPerPage = -1, $sFilter = '', $aModules = array(), $iTimeline = -1)
+    {
+        return $this->_serviceGetBlockViewProfile($sProfileModule, $iProfileContentId, array(
+            'view' => BX_TIMELINE_VIEW_OUTLINE, 
+            'type' => BX_BASE_MOD_NTFS_TYPE_OWNER, 
+            'start' => $iStart, 
+            'per_page' => $iPerPage, 
+            'per_page_default' => $this->_oConfig->getPerPage('profile'), 
+            'timeline' => $iTimeline, 
+            'filter' => $sFilter, 
+            'modules' => $aModules
+        ));
+    }
+
+    public function serviceGetBlockViewsCustom($aParams = array())
+    {
+        $aParams = array_merge(array(
+            'view' => BX_TIMELINE_VIEW_TIMELINE, 
+            'type' => BX_BASE_MOD_NTFS_TYPE_PUBLIC,
+            'owner_id' => 0,
+        ), $aParams);
+
+    	return $this->_serviceGetBlockViews($aParams);
+    }
+
+    public function serviceGetBlockViewsTimeline($sType = BX_BASE_MOD_NTFS_TYPE_PUBLIC, $iProfileId = 0, $iStart = -1, $iPerPage = -1, $iTimeline = -1, $sFilter = '', $aModules = array())
+    {
+        return $this->_serviceGetBlockViews(array(
+            'view' => BX_TIMELINE_VIEW_TIMELINE, 
+            'type' => $sType,
+            'owner_id' => $iProfileId,
+            'start' => $iStart, 
+            'per_page' => $iPerPage, 
+            'per_page_default' => $this->_oConfig->getPerPage(), 
+            'timeline' => $iTimeline, 
+            'filter' => $sFilter, 
+            'modules' => $aModules
+        ));
+    }
+    
+    public function serviceGetBlockViewsOutline($sType = BX_BASE_MOD_NTFS_TYPE_PUBLIC, $iProfileId = 0, $iStart = -1, $iPerPage = -1, $iTimeline = -1, $sFilter = '', $aModules = array())
+    {
+        return $this->_serviceGetBlockViews(array(
+            'view' => BX_TIMELINE_VIEW_OUTLINE, 
+            'type' => $sType,
+            'owner_id' => $iProfileId,
+            'start' => $iStart, 
+            'per_page' => $iPerPage, 
+            'per_page_default' => $this->_oConfig->getPerPage(), 
+            'timeline' => $iTimeline, 
+            'filter' => $sFilter, 
+            'modules' => $aModules
+        ));
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view_home get_block_view_home
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view_home', [...]); @endcode
+     * 
+     * Get Timeline View block for site's Home page.
+     * 
+     * @param $iProfileId (optional) profile ID. 0 should be used here.
+     * @param $iStart (optional) integer value with a page number. Is used in pagination.
+     * @param $iPerPage (optional) integer value with a number of items per page. Is used in pagination.
+     * @param $iTimeline (optional) integer value determining whether the timeline should be displayed or not. 
+     * @param $sFilter (optional) string value with filter name.
+     * @param $aModules (optional) an array of modules from which the events should be displayed. All available modules are used by default.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockViewHome
+     */
+    /** 
+     * @ref bx_timeline-get_block_view_home "get_block_view_home"
+     */
+    public function serviceGetBlockViewHome($iProfileId = 0, $iStart = -1, $iPerPage = -1, $iTimeline = -1, $sFilter = '', $aModules = array())
+    {
+        return $this->_serviceGetBlockViewHome(array(
+            'view' => BX_TIMELINE_VIEW_TIMELINE, 
+            'type' => BX_BASE_MOD_NTFS_TYPE_PUBLIC,
+            'owner_id' => $iProfileId,
+            'start' => $iStart, 
+            'per_page' => $iPerPage, 
+            'per_page_default' => $this->_oConfig->getPerPage('home'), 
+            'timeline' => $iTimeline, 
+            'filter' => $sFilter, 
+            'modules' => $aModules
+        ));
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view_home_outline get_block_view_home_outline
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view_home_outline', [...]); @endcode
+     * 
+     * Get Outline View block for site's Home page.
+     * 
+     * @param $iProfileId (optional) profile ID. 0 should be used here.
+     * @param $iStart (optional) integer value with a page number. Is used in pagination.
+     * @param $iPerPage (optional) integer value with a number of items per page. Is used in pagination.
+     * @param $iTimeline (optional) integer value determining whether the timeline should be displayed or not. 
+     * @param $sFilter (optional) string value with filter name.
+     * @param $aModules (optional) an array of modules from which the events should be displayed. All available modules are used by default.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockViewHomeOutline
+     */
+    /** 
+     * @ref bx_timeline-get_block_view_home_outline "get_block_view_home_outline"
+     */
+    public function serviceGetBlockViewHomeOutline($iProfileId = 0, $iStart = -1, $iPerPage = -1, $iTimeline = -1, $sFilter = '', $aModules = array())
+    {
+        return $this->_serviceGetBlockViewHome(array(
+            'view' => BX_TIMELINE_VIEW_OUTLINE, 
+            'type' => BX_BASE_MOD_NTFS_TYPE_PUBLIC,
+            'owner_id' => $iProfileId,
+            'start' => $iStart, 
+            'per_page' => $iPerPage, 
+            'per_page_default' => $this->_oConfig->getPerPage('home'), 
+            'timeline' => $iTimeline, 
+            'filter' => $sFilter, 
+            'modules' => $aModules
+        ));
+    }
+
+	/**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view_hot get_block_view_hot
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view_hot', [...]); @endcode
+     * 
+     * Get Timeline View block with Hot public events.
+     * 
+     * @param $iProfileId (optional) profile ID. 0 should be used here.
+     * @param $iStart (optional) integer value with a page number. Is used in pagination.
+     * @param $iPerPage (optional) integer value with a number of items per page. Is used in pagination.
+     * @param $iTimeline (optional) integer value determining whether the timeline should be displayed or not. 
+     * @param $sFilter (optional) string value with filter name.
+     * @param $aModules (optional) an array of modules from which the events should be displayed. All available modules are used by default.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockViewHot
+     */
+    /** 
+     * @ref bx_timeline-get_block_view_hot "get_block_view_hot"
+     */
+    public function serviceGetBlockViewHot($iProfileId = 0, $iStart = -1, $iPerPage = -1, $iTimeline = -1, $sFilter = '', $aModules = array())
+    {
+        return $this->_serviceGetBlockViewHot(array(
+            'view' => BX_TIMELINE_VIEW_TIMELINE, 
+            'type' => BX_TIMELINE_TYPE_HOT,
+            'owner_id' => $iProfileId,
+            'start' => $iStart, 
+            'per_page' => $iPerPage, 
+            'per_page_default' => $this->_oConfig->getPerPage('home'), 
+            'timeline' => $iTimeline, 
+            'filter' => $sFilter, 
+            'modules' => $aModules
+        ));
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view_hot_outline get_block_view_hot_outline
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view_hot_outline', [...]); @endcode
+     * 
+     * Get Outline View block with Hot public events.
+     * 
+     * @param $iProfileId (optional) profile ID. 0 should be used here.
+     * @param $iStart (optional) integer value with a page number. Is used in pagination.
+     * @param $iPerPage (optional) integer value with a number of items per page. Is used in pagination.
+     * @param $iTimeline (optional) integer value determining whether the timeline should be displayed or not. 
+     * @param $sFilter (optional) string value with filter name.
+     * @param $aModules (optional) an array of modules from which the events should be displayed. All available modules are used by default.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockViewHotOutline
+     */
+    /** 
+     * @ref bx_timeline-get_block_view_hot_outline "get_block_view_hot_outline"
+     */
+    public function serviceGetBlockViewHotOutline($iProfileId = 0, $iStart = -1, $iPerPage = -1, $iTimeline = -1, $sFilter = '', $aModules = array())
+    {
+        return $this->_serviceGetBlockViewHot(array(
+            'view' => BX_TIMELINE_VIEW_OUTLINE, 
+            'type' => BX_TIMELINE_TYPE_HOT, 
+            'owner_id' => $iProfileId, 
+            'start' => $iStart, 
+            'per_page' => $iPerPage, 
+            'per_page_default' => $this->_oConfig->getPerPage('home'), 
+            'timeline' => $iTimeline, 
+            'filter' => $sFilter, 
+            'modules' => $aModules
+        ));
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view_account get_block_view_account
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view_account', [...]); @endcode
+     * 
+     * Get Timeline View block for the Dashboard page.
+     * 
+     * @param $iProfileId (optional) profile ID. 0 should be used here.
+     * @param $iStart (optional) integer value with a page number. Is used in pagination.
+     * @param $iPerPage (optional) integer value with a number of items per page. Is used in pagination.
+     * @param $iTimeline (optional) integer value determining whether the timeline should be displayed or not. 
+     * @param $sFilter (optional) string value with filter name.
+     * @param $aModules (optional) an array of modules from which the events should be displayed. All available modules are used by default.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockViewAccount
+     */
+    /** 
+     * @ref bx_timeline-get_block_view_account "get_block_view_account"
+     */
+    public function serviceGetBlockViewAccount($iProfileId = 0, $iStart = -1, $iPerPage = -1, $iTimeline = -1, $sFilter = '', $aModules = array())
+    {
+        if(!isLogged())
+            return '';
+
+        return $this->_serviceGetBlockViewByType(array(
+            'view' => BX_TIMELINE_VIEW_TIMELINE, 
+            'type' => BX_TIMELINE_TYPE_OWNER_AND_CONNECTIONS, 
+            'owner_id' => $iProfileId, 
+            'start' => $iStart, 
+            'per_page' => $iPerPage, 
+            'per_page_default' => $this->_oConfig->getPerPage('account'), 
+            'timeline' => $iTimeline, 
+            'filter' => $sFilter, 
+            'modules' => $aModules
+        ));
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view_account_outline get_block_view_account_outline
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view_account_outline', [...]); @endcode
+     * 
+     * Get Outline View block for the Dashboard page.
+     * 
+     * @param $iProfileId (optional) profile ID. 0 should be used here.
+     * @param $iStart (optional) integer value with a page number. Is used in pagination.
+     * @param $iPerPage (optional) integer value with a number of items per page. Is used in pagination.
+     * @param $iTimeline (optional) integer value determining whether the timeline should be displayed or not. 
+     * @param $sFilter (optional) string value with filter name.
+     * @param $aModules (optional) an array of modules from which the events should be displayed. All available modules are used by default.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockViewAccountOutline
+     */
+    /** 
+     * @ref bx_timeline-get_block_view_account_outline "get_block_view_account_outline"
+     */
+    public function serviceGetBlockViewAccountOutline($iProfileId = 0, $iStart = -1, $iPerPage = -1, $iTimeline = -1, $sFilter = '', $aModules = array())
+    {
+        if(!isLogged())
+            return '';
+
+        return $this->_serviceGetBlockViewByType(array(
+            'view' => BX_TIMELINE_VIEW_OUTLINE, 
+            'type' => BX_TIMELINE_TYPE_OWNER_AND_CONNECTIONS,
+            'owner_id' => $iProfileId, 
+            'start' => $iStart, 
+            'per_page' => $iPerPage, 
+            'per_page_default' => $this->_oConfig->getPerPage('account'), 
+            'timeline' => $iTimeline, 
+            'filter' => $sFilter, 
+            'modules' => $aModules
+        ));
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view_custom get_block_view_custom
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view_custom', [...]); @endcode
+     * 
+     * Get custom Timeline View block.
+     *
+     * @param $aParams (optional) an array with block parameneters.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockViewCustom
+     */
+    /** 
+     * @ref bx_timeline-get_block_view_custom "get_block_view_custom"
+     */
+    public function serviceGetBlockViewCustom($aParams = array())
+    {
+    	return $this->_serviceGetBlockViewByType($aParams);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_item get_block_item
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_item', [...]); @endcode
+     * 
+     * Get View Item block.
+     * 
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockItem
+     */
+    /** 
+     * @ref bx_timeline-get_block_item "get_block_item"
+     */
+    public function serviceGetBlockItem()
+    {
+        $iItemId = bx_process_input(bx_get('id'), BX_DATA_INT);
+        if(!$iItemId)
+            return array();
+
+        $aParams = $this->_prepareParams(array(
+            'view' => BX_TIMELINE_VIEW_ITEM, 
+            'type' => BX_TIMELINE_TYPE_ITEM
+        ));
+
+        $aItemData = $this->getItemData($iItemId, $aParams);
+        return $this->_oTemplate->getItemBlock($aItemData, $aParams);
+    }
+    
+    public function serviceGetBlockItemContent()
+    {
+        $iItemId = bx_process_input(bx_get('id'), BX_DATA_INT);
+        $sMode = bx_process_input(bx_get('mode'));
+        if(!$iItemId || !$sMode)
+            return '';
+            
+        return $this->_oTemplate->getItemBlockContent($iItemId, $sMode);
+    }
+    
+    public function serviceGetBlockItemInfo()
+    {
+        $iItemId = bx_process_input(bx_get('id'), BX_DATA_INT);
+        if(!$iItemId)
+            return '';
+
+        return $this->_oTemplate->getItemBlockInfo($iItemId);
+    }
+
+    public function serviceGetBlockItemComments()
+    {
+        $iItemId = bx_process_input(bx_get('id'), BX_DATA_INT);
+        if(!$iItemId)
+            return '';
+
+        return $this->_oTemplate->getItemBlockComments($iItemId);
+    }
+
+    public function serviceGetBlockMuted($iProfileId = 0)
+    {
+        if($iProfileId == 0)
+            $iProfileId = $this->_iProfileId;
+
+        $oGrid = BxDolGrid::getObjectInstance($this->_oConfig->getObject('grid_mute'));
+        if(!$oGrid)
+            return MsgBox('_Empty');
+
+        $oGrid->setProfile($iProfileId);
+        return $oGrid->getCode();
+    }
+    
+    public function serviceGetTimelineRepostAllowedView($aEvent)
+    {
+        return isset($aEvent['content']['allowed_view']) ? $aEvent['content']['allowed_view'] : CHECK_ACTION_RESULT_ALLOWED;
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-integration_notifications Integration with Notifications
+     * @subsubsection bx_timeline-get_notifications_data get_notifications_data
+     * 
+     * @code bx_srv('bx_timeline', 'get_notifications_data', [...]); @endcode
+     * 
+     * Data for Notifications module.
+     * 
+     * @return an array with special format.
+     * 
+     * @see BxTimelineModule::serviceGetNotificationsData
+     */
+    /** 
+     * @ref bx_timeline-get_notifications_data "get_notifications_data"
+     */
+    public function serviceGetNotificationsData()
+    {
+    	$sModule = $this->_aModule['name'];
+
+        return array(
+            'handlers' => array(
+                array('group' => $sModule . '_object', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'post_common', 'module_name' => $sModule, 'module_method' => 'get_notifications_post', 'module_class' => 'Module'),
+                array('group' => $sModule . '_object', 'type' => 'delete', 'alert_unit' => $sModule, 'alert_action' => 'delete'),
+
+                array('group' => $sModule . '_object_publish_failed', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'publish_failed', 'module_name' => $sModule, 'module_method' => 'get_notifications_post_publish_failed', 'module_class' => 'Module'),
+                array('group' => $sModule . '_object_publish_succeeded', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'publish_succeeded', 'module_name' => $sModule, 'module_method' => 'get_notifications_post_publish_succeeded', 'module_class' => 'Module'),
+
+                array('group' => $sModule . '_repost', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'repost', 'module_name' => $sModule, 'module_method' => 'get_notifications_repost', 'module_class' => 'Module'),
+                array('group' => $sModule . '_repost', 'type' => 'delete', 'alert_unit' => $sModule, 'alert_action' => 'delete_repost'),
+
+                array('group' => $sModule . '_comment', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'commentPost', 'module_name' => $sModule, 'module_method' => 'get_notifications_comment', 'module_class' => 'Module'),
+                array('group' => $sModule . '_comment', 'type' => 'delete', 'alert_unit' => $sModule, 'alert_action' => 'commentRemoved'),
+
+                array('group' => $sModule . '_vote', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'doVote', 'module_name' => $sModule, 'module_method' => 'get_notifications_vote', 'module_class' => 'Module'),
+                array('group' => $sModule . '_vote', 'type' => 'delete', 'alert_unit' => $sModule, 'alert_action' => 'undoVote'),
+
+                array('group' => $sModule . '_reaction', 'type' => 'insert', 'alert_unit' => $sModule . '_reactions', 'alert_action' => 'doVote', 'module_name' => $sModule, 'module_method' => 'get_notifications_reaction', 'module_class' => 'Module'),
+                array('group' => $sModule . '_reaction', 'type' => 'delete', 'alert_unit' => $sModule . '_reactions', 'alert_action' => 'undoVote'),
+
+                array('group' => $sModule . '_score_up', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'doVoteUp', 'module_name' => $sModule, 'module_method' => 'get_notifications_score_up', 'module_class' => 'Module'),
+
+                array('group' => $sModule . '_score_down', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'doVoteDown', 'module_name' => $sModule, 'module_method' => 'get_notifications_score_down', 'module_class' => 'Module'),
+            ),
+            'settings' => array(
+                array('group' => 'content', 'unit' => $sModule, 'action' => 'post_common', 'types' => array('personal', 'follow_member', 'follow_context')),
+                array('group' => 'content', 'unit' => $sModule, 'action' => 'publish_failed', 'types' => array('personal')),
+                array('group' => 'content', 'unit' => $sModule, 'action' => 'publish_succeeded', 'types' => array('personal')),
+                array('group' => 'content', 'unit' => $sModule, 'action' => 'repost', 'types' => array('follow_member', 'follow_context')),
+                array('group' => 'comment', 'unit' => $sModule, 'action' => 'commentPost', 'types' => array('personal', 'follow_member', 'follow_context')),
+                array('group' => 'vote', 'unit' => $sModule, 'action' => 'doVote', 'types' => array('personal', 'follow_member', 'follow_context')),
+                array('group' => 'vote', 'unit' => $sModule . '_reactions', 'action' => 'doVote', 'types' => array('personal', 'follow_member', 'follow_context')),
+                array('group' => 'score_up', 'unit' => $sModule, 'action' => 'doVoteUp', 'types' => array('personal', 'follow_member', 'follow_context')),
+                array('group' => 'score_down', 'unit' => $sModule, 'action' => 'doVoteDown', 'types' => array('personal', 'follow_member', 'follow_context'))
+            ),
+            'alerts' => array(
+                array('unit' => $sModule, 'action' => 'post_common'),
+                array('unit' => $sModule, 'action' => 'publish_failed'),
+                array('unit' => $sModule, 'action' => 'publish_succeeded'),
+                array('unit' => $sModule, 'action' => 'delete'),
+
+                array('unit' => $sModule, 'action' => 'repost'),
+                array('unit' => $sModule, 'action' => 'delete_repost'),
+                
+                array('unit' => $sModule, 'action' => 'commentPost'),
+                array('unit' => $sModule, 'action' => 'commentRemoved'),
+                
+                array('unit' => $sModule, 'action' => 'doVote'),
+                array('unit' => $sModule, 'action' => 'undoVote'),
+
+                array('unit' => $sModule . '_reactions', 'action' => 'doVote'),
+                array('unit' => $sModule . '_reactions', 'action' => 'undoVote'),
+
+                array('unit' => $sModule, 'action' => 'doVoteUp'),
+                array('unit' => $sModule, 'action' => 'doVoteDown'),
+            )
+        );
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-integration_notifications Integration with Notifications
+     * @subsubsection bx_timeline-get_notifications_repost get_notifications_repost
+     * 
+     * @code bx_srv('bx_timeline', 'get_notifications_repost', [...]); @endcode
+     * 
+     * Get data for Repost event to display in Notifications module.
+     * 
+     * @param $aEvent an array with event description.
+     * @return an array with special format.
+     * 
+     * @see BxTimelineModule::serviceGetNotificationsRepost
+     */
+    /** 
+     * @ref bx_timeline-get_notifications_repost "get_notifications_repost"
+     */
+    public function serviceGetNotificationsRepost($aEvent)
+    {
+        $aResult = $this->serviceGetNotificationsPost($aEvent);
+        $aResult['lang_key'] = '_bx_timeline_txt_object_reposted';
+
+        return $aResult;
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-integration_notifications Integration with Notifications
+     * @subsubsection bx_timeline-get_notifications_post get_notifications_post
+     * 
+     * @code bx_srv('bx_timeline', 'get_notifications_post', [...]); @endcode
+     * 
+     * Get data for Post event to display in Notifications module.
+     * 
+     * @param $aEvent an array with event description.
+     * @return an array with special format.
+     * 
+     * @see BxTimelineModule::serviceGetNotificationsPost
+     */
+    /** 
+     * @ref bx_timeline-get_notifications_post "get_notifications_post"
+     */
+    public function serviceGetNotificationsPost($aEvent)
+    {
+    	$CNF = &$this->_oConfig->CNF;
+
+        $iContent = (int)$aEvent['object_id'];
+        $aContent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iContent));
+        if(empty($aContent) || !is_array($aContent))
+            return array();
+
+        if($this->_oConfig->isSystem($aContent['type'], $aContent['action']))
+            $iEntryAuthor = (int)$aContent['owner_id'];
+        else
+            $iEntryAuthor = (int)$aContent['object_id'];
+
+        $sEntryCaption = call_user_func_array(array($this->_oConfig, 'getTitleShort'), !empty($aContent['title']) ? array($aContent['title']) : array($aContent['description'], $aContent['object_id']));
+
+        return array(
+            'entry_sample' => $CNF['T']['txt_sample_single_ext'],
+            'entry_url' => $this->_oConfig->getItemViewUrl($aContent),
+            'entry_caption' => $sEntryCaption,
+            'entry_author' => $iEntryAuthor,
+            'lang_key' => '' //may be empty or not specified. In this case the default one from Notification module will be used.
+        );
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-integration_notifications Integration with Notifications
+     * @subsubsection bx_timeline-get_notifications_comment get_notifications_comment
+     * 
+     * @code bx_srv('bx_timeline', 'get_notifications_comment', [...]); @endcode
+     * 
+     * Get data for Post Comment event to display in Notifications module.
+     * 
+     * @param $aEvent an array with event description.
+     * @return an array with special format.
+     * 
+     * @see BxTimelineModule::serviceGetNotificationsComment
+     */
+    /** 
+     * @ref bx_timeline-get_notifications_comment "get_notifications_comment"
+     */
+    public function serviceGetNotificationsComment($aEvent)
+    {
+    	$CNF = &$this->_oConfig->CNF;
+
+        $iContent = (int)$aEvent['object_id'];
+        $aContent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iContent));
+        if(empty($aContent) || !is_array($aContent))
+            return array();
+
+        $oComment = BxDolCmts::getObjectInstance($CNF['OBJECT_COMMENTS'], $iContent);
+        if(!$oComment || !$oComment->isEnabled())
+            return array();
+
+        $sEntryCaption = call_user_func_array(array($this->_oConfig, 'getTitleShort'), !empty($aContent['title']) ? array($aContent['title']) : array($aContent['description'], $aContent['object_id']));
+
+        return array(
+            'entry_sample' => $CNF['T']['txt_sample_single'],
+            'entry_url' => $this->_oConfig->getItemViewUrl($aContent),
+            'entry_caption' => $sEntryCaption,
+            'entry_author' => $aContent['owner_id'],
+            'subentry_sample' => $CNF['T']['txt_sample_comment_single'],
+            'subentry_url' => $oComment->getViewUrl((int)$aEvent['subobject_id']),
+            'lang_key' => '', //may be empty or not specified. In this case the default one from Notification module will be used.
+        );
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-integration_notifications Integration with Notifications
+     * @subsubsection bx_timeline-get_notifications_vote get_notifications_vote
+     * 
+     * @code bx_srv('bx_timeline', 'get_notifications_vote', [...]); @endcode
+     * 
+     * Get data for Vote event to display in Notifications module.
+     * 
+     * @param $aEvent an array with event description.
+     * @return an array with special format.
+     * 
+     * @see BxTimelineModule::serviceGetNotificationsVote
+     */
+    /** 
+     * @ref bx_timeline-get_notifications_vote "get_notifications_vote"
+     */
+    public function serviceGetNotificationsVote($aEvent)
+    {
+    	$CNF = &$this->_oConfig->CNF;
+
+        $iContent = (int)$aEvent['object_id'];
+        $aContent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iContent));
+        if(empty($aContent) || !is_array($aContent))
+            return array();
+
+        $oVote = BxDolVote::getObjectInstance($CNF['OBJECT_VOTES'], $iContent);
+        if(!$oVote || !$oVote->isEnabled())
+            return array();
+
+        $sEntryCaption = call_user_func_array(array($this->_oConfig, 'getTitleShort'), !empty($aContent['title']) ? array($aContent['title']) : array($aContent['description'], $aContent['object_id']));
+
+        return array(
+            'entry_sample' => $CNF['T']['txt_sample_single'],
+            'entry_url' => $this->_oConfig->getItemViewUrl($aContent),
+            'entry_caption' => $sEntryCaption,
+            'entry_author' => $aContent['owner_id'],
+            'subentry_sample' => $CNF['T']['txt_sample_vote_single'],
+            'lang_key' => '', //may be empty or not specified. In this case the default one from Notification module will be used.
+        );
+    }
+
+    /**
+     * Entry post vote for Notifications module
+     */
+    public function serviceGetNotificationsReaction($aEvent)
+    {
+    	$CNF = &$this->_oConfig->CNF;
+
+    	$iContent = (int)$aEvent['object_id'];
+        $aContent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iContent));
+        if(empty($aContent) || !is_array($aContent))
+            return array();
+
+        $oReaction = BxDolVote::getObjectInstance($CNF['OBJECT_REACTIONS'], $iContent);
+        if(!$oReaction || !$oReaction->isEnabled())
+            return array();
+
+        $aSubentry = $oReaction->getTrackBy(array('type' => 'id', 'id' => (int)$aEvent['subobject_id']));
+        if(empty($aSubentry) || !is_array($aSubentry))
+            return array();
+
+        $aSubentrySampleParams = array();
+        $aReaction = $oReaction->getReaction($aSubentry['reaction']);
+        if(!empty($aReaction['title']))
+            $aSubentrySampleParams[] = $aReaction['title'];
+        else
+            $aSubentrySampleParams[] = '_undefined';
+
+        $sEntryCaption = call_user_func_array(array($this->_oConfig, 'getTitleShort'), !empty($aContent['title']) ? array($aContent['title']) : array($aContent['description'], $aContent['object_id']));
+
+        return array(
+            'entry_sample' => $CNF['T']['txt_sample_single'],
+            'entry_url' => $this->_oConfig->getItemViewUrl($aContent),
+            'entry_caption' => $sEntryCaption,
+            'entry_author' => $aContent['owner_id'],
+            'subentry_sample' => $CNF['T']['txt_sample_reaction_single'],
+            'subentry_sample_params' => $aSubentrySampleParams,
+            'lang_key' => '', //may be empty or not specified. In this case the default one from Notification module will be used.
+        );
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-integration_notifications Integration with Notifications
+     * @subsubsection bx_timeline-get_notifications_score_up get_notifications_score_up
+     * 
+     * @code bx_srv('bx_timeline', 'get_notifications_score_up', [...]); @endcode
+     * 
+     * Get data for Score Up Vote event to display in Notifications module.
+     * 
+     * @param $aEvent an array with event description.
+     * @return an array with special format.
+     * 
+     * @see BxTimelineModule::serviceGetNotificationsScoreUp
+     */
+    /** 
+     * @ref bx_timeline-get_notifications_score_up "get_notifications_score_up"
+     */
+    public function serviceGetNotificationsScoreUp($aEvent)
+    {
+    	return $this->_serviceGetNotificationsScore('up', $aEvent);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-integration_notifications Integration with Notifications
+     * @subsubsection bx_timeline-get_notifications_score_down get_notifications_score_down
+     * 
+     * @code bx_srv('bx_timeline', 'get_notifications_score_down', [...]); @endcode
+     * 
+     * Get data for Score Down Vote event to display in Notifications module.
+     * 
+     * @param $aEvent an array with event description.
+     * @return an array with special format.
+     * 
+     * @see BxTimelineModule::serviceGetNotificationsScoreDown
+     */
+    /** 
+     * @ref bx_timeline-get_notifications_score_down "get_notifications_score_down"
+     */
+    public function serviceGetNotificationsScoreDown($aEvent)
+    {
+    	return $this->_serviceGetNotificationsScore('down', $aEvent);
+    }
+
+
+    protected function _serviceGetNotificationsScore($sType, $aEvent)
+    {
+    	$CNF = &$this->_oConfig->CNF;
+
+        $iContent = (int)$aEvent['object_id'];
+        $aContent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iContent));
+        if(empty($aContent) || !is_array($aContent))
+            return array();
+
+        $oScore = BxDolScore::getObjectInstance($CNF['OBJECT_SCORES'], $iContent);
+        if(!$oScore || !$oScore->isEnabled())
+            return array();
+
+        $sEntryCaption = call_user_func_array(array($this->_oConfig, 'getTitleShort'), !empty($aContent['title']) ? array($aContent['title']) : array($aContent['description'], $aContent['object_id']));
+
+        return array(
+            'entry_sample' => $CNF['T']['txt_sample_single'],
+            'entry_url' => $this->_oConfig->getItemViewUrl($aContent),
+            'entry_caption' => $sEntryCaption,
+            'entry_author' => $aContent['owner_id'],
+            'subentry_sample' => $CNF['T']['txt_sample_score_' . $sType . '_single'],
+            'lang_key' => '', //may be empty or not specified. In this case the default one from Notification module will be used.
+        );
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-repost Repost
+     * @subsubsection bx_timeline-get_repost_element_block get_repost_element_block
+     * 
+     * @code bx_srv('bx_timeline', 'get_repost_element_block', [...]); @endcode
+     * 
+     * Get repost element for content based modules.
+     * 
+     * @param $iOwnerId integer value with owner profile ID.
+     * @param $sType string value with type (module name). 
+     * @param $sAction string value with action (module action). 
+     * @param $iObjectId integer value with object ID to be reposted. 
+     * @param $aParams (optional) an array with additional params.
+     * @return HTML string with repost element to display on the site, all necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetRepostElementBlock
+     */
+    /** 
+     * @ref bx_timeline-get_repost_element_block "get_repost_element_block"
+     */
+    public function serviceGetRepostElementBlock($iOwnerId, $sType, $sAction, $iObjectId, $aParams = array())
+    {
+    	if(!$this->isEnabled())
+    		return '';
+
+        $aParams = array_merge($this->_oConfig->getRepostDefaults(), $aParams);
+        return $this->_oTemplate->getRepostElement($iOwnerId, $sType, $sAction, $iObjectId, $aParams);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-repost Repost
+     * @subsubsection bx_timeline-get_repost_counter get_repost_counter
+     * 
+     * @code bx_srv('bx_timeline', 'get_repost_counter', [...]); @endcode
+     * 
+     * Get repost counter.
+     * 
+     * @param $sType string value with type (module name). 
+     * @param $sAction string value with action (module action). 
+     * @param $iObjectId integer value with object ID to be reposted. 
+     * @return HTML string with repost counter to display on the site, all necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetRepostCounter
+     */
+    /** 
+     * @ref bx_timeline-get_repost_counter "get_repost_counter"
+     */
+    public function serviceGetRepostCounter($sType, $sAction, $iObjectId)
+    {
+    	if(!$this->isEnabled())
+    		return '';
+
+		$aReposted = $this->_oDb->getReposted($sType, $sAction, $iObjectId);
+
+        return $this->_oTemplate->getRepostCounter($aReposted);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-repost Repost
+     * @subsubsection bx_timeline-get_repost_js_script get_repost_js_script
+     * 
+     * @code bx_srv('bx_timeline', 'get_repost_js_script', [...]); @endcode
+     * 
+     * Get repost JavaScript code.
+     * 
+     * @return HTML string with JavaScript code to display on the site, all necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetRepostJsScript
+     */
+    /** 
+     * @ref bx_timeline-get_repost_js_script "get_repost_js_script"
+     */
+    public function serviceGetRepostJsScript()
+    {
+    	if(!$this->isEnabled())
+    		return '';
+
+        return $this->_oTemplate->getRepostJsScript();
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-repost Repost
+     * @subsubsection bx_timeline-get_repost_js_click get_repost_js_click
+     * 
+     * @code bx_srv('bx_timeline', 'get_repost_js_click', [...]); @endcode
+     * 
+     * Get repost JavaScript code for OnClick event.
+     * 
+     * @param $iOwnerId integer value with owner profile ID.
+     * @param $sType string value with type (module name). 
+     * @param $sAction string value with action (module action). 
+     * @param $iObjectId integer value with object ID to be reposted. 
+     * @return HTML string with JavaScript code to display in OnClick events of HTML elements.
+     * 
+     * @see BxTimelineModule::serviceGetRepostJsClick
+     */
+    /** 
+     * @ref bx_timeline-get_repost_js_click "get_repost_js_click"
+     */
+    public function serviceGetRepostJsClick($iOwnerId, $sType, $sAction, $iObjectId)
+    {
+    	if(!$this->isEnabled())
+    		return '';
+
+        return $this->_oTemplate->getRepostJsClick($iOwnerId, $sType, $sAction, $iObjectId);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-repost Repost
+     * @subsubsection bx_timeline-repost repost
+     * 
+     * @code bx_srv('bx_timeline', 'repost', [...]); @endcode
+     * 
+     * Perform repost action.
+     * 
+     * @param $iAuthorId integer value with performer profile ID.
+     * @param $iOwnerId integer value with repost event owner profile ID.
+     * @param $sType string value with type (module name). 
+     * @param $sAction string value with action (module action). 
+     * @param $iObjectId integer value with object ID to be reposted. 
+     * @parem $bForce boolean value force reposting without ACL check.
+     * @return an array with error (code and message) or integer with newly created repost event ID.
+     * 
+     * @see BxTimelineModule::serviceRepost
+     */
+    /** 
+     * @ref bx_timeline-repost "repost"
+     */
+    public function serviceRepost($iAuthorId, $iOwnerId, $sType, $sAction, $iObjectId, $bForce = false)
+    {
+        $aReposted = $this->_oDb->getReposted($sType, $sAction, $iObjectId);
+        if(empty($aReposted) || !is_array($aReposted))
+            return array('code' => 1, 'message' => _t('_bx_timeline_txt_err_cannot_repost'));
+
+        $mixedAllowed = $this->isAllowedRepost($aReposted, true);
+        if(!$bForce && $mixedAllowed !== true)
+            return array('code' => 2, 'message' => strip_tags($mixedAllowed));
+
+        $bReposted = $this->_oDb->isReposted($aReposted['id'], $iOwnerId, $iAuthorId);
+        if($bReposted)
+            return array('code' => 3, 'message' => _t('_bx_timeline_txt_err_already_reposted'));
+
+        $iId = $this->_oDb->insertEvent(array(
+            'owner_id' => $iOwnerId,
+            'system' => 0,
+            'type' => $this->_oConfig->getPrefix('common_post') . 'repost',
+            'action' => '',
+            'object_id' => $iAuthorId,
+            'object_privacy_view' => $this->_oConfig->getPrivacyViewDefault('object'),
+            'content' => serialize(array(
+                'type' => $sType,
+                'action' => $sAction,
+                'object_id' => $iObjectId,
+            )),
+            'title' => '',
+            'description' => ''
+        ));
+
+        if(empty($iId))
+            return array('code' => 4, 'message' => _t('_bx_timeline_txt_err_cannot_repost'));
+
+        $this->onRepost($iId, $aReposted);
+
+        return $iId;
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-repost Repost
+     * @subsubsection bx_timeline-repost_by_id repost_by_id
+     * 
+     * @code bx_srv('bx_timeline', 'repost_by_id', [...]); @endcode
+     * 
+     * Perform repost action by Timeline event ID.
+     * 
+     * @param $iAuthorId integer value with performer profile ID.
+     * @param $iOwnerId integer value with repost event owner profile ID.
+     * @param $iEventId integer value with event ID which will be reposted.
+     * @parem $bForce boolean value force reposting without ACL check.
+     * @return an array with error (code and message) or integer with newly created repost event ID.
+     * 
+     * @see BxTimelineModule::serviceRepostById
+     */
+    /** 
+     * @ref bx_timeline-repost_by_id "repost_by_id"
+     */
+    public function serviceRepostById($iAuthorId, $iOwnerId, $iEventId, $bForce = false)
+    {
+        $aEvent = $this->_oDb->getEntriesBy(array('type' => 'id', 'id' => $iEventId));
+        if(empty($aEvent) || !is_array($aEvent))
+            return array('code' => 1, 'message' => _t('_bx_timeline_txt_err_cannot_repost'));
+
+        $sType = $aEvent['type'];
+        $sAction = $aEvent['action'];
+        $iObjectId = $this->_oConfig->isSystem($sType, $sAction) ? $aEvent['object_id'] : $aEvent['id'];
+
+        $sCommonPrefix = $this->_oConfig->getPrefix('common_post');
+        if(str_replace($sCommonPrefix, '', $sType) == BX_TIMELINE_PARSE_TYPE_REPOST) {
+            $aReposted = $this->_oDb->getReposted($sType, $sAction, $iObjectId);
+            if(empty($aReposted) || !is_array($aReposted))
+                return array('code' => 1, 'message' => _t('_bx_timeline_txt_err_cannot_repost'));
+
+            $aRepostedData = unserialize($aEvent['content']);
+
+            $sType = $aRepostedData['type'];
+            $sAction = $aRepostedData['action'];
+            $iObjectId = $aRepostedData['object_id'];
+        }
+
+        return $this->serviceRepost($iAuthorId, $iOwnerId, $sType, $sAction, $iObjectId, $bForce);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-update update
+     * 
+     * @code bx_srv('bx_timeline', 'update', [...]); @endcode
+     * 
+     * Update timeline event by ID.
+     * 
+     * @param $iEventId integer value with event ID.
+     * @param $aSet an array with key=>value pairs for fields which should be updated. 
+     * @return boolean value with the result of operation.
+     * 
+     * @see BxTimelineModule::serviceUpdate
+     */
+    /** 
+     * @ref bx_timeline-update "update"
+     */
+    public function serviceUpdate($iEventId, $aSet)
+    {
+        if(empty($iEventId))
+            return false;
+
+        return (int)$this->_oDb->updateEvent($aSet, array('id' => $iEventId)) > 0;
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_menu_item_addon_comment get_menu_item_addon_comment
+     * 
+     * @code bx_srv('bx_timeline', 'get_menu_item_addon_comment', [...]); @endcode
+     * 
+     * Get addon for Comment menu item.
+     * NOTE. The service isn't used for now because comment functionality in card was updated.
+     * 
+     * @param $sSystem string value with comments engine system.
+     * @param $iObjectId integer value with object ID. 
+     * @return HTML string to display in menu item.
+     * 
+     * @see BxTimelineModule::serviceGetMenuItemAddonComment
+     */
+    /** 
+     * @ref bx_timeline-get_menu_item_addon_comment "get_menu_item_addon_comment"
+     */
+    public function serviceGetMenuItemAddonComment($sSystem, $iObjectId, $aBrowseParams = array())
+    {
+        if(empty($sSystem) || empty($iObjectId))
+            return '';
+        
+        $oCmts = $this->getCmtsObject($sSystem, $iObjectId);
+        if($oCmts === false)
+            return '';
+
+        $iCounter = (int)$oCmts->getCommentsCount();
+        if(empty($iCounter))
+            return '';
+
+        return  $this->_oTemplate->parseLink('javascript:void(0)', $iCounter, array(
+            'class' => 'bx-menu-item-addon',
+            'title' => _t('_bx_timeline_menu_item_title_item_comment'),
+            'onclick' => "javascript:" . $this->_oConfig->getJsObjectView($aBrowseParams) . ".commentItem(this, '" . $sSystem . "', " . $iObjectId . ")" 
+        ));
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_settings_checker_helper get_settings_checker_helper
+     * 
+     * @code bx_srv('bx_timeline', 'get_settings_checker_helper', [...]); @endcode
+     * 
+     * Get Checker Helper class name for Forms engine.
+     * 
+     * @return string with Checker Helper class name.
+     * 
+     * @see BxTimelineModule::serviceGetSettingsCheckerHelper
+     */
+    /** 
+     * @ref bx_timeline-get_settings_checker_helper "get_settings_checker_helper"
+     */
+    public function serviceGetSettingsCheckerHelper()
+    {
+        bx_import('FormCheckerHelper', $this->_aModule);
+        return 'BxTimelineFormCheckerHelper';
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_options_videos_autoplay get_options_videos_autoplay
+     * 
+     * @code bx_srv('bx_timeline', 'get_options_videos_autoplay', [...]); @endcode
+     * 
+     * Get an array with available options for 'Videos autoplay in Timeline' setting.
+     *
+     * @return an array with available options represented as key => value pairs.
+     * 
+     * @see BxTimelineModule::serviceGetOptionsVideosAutoplay
+     */
+    /** 
+     * @ref bx_timeline-get_options_videos_autoplay "get_options_videos_autoplay"
+     */
+    public function serviceGetOptionsVideosAutoplay()
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $aOptions = array(BX_TIMELINE_VAP_OFF, BX_TIMELINE_VAP_ON_MUTE, BX_TIMELINE_VAP_ON);
+
+        $aResult = array();
+        foreach($aOptions as $sOption)
+            $aResult[] = array(
+                'key' => $sOption,
+                'value' => _t($CNF['T']['option_vap_' . $sOption])
+            );
+
+        return $aResult;
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_options_attachments_layout get_options_attachments_layout
+     * 
+     * @code bx_srv('bx_timeline', 'get_options_attachments_layout', [...]); @endcode
+     * 
+     * Get an array with available options for 'Show attachments as' setting.
+     *
+     * @return an array with available options represented as key => value pairs.
+     * 
+     * @see BxTimelineModule::serviceGetOptionsAttachmentsLayout
+     */
+    /** 
+     * @ref bx_timeline-get_options_attachments_layout "get_options_attachments_layout"
+     */
+    public function serviceGetOptionsAttachmentsLayout()
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $aOptions = array(BX_TIMELINE_ML_GALLERY, BX_TIMELINE_ML_SHOWCASE);
+
+        $aResult = array();
+        foreach($aOptions as $sOption)
+            $aResult[] = array(
+                'key' => $sOption,
+                'value' => _t($CNF['T']['option_al_' . $sOption])
+            );
+
+        return $aResult;
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_live_update get_live_update
+     * 
+     * @code bx_srv('bx_timeline', 'get_live_update', [...]); @endcode
+     * 
+     * Get an array with actual Live Update info. Only one live update notification for all new events.
+     *
+     * @return an array with Live Update info.
+     * 
+     * @see BxTimelineModule::serviceGetLiveUpdate
+     */
+    /** 
+     * @ref bx_timeline-get_live_update "get_live_update"
+     */
+    public function serviceGetLiveUpdate($aBrowseParams, $iProfileId, $iValue = 0, $iInit = 0)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $sKey = $this->_oConfig->getLiveUpdateKey($aBrowseParams);
+
+        bx_import('BxDolSession');
+        if((int)BxDolSession::getInstance()->getValue($sKey) == 1)
+            return false;
+
+        $aParams = $this->_prepareParams($aBrowseParams);
+        $aParams = array_merge($aParams, array(
+            'filter' => BX_TIMELINE_FILTER_OTHER_VIEWER
+        ));
+        $aEvents = $this->_oDb->getEvents($aParams);
+        if(empty($aEvents) || !is_array($aEvents))
+            return false;
+
+        $iValueNew = 0;
+        foreach($aEvents as $aEvent) {
+            if((int)$aEvent[$CNF['FIELD_STICKED']] != 0)
+                continue;
+
+            $sContent = $this->_oTemplate->getPost($aEvent, $aParams);
+            if(empty($sContent)) 
+                continue;
+
+            $iValueNew = $aEvent['id'];
+            break;
+        }
+
+        if($iValueNew == $iValue)
+            return false;
+
+        if((int)$iInit != 0)
+            return array('count' => $iValueNew);
+
+        return array(
+            'count' => $iValueNew, // required (for initialization and visualization)
+            'method' => $this->_oConfig->getJsObjectView($aBrowseParams) . '.showLiveUpdate(oData)', // required (for visualization)
+            'data' => array(
+                'code' => $this->_oTemplate->getLiveUpdate($aBrowseParams, $iProfileId, $iValue, $iValueNew)
+            ),  // optional, may have some additional data to be passed in JS method provided using 'method' param above.
+        );
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_live_updates get_live_updates
+     * 
+     * @code bx_srv('bx_timeline', 'get_live_updates', [...]); @endcode
+     * 
+     * Get an array with actual Live Update info. Separate live update notification for each new Event.
+     * Note. This method isn't used for now. @see BxTimelineModule::serviceGetLiveUpdate method instead.
+     * 
+     * Note. This way to display live update notifications isn't used for now. 
+     * See BxTimelineModule::serviceGetLiveUpdate method instead.
+     *
+     * @return an array with Live Update info.
+     * 
+     * @see BxTimelineModule::serviceGetLiveUpdates
+     */
+    /** 
+     * @ref bx_timeline-get_live_updates "get_live_updates"
+     */
+    public function serviceGetLiveUpdates($aBrowseParams, $iProfileId, $iCount = 0, $iInit = 0)
+    {
+        $sKey = $this->_oConfig->getLiveUpdateKey($aBrowseParams);
+
+        bx_import('BxDolSession');
+        if((int)BxDolSession::getInstance()->getValue($sKey) == 1)
+            return false;
+
+        $aParams = $this->_prepareParams($aBrowseParams);
+        $aParams['filter'] = BX_TIMELINE_FILTER_OTHER_VIEWER;
+        $aParams['count'] = true;
+
+        $iCountNew = $this->_oDb->getEvents($aParams);
+        if($iCountNew == $iCount)
+            return false;
+
+        if((int)$iInit != 0)
+            return array('count' => $iCountNew);
+
+        return array(
+            'count' => $iCountNew, // required (for initialization and visualization)
+            'method' => $this->_oConfig->getJsObjectView($aBrowseParams) . '.showLiveUpdates(oData)', // required (for visualization)
+            'data' => array(
+                'code' => $this->_oTemplate->getLiveUpdates($aBrowseParams, $iProfileId, $iCount, $iCountNew)
+            ),  // optional, may have some additional data to be passed in JS method provided using 'method' param above.
+        );
+    }
+    
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Accounts
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_menu_addon_manage_tools get_menu_addon_manage_tools
+     * 
+     * @code bx_srv('bx_timeline', 'get_menu_addon_manage_tools', [...]); @endcode
+     * 
+     * Get number of 'hidden' events for User End -> Dasboard page -> Manage block.
+     *
+     * @return integer number of 'hidden' events
+     * 
+     * @see BxTimelineModule::serviceGetMenuAddonManageTools
+     */
+    /** 
+     * @ref bx_timeline-get_menu_addon_manage_tools "get_menu_addon_manage_tools"
+     */
+    public function serviceGetMenuAddonManageTools()
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        bx_import('SearchResult', $this->_aModule);
+        $sClass = $this->_aModule['class_prefix'] . 'SearchResult';
+        $oSearch = new $sClass();
+        $oSearch->unsetPaginate();
+
+        $oSearch->fillFilters(array('status' => BX_TIMELINE_STATUS_HIDDEN));
+        $iNum1 = $oSearch->getNum();
+
+        $oSearch->fillFilters(array('status' => ''));
+        $oSearch->fillFiltersByObjects(array('reported' => array('value' => '0', 'field' => 'reports', 'operator' => '>')));
+        $iNum2 = $oSearch->getNum();
+
+        return array(
+            'counter1_value' => $iNum1, 
+            'counter2_value' => $iNum2, 
+            'counter3_value' => 0
+        );
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Accounts
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_menu_addon_profile_stats get_menu_addon_profile_stats
+     * 
+     * @code bx_srv('bx_timeline', 'get_menu_addon_profile_stats', [...]); @endcode
+     * 
+     * Get number of 'muted' events for currently logged in user. User End -> Profile Stats.
+     *
+     * @return integer number of 'muted' events
+     * 
+     * @see BxTimelineModule::serviceGetMenuAddonProfileStats
+     */
+    /** 
+     * @ref bx_timeline-get_menu_addon_profile_stats "get_menu_addon_profile_stats"
+     */
+    public function serviceGetMenuAddonProfileStats($iProfileId = 0)
+    {
+        if(empty($iProfileId))
+            $iProfileId = $this->_iProfileId;
+
+        return $this->getConnectionMuteObject()->getConnectedContentCount($iProfileId);
+    }
+
+    public function serviceGet($aParams)
+    {
+        $aParams = $this->_prepareParams($aParams);
+
+        $aParams['return_data_type'] = 'array';
+        return $this->_oTemplate->getPosts($aParams);
+
+    }
+
+    public function serviceAdd($aValues)
+    {
+        return $this->getFormPost(array(
+            'values' => $aValues
+        ));
+    }
+
+    public function serviceEdit($iId, $aValues)
+    {
+        return $this->getFormEdit($iId, array(
+            'values' => $aValues
+        ));
+    }
+
+    /*
+     * COMMON METHODS
+     */
+    public function getItemData($iId, $aParams = array())
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        if(empty($aParams))
+            $aParams = $this->_prepareParams(array(
+                'view' => BX_TIMELINE_VIEW_ITEM, 
+                'type' => BX_TIMELINE_TYPE_ITEM
+            ));
+
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iId));
+        if(empty($aEvent))
+            return array('code' => 1, 'content' => _t('_Empty'));
+
+        $iProfile = (int)$aEvent[$CNF['FIELD_OWNER_ID']];
+        if(!empty($iProfile)) {
+            $oProfile = BxDolProfile::getInstance($iProfile);
+            if(!$oProfile)
+                return array('code' => 1, 'content' => _t('_Empty'));
+
+            $mixedResult = $oProfile->checkAllowedProfileView();
+            if($mixedResult !== CHECK_ACTION_RESULT_ALLOWED)
+                return array('code' => 2, 'content' => $mixedResult);
+        }
+
+        $sContent = $this->_oTemplate->getPost($aEvent, $aParams);
+        if(empty($sContent))
+            return array('code' => 2, 'content' => _t('_Access denied'));
+
+        $sKey = 'allowed_view';
+        if(isset($aEvent[$sKey]) && $aEvent[$sKey] !== CHECK_ACTION_RESULT_ALLOWED) 
+            return array('code' => 2, 'content' => $aEvent[$sKey]);
+
+        if($this->isAllowedView($aEvent) !== true)
+            return array('code' => 2, 'content' => _t('_Access denied'));
+
+        return array('code' => 0, 'content' => $sContent, 'event' => $aEvent);
+    }
+
+    public function deleteEvent($aEvent)
+    {
+    	if(empty($aEvent) || !is_array($aEvent) || !$this->_oDb->deleteEvent(array('id' => (int)$aEvent['id'])))
+            return false;
+
+        $this->onDelete($aEvent);
+        return true;
+    }
+    
+
+    public function addAttachLink($aValues, $sDisplay = false)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        if(!$sDisplay)
+            $sDisplay = $this->_oConfig->getObject('form_display_attach_link_add');
+
+        $oForm = BxDolForm::getObjectInstance($this->_oConfig->getObject('form_attach_link'), $sDisplay, $this->_oTemplate);
+        if(!$oForm)
+            return array('message' => '_sys_txt_error_occured');
+
+        $oForm->aFormAttrs['method'] = BX_DOL_FORM_METHOD_SPECIFIC;
+        $oForm->aParams['csrf']['disable'] = true;
+        if(!empty($oForm->aParams['db']['submit_name'])) {
+            $sSubmitName = $oForm->aParams['db']['submit_name'];
+            if(!isset($oForm->aInputs[$sSubmitName])) {
+                if(isset($oForm->aInputs[$CNF['FIELD_CONTROLS']]))
+                    foreach($oForm->aInputs[$CNF['FIELD_CONTROLS']] as $mixedIndex => $aInput) {
+                        if(!is_numeric($mixedIndex) || empty($aInput['name']) || $aInput['name'] != $sSubmitName)
+                            continue;
+    
+                        $aValues[$sSubmitName] = $aInput['value'];
+                    }
+            }
+            else            
+                $aValues[$sSubmitName] = $oForm->aInputs[$sSubmitName]['value'];
+        }
+
+        $oForm->aInputs['url']['checker']['params']['preg'] = $this->_oConfig->getPregPattern('url');
+
+        $oForm->initChecker(array(), $aValues);
+        if(!$oForm->isSubmittedAndValid())
+            return array('message' => '_sys_txt_error_occured');
+
+        return $this->_addLink($oForm);
+    }
+
+    public function getFormAttachLink($iEventId = 0)
+    {
+        $oForm = BxDolForm::getObjectInstance($this->_oConfig->getObject('form_attach_link'), $this->_oConfig->getObject('form_display_attach_link_add'), $this->_oTemplate);
+        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'submit_attach_link_form/';
+        $oForm->aInputs['event_id']['value'] = $iEventId;
+        $oForm->aInputs['url']['checker']['params']['preg'] = $this->_oConfig->getPregPattern('url');
+
+        $oForm->initChecker();
+        if($oForm->isSubmittedAndValid())
+            return $this->_addLink($oForm);
+
+        return array('form' => $oForm->getCode(), 'form_id' => $oForm->id);
+    }
+
+    public function getFormPost($aParams = array())
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $iUserId = $this->getUserId();
+
+        $oForm = $this->getFormPostObject($aParams);
+        $aFormInitCheckerParams = array();
+
+        $bValues = !empty($aParams['values']) && is_array($aParams['values']);
+        if($bValues) {
+            $this->_prepareFormForAutoSubmit($oForm, $aParams['values']);
+
+            $aFormInitCheckerParams = array(array(), $aParams['values']);
+            unset($aParams['values']);
+        }
+
+        call_user_func_array(array($oForm, 'initChecker'), $aFormInitCheckerParams);
+
+        $bAjaxMode = $oForm->isAjaxMode();
+        $bDynamicMode = $bAjaxMode;
+
+        if($oForm->isSubmittedAndValid()) {
+            $sType = $oForm->getCleanValue('type');
+            $sType = $this->_oConfig->getPrefix('common_post') . $sType;
+            BxDolForm::setSubmittedValue('type', $sType, $oForm->aFormAttrs['method']);
+
+            $aContent = array();
+
+            //--- Process Text ---//
+            $sText = $oForm->getCleanValue('text');
+            $sText = $this->_prepareTextForSave($sText);
+            $bText = !empty($sText);
+
+            if($bText)
+            	$aContent['text'] = $sText;
+
+            //--- Process Context and Privacy ---//
+            $iOwnerId = (int)$oForm->getCleanValue('owner_id');
+            $iObjectPrivacyView = (int)$oForm->getCleanValue('object_privacy_view');
+            $iObjectPrivacyViewDefault = $this->_oConfig->getPrivacyViewDefault('object');
+            if(empty($iObjectPrivacyView))
+                $iObjectPrivacyView = $iObjectPrivacyViewDefault;
+            else if($iObjectPrivacyView < 0)
+                $iOwnerId = abs($iObjectPrivacyView);
+
+            //--- Process Link ---//
+            $aLinkIds = $oForm->getCleanValue($CNF['FIELD_LINK']);
+            $bLinkIds = !empty($aLinkIds) && is_array($aLinkIds);
+
+            //--- Process Media ---//
+            $aPhotoIds = $oForm->getCleanValue($CNF['FIELD_PHOTO']);
+            $bPhotoIds = !empty($aPhotoIds) && is_array($aPhotoIds);
+
+            $aVideoIds = $oForm->getCleanValue($CNF['FIELD_VIDEO']);
+            $bVideoIds = !empty($aVideoIds) && is_array($aVideoIds);
+
+            if(!$bText && !$bLinkIds && !$bPhotoIds && !$bVideoIds) {
+                $oForm->aInputs['text']['error'] =  _t('_bx_timeline_txt_err_empty_post');
+                $oForm->setValid(false);
+
+            	return $this->_prepareResponse(array('form' => $oForm->getCode($bDynamicMode), 'form_id' => $oForm->id), $bAjaxMode);
+            }
+
+            $sTitle = $bText ? $this->_oConfig->getTitle($sText) : $this->_oConfig->getTitleDefault($bLinkIds, $bPhotoIds, $bVideoIds);
+            $sDescription = _t('_bx_timeline_txt_user_added_sample', '{profile_name}', _t('_bx_timeline_txt_sample_with_article'));
+
+            /**
+             * Unset 'text' input because its data was already processed 
+             * and will be saved via additional values which were passed 
+             * to BxDolForm::insert method.
+             */
+            unset($oForm->aInputs['text']);
+
+            $iId = $oForm->insert(array(
+                'owner_id' => $iOwnerId,
+                'object_id' => $iUserId,
+                'object_owner_id' => $iUserId,
+                'object_privacy_view' => $iObjectPrivacyView,
+                'content' => serialize($aContent),
+                'title' => $sTitle,
+                'description' => $sDescription
+            ));
+
+            if(!empty($iId)) {
+                $aContent = array_merge($aContent, array(
+                    'timeline_group' => array(
+                        'by' => $this->getName() . '_' . $iUserId . '_' . $iId,
+                        'field' => 'owner_id'
+                    )
+                ));
+                $this->_oDb->updateEvent(array('content' => serialize($aContent)), array('id' => $iId));
+
+                //--- Process Meta ---//
+            	$oMetatags = BxDolMetatags::getObjectInstance($this->_oConfig->getObject('metatags'));
+            	if($bText)
+                    $oMetatags->metaAdd($iId, $sText);
+                $oMetatags->locationsAddFromForm($iId, $this->_oConfig->CNF['FIELD_LOCATION_PREFIX']);
+
+                //--- Process Link ---//
+                if($bLinkIds)
+                    foreach($aLinkIds as $iLinkId)
+                        $this->_oDb->saveLink($iId, $iLinkId);
+
+                //--- Process Media ---//
+                $this->_saveMedia($CNF['FIELD_PHOTO'], $iId, $aPhotoIds, $iUserId, true);
+                $this->_saveMedia($CNF['FIELD_VIDEO'], $iId, $aVideoIds, $iUserId, true);
+
+                $this->onPost($iId);
+
+                return $this->_prepareResponse(array('id' => $iId), $bAjaxMode, array(
+                    'redirect' => $this->_oConfig->getItemViewUrl(array('id' => $iId))
+                ));
+            }
+
+            return $this->_prepareResponse(array('message' => _t('_bx_timeline_txt_err_cannot_perform_action')), $bAjaxMode);
+        }
+
+        return $this->_prepareResponse(array('form' => $oForm->getCode($bDynamicMode), 'form_id' => $oForm->id), $bAjaxMode && $oForm->isSubmitted());
+    }
+
+    public function getFormEdit($iId, $aParams = array(), $aBrowseParams = array())
+    {
+        $CNF = &$this->_oConfig->CNF;
+        $sJsObjectView = $this->_oConfig->getJsObjectView($aBrowseParams);
+
+        $iUserId = $this->getUserId();
+
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iId));
+        if(empty($aEvent) || !is_array($aEvent))
+            return array();
+
+        $aContent = unserialize($aEvent['content']);
+        if(is_array($aContent) && !empty($aContent['text']))
+            $aEvent['text'] = $aContent['text'];
+
+        if(empty($aParams['form_object']))
+            $aParams['form_object'] = 'form_post';
+        if(empty($aParams['form_display']))
+            $aParams['form_display'] = 'form_display_post_edit';
+
+        $oForm = $this->getFormPostObject($aParams);
+        $oForm->setId($this->_oConfig->getHtmlIds('view', 'edit_form') . $iId);
+        $aFormInitCheckerParams = array();
+
+        $bValues = !empty($aParams['values']) && is_array($aParams['values']);
+        if($bValues) {
+            $this->_prepareFormForAutoSubmit($oForm, $aParams['values']);
+
+            $aFormInitCheckerParams = array(array(), array_merge($aEvent, $aParams['values']));
+            unset($aParams['values']);
+        }
+        else {
+            $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'edit/' . $iId ;
+            if(!empty($aBrowseParams) && is_array($aBrowseParams))
+                $oForm->aFormAttrs['action'] = $this->_oConfig->addBrowseParams($oForm->aFormAttrs['action'], $aBrowseParams);
+
+            foreach($oForm->aInputs[$CNF['FIELD_CONTROLS']] as $mixedIndex => $aInput) {
+                if(!is_numeric($mixedIndex))
+                    continue;
+
+                $oForm->aInputs[$CNF['FIELD_CONTROLS']][$mixedIndex]['attrs'] = bx_replace_markers($aInput['attrs'], array(
+                    'js_object_view' => $sJsObjectView,
+                    'content_id' => $iId
+                ));
+            }
+
+            $aFormInitCheckerParams = array($aEvent);
+        }
+
+        call_user_func_array(array($oForm, 'initChecker'), $aFormInitCheckerParams);
+
+        $bAjaxMode = $oForm->isAjaxMode();
+        $bDynamicMode = $bAjaxMode || bx_is_dynamic_request();
+        
+        $sCodeAdd = '';
+        if($bDynamicMode) {
+            $sCodeAdd .= $this->_oTemplate->getAddedJs('post', $bDynamicMode);
+            $sCodeAdd .= $this->_oTemplate->getJsCode('post', array(), true, $bDynamicMode);
+        }
+
+        if($oForm->isSubmittedAndValid()) {
+            $aContent = array();
+
+            //--- Process Text ---//
+            $sText = $oForm->getCleanValue('text');
+            $sText = $this->_prepareTextForSave($sText);
+            $bText = !empty($sText);
+            unset($oForm->aInputs['text']);
+
+            if($bText)
+            	$aContent['text'] = $sText;
+
+            $aValsToAdd = array(
+            	'content' => serialize($aContent)
+            );
+
+            //--- Process Privacy ---//
+            if(isset($oForm->aInputs[$CNF['FIELD_OBJECT_PRIVACY_VIEW']])) {
+                $iObjectPrivacyView = (int)$oForm->getCleanValue('object_privacy_view');
+                $iObjectPrivacyViewDefault = $this->_oConfig->getPrivacyViewDefault('object');
+                if(empty($iObjectPrivacyView))
+                    $aValsToAdd = array_merge($aValsToAdd, array(
+                        'object_privacy_view' => $iObjectPrivacyViewDefault
+                    ));
+                else if($iObjectPrivacyView < 0) 
+                    $aValsToAdd = array_merge($aValsToAdd, array(
+                        'owner_id' => abs($iObjectPrivacyView)
+                    ));
+            }
+
+            //--- Process Link ---//
+            $aLinkIds = $oForm->getCleanValue($CNF['FIELD_LINK']);
+            $bLinkIds = !empty($aLinkIds) && is_array($aLinkIds);
+
+            //--- Process Media ---//
+            $aPhotoIds = $oForm->getCleanValue($CNF['FIELD_PHOTO']);
+            $bPhotoIds = !empty($aPhotoIds) && is_array($aPhotoIds);
+
+            $aVideoIds = $oForm->getCleanValue($CNF['FIELD_VIDEO']);
+            $bVideoIds = !empty($aVideoIds) && is_array($aVideoIds);
+
+            if(!$bText && !$bLinkIds && !$bPhotoIds && !$bVideoIds) {
+                $oForm->aInputs['text']['error'] =  _t('_bx_timeline_txt_err_empty_post');
+                $oForm->setValid(false);
+
+            	return $this->_prepareResponse(array('form' => $sCodeAdd . $oForm->getCode($bDynamicMode), 'form_id' => $oForm->id), $bAjaxMode);
+            }
+
+            if($oForm->update($iId, $aValsToAdd) === false)
+                return array('message' => _t('_bx_timeline_txt_err_cannot_perform_action'));
+
+            $oMetatags = BxDolMetatags::getObjectInstance($this->_oConfig->getObject('metatags'));
+            if($bText)
+                $oMetatags->metaAdd($iId, $sText);
+            $oMetatags->locationsAddFromForm($iId, $this->_oConfig->CNF['FIELD_LOCATION_PREFIX']);
+
+            //--- Process Link ---//
+            if($bLinkIds)
+                foreach($aLinkIds as $iLinkId)
+                    $this->_oDb->saveLink($iId, $iLinkId);
+
+            //--- Process Media ---//
+            $this->_saveMedia($CNF['FIELD_PHOTO'], $iId, $aPhotoIds, $iUserId);
+            $this->_saveMedia($CNF['FIELD_VIDEO'], $iId, $aVideoIds, $iUserId);
+
+            $this->getCacheItemObject()->removeAllByPrefix($this->_oConfig->getPrefix('cache_item') . $iId);
+            $this->_oDb->deleteCache(array('event_id' => $iId));
+
+            return array(
+                'id' => $iId
+            );
+        }
+
+        return array(
+            'id' => $iId, 
+            'form' => $sCodeAdd . $oForm->getCode($bDynamicMode), 
+            'form_id' => $oForm->id,
+            'eval' => $sJsObjectView . '.onEditPost(oData)'
+        );
+    }
+
+    public function getFormPostObject($aParams)
+    {
+    	$sFormObject = !empty($aParams['form_object']) ? $aParams['form_object'] : 'form_post';
+        $sFormDisplay = !empty($aParams['form_display']) ? $aParams['form_display'] : 'form_display_post_add';
+
+        $oForm = BxDolForm::getObjectInstance($this->_oConfig->getObject($sFormObject), $this->_oConfig->getObject($sFormDisplay), $this->_oTemplate);        
+
+        /**
+         * Note. 'ajax_mode' parameter isn't checked because
+         * timeline post form works as Ajax form by default.
+         */
+        $sParamsKey = 'visibility_autoselect';
+        if(isset($aParams[$sParamsKey]) && (bool)$aParams[$sParamsKey] === true)
+            $oForm->setVisibilityAutoselect((bool)$aParams[$sParamsKey]);
+
+        $oForm->init();
+        return $oForm;
+    }
+
+    public function getCmtsObject($sSystem, $iId)
+    {
+        if(empty($sSystem) || (int)$iId == 0)
+            return false;
+
+        $oCmts = BxDolCmts::getObjectInstance($sSystem, $iId, true, $this->_oTemplate);
+        if(!$oCmts || !$oCmts->isEnabled())
+            return false;
+
+        return $oCmts;
+    }
+
+    public function getViewObject($sSystem, $iId)
+    {
+        if(empty($sSystem) || (int)$iId == 0)
+            return false;
+
+        $oView = BxDolView::getObjectInstance($sSystem, $iId, true, $this->_oTemplate);
+        if(!$oView || !$oView->isEnabled())
+            return false;
+
+        return $oView;
+    }
+
+    public function getVoteObject($sSystem, $iId)
+    {
+        if(empty($sSystem) || (int)$iId == 0)
+            return false;
+
+        $oVote = BxDolVote::getObjectInstance($sSystem, $iId, true, $this->_oTemplate);
+        if(!$oVote || !$oVote->isEnabled())
+            return false;
+
+        return $oVote;
+    }
+    
+    public function getReactionObject($sSystem, $iId)
+    {
+        if(empty($sSystem) || (int)$iId == 0)
+            return false;
+
+        $oReaction = BxDolVote::getObjectInstance($sSystem, $iId, true, $this->_oTemplate);
+        if(!$oReaction || !$oReaction->isEnabled())
+            return false;
+
+        return $oReaction;
+    }
+
+    public function getScoreObject($sSystem, $iId)
+    {
+        if(empty($sSystem) || (int)$iId == 0)
+            return false;
+
+        $oScore = BxDolScore::getObjectInstance($sSystem, $iId, true, $this->_oTemplate);
+        if(!$oScore || !$oScore->isEnabled())
+            return false;
+
+        return $oScore;
+    }
+
+	public function getReportObject($sSystem, $iId)
+    {
+        if(empty($sSystem) || (int)$iId == 0)
+            return false;
+
+        $oReport = BxDolReport::getObjectInstance($sSystem, $iId, true, $this->_oTemplate);
+        if(!$oReport || !$oReport->isEnabled())
+            return false;
+
+        return $oReport;
+    }
+
+    public function getAttachmentsMenuObject()
+    {
+        return BxDolMenu::getObjectInstance($this->_oConfig->getObject('menu_post_attachments'), $this->_oTemplate);
+    }
+
+    public function getManageMenuObject()
+    {
+        return BxDolMenu::getObjectInstance($this->_oConfig->getObject('menu_item_manage'), $this->_oTemplate);
+    }
+
+    public function getCacheItemObject()
+    {
+        $oCacheEngine = bx_instance('BxDolCache' . $this->_oConfig->getCacheItemEngine());
+        if(!$oCacheEngine->isAvailable())
+            $oCacheEngine = bx_instance('BxDolCacheFile');
+
+        return $oCacheEngine;
+    }
+
+    public function getConnectionMuteObject()
+    {
+        return BxDolConnection::getObjectInstance($this->_oConfig->getObject('connection_mute'));
+    }
+
+    //--- Check permissions methods ---//
+    public function serviceCheckAllowedViewForProfile ($aDataEntry, $isPerformAction = false, $iProfileId = false)
+    {
+        if(!$iProfileId)
+            $iProfileId = $this->_iProfileId;
+
+        $CNF = &$this->_oConfig->CNF;
+
+        // moderator and owner always have access
+        $iOwnerId = (int)$aDataEntry['owner_id'];
+        if(!empty($iProfileId) && (abs($iOwnerId) == (int)$iProfileId || $this->isModerator()))
+            return CHECK_ACTION_RESULT_ALLOWED;
+
+        // check ACL
+        if($iOwnerId != 0 && ($oOwner = BxDolProfile::getInstanceMagic($iOwnerId)) !== false) {
+            $mixedCheckResult = BxDolService::call($oOwner->getModule(), 'check_allowed_with_content_for_profile', array('view', $oOwner->getContentId(), $iProfileId));
+            if($mixedCheckResult !== CHECK_ACTION_RESULT_ALLOWED)
+                return $mixedCheckResult;
+        }
+
+        // check privacy
+        if(!empty($CNF['OBJECT_PRIVACY_VIEW'])) {
+            $oPrivacy = BxDolPrivacy::getObjectInstance($CNF['OBJECT_PRIVACY_VIEW']);
+            if($oPrivacy && !$oPrivacy->check($aDataEntry[$CNF['FIELD_ID']], $iProfileId))
+                return _t('_sys_access_denied_to_private_content');
+        }
+
+        // check alert to allow custom checks
+        $mixedResult = null;
+        bx_alert('system', 'check_allowed_view', 0, 0, array('module' => $this->getName(), 'content_info' => $aDataEntry, 'profile_id' => $iProfileId, 'override_result' => &$mixedResult));
+        if($mixedResult !== null)
+            return $mixedResult;
+
+        return CHECK_ACTION_RESULT_ALLOWED;
+    }
+
+    public function isModerator()
+    {
+        $sModule = $this->getName();
+        $iUserId = (int)$this->getUserId();
+
+        $aCheckResult = checkActionModule($iUserId, 'edit', $sModule);
+        if($aCheckResult[CHECK_ACTION_RESULT] === CHECK_ACTION_RESULT_ALLOWED)
+            return true;
+
+        $aCheckResult = checkActionModule($iUserId, 'delete', $sModule);
+        if($aCheckResult[CHECK_ACTION_RESULT] === CHECK_ACTION_RESULT_ALLOWED)
+            return true;
+
+        return false;
+    }
+
+    public function isAllowedPost($bPerform = false)
+    {
+        if(isAdmin())
+            return true;
+
+        $iUserId = $this->getUserId();
+
+        $aCheckResult = checkActionModule($iUserId, 'post', $this->getName(), $bPerform);
+        if($aCheckResult[CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED)
+            return $aCheckResult[CHECK_ACTION_MESSAGE];
+        
+        if(!empty($this->_iOwnerId) && ($oProfileOwner = BxDolProfile::getInstance($this->_iOwnerId)) !== false) {
+            if($oProfileOwner->checkAllowedPostInProfile() !== CHECK_ACTION_RESULT_ALLOWED)
+                return _t('_sys_txt_access_denied');
+
+            bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_post', $oProfileOwner->id(), $iUserId, array('check_result' => &$aCheckResult));
+        }
+
+        return $aCheckResult[CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED ? $aCheckResult[CHECK_ACTION_MESSAGE] : true;
+    }
+
+    public function isAllowedView($aEvent, $bPerform = false)
+    {
+        $CNF = $this->_oConfig->CNF;
+
+        if((int)$aEvent[$CNF['FIELD_OWNER_ID']] == 0)
+            return true;
+
+        $oProfileOwner = BxDolProfile::getInstance($aEvent[$CNF['FIELD_OWNER_ID']]);
+        if($oProfileOwner && $oProfileOwner->checkAllowedProfileView() !== CHECK_ACTION_RESULT_ALLOWED)
+            return false;
+
+        $oPrivacy = BxDolPrivacy::getObjectInstance($this->_oConfig->getObject('privacy_view'));
+        if(!$oPrivacy) 
+            return true;
+
+        $oPrivacy->setTableFieldAuthor($this->_oConfig->isSystem($aEvent['type'], $aEvent['action']) ? 'owner_id' : 'object_id');
+
+        return $oPrivacy->check($aEvent[$CNF['FIELD_ID']]);
+    }
+
+    public function isAllowedEdit($aEvent, $bPerform = false)
+    {
+        if(!isLogged())
+            return false;
+            
+        //--- System posts and Reposts cannot be edited at all.
+        if(!$this->_oConfig->isCommon($aEvent['type'], $aEvent['action']) || $aEvent['type'] == $this->_oConfig->getPrefix('common_post') . 'repost')
+            return false;
+
+        if(isAdmin())
+            return true;
+
+        $iUserId = (int)$this->getUserId();
+        $iOwnerId = (int)$aEvent['owner_id'];
+        $iObjectId = abs((int)$aEvent['object_id']);
+        if($iObjectId == $iUserId && $this->_oConfig->isAllowEdit())
+           return true;
+
+        $aCheckResult = checkActionModule($iUserId, 'edit', $this->getName(), $bPerform);
+        if(!empty($iOwnerId) && ($oProfileOwner = BxDolProfile::getInstance($iOwnerId)) !== false)
+            bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_edit', $oProfileOwner->id(), $iUserId, array('check_result' => &$aCheckResult));
+
+        return $aCheckResult[CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED ? $aCheckResult[CHECK_ACTION_MESSAGE] : true;
+    }
+
+    public function isAllowedDelete($aEvent, $bPerform = false)
+    {
+        if(!isLogged())
+            return false;
+
+        if(isAdmin())
+            return true;
+
+        $iUserId = (int)$this->getUserId();
+        $iOwnerId = (int)$aEvent['owner_id'];
+        $iObjectId = abs((int)$aEvent['object_id']);
+        if((($iOwnerId == $iUserId && $this->_oConfig->isAllowDelete()) || ($this->_oConfig->isCommon($aEvent['type'], $aEvent['action']) && $iObjectId == $iUserId)))
+           return true;
+
+        $aCheckResult = checkActionModule($iUserId, 'delete', $this->getName(), $bPerform);
+        if(!empty($iOwnerId) && ($oProfileOwner = BxDolProfile::getInstance($iOwnerId)) !== false)
+            bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_delete', $oProfileOwner->id(), $iUserId, array('check_result' => &$aCheckResult));
+
+        return $aCheckResult[CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED ? $aCheckResult[CHECK_ACTION_MESSAGE] : true;
+    }
+
+    public function isAllowedComment($aEvent, $bPerform = false)
+    {
+        $mixedComments = $this->getCommentsData($aEvent['comments']);
+        if($mixedComments === false)
+            return false;
+
+        list($sSystem, $iObjectId) = $mixedComments;
+        $oCmts = $this->getCmtsObject($sSystem, $iObjectId);
+        
+        if($oCmts->isViewAllowed() !== CHECK_ACTION_RESULT_ALLOWED)
+            return false;
+
+        $oCmts->addCssJs();
+        return true;
+    }
+
+    public function isAllowedViewCounter($aEvent, $bPerform = false)
+    {
+        $mixedViews = $this->getViewsData($aEvent['views']);
+        if($mixedViews === false)
+            return false;
+
+        list($sSystem, $iObjectId) = $mixedViews;
+        $oView = $this->getViewObject($sSystem, $iObjectId);
+
+        if(!$oView->isAllowedViewView($bPerform))
+        	return false;
+
+        $bResult = true;
+        if(!empty($aEvent['owner_id']) && ($oProfileOwner = BxDolProfile::getInstance($aEvent['owner_id'])) !== false)
+            bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_view_counter', $oProfileOwner->id(), (int)$this->getUserId(), array('result' => &$bResult));
+
+        return $bResult;
+    }
+
+    public function isAllowedVote($aEvent, $bPerform = false)
+    {
+        $mixedVotes = $this->getVotesData($aEvent['votes']);
+        if($mixedVotes === false)
+            return false;
+
+        list($sSystem, $iObjectId) = $mixedVotes;
+        $oVote = $this->getVoteObject($sSystem, $iObjectId);
+
+        if(!$oVote->isAllowedVote($bPerform))
+        	return false;
+
+        $bResult = true;
+        if(!empty($aEvent['owner_id']) && ($oProfileOwner = BxDolProfile::getInstance($aEvent['owner_id'])) !== false)
+            bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_vote', $oProfileOwner->id(), (int)$this->getUserId(), array('result' => &$bResult));
+
+        return $bResult;
+    }
+
+    public function isAllowedReaction($aEvent, $bPerform = false)
+    {
+        $mixedReactions = $this->getReactionsData($aEvent['reactions']);
+        if($mixedReactions === false)
+            return false;
+
+        list($sSystem, $iObjectId) = $mixedReactions;
+        $oReaction = $this->getReactionObject($sSystem, $iObjectId);
+
+        if(!$oReaction->isAllowedVote($bPerform))
+            return false;
+
+        $bResult = true;
+        if(!empty($aEvent['owner_id']) && ($oProfileOwner = BxDolProfile::getInstance($aEvent['owner_id'])) !== false)
+            bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_reaction', $oProfileOwner->id(), (int)$this->getUserId(), array('result' => &$bResult));
+
+        return $bResult;
+    }
+
+    public function isAllowedScore($aEvent, $bPerform = false)
+    {
+        $mixedScores = $this->getScoresData($aEvent['scores']);
+        if($mixedScores === false)
+            return false;
+
+        list($sSystem, $iObjectId) = $mixedScores;
+        $oScore = $this->getScoreObject($sSystem, $iObjectId);
+
+        if(!$oScore->isAllowedVote($bPerform))
+        	return false;
+
+        $bResult = true;
+        if(!empty($aEvent['owner_id']) && ($oProfileOwner = BxDolProfile::getInstance($aEvent['owner_id'])) !== false)
+            bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_score', $oProfileOwner->id(), (int)$this->getUserId(), array('result' => &$bResult));
+
+        return $bResult;
+    }
+
+    public function isAllowedReport($aEvent, $bPerform = false)
+    {
+        $mixedReports = $this->getReportsData($aEvent['reports']);
+        if($mixedReports === false)
+            return false;
+
+        list($sSystem, $iObjectId) = $mixedReports;
+        $oReport = $this->getReportObject($sSystem, $iObjectId);
+
+        if(!$oReport->isAllowedReport($bPerform))
+        	return false;
+
+        $bResult = true;
+        if(!empty($aEvent['owner_id']) && ($oProfileOwner = BxDolProfile::getInstance($aEvent['owner_id'])) !== false)
+            bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_report', $oProfileOwner->id(), (int)$this->getUserId(), array('result' => &$bResult));
+
+        return $bResult;
+    }
+
+    public function isAllowedRepost($aEvent, $bPerform = false)
+    {
+        $iUserId = (int)$this->getUserId();
+        if($iUserId == 0)
+            return false;
+
+        $iPrivacy = (int)$aEvent['object_privacy_view'];
+        if($iPrivacy >= 0 && !in_array($iPrivacy, array(BX_DOL_PG_ALL, BX_DOL_PG_MEMBERS)))
+            return false;      
+
+        if(isAdmin())
+            return true;
+
+        $aCheckResult = checkActionModule($iUserId, 'repost', $this->getName(), $bPerform);
+        if(!empty($aEvent['owner_id']) && ($oProfileOwner = BxDolProfile::getInstance($aEvent['owner_id'])) !== false)
+            bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_repost', $oProfileOwner->id(), $iUserId, array('check_result' => &$aCheckResult));
+
+        return $aCheckResult[CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED ? $aCheckResult[CHECK_ACTION_MESSAGE] : true;
+    }
+
+    public function isAllowedSend($aEvent, $bPerform = false)
+    {
+        if(!$this->_oDb->isEnabledByName('bx_convos'))
+            return false;
+
+        if(isAdmin())
+            return true;
+
+        $iUserId = (int)$this->getUserId();
+        if($iUserId == 0)
+            return false;
+
+        $aCheckResult = checkActionModule($iUserId, 'send', $this->getName(), $bPerform);
+        if(!empty($aEvent['owner_id']) && ($oProfileOwner = BxDolProfile::getInstance($aEvent['owner_id'])) !== false)
+            bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_send', $oProfileOwner->id(), $iUserId, array('check_result' => &$aCheckResult));
+
+        return $aCheckResult[CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED ? $aCheckResult[CHECK_ACTION_MESSAGE] : true;
+    }
+
+    public function isAllowedMute($aEvent, $bPerform = false)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        if(!empty($aEvent[$CNF['FIELD_OWNER_ID']]) && $aEvent[$CNF['FIELD_OWNER_ID']] != $this->_iProfileId)
+            return false;
+
+        $iAuthor = (int)$aEvent[$CNF['FIELD_OWNER_ID']];
+        if(!$this->_oConfig->isSystem($aEvent['type'], $aEvent['action']))
+            $iAuthor = (int)$aEvent[$CNF['FIELD_OBJECT_ID']];
+
+        if($this->_iProfileId == $iAuthor || $this->getConnectionMuteObject()->isConnected($this->_iProfileId, $iAuthor))
+            return false;
+
+        return $this->_isAllowedMute($bPerform);
+    }
+
+    public function isAllowedUnmute($iAuthor, $bPerform = false)
+    {
+    	if(!$this->getConnectionMuteObject()->isConnected($this->_iProfileId, $iAuthor))
+            return false;
+
+        return $this->_isAllowedMute($bPerform);
+    }
+
+    /**
+     * Pin - "Pin here" - pin the post on Profile Timeline for profile owner.
+     * Can be done by profile owner for himself or by admin for profile owner to see.
+     * @param type $aEvent
+     * @param type $bPerform
+     * @return boolean
+     */
+    public function isAllowedPin($aEvent, $bPerform = false)
+    {
+    	if((int)$aEvent['pinned'] != 0)
+    		return false;
+
+        return $this->_isAllowedPin($aEvent, $bPerform);
+    }
+
+    public function isAllowedUnpin($aEvent, $bPerform = false)
+    {
+    	if((int)$aEvent['pinned'] == 0)
+    		return false;
+
+        return $this->_isAllowedPin($aEvent, $bPerform);
+    }
+
+    /**
+     * Stick - "Pin for All" - pin the post on Public Timeline for everybody to see.
+     * Is available for Administrators/Moderators only.
+     * @param type $aEvent
+     * @param type $bPerform
+     * @return boolean
+     */
+    public function isAllowedStick($aEvent, $bPerform = false)
+    {
+    	if((int)$aEvent['sticked'] != 0)
+    		return false;
+    
+    	return $this->_isAllowedStick($aEvent, $bPerform);
+    }
+    
+    public function isAllowedUnstick($aEvent, $bPerform = false)
+    {
+    	if((int)$aEvent['sticked'] == 0)
+    		return false;
+    
+    	return $this->_isAllowedStick($aEvent, $bPerform);
+    }
+    
+    public function isAllowedPromote($aEvent, $bPerform = false)
+    {
+    	if((int)$aEvent['promoted'] != 0)
+    		return false;
+
+        return $this->_isAllowedPromote($aEvent, $bPerform);
+    }
+
+    public function isAllowedUnpromote($aEvent, $bPerform = false)
+    {
+    	if((int)$aEvent['promoted'] == 0)
+    		return false;
+
+        return $this->_isAllowedPromote($aEvent, $bPerform);
+    }
+
+    public function isAllowedMore($aEvent, $bPerform = false)
+    {
+    	$oMoreMenu = $this->getManageMenuObject();
+    	$oMoreMenu->setEvent($aEvent);
+    	return $oMoreMenu->isVisible();
+    }
+
+    public function checkAllowedView ($aContentInfo, $isPerformAction = false)
+    {
+        if(!$this->isAllowedView($aContentInfo, $isPerformAction))
+            return _t('_sys_txt_access_denied');
+
+        return CHECK_ACTION_RESULT_ALLOWED;
+    }
+
+    public function checkAllowedCommentsView ($aContentInfo, $isPerformAction = false)
+    {
+        $CNF = $this->_oConfig->CNF;
+
+        $iOwner = (int)$aContentInfo[$CNF['FIELD_OWNER_ID']];
+        if($iOwner == 0) //--- in case of Public Timeline.
+            return CHECK_ACTION_RESULT_ALLOWED;
+
+        $oOwner = BxDolProfile::getInstance($iOwner);
+        if(!$oOwner) //--- in case of non-existed Timeline owner.
+            return _t('_sys_txt_access_denied');
+
+        $mixedResult = $oOwner->checkAllowedProfileView();
+        if($mixedResult !== CHECK_ACTION_RESULT_ALLOWED)
+            return $mixedResult;
+
+        return $this->checkAllowedView($aContentInfo, $isPerformAction);
+    }
+
+    public function checkAllowedCommentsPost ($aContentInfo, $isPerformAction = false)
+    {
+        $sError = '_sys_txt_access_denied';
+
+        $aContentInfo = array_merge($aContentInfo, $this->_oTemplate->getDataCached($aContentInfo));
+        if($aContentInfo === false)
+            return _t($sError);
+
+        if(!$this->isAllowedComment($aContentInfo, $isPerformAction))
+            return _t($sError);
+
+        return CHECK_ACTION_RESULT_ALLOWED;
+    }
+
+    public function checkAllowedEditAnyEntryForProfile ($isPerformAction = false, $iProfileId = false)
+    {
+        if(!$iProfileId)
+            $iProfileId = $this->_iProfileId;
+
+    	$aCheck = checkActionModule($iProfileId, 'edit', $this->getName(), $isPerformAction);
+    	if($aCheck[CHECK_ACTION_RESULT] === CHECK_ACTION_RESULT_ALLOWED)
+    		return CHECK_ACTION_RESULT_ALLOWED;
+
+    	return _t('_sys_txt_access_denied');
+    }
+
+    public function onPost($iContentId)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iContentId));
+
+        if($this->_oConfig->isSystem($aEvent['type'], $aEvent['action'])) {
+            //--- Request event's data from content module and update it in the Timeline DB.
+            $this->_oTemplate->getDataCached($aEvent);
+
+            $sPostType = 'system';
+            $iSenderId = $iObjectAuthorId = (int)$aEvent['owner_id'];
+        } 
+        else {
+            $sPostType = 'common';
+            $iSenderId = $iObjectAuthorId = (int)$aEvent['object_id'];
+        }
+
+        //--- Delete feed cached
+        $this->_oDb->deleteCache(array('context_id' => 0)); //--- Delete cache for Public feed
+        $this->_oDb->deleteCache(array('context_id' => $aEvent[$CNF['FIELD_OWNER_ID']])); //--- Delete cache for old context
+
+        //--- Event -> Post/Defer for Alerts Engine ---//
+        $sAction = ($aEvent[$CNF['FIELD_STATUS']] == BX_TIMELINE_STATUS_AWAITING ? 'defer' : 'post') . '_' . $sPostType;
+        bx_alert($this->_oConfig->getObject('alert'), $sAction, $iContentId, $iSenderId, array(
+            'owner_id' => $aEvent['owner_id'],
+            'object_author_id' => $iObjectAuthorId,
+            'privacy_view' => $aEvent['object_privacy_view'],
+        ));
+        //--- Event -> Post for Alerts Engine ---//
+    }
+
+    public function onPublished($iContentId)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iContentId));
+
+        //--- Clear Item cache
+        $this->getCacheItemObject()->removeAllByPrefix($this->_oConfig->getPrefix('cache_item') . $iContentId);
+        
+        //--- Clear Feed cache
+        $this->_oDb->deleteCache(array('context_id' => $aEvent[$CNF['FIELD_OWNER_ID']]));
+
+        $this->onPost($iContentId);
+    }
+    
+    public function onFailed($iContentId)
+    {
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iContentId));
+
+        //--- Clear Item cache
+        $this->getCacheItemObject()->removeAllByPrefix($this->_oConfig->getPrefix('cache_item') . $iContentId);
+
+        if($this->_oConfig->isSystem($aEvent['type'], $aEvent['action'])) {
+            //--- Request event's data from content module and update it in the Timeline DB.
+            $this->_oTemplate->getDataCached($aEvent);
+
+            $sPostType = 'system';
+            $iSenderId = $iObjectAuthorId = (int)$aEvent['owner_id'];
+        } 
+        else {
+            $sPostType = 'common';
+            $iSenderId = $iObjectAuthorId = (int)$aEvent['object_id'];
+        }
+
+        //--- Event -> Fail for Alerts Engine ---//
+        bx_alert($this->_oConfig->getObject('alert'), 'fail_' . $sPostType, $iContentId, $iSenderId, array(
+            'owner_id' => $aEvent['owner_id'],
+            'object_author_id' => $iObjectAuthorId,
+            'privacy_view' => $aEvent['object_privacy_view'],
+        ));
+        //--- Event -> Post for Alerts Engine ---//
+    }
+
+    public function onRepost($iContentId, $aReposted = array())
+    {
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iContentId));
+
+        if(empty($aReposted)) {
+            $aContent = unserialize($aEvent['content']);
+
+            $aReposted = $this->_oDb->getReposted($aContent['type'], $aContent['action'], $aContent['object_id']);
+            if(empty($aReposted) || !is_array($aReposted))
+                return;
+        }
+
+        $iUserId = $this->getUserId();
+        $this->_oDb->insertRepostTrack($aEvent['id'], $iUserId, $this->getUserIp(), $aReposted['id']);
+        $this->_oDb->updateRepostCounter($aReposted['id'], $aReposted['reposts']);
+
+        //--- Timeline -> Update for Alerts Engine ---//
+        bx_alert($this->_oConfig->getObject('alert'), 'repost', $aReposted['id'], $iUserId, array(
+            'privacy_view' => $aEvent['object_privacy_view'],
+            'object_author_id' => $aReposted['owner_id'],
+            'repost_id' => $iContentId,
+        ));
+        //--- Timeline -> Update for Alerts Engine ---//
+    }
+
+    public function onDelete($aEvent)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $iUserId = $this->getUserId();
+    	$sCommonPostPrefix = $this->_oConfig->getPrefix('common_post');
+    	$sCommonPostComment = $this->_oConfig->getObject('comment');
+    	
+    	//--- Delete comments for Common posts.
+    	if($this->_oConfig->isCommon($aEvent['type'], $aEvent['action'])) {
+            $oComments = $this->getCmtsObject($sCommonPostComment, $aEvent[$CNF['FIELD_ID']]);
+            if($oComments !== false)
+                $oComments->onObjectDelete($aEvent[$CNF['FIELD_ID']]);
+    	}
+
+    	//--- Delete attached photos, videos and links when common event was deleted.
+    	if($aEvent['type'] == $sCommonPostPrefix . BX_TIMELINE_PARSE_TYPE_POST) {
+            $this->_deleteMedia($CNF['FIELD_PHOTO'], $aEvent[$CNF['FIELD_ID']]);
+            $this->_deleteMedia($CNF['FIELD_VIDEO'], $aEvent[$CNF['FIELD_ID']]);
+
+            $this->_deleteLinks($aEvent[$CNF['FIELD_ID']]);
+    	}
+
+    	//--- Update parent event when repost event was deleted.
+    	$bRepost = $aEvent['type'] == $sCommonPostPrefix . BX_TIMELINE_PARSE_TYPE_REPOST;
+        if($bRepost) {
+            $this->_oDb->deleteRepostTrack($aEvent[$CNF['FIELD_ID']]);
+
+            $aContent = unserialize($aEvent['content']);
+            $aReposted = $this->_oDb->getReposted($aContent['type'], $aContent['action'], $aContent['object_id']);
+            if(!empty($aReposted) && is_array($aReposted))
+                $this->_oDb->updateRepostCounter($aReposted[$CNF['FIELD_ID']], $aReposted['reposts'], -1);
+        }
+
+        //--- Find and delete repost events when parent event was deleted.
+        $bSystem = $this->_oConfig->isSystem($aEvent['type'], $aEvent['action']);
+	    $aRepostEvents = $this->_oDb->getEvents(array('browse' => 'reposted_by_descriptor', 'type' => $aEvent['type']));
+		foreach($aRepostEvents as $aRepostEvent) {
+			$aContent = unserialize($aRepostEvent['content']);
+			if(isset($aContent['type']) && $aContent['type'] == $aEvent['type'] && isset($aContent['object_id']) && (($bSystem && (int)$aContent['object_id'] == (int)$aEvent['object_id']) || (!$bSystem  && (int)$aContent['object_id'] == (int)$aEvent[$CNF['FIELD_ID']])) && (int)$this->_oDb->deleteEvent(array('id' => (int)$aRepostEvent[$CNF['FIELD_ID']])) > 0) {
+			    $oComments = $this->getCmtsObject($sCommonPostComment, $aRepostEvent[$CNF['FIELD_ID']]);
+                if($oComments !== false)
+                    $oComments->onObjectDelete($aRepostEvent[$CNF['FIELD_ID']]);
+
+                bx_alert($this->_oConfig->getObject('alert'), 'delete_repost', $aEvent[$CNF['FIELD_ID']], $iUserId, array(
+                    'repost_id' => $aRepostEvent[$CNF['FIELD_ID']],
+                ));
+            }
+		}
+
+        //--- Delete associated meta.
+        $oMetatags = BxDolMetatags::getObjectInstance($this->_oConfig->getObject('metatags'));
+        $oMetatags->onDeleteContent($aEvent[$CNF['FIELD_ID']]);
+
+        //--- Delete feed cache.
+        $this->_oDb->deleteCache(array('event_id' => $aEvent[$CNF['FIELD_ID']]));
+        
+        //--- Delete item cache.
+        $sCacheItemKey = $this->_oConfig->getCacheItemKey($aEvent[$CNF['FIELD_ID']]);
+        $this->getCacheItemObject()->delData($sCacheItemKey);
+
+        //--- Event -> Delete for Alerts Engine ---//
+        if($bRepost)
+            bx_alert($this->_oConfig->getObject('alert'), 'delete_repost', $aReposted[$CNF['FIELD_ID']], $iUserId, array(
+                'repost_id' => $aEvent[$CNF['FIELD_ID']],
+            ));
+        else
+            bx_alert($this->_oConfig->getObject('alert'), 'delete', $aEvent[$CNF['FIELD_ID']], $iUserId);
+        //--- Event -> Delete for Alerts Engine ---//
+    }
+
+    public function getParams($sView = '', $sType = '', $iOwnerId = 0, $iStart = 0, $iPerPage = 0, $sFilter = BX_TIMELINE_FILTER_ALL, $aModules = array(), $iTimeline = 0)
+    {
+        return $this->_prepareParams(array(
+            'view' => $sView,
+            'type' => $sType,
+            'owner_id' => $iOwnerId,
+            'start' => $iStart, 
+            'per_page' => $iPerPage, 
+            'timeline' => $iTimeline, 
+            'filter' => $sFilter, 
+            'modules' => $aModules
+        ));
+    }
+
+    public function getParamsExt($aParams = array())
+    {
+        return $this->_prepareParams($aParams);
+    }
+
+    public function getViewsData(&$aViews)
+    {
+        if(empty($aViews) || !is_array($aViews))
+            return false;
+
+        $sSystem = isset($aViews['system']) ? $aViews['system'] : '';
+        $iObjectId = isset($aViews['object_id']) ? (int)$aViews['object_id'] : 0;
+        $iCount = isset($aViews['count']) ? (int)$aViews['count'] : 0;
+        if($sSystem == '' || $iObjectId == 0)
+            return false;
+
+        return array($sSystem, $iObjectId, $iCount);
+    }
+
+    public function getVotesData(&$aVotes)
+    {
+        if(empty($aVotes) || !is_array($aVotes))
+            return false;
+
+        $sSystem = isset($aVotes['system']) ? $aVotes['system'] : '';
+        $iObjectId = isset($aVotes['object_id']) ? (int)$aVotes['object_id'] : 0;
+        $iCount = isset($aVotes['count']) ? (int)$aVotes['count'] : 0;
+        if($sSystem == '' || $iObjectId == 0)
+            return false;
+
+        return array($sSystem, $iObjectId, $iCount);
+    }
+
+    public function getReactionsData(&$aReactions)
+    {
+        if(empty($aReactions) || !is_array($aReactions))
+            return false;
+
+        $sSystem = isset($aReactions['system']) ? $aReactions['system'] : '';
+        $iObjectId = isset($aReactions['object_id']) ? (int)$aReactions['object_id'] : 0;
+        $iCount = isset($aReactions['count']) ? (int)$aReactions['count'] : 0;
+        if($sSystem == '' || $iObjectId == 0)
+            return false;
+
+        return array($sSystem, $iObjectId, $iCount);
+    }
+
+    public function getScoresData(&$aScores)
+    {
+        if(empty($aScores) || !is_array($aScores))
+            return false;
+
+        $sSystem = isset($aScores['system']) ? $aScores['system'] : '';
+        $iObjectId = isset($aScores['object_id']) ? (int)$aScores['object_id'] : 0;
+        $iScore = isset($aScores['score']) ? (int)$aScores['score'] : 0;
+        if($sSystem == '' || $iObjectId == 0)
+            return false;
+
+        return array($sSystem, $iObjectId, $iScore);
+    }
+
+    public function getReportsData(&$aReports)
+    {
+        if(empty($aReports) || !is_array($aReports))
+            return false;
+
+        $sSystem = isset($aReports['system']) ? $aReports['system'] : '';
+        $iObjectId = isset($aReports['object_id']) ? (int)$aReports['object_id'] : 0;
+        $iCount = isset($aReports['count']) ? (int)$aReports['count'] : 0;
+        if($sSystem == '' || $iObjectId == 0)
+            return false;
+
+        return array($sSystem, $iObjectId, $iCount);
+    }
+
+    public function getCommentsData(&$aComments)
+    {
+        if(empty($aComments) || !is_array($aComments))
+            return false;
+
+        $sSystem = isset($aComments['system']) ? $aComments['system'] : '';
+        $iObjectId = isset($aComments['object_id']) ? (int)$aComments['object_id'] : 0;
+        $iCount = isset($aComments['count']) ? (int)$aComments['count'] : 0;
+        if($sSystem == '' || $iObjectId == 0 || ($iCount == 0 && !isLogged()))
+            return false;
+
+        return array($sSystem, $iObjectId, $iCount);
+    }
+
+    public function getEventLinks($iEventId)
+    {
+        $aLinks = $this->_oDb->getLinks($iEventId);
+        if(empty($aLinks) || !is_array($aLinks))
+            return array();
+
+        $oTranscoder = BxDolTranscoderImage::getObjectInstance($this->_oConfig->getObject('transcoder_photos_preview'));
+
+        $aResult = array();
+        foreach($aLinks as $aLink)
+            $aResult[] = array(
+                'url' => $aLink['url'],
+                'title' => $aLink['title'],
+                'text' => $aLink['text'],
+                'thumbnail' => (int)$aLink['media_id'] != 0 ? $oTranscoder->getFileUrl($aLink['media_id']) : ''
+            );
+
+        return $aResult;
+    }
+
+    public function getEventImages($iEventId)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $aPhotos = $this->_oDb->getMedia($CNF['FIELD_PHOTO'], $iEventId);
+        if(empty($aPhotos) || !is_array($aPhotos))
+            return array();
+
+        $oTranscoder = BxDolTranscoderImage::getObjectInstance($this->_oConfig->getObject('transcoder_photos_view'));
+        $oTranscoderMedium = BxDolTranscoderImage::getObjectInstance($this->_oConfig->getObject('transcoder_photos_medium'));
+        $oTranscoderBig = BxDolTranscoderImage::getObjectInstance($this->_oConfig->getObject('transcoder_photos_big'));
+
+        $aResult = array();
+        foreach($aPhotos as $iPhotoId) {
+            $sPhotoSrc = $oTranscoder->getFileUrl($iPhotoId);
+            $sPhotoSrcMedium = $oTranscoderMedium->getFileUrl($iPhotoId);
+            $sPhotoSrcBig = $oTranscoderBig->getFileUrl($iPhotoId);
+            if(empty($sPhotoSrcMedium) && !empty($sPhotoSrc))
+                $sPhotoSrcMedium = $sPhotoSrc;
+            if(empty($sPhotoSrcBig) && !empty($sPhotoSrcMedium))
+                $sPhotoSrcBig = $sPhotoSrcMedium;
+
+            $aResult[] = array(
+                'id' => $iPhotoId,
+                'src' => $sPhotoSrc,
+                'src_medium' => $sPhotoSrcMedium,
+                'src_orig' => $sPhotoSrcBig,
+            );
+        }
+
+        return $aResult;
+    }
+
+    public function getEventVideos($iEventId)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $aVideos = $this->_oDb->getMedia($CNF['FIELD_VIDEO'], $iEventId);
+        if(empty($aVideos) || !is_array($aVideos))
+            return array();
+
+        $oStorage = BxDolStorage::getObjectInstance($this->_oConfig->getObject('storage_videos'));
+
+        $oTranscoderPoster = BxDolTranscoderVideo::getObjectInstance($this->_oConfig->getObject('transcoder_videos_poster'));
+        $oTranscoderMp4 = BxDolTranscoderVideo::getObjectInstance($this->_oConfig->getObject('transcoder_videos_mp4'));
+        $oTranscoderMp4Hd = BxDolTranscoderVideo::getObjectInstance($this->_oConfig->getObject('transcoder_videos_mp4_hd'));
+
+        $aResult = array();
+        foreach($aVideos as $iVideoId) {
+            $sVideoUrl = $oStorage->getFileUrlById($iVideoId);
+            $aVideoSize = $oTranscoderMp4Hd->getVideoSize($sVideoUrl);
+
+            $sVideoUrlHd = '';
+            if(!empty($aVideoSize) && is_array($aVideoSize) && (int)$aVideoSize['h'] >= 720)
+                $sVideoUrlHd = $oTranscoderMp4Hd->getFileUrl($iVideoId);
+
+            $aResult[$iVideoId] = array(
+                'id' => $iVideoId,
+                'src_poster' => $oTranscoderPoster->getFileUrl($iVideoId),
+                'src_mp4' => $oTranscoderMp4->getFileUrl($iVideoId),
+                'src_mp4_hd' => $sVideoUrlHd,
+            );
+        }
+
+        return $aResult;
+    }
+
+    /**
+     * Protected Methods 
+     */
+    protected function _serviceGetBlockView($iProfileId = 0, $aBrowseParams = array())
+    {
+        if(empty($iProfileId) && bx_get('profile_id') !== false)
+            $iProfileId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
+
+        if(empty($iProfileId) && isLogged())
+            $iProfileId = bx_get_logged_profile_id();
+
+        $aBrowseParams['owner_id'] = $iProfileId;
+
+        $aBlock = $this->_getBlockView($aBrowseParams);
+        if(!empty($aBlock))
+            return $aBlock;
+
+        return array('content' => MsgBox(_t('_bx_timeline_txt_msg_no_results')));
+    }
+
+    protected function _serviceGetBlockViewProfile($sProfileModule = 'bx_persons', $iProfileContentId = 0, $aBrowseParams = array())
+    {
+        if(empty($sProfileModule))
+            return array();
+
+        if(empty($iProfileContentId) && bx_get('id') !== false)
+            $iProfileContentId = bx_process_input(bx_get('id'), BX_DATA_INT);
+
+        $oProfile = BxDolProfile::getInstanceByContentAndType($iProfileContentId, $sProfileModule);
+        if(empty($oProfile))
+            return array();
+
+        $aBrowseParams['owner_id'] = $oProfile->id();
+
+        return $this->_getBlockView($aBrowseParams);
+    }
+
+    protected function _serviceGetBlockViews($aBrowseParams = array())
+    {
+        $aParams = $this->_prepareParams($aBrowseParams);
+
+        $this->_iOwnerId = $aParams['owner_id'];
+
+        return $this->_oTemplate->getViewsBlock($aParams);
+    }
+
+    protected function _serviceGetBlockViewHome($aBrowseParams = array())
+    {
+        $sRssUrl = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'rss/' . $aBrowseParams['type'] . '/';
+        BxDolTemplate::getInstance()->addPageRssLink(_t('_bx_timeline_page_title_view_home'), $sRssUrl);
+
+        return $this->_serviceGetBlockViewByType($aBrowseParams);
+    }
+
+    protected function _serviceGetBlockViewHot($aBrowseParams = array())
+    {
+        $sRssUrl = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'rss/' . $aBrowseParams['type'] . '/';
+        BxDolTemplate::getInstance()->addPageRssLink(_t('_bx_timeline_page_title_view_hot'), $sRssUrl);
+
+        return $this->_serviceGetBlockViewByType($aBrowseParams);
+    }
+
+    protected function _serviceGetBlockViewByType($aBrowseParams = array())
+    {
+        $aParams = $this->_prepareParams($aBrowseParams);
+
+        $this->_iOwnerId = $aParams['owner_id'];
+
+        return array(
+            'content' => $this->_oTemplate->getViewBlock($aParams)
+        );
+    }
+
+    protected function _getBlockPost($iProfileId, $aParams = array())
+    {
+        $this->_iOwnerId = $iProfileId;
+
+        if($this->isAllowedPost() !== true)
+            return array();
+
+        return array(
+            'content' => $this->_oTemplate->getPostBlock($this->_iOwnerId, $aParams)
+        );
+    }
+
+    protected function _getBlockView($aBrowseParams = array())
+    {
+        if(empty($aBrowseParams['owner_id']))
+            return array();
+
+        $aParams = $this->_prepareParams($aBrowseParams);
+        if(empty($aParams['per_page']))
+            $aParams['per_page'] = $this->_oConfig->getPerPage('profile');
+
+        $this->_iOwnerId = $aParams['owner_id'];
+        $oProfileOwner = BxDolProfile::getInstance($this->_iOwnerId);
+
+        $mixedResult = $oProfileOwner->checkAllowedProfileView();
+        if($mixedResult !== CHECK_ACTION_RESULT_ALLOWED)
+            return array('content' => MsgBox($mixedResult));
+
+        $sUserName = $this->getObjectUser($aParams['owner_id'])->getDisplayName();
+
+        $sView = $aParams['view'];
+        $sRssUrl = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'rss/' . BX_BASE_MOD_NTFS_TYPE_OWNER . '/' . $this->_iOwnerId . '/';
+        $sJsObject = $this->_oConfig->getJsObjectView($aParams);
+        $aMenu = array(
+            array('id' => $sView . '-view-all', 'name' => $sView . '-view-all', 'class' => '', 'link' => 'javascript:void(0)', 'onclick' => 'javascript:' . $sJsObject . '.changeFilter(this)', 'target' => '_self', 'title' => _t('_bx_timeline_menu_item_view_all'), 'active' => 1),
+            array('id' => $sView . '-view-owner', 'name' => $sView . '-view-owner', 'class' => '', 'link' => 'javascript:void(0)', 'onclick' => 'javascript:' . $sJsObject . '.changeFilter(this)', 'target' => '_self', 'title' => _t('_bx_timeline_menu_item_view_owner', $sUserName)),
+            array('id' => $sView . '-view-other', 'name' => $sView . '-view-other', 'class' => '', 'link' => 'javascript:void(0)', 'onclick' => 'javascript:' . $sJsObject . '.changeFilter(this)', 'target' => '_self', 'title' => _t('_bx_timeline_menu_item_view_other')),
+            array('id' => $sView . '-get-rss', 'name' => $sView . '-get-rss', 'class' => '', 'link' => $sRssUrl, 'onclick' => '', 'target' => '_blank', 'title' => _t('_bx_timeline_menu_item_get_rss')),
+        );
+
+        $sContent = '';
+        bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_view', $this->_iOwnerId, $this->getUserId(), array('override_content' => &$sContent, 'params' => &$aParams, 'menu' => &$aMenu));
+
+        $oMenu = new BxTemplMenuInteractive(array('template' => 'menu_interactive_vertical.html', 'menu_id'=> $sView . '-view-all', 'menu_items' => $aMenu));
+        $oMenu->setSelected('', $sView . '-view-all');
+
+        if (!$sContent)
+            $sContent = $this->_oTemplate->getViewBlock($aParams);
+
+        BxDolTemplate::getInstance()->addPageRssLink(_t('_bx_timeline_page_title_view'), $sRssUrl);
+
+        return array('content' => $sContent, 'menu' => $oMenu);
+    }
+    
+    protected function _getContentForTimelinePost($aEvent, $aContentInfo, $aBrowseParams = array())
+    {
+    	$CNF = &$this->_oConfig->CNF;
+
+        $iId = (int)$aContentInfo[$CNF['FIELD_ID']];
+    	$sUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $iId);
+
+        $sText = ''; 
+        if(isset($aContentInfo['content'])){
+            $aTmp = unserialize($aContentInfo['content']);
+            if(isset($aTmp['text']))
+                $sText = $aTmp['text'];
+        }
+
+        if(empty($sText) && !empty($aContentInfo[$CNF['FIELD_TITLE']]))
+            $sText = $aContentInfo[$CNF['FIELD_TITLE']];
+
+        if(!empty($CNF['OBJECT_METATAGS']) && !empty($sText)) {
+            $oMetatags = BxDolMetatags::getObjectInstance($CNF['OBJECT_METATAGS']);
+            $sText = $oMetatags->metaParse($iId, $sText);
+        }
+
+        return array(
+            'sample' => isset($CNF['T']['txt_sample_single_with_article']) ? $CNF['T']['txt_sample_single_with_article'] : $CNF['T']['txt_sample_single'],
+            'sample_wo_article' => $CNF['T']['txt_sample_single'],
+            'sample_action' => isset($CNF['T']['txt_sample_action']) ? $CNF['T']['txt_sample_action'] : '',
+            'url' => $sUrl,
+            'title' => '',
+            'text' => $sText,
+            'links' => $this->getEventLinks($iId),
+            'images' => array(),
+            'images_attach' => $this->getEventImages($iId),
+            'videos' => array(),
+            'videos_attach' => $this->getEventVideos($iId),
+            'files' => array(),
+            'files_attach' => array()
+        );
+    }
+
+    protected function _isAllowedMute($bPerform = false)
+    {
+    	if($this->_iProfileId == 0)
+            return false;
+
+        if(isAdmin())
+           return true;
+
+        $aCheckResult = checkActionModule($this->_iProfileId, 'mute', $this->getName(), $bPerform);
+        return $aCheckResult[CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED ? $aCheckResult[CHECK_ACTION_MESSAGE] : true;
+    }
+
+    protected function _isAllowedPin($aEvent, $bPerform = false)
+    {
+    	$iUserId = (int)$this->getUserId();
+    	if($iUserId == 0)
+    		return false;
+
+		if(isAdmin() || (int)$aEvent['owner_id'] == $iUserId || ((int)$aEvent['owner_id'] == 0 && $this->_oConfig->isCommon($aEvent['type'], $aEvent['action']) && (int)$aEvent['object_id'] == $iUserId))
+           return true;
+
+        $aCheckResult = checkActionModule($iUserId, 'pin', $this->getName(), $bPerform);
+        if(!empty($aEvent['owner_id']) && ($oProfileOwner = BxDolProfile::getInstance($aEvent['owner_id'])) !== false)
+            bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_pin', $oProfileOwner->id(), $iUserId, array('check_result' => &$aCheckResult));
+
+        return $aCheckResult[CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED ? $aCheckResult[CHECK_ACTION_MESSAGE] : true;
+    }
+
+    protected function _isAllowedStick($aEvent, $bPerform = false)
+    {
+    	$iUserId = (int)$this->getUserId();
+    	if($iUserId == 0)
+    		return false;
+
+    	if(isAdmin())
+    		return true;
+
+    	$aCheckResult = checkActionModule($iUserId, 'stick', $this->getName(), $bPerform);
+    	if(!empty($aEvent['owner_id']) && ($oProfileOwner = BxDolProfile::getInstance($aEvent['owner_id'])) !== false)
+            bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_stick', $oProfileOwner->id(), $iUserId, array('check_result' => &$aCheckResult));
+    
+    	return $aCheckResult[CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED ? $aCheckResult[CHECK_ACTION_MESSAGE] : true;
+    }
+
+    protected function _isAllowedPromote($aEvent, $bPerform = false)
+    {
+        if(isAdmin())
+            return true;
+
+        $iUserId = (int)$this->getUserId();
+        if($iUserId == 0)
+            return false;
+
+        $aCheckResult = checkActionModule($iUserId, 'promote', $this->getName(), $bPerform);
+        if(!empty($aEvent['owner_id']) && ($oProfileOwner = BxDolProfile::getInstance($aEvent['owner_id'])) !== false)
+            bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_promote', $oProfileOwner->id(), $iUserId, array('check_result' => &$aCheckResult));
+
+        return $aCheckResult[CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED ? $aCheckResult[CHECK_ACTION_MESSAGE] : true;
+    }
+
+    protected function _addLink(&$oForm)
+    {
+        $iUserId = $this->getUserId();
+
+        $iEventId = (int)$oForm->getCleanValue('event_id');
+        $sLink = $oForm->getCleanValue('url');
+
+        $aMatches = array();
+        preg_match($this->_oConfig->getPregPattern('url'), $sLink, $aMatches);
+        $sLink = (empty($aMatches[2]) ? 'http://' : '') . $aMatches[0];
+
+        $aSiteInfo = bx_get_site_info($sLink, array(
+            'thumbnailUrl' => array('tag' => 'link', 'content_attr' => 'href'),
+            'OGImage' => array('name_attr' => 'property', 'name' => 'og:image'),
+        ));
+
+        $sTitle = !empty($aSiteInfo['title']) ? $aSiteInfo['title'] : _t('_Empty');
+        $sDescription = !empty($aSiteInfo['description']) ? $aSiteInfo['description'] : _t('_Empty');
+
+        $sMediaUrl = '';
+        if(!empty($aSiteInfo['thumbnailUrl']))
+            $sMediaUrl = $aSiteInfo['thumbnailUrl'];
+        else if(!empty($aSiteInfo['OGImage']))
+            $sMediaUrl = $aSiteInfo['OGImage'];
+
+        $iMediaId = 0;
+        $oStorage = null;
+        if(!empty($sMediaUrl)) {
+            $oStorage = BxDolStorage::getObjectInstance($this->_oConfig->getObject('storage_photos'));
+
+            $iMediaId = $oStorage->storeFileFromUrl($sMediaUrl, true, $iUserId);
+        }
+
+        $iId = (int)$oForm->insert(array('profile_id' => $iUserId, 'media_id' => $iMediaId, 'url' => $sLink, 'title' => $sTitle, 'text' => $sDescription, 'added' => time()));
+        if(!empty($iId)) {
+            if(!empty($oStorage) && !empty($iMediaId))
+                $oStorage->afterUploadCleanup($iMediaId, $iUserId);
+
+            return array('id' => $iId, 'event_id' => $iEventId, 'item' => $this->_oTemplate->getAttachLinkItem($iUserId, $iId));
+        }
+
+        return array('message' => _t('_bx_timeline_txt_err_cannot_perform_action'));
+    }
+
+    protected function _deleteLinks($iId)
+    {
+        $aLinks = $this->_oDb->getLinks($iId);
+        if(empty($aLinks) || !is_array($aLinks))
+            return;
+
+        $oStorage = BxDolStorage::getObjectInstance($this->_oConfig->getObject('storage_photos'));
+        foreach($aLinks as $aLink)
+            if(!empty($aLink['media_id']))
+                $oStorage->deleteFile($aLink['media_id']);
+
+        $this->_oDb->deleteLinks($iId);
+    }
+
+    protected function _saveMedia($sType, $iContentId, $aItemIds, $iProfileId = 0, $isAssociateWithContent = false)
+    {
+        if(empty($iContentId))
+            return;
+
+        if(!$isAssociateWithContent)
+            $this->_oDb->deleteMedia($sType, $iContentId);
+
+    	if(empty($aItemIds) || !is_array($aItemIds))
+            return; 
+
+        if(empty($iProfileId))
+            $iProfileId = $this->_iProfileId;
+
+        $oStorage = BxDolStorage::getObjectInstance($this->_oConfig->getObject('storage_' . strtolower($sType) . 's'));
+
+        $aGhostFiles = $oStorage->getGhosts ($iProfileId, !$isAssociateWithContent ? $iContentId : 0, true, $this->_isModerator());
+        if(empty($aGhostFiles) || !is_array($aGhostFiles))
+            return;
+
+        foreach($aGhostFiles as $aFile) {
+            if(is_array($aItemIds) && !in_array($aFile['id'], $aItemIds))
+                continue;
+
+            $iFileId = (int)$aFile['id'];
+
+            if($aFile['private'])
+                $oStorage->setFilePrivate($iFileId, 1);
+
+            $oStorage->updateGhostsContentId($iFileId, $iProfileId, $iContentId, $this->_isModerator());
+
+            $this->_oDb->saveMedia($sType, $iContentId, $iFileId);
+        }
+    }
+
+    protected function _deleteMedia($sType, $iContentId)
+    {
+        $aItems = $this->_oDb->getMedia($sType, $iContentId);
+        if(empty($aItems) || !is_array($aItems))
+            return;
+
+        $oStorage = BxDolStorage::getObjectInstance($this->_oConfig->getObject('storage_' . strtolower($sType) . 's'));
+        foreach($aItems as $iItemId)
+            $oStorage->deleteFile($iItemId);
+
+        $this->_oDb->deleteMedia($sType, $iContentId);
+    }
+
+    protected function _prepareParams($aParams)
+    {
+        if(empty($aParams['name']))
+            $aParams['name'] = '';
+        
+        if(empty($aParams['view']))
+            $aParams['view'] = BX_TIMELINE_VIEW_DEFAULT;
+
+        if(empty($aParams['type']))
+            $aParams['type'] = BX_TIMELINE_TYPE_DEFAULT;
+
+        if(empty($aParams['owner_id']))
+            $aParams['owner_id'] = $this->getUserId();
+
+        if(!isset($aParams['start']) || (int)$aParams['start'] < 0)
+            $aParams['start'] = 0;
+
+        if(!isset($aParams['per_page']) || (int)$aParams['per_page'] <= 0)
+            $aParams['per_page'] = isset($aParams['per_page_default']) && (int)$aParams['per_page_default'] > 0 ? $aParams['per_page_default'] : $this->_oConfig->getPerPage();
+
+        if(empty($aParams['timeline']) || (int)$aParams['timeline'] < 0)
+            $aParams['timeline'] = 0;
+
+        if(empty($aParams['filter']))
+            $aParams['filter'] = BX_TIMELINE_FILTER_ALL;
+
+        if(empty($aParams['modules']) || !is_array($aParams['modules']))
+            $aParams['modules'] = array();
+
+        if(empty($aParams['blink']) || !is_array($aParams['blink']))
+            $aParams['blink'] = array();
+
+        $aParams = array_merge($aParams, array(
+            'browse' => 'list',
+            'status' => BX_TIMELINE_STATUS_ACTIVE,
+            'dynamic_mode' => false,
+        ));
+
+        return $aParams;
+    }
+
+    protected function _prepareParamsGet()
+    {
+        $aParams = array();
+
+        $aParams['name'] = bx_get('name');
+        $aParams['name'] = $aParams['name'] !== false ? bx_process_input($aParams['name'], BX_DATA_TEXT) : '';
+
+        $aParams['view'] = bx_get('view');
+        $aParams['view'] = $aParams['view'] !== false ? bx_process_input($aParams['view'], BX_DATA_TEXT) : BX_TIMELINE_VIEW_DEFAULT;
+
+        $aParams['type'] = bx_get('type');
+        $aParams['type'] = $aParams['type'] !== false ? bx_process_input($aParams['type'], BX_DATA_TEXT) : BX_TIMELINE_TYPE_DEFAULT;
+
+        $aParams['owner_id'] = bx_get('owner_id');
+        $aParams['owner_id'] = $aParams['owner_id'] !== false ? bx_process_input($aParams['owner_id'], BX_DATA_INT) : $this->getUserId();
+
+        $aParams['start'] = bx_get('start');
+        $aParams['start'] = $aParams['start'] !== false ? bx_process_input($aParams['start'], BX_DATA_INT) : 0;
+
+        $aParams['per_page'] = bx_get('per_page');
+        $aParams['per_page'] = $aParams['per_page'] !== false ? bx_process_input($aParams['per_page'], BX_DATA_INT) : $this->_oConfig->getPerPage();
+
+        $aParams['timeline'] = bx_get('timeline');
+        $aParams['timeline'] = $aParams['timeline'] !== false ? bx_process_input($aParams['timeline']) : '';
+
+        $aParams['filter'] = bx_get('filter');
+        $aParams['filter'] = $aParams['filter'] !== false ? bx_process_input($aParams['filter'], BX_DATA_TEXT) : BX_TIMELINE_FILTER_ALL;
+
+        $aParams['modules'] = bx_get('modules');
+        $aParams['modules'] = $aParams['modules'] !== false ? bx_process_input($aParams['modules'], BX_DATA_TEXT) : array();
+
+        $aParams['blink'] = bx_get('blink');
+        $aParams['blink'] = $aParams['blink'] !== false ? explode(',', bx_process_input($aParams['blink'], BX_DATA_TEXT)) : array();
+
+        $aParams = array_merge($aParams, array(
+            'browse' => 'list',
+            'status' => BX_TIMELINE_STATUS_ACTIVE,
+            'dynamic_mode' => true,
+        ));
+
+        return $aParams;
+    }
+
+    protected function _prepareTextForSave($s)
+    {
+        return bx_process_input($s, BX_DATA_HTML);
+    }
+
+    protected function _prepareFormForAutoSubmit(&$oForm, &$aValues)
+    {
+        $oForm->aFormAttrs['method'] = BX_DOL_FORM_METHOD_SPECIFIC;
+        $oForm->aParams['csrf']['disable'] = true;
+        if(!empty($oForm->aParams['db']['submit_name'])) {
+            $sSubmitName = $sSubmitValue = false;
+            if(is_array($oForm->aParams['db']['submit_name'])) {
+                foreach ($oForm->aParams['db']['submit_name'] as $sName) {
+                    if(isset($oForm->aInputs[$sName])) {
+                        $sSubmitName = $sName;
+                        $sSubmitValue = $oForm->aInputs[$sName]['value'];
+                        break;
+                    }
+                    else if(isset($oForm->aInputs['controls'])) 
+                        foreach($oForm->aInputs['controls'] as $mixedKey => $mixedInput)
+                            if(is_numeric($mixedKey) && isset($mixedInput['name']) && $mixedInput['name'] == $sName) {
+                                $sSubmitName = $sName;
+                                $sSubmitValue = $mixedInput['value'];
+                                break 2;
+                            }
+                }
+            }
+            else {
+                $sName = $oForm->aParams['db']['submit_name'];
+                if(isset($oForm->aInputs[$sName])) {
+                    $sSubmitName = $sName;
+                    $sSubmitValue = $oForm->aInputs[$sName]['value'];
+                }
+                else if(isset($oForm->aInputs['controls']))
+                    foreach($oForm->aInputs['controls'] as $mixedKey => $mixedInput)
+                        if(is_numeric($mixedKey) && isset($mixedInput['name']) && $mixedInput['name'] == $sName) {
+                            $sSubmitName = $sName;
+                            $sSubmitValue = $mixedInput['value'];
+                            break;
+                        }
+            }
+
+            if($sSubmitName && $sSubmitValue)
+                $aValues[$sSubmitName] = $sSubmitValue;
+        }
+    }
+
+    protected function _getFieldValue($sField, $iContentId)
+    {
+        $CNF = &$this->_oConfig->CNF;
+        if(empty($CNF[$sField]))
+            return false;
+
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iContentId));
+        if(empty($aEvent) || empty($aEvent[$CNF[$sField]]))
+            return false;
+
+        return $aEvent[$CNF[$sField]];
+    }
+
+    /**
+     * Returns records for React Jot using OAuth2
+     * @param int $iProfileId
+     * @param string $sPage
+     * @param string $sTab
+     * @param int $iStart
+     * @param int $iPerPage
+     * @return array
+     */
+    public function serviceGetUserPosts($iProfileId = 0, $sPage = 'home', $sTab = 'hot', $iStart = 0, $iPerPage = 0)
+    {
+        $iProfileId = (int)$iProfileId ? (int)$iProfileId : bx_get_logged_profile_id();
+        if(empty($iProfileId))
+            return array(
+                'code' => 1,
+                'result' => array(),
+                'message' => _t('_bx_timeline_txt_msg_no_profile_id'),
+                'page' => $sPage,
+                'tab' => $sTab
+            );
+
+        $sType = BX_TIMELINE_TYPE_OWNER_AND_CONNECTIONS;
+        $sView = BX_TIMELINE_VIEW_DEFAULT;
+        $sFilter = BX_TIMELINE_FILTER_ALL;
+
+        $aModules = array();
+
+        switch($sPage){
+            case 'profile':
+                $sType = BX_BASE_MOD_NTFS_TYPE_OWNER;
+                $sFilter = BX_TIMELINE_FILTER_OWNER;
+                break;
+            default:
+                if ($this -> _oDb -> isModuleByName($sPage))
+                   $aModules = array($sPage);
+        }
+
+        switch($sTab)
+        {
+            case 'latest':
+                $sType = BX_BASE_MOD_NTFS_TYPE_PUBLIC;
+                break;
+            case 'popular':
+                $sType = BX_TIMELINE_TYPE_HOT;
+                break;
+            case 'feed':
+                $sType = BX_TIMELINE_TYPE_OWNER_AND_CONNECTIONS;
+                break;
+            default:
+                if ($this -> _oDb -> isModuleByName($sTab))
+                    $aModules = array($sTab);
+        }
+
+        $aParams = $this->getParams($sView, $sType, $iProfileId, $iStart, $iPerPage, $sFilter, $aModules);
+        $aEvents = $this->_oDb->getEvents($aParams);
+        $iCount = $this->_oDb->getEvents(array_merge($aParams, array('count' => true)));
+
+        if(empty($aEvents) || !is_array($aEvents))
+            return array(
+                'code' => 0,
+                'result' => array(),
+                'message' => _t('_bx_timeline_txt_msg_no_results'),
+                'page' => $sPage,
+                'tab' => $sTab
+            );
+
+        $aBrowseParams = array();
+        $aItems = array();
+
+        foreach($aEvents as $aEvent) {
+            $aResult = $this->_oTemplate->getData($aEvent, $aBrowseParams);
+
+            if($aResult === false)
+                continue;
+
+            $oOwnerProfile = BxDolProfile::getInstance($aResult['owner_id']);
+
+            $aFiles = array();
+            $aContent = &$aResult['content'];
+
+            if (!empty($aContent['image']))
+                $aFiles['images'] = array_values($aContent['images']);
+            if (!empty($aContent['images_attach']))
+                $aFiles['images'] = array_values($aContent['images_attach']);
+
+            if (!empty($aContent['videos']))
+                $aFiles['videos'] = array_values($aContent['videos']);
+            else
+            if (!empty($aContent['videos_attach']))
+                $aFiles['videos'] = array_values($aContent['videos_attach']);
+
+            if (!empty($aContent['files']))
+                $aFiles['files'] = array_values($aContent['files']);
+            else
+                if (!empty($aContent['files_attach']))
+                    $aFiles['files'] = array_values($aContent['files_attach']);
+
+            $aItems[$aEvent['id']] = array_merge(array(
+                'owner' => array(
+                    'icon' => $oOwnerProfile -> getThumb(),
+                    'name' => $oOwnerProfile -> getDisplayName(),
+                    'url' => $oOwnerProfile -> getUrl()
+                ),
+                'sample' => !empty($aResult['sample']) ? _t($aResult['sample']) : _t('_bx_timeline_txt_sample'),
+                'sample_action' => !empty($aResult['sample_action']) ? _t($aResult['sample_action']) : _t('_bx_timeline_txt_added_sample'),
+                'url' => isset($aResult['url']) ? $aResult['url'] : '',
+                'raw' => isset($aContent['raw']) ? strip_tags($aContent['raw']) : '',
+                'text' => isset($aContent['text']) ? strip_tags($aContent['text']) : '',
+                'views' => isset($aResult['views']['count']) ? (int)$aResult['views']['count'] : 0,
+                'votes' => isset($aResult['votes']['count']) ? (int)$aResult['votes']['count'] : 0,
+                'reactions' => isset($aResult['reactions']['count']) ? (int)$aResult['reactions']['count'] : 0,
+                'scores' => isset($aResult['scores']['count']) ? (int)$aResult['scores']['count'] : 0,
+                'reports' => isset($aResult['reports']['count']) ? (int)$aResult['reports']['count'] : 0,
+                'comments' => isset($aResult['comments']['count']) ? (int)$aResult['comments']['count'] : 0,
+                'date' => isset($aResult['date']) ? $aResult['date'] : $aEvent['date'],
+                'type' => stripos($aEvent['type'], 'timeline') !== false ? 'bx_timeline' : $aEvent['type'],
+                'event_type' => $aEvent['type'],
+                'id' => $aEvent['id'],
+                'content' => $aResult['content'],
+                'title' => isset($aResult['title']) ? _t($aResult['title']) : '',
+                'description' => isset($aResult['description']) ? $aResult['description'] : ''
+            ), $aFiles);
+        }
+
+        return array(
+            'result' => $aItems,
+            'code' => 0,
+            'message' => '',
+            'page' => $sPage,
+            'tab' => $sTab,
+            'total' => $iCount,
+            'start' => (int)$iStart
+        );
+    }
+}
+
+/** @} */

+ 2688 - 0
modules/boonex/timeline/updates/12.0.2_12.0.3/source/classes/BxTimelineTemplate.php

@@ -0,0 +1,2688 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Timeline Timeline
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxTimelineTemplate extends BxBaseModNotificationsTemplate
+{
+    protected static $_aMemoryCacheItems;
+    protected static $_aMemoryCacheItemsData;
+    protected static $_sMemoryCacheItemsKeyMask;
+
+    protected static $_sTmplContentItemItem;
+    protected static $_sTmplContentItemOutline;
+    protected static $_sTmplContentItemOutlineSample;
+    protected static $_sTmplContentItemTimeline;
+    protected static $_sTmplContentItemTimelineSample;
+    protected static $_sTmplContentItemSearch;
+    protected static $_sTmplContentTypePost;
+    protected static $_sTmplContentTypeRepost;
+
+    protected $_bShowTimelineDividers;
+
+    function __construct(&$oConfig, &$oDb)
+    {
+        parent::__construct($oConfig, $oDb);
+
+        $this->_bShowTimelineDividers = false;
+    }
+
+    public function init()
+    {
+        parent::init();
+
+        self::$_aMemoryCacheItems = array();
+        self::$_aMemoryCacheItemsData = array();
+        self::$_sMemoryCacheItemsKeyMask = "%s_%d";
+    }
+
+    public function getAddedCss($sType = '', $bDynamic = false)
+    {
+        $aCss = array();
+        switch($sType) {
+            case 'view':
+                $aCss = array(
+                    BX_DIRECTORY_PATH_PLUGINS_PUBLIC . 'flickity/|flickity.css',
+                    'cmts.css',
+                    'view.css',
+                    'view-media-tablet.css',
+                    'view-media-desktop.css',
+                    'repost.css',
+                );
+
+                if($this->_oConfig->isJumpTo())
+                    $aCss[] = 'jquery-ui/jquery-ui.css';
+                break;
+
+            case 'post':
+                if($this->_oConfig->isEmoji())
+                    $aCss[] = BX_DIRECTORY_PATH_PLUGINS_PUBLIC . 'emoji/css/|emoji.css';
+
+                $aCss[] = 'post.css';
+                break;
+        }
+
+        $mixedResult = $this->addCss($aCss, $bDynamic);
+        if($bDynamic)
+            return $mixedResult; 
+    }
+
+    public function getAddedJs($sType = '', $bDynamic = false)
+    {
+        $aJs = array(
+            'autosize.min.js',
+            'jquery.anim.js',
+            'main.js',
+        );
+        switch($sType) {
+            case 'view':
+                $aJs = array_merge($aJs, array(
+                    'masonry.pkgd.min.js',
+                    'flickity/flickity.pkgd.min.js',
+                    'embedly-player.min.js',
+                    'BxDolCmts.js',
+                    'view.js',
+                    'repost.js',
+                ));
+
+                if($this->_oConfig->isJumpTo())
+                    $aJs = array_merge($aJs, array(
+                        'jquery-ui/jquery.ui.core.min.js',
+                        'jquery-ui/jquery.ui.datepicker.min.js',
+                    ));
+                    
+                break;
+
+            case 'post':
+                $aJs = array_merge($aJs, array(
+                    'jquery.form.min.js',
+                    'post.js',
+                ));
+                break;
+        }
+
+        $mixedResult = $this->addJs($aJs, $bDynamic);
+        if($bDynamic)
+            return $mixedResult; 
+    }
+
+    public function getJsCodeView($aParams = array(), $bWrap = true, $bDynamic = false)
+    {
+        $aParams = array_merge(array(
+            'bInit' => true,
+            'bInfScroll' => $this->_oConfig->isInfiniteScroll(),
+            'iInfScrollAutoPreloads' => $this->_oConfig->getAutoPreloads(),
+        ), $aParams);
+
+        return parent::getJsCode('view', $aParams, $bWrap, $bDynamic);
+    }
+
+    public function getJsCodePost($iOwnerId, $aParams = array(), $bWrap = true, $bDynamic = false)
+    {
+        return $this->getJsCode('post', array(
+            'bEmoji' => $this->_oConfig->isEmoji(),
+            'sVideosAutoplay' => $this->_oConfig->getVideosAutoplay(),
+            'oRequestParams' => array_merge(array(
+                'type' => isset($aParams['type']) ? $aParams['type'] : BX_TIMELINE_TYPE_DEFAULT, 
+                'owner_id' => $iOwnerId
+            ), $aParams)
+        ), $bWrap, $bDynamic);
+    }
+
+    public function getPostBlock($iOwnerId, $aParams = array())
+    {
+        $aForm = $this->getModule()->getFormPost($aParams);
+
+        return $this->parseHtmlByName('block_post.html', array (
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'js_object' => $this->_oConfig->getJsObject('post'),
+            'js_content' => $this->getJsCodePost($iOwnerId, $aParams),
+            'form' => $aForm['form']
+        ));
+    }
+
+    public function getViewsBlock($aParams)
+    {
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+        $sJsObject = $this->_oConfig->getJsObjectView($aParams);
+        
+        $sType = isset($aParams['type']) ? $aParams['type'] : '';
+
+        $sMenu = $this->_oConfig->getObject('menu_view');
+        $oMenu = BxDolMenu::getObjectInstance($sMenu);
+
+    	$aMenuItems = $oMenu->getMenuItems();
+    	if(empty($aMenuItems) || !is_array($aMenuItems))
+            return '';
+
+    	if(empty($sType)) {
+            $aMenuItem = array_shift($aMenuItems);
+            $sType = $aMenuItem['name'];
+    	}
+    	$oMenu->setSelected($this->_oConfig->getName(), $sType);
+        $oMenu->addMarkers(array(
+            'js_object_view' => $sJsObject
+        ));
+
+        $sTitle = _t('_bx_timeline_page_block_title_views_' . $aParams['view']);
+
+        return array(
+            'content' => $this->parseHtmlByName('block_views.html', array(
+                'style_prefix' => $sStylePrefix,
+                'html_id' => $this->_oConfig->getHtmlIdView('views', $aParams, array('with_type' => false)),
+                'html_id_content' => $this->_oConfig->getHtmlIdView('views_content', $aParams, array('with_type' => false)),
+                'title' => $sTitle,
+                'content' => $this->getViewBlock($aParams)
+            )),
+            'menu' => $oMenu
+        );
+    }
+
+    public function getViewBlock($aParams)
+    {
+        $oModule = $this->getModule();
+
+        $bJsInitView = true;
+        if(isset($aParams['js_init_view'])) {
+            $bJsInitView = (bool)$aParams['js_init_view'];
+            unset($aParams['js_init_view']);
+        }
+
+        list($sContent, $sLoadMore, $sBack, $sEmpty, $iEvent, $bEventsToLoad) = $this->getPosts($aParams);
+
+        //--- Add live update
+        $oModule->actionResumeLiveUpdate($aParams['type'], $aParams['owner_id']);
+
+        $sModuleName = $oModule->getName();
+        $sModuleMethod = !empty($aParams['get_live_updates']) ? $aParams['get_live_updates'] : 'get_live_update';
+        $sService = BxDolService::getSerializedService($sModuleName, $sModuleMethod, array($aParams, $oModule->getUserId(), '{count}', '{init}'));
+
+        $aLiveUpdateParams = array($this->_oConfig->getLiveUpdateKey($aParams), 1, $sService, true);
+        if($sModuleMethod == 'get_live_update')
+            $aLiveUpdateParams[] = $iEvent;
+
+        $sLiveUpdateCode = null;
+        bx_alert($sModuleName, 'add_live_update', 0, 0, array(
+            'browse_params' => $aParams,
+            'live_update_params' => &$aLiveUpdateParams,
+            'override_result' => &$sLiveUpdateCode,
+        ));
+
+        if($sLiveUpdateCode === null)
+            $sLiveUpdateCode = call_user_func_array(array(BxDolLiveUpdates::getInstance(), 'add'), $aLiveUpdateParams);
+        //--- Add live update
+
+        $sJsObject = $this->_oConfig->getJsObjectView($aParams);
+        return $sLiveUpdateCode . $this->parseHtmlByName('block_view.html', array(
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'html_id' => $this->_oConfig->getHtmlIdView('main', $aParams),
+            'view' => $aParams['view'],
+            'back' => $sBack,
+            'empty' => $sEmpty, 
+            'content' => $sContent,
+            'load_more' =>  $sLoadMore,
+            'show_more' => $this->_getShowMore($aParams),
+            'view_image_popup' => $this->_getImagePopup($aParams),
+            'js_content' => $this->getJsCodeView(array(
+                'sObjName' => $sJsObject,
+                'sVideosAutoplay' => $this->_oConfig->getVideosAutoplay(),
+                'bEventsToLoad' => $bEventsToLoad,
+            	'oRequestParams' => $aParams,
+                'bInit' => $bJsInitView
+            ), array(
+                'wrap' => true,
+                'mask_markers' => array('object' => $sJsObject)
+            )) . $this->getJsCode('repost')
+        ));
+    }
+
+    public function getSearchBlock($sContent)
+    {
+        $oModule = $this->getModule();
+        $aParams = $oModule->getParams(BX_TIMELINE_VIEW_SEARCH);
+
+        return $this->parseHtmlByName('block_search.html', array(
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'html_id' => $this->_oConfig->getHtmlIdView('main', $aParams),
+            'view' => $aParams['view'],
+            'content' => $sContent,
+            'view_image_popup' => $this->_getImagePopup($aParams),
+            'js_content' => $this->getJsCodeView(array(
+            	'oRequestParams' => $aParams
+            ))
+        ));
+    }
+
+    public function getItemBlock($mixedId, $aBrowseParams = array())
+    {
+        $CNF = $this->_oConfig->CNF;
+        $oModule = $this->getModule();
+
+        if(is_numeric($mixedId))
+            $mixedId = $oModule->getItemData($mixedId);
+
+        if(empty($mixedId) || !is_array($mixedId))
+            return array('content' => MsgBox(_t('_Empty')), 'designbox_id' => 13);
+
+        if($mixedId['code'] != 0)
+            return array('content' => MsgBox($mixedId['content']), 'designbox_id' => 13);
+
+        $aEvent = $mixedId['event'];
+        $sContent = $mixedId['content'];
+
+        if(!$this->_oConfig->isSystem($aEvent['type'], $aEvent['action'])) {
+            $mixedViews = $oModule->getViewsData($aEvent['views']);
+            if($mixedViews !== false) {
+                list($sSystem, $iObjectId) = $mixedViews;
+                $oModule->getViewObject($sSystem, $iObjectId)->doView();
+            }
+        }
+
+        $sAuthorName = $oModule->getObjectUser($aEvent['object_owner_id'])->getDisplayName();
+
+        $sTitle = $sAuthorName . ' ' . _t($aEvent['sample_action'], _t($aEvent['sample']));
+        $sDescription = $aEvent['title'];
+        if(get_mb_substr($sDescription, 0, 1) == '_')
+            $sDescription = _t($sDescription);
+
+        $oTemplate = BxDolTemplate::getInstance();
+        $oTemplate->setPageHeader(strip_tags($sTitle));
+        $oTemplate->setPageDescription(strip_tags($sDescription));
+
+        $oMetatags = BxDolMetatags::getObjectInstance($this->_oConfig->getObject('metatags'));
+        if($oMetatags)
+            $oMetatags->addPageMetaInfo($aEvent[$CNF['FIELD_ID']]);
+
+        $sReferrer = '';
+        if(isset($_SERVER['HTTP_REFERER']) && mb_stripos($_SERVER['HTTP_REFERER'], BX_DOL_URL_ROOT) === 0)
+            $sReferrer = $_SERVER['HTTP_REFERER'];
+        else 
+            $sReferrer = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($this->_oConfig->CNF['URL_HOME']);
+
+        $sJsObject = $this->_oConfig->getJsObjectView($aBrowseParams);
+        return array('content' => $this->parseHtmlByName('block_item.html', array(
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'html_id' => $this->_oConfig->getHtmlIdView('main', $aBrowseParams),
+            'content' => $sContent,
+            'show_more' => $this->_getShowMore($aBrowseParams),
+            'view_image_popup' => $this->_getImagePopup($aBrowseParams),
+            'js_content' => $this->getJsCodeView(array(
+                'sObjName' => $sJsObject,
+                'sVideosAutoplay' => $this->_oConfig->getVideosAutoplay(),
+                'sReferrer' => $sReferrer,
+                'oRequestParams' => $aBrowseParams
+            ), array(
+                'wrap' => true,
+                'mask_markers' => array('object' => $sJsObject)
+            )) . $this->getJsCode('repost')
+        )));
+    }
+
+    /**
+     * Get event's content.
+     * @param integer $iId - event ID.
+     * @param string $sMode - 'photo' is only one mode which is available for now.
+     */
+    public function getItemBlockContent($iId, $sMode) {
+        $CNF = $this->_oConfig->CNF;
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iId));
+        if(empty($aEvent))
+            return '';
+
+        $aTmplVars = array(
+        	'style_prefix' => $sStylePrefix,
+            'bx_if:show_image' => array(
+                'condition' => false,
+                'content' => array()
+            )
+        );
+
+        switch($sMode) {
+            case 'photo':
+                $aTmplVars['bx_if:show_image']['condition'] = true;
+                $aTmplVars['bx_if:show_image']['content'] = array(
+                    'style_prefix' => $sStylePrefix,
+                    'src' => base64_decode(bx_process_input(bx_get('src'))),
+                );
+                break;
+        }
+
+        return $this->parseHtmlByName('block_item_content.html', $aTmplVars);
+    }
+
+    public function getItemBlockInfo($iId) {
+        $CNF = $this->_oConfig->CNF;
+
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iId));
+        if(empty($aEvent))
+            return '';
+
+        $aResult = $this->getDataCached($aEvent);
+        if($aResult === false)
+            return '';
+
+        $sAuthorUnit = $this->getModule()->getObjectUser($aResult['object_owner_id'])->getUnit();
+
+        $oForm = BxDolForm::getObjectInstance($this->_oConfig->getObject('form_post'), $this->_oConfig->getObject('form_display_post_view'), $this);
+        $oForm->initChecker($aEvent);
+
+        return $this->parseHtmlByName('block_item_info.html', array(
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'author' => $sAuthorUnit,
+            'fields' => $oForm->getCode()
+        ));
+    }
+
+    public function getItemBlockComments($iId) {
+        $CNF = &$this->_oConfig->CNF;
+
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iId));
+        if(empty($aEvent))
+            return '';
+
+        $aResult = $this->getDataCached($aEvent);
+        if($aResult === false)
+            return '';
+
+        return $this->parseHtmlByName('block_item_comments.html', array(
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'content' => $this->_getComments($aResult['comments'])
+        ));
+                
+    }
+
+    public function getUnit(&$aEvent, $aBrowseParams = array())
+    {
+        $oModule = $this->getModule();
+
+        if(empty($aBrowseParams) || !is_array($aBrowseParams))
+            $aBrowseParams = $oModule->getParams(BX_TIMELINE_VIEW_SEARCH);
+
+        return $this->getPost($aEvent, $aBrowseParams);
+    }
+
+    public function getPost(&$aEvent, $aBrowseParams = array())
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $iEventId = (int)$aEvent[$CNF['FIELD_ID']];
+
+        $sMemoryCacheItemsKey = sprintf(self::$_sMemoryCacheItemsKeyMask, $aBrowseParams['view'], $iEventId);
+        if(array_key_exists($sMemoryCacheItemsKey, self::$_aMemoryCacheItems)) {
+            if(array_key_exists($sMemoryCacheItemsKey, self::$_aMemoryCacheItemsData))
+                $aEvent = self::$_aMemoryCacheItemsData[$sMemoryCacheItemsKey];
+
+            return self::$_aMemoryCacheItems[$sMemoryCacheItemsKey];
+        }
+
+        /**
+         * Add all items in memory cache even if they are empty.
+         */
+        self::$_aMemoryCacheItems[$sMemoryCacheItemsKey] = '';
+        self::$_aMemoryCacheItemsData[$sMemoryCacheItemsKey] = array();
+
+        $oPrivacy = BxDolPrivacy::getObjectInstance($this->_oConfig->getObject('privacy_view'));
+        if($oPrivacy) {
+            $oPrivacy->setTableFieldAuthor($this->_oConfig->isSystem($aEvent['type'], $aEvent['action']) ? 'owner_id' : 'object_id');
+            if(!$oPrivacy->check($iEventId)) {
+                if($this->_oConfig->isCacheList())
+                    $this->_oDb->deleteCache(array(
+                        'type' => $aBrowseParams['type'], 
+                        'profile_id' => bx_get_logged_profile_id(),
+                        'event_id' => $iEventId
+                    ));
+
+                return '';
+            }
+        }
+
+        $aResult = $this->getDataCached($aEvent, $aBrowseParams);
+        if($aResult === false)
+            return '';
+
+        if(isset($aResult['owner_id']))
+            $aEvent['owner_id'] = $aResult['owner_id'];
+
+        $aEvent['object_owner_id'] = $aResult['object_owner_id'];
+        $aEvent['icon'] = !empty($aResult['icon']) ? $aResult['icon'] : '';
+        $aEvent['sample'] = !empty($aResult['sample']) ? $aResult['sample'] : '_bx_timeline_txt_sample';
+        $aEvent['sample_action'] = !empty($aResult['sample_action']) ? $aResult['sample_action'] : '_bx_timeline_txt_added_sample';
+        $aEvent['content'] = $aResult['content'];
+        $aEvent['views'] = $aResult['views'];
+        $aEvent['votes'] = $aResult['votes'];
+        $aEvent['reactions'] = $aResult['reactions'];
+        $aEvent['scores'] = $aResult['scores'];
+        $aEvent['reports'] = $aResult['reports'];
+        $aEvent['comments'] = $aResult['comments'];
+
+        $sKey = 'allowed_view';
+        $aEvent[$sKey] = $this->_preparePrivacy($sKey, $aEvent, $aResult);
+        if(isset($aEvent[$sKey]) && $aEvent[$sKey] !== CHECK_ACTION_RESULT_ALLOWED) 
+            return '';
+
+        if($this->_oConfig->isCacheList())
+            $this->_cacheEvent(bx_get_logged_profile_id(), $aEvent, $aBrowseParams);
+
+        $sType = !empty($aResult['content_type']) ? $aResult['content_type'] : BX_TIMELINE_PARSE_TYPE_DEFAULT;
+        self::$_aMemoryCacheItems[$sMemoryCacheItemsKey] = $this->_getPost($sType, $aEvent, $aBrowseParams);
+        self::$_aMemoryCacheItemsData[$sMemoryCacheItemsKey] = $aEvent;
+
+        return self::$_aMemoryCacheItems[$sMemoryCacheItemsKey];
+    }
+
+    public function getPosts($aParams)
+    {
+        $bReturnArray = isset($aParams['return_data_type']) && $aParams['return_data_type'] == 'array';
+        $bViewTimeline = $aParams['view'] == BX_TIMELINE_VIEW_TIMELINE;
+
+        $iStart = $aParams['start'];
+        $iPerPage = $aParams['per_page'];
+
+        $aParamsDb = $aParams;
+
+        //--- Before: Check for Previous
+        $iDays = -1;
+        $bPrevious = false;
+        if($iStart - 1 >= 0) {
+            $aParamsDb['start'] -= 1;
+            $aParamsDb['per_page'] += 1;
+            $bPrevious = true;
+        }
+
+        //--- Before: Check for Next
+        $aParamsDb['per_page'] += 1;
+
+        $aEvents = $this->_getPosts($aParamsDb);
+
+        //--- After: Check for Previous
+        if($bPrevious) {
+            $aEvent = array_shift($aEvents);
+            $iDays = (int)$aEvent['days'];
+        }
+
+        //--- After: Check for Next
+        $bNext = false;
+        if(count($aEvents) > $iPerPage) {
+            $aEvent = array_pop($aEvents);
+            $bNext = true;
+        }
+
+        $sContent = '';
+        $sContent .= $this->getSizer($aParams);
+
+        $iFirst = 0;
+        $iEvents = count($aEvents);
+        if($iEvents > 0)
+            $iFirst = $this->_getFirst($aEvents, $aParams);
+        else 
+            $sContent .= $bViewTimeline ? $this->getDividerToday() : '';
+
+        //--- Check for Visual Grouping
+        $aGroups = array();
+        foreach($aEvents as $iIndex => $aEvent) {
+            $aContent = unserialize($aEvent['content']);
+            if(!isset($aContent['timeline_group']))
+                continue;
+
+            $aGroup = $aContent['timeline_group'];
+            $sGroup = $aGroup['by'];
+            if(!isset($aGroups[$sGroup]))
+               $aGroups[$sGroup] = array('field' => $aGroup['field'], 'indexes' => array(), 'processed' => false);
+
+            $aGroups[$sGroup]['indexes'][] = $iIndex;
+        }
+
+        //--- Perform Visual Grouping
+        foreach($aGroups as $sGroup => $aGroup) {
+            if(empty($aGroup['field']) || empty($aGroup['indexes']))
+                continue;
+
+            switch($aGroup['field']) {
+                case 'owner_id':
+                    $aOwnerIds = array();
+                    foreach($aGroup['indexes'] as $iIndex)
+                        if(!in_array($aEvents[$iIndex]['owner_id'], $aOwnerIds))
+                            $aOwnerIds[] = $aEvents[$iIndex]['owner_id'];
+
+                    $iGroupIndex = (int)array_shift($aGroup['indexes']);
+                    if(is_null($iGroupIndex))
+                        break;
+
+                    foreach($aGroup['indexes'] as $iIndex)
+                        unset($aEvents[$iIndex]);
+
+                    $aEvents[$iGroupIndex]['owner_id_grouped'] = $aOwnerIds;
+                    break;
+            }
+        }
+
+        $bFirst = true;
+        $mixedEvents = $bReturnArray ? array() : '';
+        foreach($aEvents as $aEvent) {
+            $iEvent = (int)$aEvent['id'];
+
+            $sEvent = $this->getPost($aEvent, $aParams);
+            if(empty($sEvent))
+                continue;
+
+            if($bReturnArray) {
+                $mixedEvents[] = $aEvent;
+                continue;
+            }
+
+            if($bFirst && $bViewTimeline) {
+                $mixedEvents .= $this->getDividerToday($aEvent);
+
+                $bFirst = false;
+            }
+
+            $mixedEvents .= $bViewTimeline ? $this->getDivider($iDays, $aEvent) : '';
+            $mixedEvents .= $sEvent;
+        }
+
+        if($bReturnArray)
+            return $mixedEvents;
+
+        $sContent .= $mixedEvents;
+
+        $bEvents = !empty($mixedEvents);
+
+        $sBack = $this->getBack($aParams);
+
+        $iPerPage = $this->_oConfig->getPerPage();
+        $iPreloads = $this->_oConfig->getAutoPreloads();
+        if(!$this->_oConfig->isInfiniteScroll() || (($aParams['start'] - $iPerPage * ($iPreloads - 1)) % ($iPerPage * $iPreloads) == 0))
+            $sLoadMore = $this->getLoadMore($aParams, $bNext, $iEvents > 0 && $bEvents);
+        else
+            $sLoadMore = $this->getLoadMoreAuto($aParams, $bNext, $iEvents > 0 && $bEvents);
+
+        $sEmpty = $this->getEmpty($iEvents <= 0 || !$bEvents);
+
+        return array($sContent, $sLoadMore, $sBack, $sEmpty, $iFirst, $bNext);
+    }
+
+    public function getEmpty($bVisible)
+    {
+        return $this->parseHtmlByName('empty.html', array(
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'visible' => $bVisible ? 'block' : 'none',
+            'content' => MsgBox(_t('_bx_timeline_txt_msg_no_results'))
+        ));
+    }
+
+    public function getDivider(&$iDays, &$aEvent)
+    {
+        if(!$this->_bShowTimelineDividers || $iDays == $aEvent['days'])
+            return '';
+
+        $iDays = $aEvent['days'];
+        $iDaysAgo = (int)$aEvent['ago_days'];
+        if($aEvent['today'] == $aEvent['days'] || (($aEvent['today'] - $aEvent['days']) == 1 && $iDaysAgo == 0))
+            return '';
+
+        return $this->parseHtmlByName('divider.html', array(
+        	'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'type' => 'common',
+            'bx_if:show_hidden' => array(
+                'condition' => false,
+                'content' => array()
+            ),
+            'content' => bx_time_js($aEvent['date'])
+        ));
+    }
+
+    public function getDividerToday($aEvent = array())
+    {
+        if(!$this->_bShowTimelineDividers)
+            return '';
+
+    	$bToday = !empty($aEvent) && ($aEvent['today'] == $aEvent['days'] || (($aEvent['today'] - $aEvent['days']) == 1 && (int)$aEvent['ago_days'] == 0));
+
+        return $this->parseHtmlByName('divider.html', array(
+        	'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'type' => 'today',
+        	'bx_if:show_hidden' => array(
+                'condition' => !$bToday,
+                'content' => array()
+            ),
+            'content' => _t('_bx_timeline_txt_today')
+        ));
+    }
+
+    public function getSizer($aParams)
+    {
+        if($aParams['view'] != BX_TIMELINE_VIEW_OUTLINE)
+            return '';
+
+        return $this->parseHtmlByName('sizer_' . $aParams['view'] . '.html', array(
+        	'style_prefix' => $this->_oConfig->getPrefix('style')
+        ));
+    }
+
+    public function getBack($aParams)
+    {
+        $iYearSel = (int)$aParams['timeline'];
+        if($iYearSel == 0)
+            return '';
+
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+        $sJsObject = $this->_oConfig->getJsObjectView($aParams);
+
+        $iYearNow = date('Y', time());
+        return $this->parseHtmlByName('back.html', array(
+        	'style_prefix' => $sStylePrefix,
+            'content' => $this->parseLink('javascript:void(0)', _t('_bx_timeline_txt_jump_to_recent'), array(
+                'title' => _t('_bx_timeline_txt_jump_to_n_year', $iYearNow),
+        		'onclick' => 'javascript:' . $sJsObject . '.changeTimeline(this, 0)'
+            ))
+        ));
+    }
+
+    public function getLoadMore($aParams, $bEnabled, $bVisible = true)
+    {
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+        $sJsObject = $this->_oConfig->getJsObjectView($aParams);
+
+        $iStart = $aParams['start'];
+        $iPerPage = $aParams['per_page'];
+
+        $aTmplVars = array(
+            'style_prefix' => $sStylePrefix,
+            'visible' => ($aParams['view'] == BX_TIMELINE_VIEW_TIMELINE && $bVisible) || ($aParams['view'] == BX_TIMELINE_VIEW_OUTLINE && $bEnabled && $bVisible) ? 'block' : 'none',
+            'bx_if:is_disabled' => array(
+                'condition' => !$bEnabled,
+                'content' => array()
+            ),
+            'bx_if:show_on_click' => array(
+                'condition' => $bEnabled,
+                'content' => array(
+                    'on_click' => 'javascript:' . $sJsObject . '.changePage(this, ' . ($iStart + $iPerPage) . ', ' . $iPerPage . ')'
+                )
+            ),
+            'bx_if:show_jump_to' => array(
+                'condition' => $this->_oConfig->isJumpTo(),
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'content' => $this->getJumpTo($aParams)
+                )
+            )
+        );
+        return $this->parseHtmlByName('load_more.html', $aTmplVars);
+    }
+
+    public function getLoadMoreAuto($aParams, $bEnabled, $bVisible = true)
+    {
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+
+        return $this->parseHtmlByName('load_more_auto.html', array(
+            'style_prefix' => $sStylePrefix,
+            'visible' => ($aParams['view'] == BX_TIMELINE_VIEW_TIMELINE && $bVisible) || ($aParams['view'] == BX_TIMELINE_VIEW_OUTLINE && $bEnabled && $bVisible) ? 'block' : 'none',
+            'loading' => _t('_bx_timeline_txt_loading' . ($bEnabled ? '' : '_complete'))
+        ));
+    }
+
+    /**
+     * Note. For now both List and Caledar based Jump To elements are available.
+     * Calendar based element is used by default. List based one can be removed 
+     * later if it won't be used completely.
+     */
+    public function getJumpTo($aParams)
+    {
+        if(!$this->_oConfig->isJumpTo())
+            return '';
+
+        $bList = false;
+        $bDynamicMode = isset($aParams['dynamic_mode']) && (bool)$aParams['dynamic_mode'] === true;
+
+        if($bList && !$bDynamicMode)
+            return '';
+
+        return $this->{'_getJumpTo' . ($bList ? 'List' : 'Caledar')}($aParams);
+    }
+
+    public function getComments($sSystem, $iId, $aBrowseParams = array())
+    {
+        $oModule = $this->getModule();
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+
+        $oCmts = $oModule->getCmtsObject($sSystem, $iId);
+        if($oCmts === false)
+            return '';
+
+        $aCmtsBp = array();
+        if(!empty($aBrowseParams['cmts_preload_number']))
+            $aCmtsBp['per_view'] = $aBrowseParams['cmts_preload_number'];
+
+        $aCmtsDp = array(
+            'in_designbox' => false, 
+            'dynamic_mode' => isset($aBrowseParams['dynamic_mode']) && $aBrowseParams['dynamic_mode'] === true
+        );
+        if(!empty($aBrowseParams['cmts_min_post_form']))
+            $aCmtsDp['min_post_form'] = $aBrowseParams['cmts_min_post_form'];
+
+        $aComments = $oCmts->getCommentsBlock($aCmtsBp, $aCmtsDp);
+        if(empty($aComments) || !is_array($aComments))
+            return '';
+
+        return $this->parseHtmlByName('comments.html', array(
+            'style_prefix' => $sStylePrefix,
+            'id' => $iId,
+            'content' => $aComments['content']
+        ));
+    }
+
+    public function getRepostElement($iOwnerId, $sType, $sAction, $iObjectId, $aParams = array())
+    {
+        $aReposted = $this->_oDb->getReposted($sType, $sAction, $iObjectId);
+        if(empty($aReposted) || !is_array($aReposted))
+            return '';
+
+		$oModule = $this->getModule();
+		$bDisabled = $oModule->isAllowedRepost($aReposted) !== true || $this->_oDb->isReposted($aReposted['id'], $iOwnerId, $oModule->getUserId());
+		if($bDisabled && (int)$aReposted['reposts'] == 0)
+            return '';
+
+		$sStylePrefix = $this->_oConfig->getPrefix('style');
+        $sStylePrefixRepost = $sStylePrefix . '-repost-';
+
+        $bDynamicMode = isset($aParams['dynamic_mode']) && $aParams['dynamic_mode'] === true;
+
+        $bShowDoRepostAsButtonSmall = isset($aParams['show_do_repost_as_button_small']) && $aParams['show_do_repost_as_button_small'] == true;
+        $bShowDoRepostAsButton = !$bShowDoRepostAsButtonSmall && isset($aParams['show_do_repost_as_button']) && $aParams['show_do_repost_as_button'] == true;
+
+        $bShowDoRepostImage = isset($aParams['show_do_repost_image']) && $aParams['show_do_repost_image'] == true && !empty($aParams['image_do_repost']);
+        $bShowDoRepostIcon = isset($aParams['show_do_repost_icon']) && $aParams['show_do_repost_icon'] == true && !empty($aParams['icon_do_repost']);
+        $bShowDoRepostText = isset($aParams['show_do_repost_text']) && $aParams['show_do_repost_text'] == true && !empty($aParams['text_do_repost']);
+        $bShowCounter = isset($aParams['show_counter']) && $aParams['show_counter'] === true;
+
+        //--- Do repost link ---//
+		$sClass = $sStylePrefixRepost . 'do-repost';
+		if($bShowDoRepostAsButton)
+			$sClass .= ' bx-btn';
+		else if($bShowDoRepostAsButtonSmall)
+			$sClass .= ' bx-btn bx-btn-small';
+
+                $sOnClick = '';
+                if(!$bDisabled) {
+                    $sCommonPrefix = $this->_oConfig->getPrefix('common_post');
+                    if(str_replace($sCommonPrefix, '', $sType) == BX_TIMELINE_PARSE_TYPE_REPOST) {
+                        $aRepostedData = unserialize($aReposted['content']);
+
+                        $sOnClick = $this->_getRepostJsClick($iOwnerId, $aRepostedData['type'], $aRepostedData['action'], $aRepostedData['object_id']);
+                    }
+                    else
+                        $sOnClick = $this->_getRepostJsClick($iOwnerId, $sType, $sAction, $iObjectId);
+                }
+                else
+                    $sClass .= $bShowDoRepostAsButton || $bShowDoRepostAsButtonSmall ? ' bx-btn-disabled' : ' ' . $sStylePrefixRepost . 'disabled';
+
+		$aOnClickAttrs = array(
+			'title' => _t('_bx_timeline_txt_do_repost')
+		);
+		if(!empty($sClass))
+			$aOnClickAttrs['class'] = $sClass;
+		if(!empty($sOnClick))
+			$aOnClickAttrs['onclick'] = $sOnClick;
+
+		//--- Do repost label ---//
+		$sMethodDoRepostLabel = ''; 
+		$sTemplateDoRepostLabel = '';
+		if(!empty($aParams['template_do_repost_label'])) {
+			$sMethodDoRepostLabel = 'parseHtmlByContent';
+			$sTemplateDoRepostLabel = $aParams['template_do_repost_label'];
+		}
+		else {
+			$sMethodDoRepostLabel = 'parseHtmlByName';
+			$sTemplateDoRepostLabel = $aParams['template_do_repost_label_name'];
+		}
+
+		$sDoRepost = $this->$sMethodDoRepostLabel($sTemplateDoRepostLabel, array(
+        	'bx_if:show_image' => array(
+        		'condition' => $bShowDoRepostImage,
+        		'content' => array(
+        			'src' => $this->getIconUrl($aParams['image_do_repost'])
+        		)
+        	),
+        	'bx_if:show_icon' => array(
+        		'condition' => $bShowDoRepostIcon,
+        		'content' => array(
+        			'name' => $aParams['icon_do_repost']
+        		)
+        	),
+        	'bx_if:show_text' => array(
+        		'condition' => $bShowDoRepostText,
+        		'content' => array(
+        			'text' => _t($aParams['text_do_repost'])
+        		)
+        	)
+        ));
+
+        return $this->parseHtmlByName('repost_element_block.html', array(
+            'style_prefix' => $sStylePrefix,
+            'html_id' => $this->_oConfig->getHtmlIds('repost', 'main') . $aReposted['id'],
+            'class' => ($bShowDoRepostAsButton ? $sStylePrefixRepost . 'button' : '') . ($bShowDoRepostAsButtonSmall ? $sStylePrefixRepost . 'button-small' : ''),
+            'count' => $aReposted['reposts'],
+            'do_repost' => $this->parseLink('javascript:void(0)', $sDoRepost, $aOnClickAttrs),
+            'bx_if:show_counter' => array(
+                'condition' => $bShowCounter,
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+        			'bx_if:show_hidden' => array(
+        				'condition' => (int)$aReposted['reposts'] == 0,
+        				'content' => array()
+        			),
+                    'counter' => $this->getRepostCounter($aReposted, $aParams)
+                )
+            ),
+            'script' => $this->getRepostJsScript($bDynamicMode)
+        ));
+    }
+
+    public function getRepostCounter($aEvent, $aParams = array())
+    {
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+        $sJsObject = $this->_oConfig->getJsObject('repost');
+
+        $bShowDoRepostAsButtonSmall = isset($aParams['show_do_repost_as_button_small']) && $aParams['show_do_repost_as_button_small'] == true;
+        $bShowDoRepostAsButton = !$bShowDoRepostAsButtonSmall && isset($aParams['show_do_repost_as_button']) && $aParams['show_do_repost_as_button'] == true;
+
+        $sClass = $sStylePrefix . '-repost-counter';
+        if($bShowDoRepostAsButtonSmall)
+            $sClass .= ' bx-btn-small-height';
+        if($bShowDoRepostAsButton)
+            $sClass .= ' bx-btn-height';
+
+        return $this->parseLink('javascript:void(0)', !empty($aEvent['reposts']) && (int)$aEvent['reposts'] > 0 ? $this->getRepostCounterLabel($aEvent['reposts']) : '', array(
+            'id' => $this->_oConfig->getHtmlIds('repost', 'counter') . $aEvent['id'],
+            'class' => $sClass,
+            'title' => _t('_bx_timeline_txt_reposted_by'),
+            'onclick' => 'javascript:' . $sJsObject . '.toggleByPopup(this, ' . $aEvent['id'] . ')'
+        ));
+    }
+
+    public function getRepostCounterLabel($iCount)
+    {
+        return $iCount;
+    }
+
+    public function getRepostedBy($iId)
+    {
+        $aTmplUsers = array();
+        $oModule = $this->getModule();
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+
+        $aUserIds = $this->_oDb->getRepostedBy($iId);
+        foreach($aUserIds as $iUserId)
+            $aTmplUsers[] = array(
+                'style_prefix' => $sStylePrefix,
+                'user_unit' => $oModule->getObjectUser($iUserId)->getUnit()
+            );
+
+        if(empty($aTmplUsers))
+            $aTmplUsers = MsgBox(_t('_Empty'));
+
+        return $this->parseHtmlByName('repost_by_list.html', array(
+            'style_prefix' => $sStylePrefix,
+            'bx_repeat:list' => $aTmplUsers
+        ));
+    }
+
+    public function getRepostJsScript($bDynamicMode = false)
+    {
+        $sCode = $this->getJsCode('repost', array(), array('mask' => '{object} = new {class}({params});', 'wrap' => false));
+
+        if($bDynamicMode) {
+            $sJsObject = $this->_oConfig->getJsObject('repost');
+
+            $sCode = "var " . $sJsObject . " = null; 
+            $.getScript('" . bx_js_string($this->getJsUrl('main.js'), BX_ESCAPE_STR_APOS) . "', function(data, textStatus, jqxhr) {
+                $.getScript('" . bx_js_string($this->getJsUrl('repost.js'), BX_ESCAPE_STR_APOS) . "', function(data, textStatus, jqxhr) {
+                    bx_get_style('" . bx_js_string($this->getCssUrl('repost.css'), BX_ESCAPE_STR_APOS) . "');
+                    " . $sCode . "
+                });
+            }); ";
+        }
+        else {
+            $sCode = "var " . $sCode;
+
+            $this->addCss(array('repost.css'));
+            $this->addJs(array('main.js', 'repost.js'));
+        }
+
+        return $this->_wrapInTagJsCode($sCode);
+    }
+
+    public function getRepostJsClick($iOwnerId, $sType, $sAction, $iObjectId)
+    {
+        $aReposted = $this->_oDb->getReposted($sType, $sAction, $iObjectId);
+        if(empty($aReposted) || !is_array($aReposted))
+            return '';
+
+        $sResult = '';
+        $sCommonPrefix = $this->_oConfig->getPrefix('common_post');
+        if(str_replace($sCommonPrefix, '', $sType) == BX_TIMELINE_PARSE_TYPE_REPOST) {
+            $aRepostedData = unserialize($aReposted['content']);
+
+            $sResult = $this->_getRepostJsClick($iOwnerId, $aRepostedData['type'], $aRepostedData['action'], $aRepostedData['object_id']);
+        }
+        else
+            $sResult = $this->_getRepostJsClick($iOwnerId, $sType, $sAction, $iObjectId);
+
+        return $sResult;
+    }
+
+    public function getAttachLinkForm($iEventId = 0)
+    {
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+        $sJsObject = $this->_oConfig->getJsObject('post');
+
+        $aForm = $this->getModule()->getFormAttachLink($iEventId);
+
+        return $this->parseHtmlByName('attach_link_form.html', array(
+            'style_prefix' => $sStylePrefix,
+            'js_object' => $sJsObject,
+            'form_id' => $aForm['form_id'],
+            'form' => $aForm['form'],
+        ));
+    }
+
+    public function getAttachLinkField($iUserId, $iEventId = 0)
+    {
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+
+        if(!$iEventId)
+            $aLinks = $this->_oDb->getUnusedLinks($iUserId);
+        else
+            $aLinks = $this->_oDb->getLinks($iEventId);
+
+        $sLinks = '';
+        foreach($aLinks as $aLink)
+            $sLinks .= $this->getAttachLinkItem($iUserId, $aLink);
+
+        return $this->parseHtmlByName('attach_link_form_field.html', array(
+            'html_id' => $this->_oConfig->getHtmlIds('post', 'attach_link_form_field') . $iEventId,
+            'style_prefix' => $sStylePrefix,
+            'links' => $sLinks
+        ));
+    }
+
+    public function getAttachLinkItem($iUserId, $mixedLink)
+    {
+        $aLink = is_array($mixedLink) ? $mixedLink : $this->_oDb->getLinksBy(array('type' => 'id', 'id' => (int)$mixedLink, 'profile_id' => $iUserId));
+        if(empty($aLink) || !is_array($aLink))
+            return '';
+
+        $sLinkIdPrefix = $this->_oConfig->getHtmlIds('post', 'attach_link_item');
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+        $sClass = $sStylePrefix . '-al-item';
+        $sJsObject = $this->_oConfig->getJsObject('post');
+
+        $oEmbed = BxDolEmbed::getObjectInstance();
+        $bEmbed = $oEmbed !== false;
+
+        $sThumbnail = '';
+        $aLinkAttrs = array();
+        if(!$bEmbed) {
+            $aLinkAttrs = array(
+            	'title' => bx_html_attribute($aLink['title'])
+            );
+            if(!$this->_oConfig->isEqualUrls(BX_DOL_URL_ROOT, $aLink['url'])) {
+                $aLinkAttrs['target'] = '_blank';
+    
+                if($this->_oDb->getParam('sys_add_nofollow') == 'on')
+            	    $aLinkAttrs['rel'] = 'nofollow';
+            }
+
+            if((int)$aLink['media_id'] != 0)
+                $sThumbnail = BxDolTranscoderImage::getObjectInstance($this->_oConfig->getObject('transcoder_photos_preview'))->getFileUrl($aLink['media_id']);
+        }
+        else
+            $sClass .= ' embed';
+
+        return $this->parseHtmlByName('attach_link_item.html', array(
+            'html_id' => $sLinkIdPrefix . $aLink['id'],
+            'style_prefix' => $sStylePrefix,
+            'class' => $sClass,
+            'js_object' => $sJsObject,
+            'id' => $aLink['id'],
+            'bx_if:show_embed_outer' => array(
+                'condition' => $bEmbed,
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'embed' => $bEmbed ? $oEmbed->getLinkHTML($aLink['url'], $aLink['title'], 300) : '',
+                )
+            ),
+            'bx_if:show_embed_inner' => array(
+                'condition' => !$bEmbed,
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'bx_if:show_thumbnail' => array(
+                        'condition' => !empty($sThumbnail),
+                        'content' => array(
+                            'style_prefix' => $sStylePrefix,
+                            'thumbnail' => $sThumbnail
+                        )
+                    ),
+                    'url' => $aLink['url'],
+                    'link' => $this->parseLink($aLink['url'], $aLink['title'], $aLinkAttrs)
+                )
+            ),
+        ));
+    }
+
+    public function getData(&$aEvent, $aBrowseParams = array())
+    {
+        $aResult = $this->_oConfig->isSystem($aEvent['type'], $aEvent['action']) ? $this->_getSystemData($aEvent, $aBrowseParams) : $this->_getCommonData($aEvent, $aBrowseParams);
+        if(empty($aResult) || empty($aResult['object_owner_id']) || empty($aResult['content']))
+            return false;
+
+        $sSample = !empty($aResult['sample']) ? $aResult['sample'] : '_bx_timeline_txt_sample';
+
+        $aUpdate = array(
+            'object_owner_id' => $aResult['object_owner_id']
+        );
+
+        //--- Update Title if empty.
+        if(empty($aEvent['title'])) {
+            $sTitle = !empty($aResult['title']) ? $this->_oConfig->getTitle($aResult['title']) : _t($sSample);
+
+            $aUpdate['title'] = bx_process_input(strip_tags($sTitle));
+        }
+
+        //--- Update Description if empty.
+        if(empty($aEvent['description'])) {
+            $sUserName = $this->getModule()->getObjectUser($aResult['object_owner_id'])->getDisplayName();
+
+            $sDescription = !empty($aResult['description']) ? $aResult['description'] : _t('_bx_timeline_txt_user_added_sample', $sUserName, _t($sSample));
+            if($sDescription == '' && !empty($aResult['content']['text']))
+                $sDescription = $aResult['content']['text'];
+
+            $aUpdate['description'] = bx_process_input(strip_tags($sDescription));
+        }
+
+        if(!empty($aUpdate) && is_array($aUpdate)) 
+            $this->_oDb->updateEvent($aUpdate, array('id' => $aEvent['id']));
+
+        return $aResult;
+    }
+
+    public function getDataCached($aEvent, $aBrowseParams = array())
+    {
+        if(!$this->_oConfig->isCacheItem()) 
+            return $this->getData($aEvent, $aBrowseParams);
+
+        /**
+         * For now parameters from $aBrowseParams array aren't used during data retrieving.
+         * If they will then the cache should be created depending on their values.
+         */
+        $sCacheKey = $this->_oConfig->getCacheItemKey($aEvent['id']);
+        $iCacheLifetime = $this->_oConfig->getCacheItemLifetime();
+
+        $oCache = $this->getModule()->getCacheItemObject();
+        $aCached = $oCache->getData($sCacheKey, $iCacheLifetime);
+        if(!empty($aCached)) 
+            return unserialize($aCached);
+
+        $aBrowseParams['dynamic_mode'] = true;
+        $aResult = $this->getData($aEvent, $aBrowseParams);
+        if(!empty($aResult) && isset($aResult['_cache']) && (bool)$aResult['_cache'] === false)
+            return $aResult;
+
+        $oCache->setData($sCacheKey, serialize($aResult), $iCacheLifetime);           
+        return $aResult;
+    }
+
+    public function getVideo($aEvent, $aVideo)
+    {
+        $sVideoId = $this->_oConfig->getHtmlIds('view', 'video') . $aEvent['id'] . '-' . $aVideo['id'];
+        $oPlayer = BxDolPlayer::getObjectInstance();
+        if (!$oPlayer)
+            return '';
+
+        $sPlayer = $oPlayer->getCodeVideo (BX_PLAYER_EMBED, array(
+            'poster' => $aVideo['src_poster'],
+            'mp4' => array('sd' => $aVideo['src_mp4'], 'hd' => $aVideo['src_mp4_hd']),
+            'attrs' => array('id' => $sVideoId),
+        ));
+        return $this->parseHtmlByName('video_player.html', array(
+            'player' => $sPlayer,
+            'html_id' => $sVideoId
+        ));
+    }
+
+    /*
+     * Show only one Live Update notification for all new Events.
+     */
+    function getLiveUpdate($aBrowseParams, $iProfileId, $iCountOld = 0, $iCountNew = 0)
+    {
+        $oModule = $this->getModule();
+
+    	$iCount = (int)$iCountNew - (int)$iCountOld;
+    	if($iCount < 0)
+            return '';
+
+        $aParams = $oModule->getParamsExt($aBrowseParams);
+        $aParams['start'] = 0;
+        $aParams['per_page'] = 1;
+        $aParams['newest'] = true;
+        $aParams['filter'] = BX_TIMELINE_FILTER_OTHER_VIEWER;
+        $aEvents = $this->_oDb->getEvents($aParams);
+        if(empty($aEvents) || !is_array($aEvents))
+            return '';
+
+        $aEvent = array_shift($aEvents);
+        if(empty($aEvent) || !is_array($aEvent))
+            return '';
+
+        $sJsObject = $this->_oConfig->getJsObjectView($aParams);
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+
+        return $this->parseHtmlByName('live_update_button.html', array(
+            'style_prefix' => $sStylePrefix,
+            'html_id' => $this->_oConfig->getHtmlIds('view', 'live_update_popup') . $aBrowseParams['type'],
+            'onclick_show' => "javascript:" . $sJsObject . ".goToBtn(this, 'timeline-event-" . $aEvent['id'] . "', '" . $aEvent['id'] . "');",
+        ));
+    }
+
+    /*
+     * Show Live Update notification separately for each new Event. Popup Chain is used here.
+     * 
+     * Note. This way to display live update notifications isn't used for now. 
+     * See BxTimelineTemplate::getLiveUpdate method instead.
+     */
+    function getLiveUpdates($aBrowseParams, $iProfileId, $iCountOld = 0, $iCountNew = 0)
+    {
+        $bShowAll = true;
+        $bShowActions = false;
+        $oModule = $this->getModule();
+
+    	$iCount = (int)$iCountNew - (int)$iCountOld;
+    	if($iCount < 0)
+            return '';
+
+        $iCountMax = $this->_oConfig->getLiveUpdateLength();
+        if($iCount > $iCountMax)
+            $iCount = $iCountMax;
+
+        $aParams = $oModule->getParamsExt($aBrowseParams);
+        $aParams['start'] = 0;
+        $aParams['per_page'] = $iCount;
+        $aParams['filter'] = BX_TIMELINE_FILTER_OTHER_VIEWER;
+        $aEvents = $this->_oDb->getEvents($aParams);
+        if(empty($aEvents) || !is_array($aEvents))
+            return '';
+
+        $sJsObject = $this->_oConfig->getJsObjectView($aParams);
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+
+        $iUserId = $oModule->getUserId();
+        $bModerator = $oModule->isModerator();
+
+        $aEvents = array_reverse($aEvents);
+        $iEvents = count($aEvents);
+
+        $aTmplVarsItems = array();
+        foreach($aEvents as $iIndex => $aEvent) {
+            $aData = $this->getDataCached($aEvent);
+            if($aData === false)
+                continue;
+
+            $iEventId = $aEvent['id'];
+            $iEventAuthorId = $this->_oConfig->isSystem($aEvent['type'], $aEvent['action']) ? (int)$aEvent['owner_id'] : (int)$aEvent['object_id'];
+            if($iEventAuthorId < 0) {
+                if(abs($iEventAuthorId) == $iUserId)
+                    continue;
+                else if($bModerator)
+                    $iEventAuthorId *= -1;
+            }
+
+            $oAuthor = $oModule->getObjectUser($iEventAuthorId);
+            $sAuthorName = $oAuthor->getDisplayName();
+
+            $aTmplVarsItems[] = array(
+                'bx_if:show_as_hidden' => array(
+                    'condition' => !$bShowAll && $iIndex < ($iEvents - 1),
+                    'content' => array(),
+                ),
+                'item' => $this->parseHtmlByName('live_update_notification.html', array(
+                    'style_prefix' => $sStylePrefix,
+                    'onclick_show' => "javascript:" . $sJsObject . ".goTo(this, 'timeline-event-" . $iEventId . "', '" . $iEventId . "');",
+                    'author_link' => $oAuthor->getUrl(), 
+                    'author_title' => bx_html_attribute($sAuthorName),
+                    'author_name' => $sAuthorName,
+                    'author_unit' => $oAuthor->getUnit(0, array('template' => 'unit_wo_info_links')), 
+                    'text' => _t($aData['sample_action'], _t($aData['sample'])),
+                )),
+                'bx_if:show_previous' => array(
+                    'condition' => $bShowActions && $iIndex > 0,
+                    'content' => array(
+                        'onclick_previous' => $sJsObject . '.previousLiveUpdate(this)'
+                    )
+                ),
+                'bx_if:show_close' => array(
+                    'condition' => $bShowActions,
+                    'content' => array(
+                        'onclick_close' => $sJsObject . '.hideLiveUpdate(this)'
+                    )
+                )
+            );
+        }
+
+        return $this->parseHtmlByName('popup_chain.html', array(
+            'html_id' => $this->_oConfig->getHtmlIds('view', 'live_update_popup') . $aBrowseParams['type'],
+            'bx_repeat:items' => $aTmplVarsItems
+        ));
+    }
+
+    protected function _cacheEvent($iProfileId, &$aEvent, &$aParams)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $aParamsSet = array(
+            'type' => $aParams['type'],
+            'context_id' => is_array($aEvent[$CNF['FIELD_OWNER_ID']]) ? array_shift($aEvent[$CNF['FIELD_OWNER_ID']]) : $aEvent[$CNF['FIELD_OWNER_ID']],  
+            'profile_id' => $iProfileId, 
+            'event_id' => $aEvent[$CNF['FIELD_ID']], 
+            'date' => $aEvent[$CNF['FIELD_ADDED']]
+        );
+
+        //--- Process Context ID value.
+        if($aParams['type'] == BX_BASE_MOD_NTFS_TYPE_PUBLIC)
+            $aParamsSet['context_id'] = 0;
+        else if(in_array($aParams['type'], array(BX_TIMELINE_TYPE_FEED, BX_TIMELINE_TYPE_CHANNELS, BX_TIMELINE_TYPE_OWNER_AND_CONNECTIONS)))
+            $aParamsSet['context_id'] = $iProfileId;
+
+        //--- Process 'important' flag.
+        if($aParams['type'] == BX_BASE_MOD_NTFS_TYPE_OWNER && (int)$aEvent['pinned'] > 0) 
+            $aParamsSet['important'] = 1;
+        else if(in_array($aParams['type'], array(BX_BASE_MOD_NTFS_TYPE_PUBLIC, BX_BASE_MOD_NTFS_TYPE_CONNECTIONS, BX_TIMELINE_TYPE_FEED, BX_TIMELINE_TYPE_CHANNELS, BX_TIMELINE_TYPE_OWNER_AND_CONNECTIONS)) && (int)$aEvent['sticked'] > 0)
+            $aParamsSet['important'] = 1;
+
+        return $this->_oDb->insertCache($aParamsSet);
+    }
+
+    protected function _cacheEvents($aParams)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $iPerPage = (int)$aParams['per_page'];
+        $aParamsCopy = $aParams;
+
+        $aIds = array();
+        while(count($aIds) < $iPerPage) {
+            $aEvents = $this->_oDb->getEvents($aParamsCopy);
+            if(empty($aEvents))
+                break;
+
+            foreach($aEvents as $aEvent) {
+                if($this->getPost($aEvent, $aParamsCopy) == '')
+                    continue;
+
+                $aIds[] = $aEvent[$CNF['FIELD_ID']];
+                if(count($aIds) == $iPerPage)
+                    break 2;
+            }
+
+            $aParamsCopy['start'] += $iPerPage;
+        }
+
+        return $aIds;
+    }
+
+    protected function _getCachedEvents($iProfileId, &$aParams)
+    {
+        return $this->_oDb->getCache(array(
+            'browse' => $aParams['browse'], 
+            'type' => $aParams['type'], 
+            'context_id' => $aParams['owner_id'], 
+            'profile_id' => $iProfileId, 
+            'start' => $aParams['start'], 
+            'per_page' => $aParams['per_page']
+        ));
+    }
+
+    protected function _getPosts($aParams)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        if(!$this->_oConfig->isCacheList() || $this->_oConfig->isCacheListException($aParams['type']))
+            return $this->_oDb->getEvents($aParams);
+
+        $iPerPage = (int)$aParams['per_page'];
+        $iProfileId = (int)bx_get_logged_profile_id(); 
+
+        /*
+         * Get cached data.
+         */
+        $aCache = $this->_getCachedEvents($iProfileId, $aParams);
+        if(!empty($aCache) && is_array($aCache) && count($aCache) == $iPerPage)
+            return $this->_oDb->getEvents(array('browse' => 'ids', 'type' => $aParams['type'], 'ids' => array_keys($aCache)));
+
+        /*
+         * Cache data.
+         */
+        $aIds = $this->_cacheEvents($aParams);
+        return $this->_oDb->getEvents(array('browse' => 'ids', 'type' => $aParams['type'], 'ids' => $aIds));
+    }
+
+    protected function _getPost($sType, $aEvent, $aBrowseParams = array())
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $oModule = $this->getModule();
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+        $sJsObject = $this->_oConfig->getJsObjectView($aBrowseParams);
+
+        $bViewItem = isset($aBrowseParams['view']) && $aBrowseParams['view'] == BX_TIMELINE_VIEW_ITEM;
+        $bViewOutline = isset($aBrowseParams['view']) && $aBrowseParams['view'] == BX_TIMELINE_VIEW_OUTLINE;
+
+        $oAuthor = $oModule->getObjectUser($aEvent['object_owner_id']);
+        $sAuthorName = $oAuthor->getDisplayName(); 
+        $sAuthorUrl = $oAuthor->getUrl();
+        $sAuthorUnit = $oAuthor->getUnit(0, array('template' => 'unit_wo_info'));
+        $sAuthorBadges = $oAuthor->getBadges();
+        $sAuthorAction = _t($aEvent['sample_action'], _t($aEvent['sample']));
+
+        if(($bViewItem || $this->_oConfig->isCountAllViews()) && !empty($aEvent['views']) && is_array($aEvent['views']) && isset($aEvent['views']['system']))
+            $oModule->getViewObject($aEvent['views']['system'], $aEvent['views']['object_id'])->doView();
+
+        $aTmplVarsNote = $this->_getTmplVarsNote($aEvent);
+        $aTmplVarsMenuItemCounters = $this->_getTmplVarsMenuItemCounters($aEvent, $aBrowseParams);
+        $aTmplVarsMenuItemActions = $this->_getTmplVarsMenuItemActions($aEvent, $aBrowseParams);
+        $aTmplVarsMenuItemMeta = $this->_getTmplVarsMenuItemMeta($aEvent, $aBrowseParams);
+
+        $aTmplVarsManage = $this->_getTmplVarsManage($aEvent, $aBrowseParams);
+
+        $aTmplVarsTimelineOwner = $this->_getTmplVarsTimelineOwner($aEvent);
+        $bTmplVarsTimelineOwner = !empty($aTmplVarsTimelineOwner);
+
+        $aTmplVarsOwnerActions = $this->_getTmplVarsOwnerActions($aEvent, $aBrowseParams);
+        $bTmplVarsOwnerActions = !empty($aTmplVarsOwnerActions); 
+
+        $bPinned = (int)$aEvent['pinned'] > 0;
+        $bSticked = (int)$aEvent['sticked'] > 0;
+        $bPromoted = (int)$aEvent['promoted'] > 0;
+
+        $sClass = $aEvent['type'] . ' ' . (!empty($aEvent['action']) ? $aEvent['action'] . ' ' : '') . $sStylePrefix . '-view-sizer';
+        if($bViewOutline) {
+            $sClass = $sStylePrefix . '-grid-item-sizer';
+            if($bPinned || $bSticked || $bPromoted) {
+                $sClass .= ' ' . $sStylePrefix . '-gis';
+
+            if($bPinned)
+                $sClass .= '-pnd';
+            if($bSticked)
+                $sClass .= '-psd';
+            if($bPromoted)
+                $sClass .= '-pmd';
+            }
+        }
+        if(!empty($aBrowseParams['blink']) && in_array($aEvent['id'], $aBrowseParams['blink']))
+            $sClass .= ' ' . $sStylePrefix . '-blink';
+        if($bPinned)
+            $sClass .= ' ' . $sStylePrefix . '-pinned';
+        if($bSticked)
+            $sClass .= ' ' . $sStylePrefix . '-sticked';
+        if($bPromoted)
+            $sClass .= ' ' . $sStylePrefix . '-promoted';
+
+        $sClassOwner = $bTmplVarsOwnerActions ? $sStylePrefix . '-io-with-actions' : '';
+
+        $oMetatags = BxDolMetatags::getObjectInstance($this->_oConfig->getObject('metatags'));
+        $sLocation = $oMetatags->locationsString($aEvent['id']);
+ 
+        $sFields = '';
+        if(!$bViewItem) {
+            $oForm = BxDolForm::getObjectInstance($this->_oConfig->getObject('form_post'), $this->_oConfig->getObject('form_display_post_view'), $this, $aEvent['id']);
+            $oForm->initChecker($aEvent);
+
+            if(!empty($oForm->aInputs) && is_array($oForm->aInputs))
+                foreach($oForm->aInputs as $aInput)
+                    if($aInput['type'] != 'hidden' && !empty($aInput['value'])) {
+                        $sFields = $oForm->getCode();
+                        break;
+                    }
+        }
+
+        $aTmplVars = array (
+            'style_prefix' => $sStylePrefix,
+            'js_object' => $sJsObject,
+            'html_id' => $this->_oConfig->getHtmlIdView('item', $aBrowseParams, array('whole' => false)) . $aEvent['id'],
+            'class' => $sClass,
+            'class_owner' => $sClassOwner,
+            'class_content' => $bViewItem ? 'bx-def-color-bg-block' : 'bx-def-color-bg-box',
+            'id' => $aEvent['id'],
+            'bx_if:show_note' => array(
+                'condition' => !empty($aTmplVarsNote),
+                'content' => $aTmplVarsNote
+            ),
+            'bx_if:show_owner_actions' => array(
+                'condition' => $bTmplVarsOwnerActions,
+                'content' => $aTmplVarsOwnerActions
+            ),
+            'item_icon' => !empty($aEvent['icon']) ? $aEvent['icon'] : $CNF['ICON'],
+            'item_owner_url' => $sAuthorUrl,
+            'item_owner_title' => bx_html_attribute($sAuthorName),
+            'item_owner_name' => $sAuthorName .' '. $sAuthorBadges,
+            'item_owner_unit' => $sAuthorUnit,
+            'item_view_url' => $this->_oConfig->getItemViewUrl($aEvent),
+            'item_date' => bx_time_js($aEvent['date']),
+            'bx_if:show_pinned' => array(
+            	'condition' => $bPinned,
+            	'content' => array(
+                    'style_prefix' => $sStylePrefix,
+            	)
+            ),
+            'bx_if:show_sticked' => array(
+            	'condition' => $bSticked,
+            	'content' => array(
+                    'style_prefix' => $sStylePrefix,
+            	)
+            ),
+            'bx_if:show_hot' => array(
+            	'condition' => $this->_oConfig->isHotEvent($aEvent['id']),
+            	'content' => array(
+                    'style_prefix' => $sStylePrefix,
+            	)
+            ),
+            'bx_if:show_manage' => array(
+                'condition' => !empty($aTmplVarsManage),
+                'content' => $aTmplVarsManage
+            ),
+            'bx_if:show_item_action' => array(
+                'condition' => $this->_oConfig->isSystem($aEvent['type'], $aEvent['action']) || $bTmplVarsTimelineOwner,
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'item_owner_action' => $sAuthorAction,
+                    'bx_if:show_timeline_owner' => array(
+                        'condition' => $bTmplVarsTimelineOwner,
+                        'content' => $aTmplVarsTimelineOwner
+                    ),
+                )
+            ),
+            'content_type' => $sType,
+            'content' => is_string($aEvent['content']) ? $aEvent['content'] : $this->_getContent($sType, $aEvent, $aBrowseParams),
+            'bx_if:show_location' => array(
+            	'condition' => !empty($sLocation),
+            	'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'location' => $sLocation
+            	)
+            ),
+            'bx_if:show_fields' => array(
+                'condition' => !empty($sFields),
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'fields' => $sFields
+            	)
+            ),
+            'bx_if:show_menu_item_counters' => array(
+                'condition' => !empty($aTmplVarsMenuItemCounters),
+                'content' => $aTmplVarsMenuItemCounters
+            ),
+            'bx_if:show_menu_item_actions' => array(
+                'condition' => !empty($aTmplVarsMenuItemActions),
+                'content' => $aTmplVarsMenuItemActions
+            ),
+            'bx_if:show_menu_item_meta' => array(
+                'condition' => !empty($aTmplVarsMenuItemMeta),
+                'content' => $aTmplVarsMenuItemMeta
+            ),
+            'comments' => '',
+        );
+
+        $iPreloadComments = $this->_oConfig->getPreloadComments();
+        if($iPreloadComments > 0 && $oModule->isAllowedComment($aEvent) && in_array($aBrowseParams['view'], array(BX_TIMELINE_VIEW_TIMELINE, BX_TIMELINE_VIEW_OUTLINE)))
+            $aTmplVars['comments'] = $this->_getComments($aEvent['comments'], array_merge($aBrowseParams, array(
+                'cmts_preload_number' => $iPreloadComments,
+                'cmts_min_post_form' => false
+            )));       
+
+        $sVariable = '_sTmplContentItem' . bx_gen_method_name($aBrowseParams['view']);
+        if(empty(self::$$sVariable))
+            self::$$sVariable = $this->getHtml('item_' . $aBrowseParams['view'] . '.html');
+
+        $sTmplCode = self::$$sVariable;
+        bx_alert($this->_oConfig->getName(), 'get_post', 0, 0, array(
+            'type' => $sType,
+            'event' => $aEvent,
+            'browse_params' => $aBrowseParams,
+            'tmpl_code' => &$sTmplCode,
+            'tmpl_vars' => &$aTmplVars
+        ));
+
+        return $this->parseHtmlByContent($sTmplCode, $aTmplVars);
+    }
+
+    protected function _getContent($sType, $aEvent, $aBrowseParams = array())
+    {
+        $sMethod = '_getTmplVarsContent' . ucfirst($sType);
+        if(!method_exists($this, $sMethod))
+            return '';
+
+        $sVariable = '_sTmplContentType' . bx_gen_method_name($sType);
+        if(empty(self::$$sVariable))
+            self::$$sVariable = $this->getHtml('type_' . $sType . '.html');
+
+		return $this->parseHtmlByContent(self::$$sVariable, $this->$sMethod($aEvent, $aBrowseParams));
+    }
+
+    protected function _getComments($aComments, $aBrowseParams = array())
+    {
+        $mixedComments = $this->getModule()->getCommentsData($aComments);
+        if($mixedComments === false)
+            return '';
+
+        list($sSystem, $iObjectId, $iCount) = $mixedComments;
+        return $this->getComments($sSystem, $iObjectId, $aBrowseParams);
+    }
+
+    protected function _getShowMore($aParams)
+    {
+        return $this->parseHtmlByName('show_more.html', array(
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'js_object' => $this->_oConfig->getJsObjectView($aParams),
+        ));
+    }
+
+    protected function _getImagePopup($aParams)
+    {
+        $sViewImagePopupId = $this->_oConfig->getHtmlIdView('photo_popup', $aParams);
+        $sViewImagePopupContent = $this->parseHtmlByName('popup_image.html', array(
+            'image_url' => ''
+    	));
+
+    	return BxTemplFunctions::getInstance()->transBox($sViewImagePopupId, $sViewImagePopupContent, true);
+    }
+
+    protected function _getRepostJsClick($iOwnerId, $sType, $sAction, $iObjectId)
+    {
+        $sJsObject = $this->_oConfig->getJsObject('repost');
+        $sFormat = "%s.repostItem(this, %d, '%s', '%s', %d);";
+
+        $iOwnerId = !empty($iOwnerId) ? (int)$iOwnerId : $this->getModule()->getUserId(); //--- in whose timeline the content will be reposted
+        return sprintf($sFormat, $sJsObject, $iOwnerId, $sType, $sAction, (int)$iObjectId);
+    }
+
+    protected function _getJumpToList($aParams)
+    {
+        $iYearSel = (int)$aParams['timeline'];
+        $iYearMin = $this->_oDb->getMaxDuration($aParams);      
+        if(empty($iYearMin))
+            return '';
+
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+        $sJsObject = $this->_oConfig->getJsObjectView($aParams);
+
+        $aYears = array();
+        $iYearMax = date('Y', time()) - 1;
+        for($i = $iYearMax; $i >= $iYearMin; $i--) {
+            $bCurrent = $i == $iYearSel;
+            $aYears[] = array(
+                'style_prefix' => $sStylePrefix,
+                'bx_if:show_link' => array(
+                    'condition' => !$bCurrent,
+                    'content' => array(
+                        'title' => _t('_bx_timeline_txt_jump_to_n_year', $i),
+                        'onclick' => 'javascript:' . $sJsObject . '.changeTimeline(this, \'' . $i . '-12-31\')',
+                        'content' => $i
+                    )
+                ),
+                'bx_if:show_text' => array(
+                    'condition' => $bCurrent,
+                    'content' => array(
+                        'content' => $i
+                    )
+                ),
+            );
+        }
+
+        return $this->parseHtmlByName('jump_to.html', array(
+            'bx_if:show_list' => array(
+                'condition' => true,
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'bx_repeat:links' => $aYears,
+                )
+            ),
+            'bx_if:show_calendar' => array(
+                'condition' => false,
+                'content' => array()
+            )
+        ));
+    }
+
+    protected function _getJumpToCaledar($aParams)
+    {
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+        $sJsObject = $this->_oConfig->getJsObjectView($aParams);
+                
+        return $this->parseHtmlByName('jump_to.html', array(
+            'bx_if:show_list' => array(
+                'condition' => false,
+                'content' => array()
+            ),
+            'bx_if:show_calendar' => array(
+                'condition' => true,
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'onclick' => 'javascript:' . $sJsObject . '.showCalendar(this)',
+                )
+            )
+        ));
+    }
+
+    protected function _getTmplVarsMenuItemActions(&$aEvent, $aBrowseParams = array())
+    {
+        $oMenu = BxDolMenu::getObjectInstance($this->_oConfig->getObject('menu_item_actions_all'));
+        if(!$oMenu) {
+            $oMenu = BxDolMenu::getObjectInstance($this->_oConfig->getObject('menu_item_actions'));
+            if(!$oMenu)
+                return array();
+        }
+
+        $oMenu->setEvent($aEvent, $aBrowseParams);
+        $oMenu->setDynamicMode(isset($aBrowseParams['dynamic_mode']) && $aBrowseParams['dynamic_mode'] === true);
+
+        $sMenu = $oMenu->getCode();
+        if(empty($sMenu))
+            return array();
+
+        return array(
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'js_object' => $this->_oConfig->getJsObjectView($aBrowseParams),
+            'menu_item_actions' => $sMenu
+        );
+    }
+
+    protected function _getTmplVarsManage(&$aEvent, $aBrowseParams = array())
+    {
+        $oMenu = BxDolMenu::getObjectInstance($this->_oConfig->getObject('menu_item_actions_all'));
+        if($oMenu)
+            return array();
+        
+        $oMenu = BxDolMenu::getObjectInstance($this->_oConfig->getObject('menu_item_manage'));
+        if(!$oMenu)
+            return array();
+
+        $oMenu->setEvent($aEvent, $aBrowseParams);
+        $oMenu->setDynamicMode(isset($aBrowseParams['dynamic_mode']) && $aBrowseParams['dynamic_mode'] === true);
+        if(!$oMenu->isVisible())
+            return array();
+
+        $sOnclick = "bx_menu_popup('bx_timeline_menu_item_manage', this, {'id':'bx_timeline_menu_item_manage_{content_id}'}, {content_id:{content_id}, name:'{name}', view:'{view}', type:'{type}'});";
+        $sOnclick = bx_replace_markers($sOnclick, array(
+            'content_id' => $aEvent['id'],            
+            'view' => $aBrowseParams['view'],
+            'type' => $aBrowseParams['type'],
+            'name' => $aBrowseParams['name'],
+        ));
+
+        return array(
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'onclick' => $sOnclick
+        );
+    }
+
+    protected function _getTmplVarsMenuItemCounters(&$aEvent, $aBrowseParams = array())
+    {
+        $oMenu = BxDolMenu::getObjectInstance($this->_oConfig->getObject('menu_item_counters'));
+        $oMenu->setEvent($aEvent, $aBrowseParams);
+        $oMenu->setDynamicMode(isset($aBrowseParams['dynamic_mode']) && $aBrowseParams['dynamic_mode'] === true);
+
+        $sMenu = $oMenu->getCode();
+        if(empty($sMenu))
+            return array();
+
+        return array(
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'js_object' => $this->_oConfig->getJsObjectView($aBrowseParams),
+            'menu_item_counters' => $sMenu
+        );
+    }
+
+    protected function _getTmplVarsMenuItemMeta(&$aEvent, $aBrowseParams = array())
+    {
+        $oMenu = BxDolMenu::getObjectInstance($this->_oConfig->getObject('menu_item_meta'));
+        if(!$oMenu)
+            return array();
+
+        $oMenu->setEvent($aEvent);
+
+        $sMenu = $oMenu->getCode();
+        if(empty($sMenu))
+            return array();
+
+        return array(
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'meta' => $sMenu
+        );
+    }
+
+    protected function _getTmplVarsTimelineOwner(&$aEvent)
+    {
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+        $iUser = bx_get_logged_profile_id();
+        $oModule = $this->getModule();
+
+        $sConnection = $this->_oConfig->getObject('conn_subscriptions');
+        $oConnection = BxDolConnection::getObjectInstance($sConnection);
+        $sConnectionTitle = _t('_sys_menu_item_title_sm_subscribe');
+
+        $sKeyOwnerId = isset($aEvent['owner_id_grouped']) ? 'owner_id_grouped' : 'owner_id';
+        $aOwnerIds = is_array($aEvent[$sKeyOwnerId]) ? $aEvent[$sKeyOwnerId] : array($aEvent[$sKeyOwnerId]);
+
+        $aTmplVarsOwners = array();
+        foreach($aOwnerIds as $iOwnerId) {
+            $iOwnerId = (int)$iOwnerId;
+            $iObjectOwner = (int)$aEvent['object_owner_id'];
+            if($iObjectOwner < 0 && abs($iObjectOwner) == $iUser)
+                $iObjectOwner *= -1;
+
+            if($iOwnerId == 0 || $iOwnerId == $iObjectOwner)
+                continue;
+
+            $oOwner = $oModule->getObjectUser($iOwnerId);
+            $sToType = $oOwner->getModule();
+            $sToName = $oOwner->getDisplayName();
+            $sToUrl = $oOwner->getUrl();
+
+            $aTmplVarsActions = array();
+            if(!empty($iUser) && $iUser != $iOwnerId && $oConnection->checkAllowedConnect($iUser, $iOwnerId) === CHECK_ACTION_RESULT_ALLOWED) {
+                $aTmplVarsActions[] = array(
+                    'href' => "javascript:void(0)",
+                    'onclick' => "bx_conn_action(this, '" . $sConnection . "', 'add', '" . $iOwnerId . "')",
+                    'title' => bx_html_attribute($sConnectionTitle),
+                    'content' => $sConnectionTitle,
+                    'icon' => 'check'
+                );
+            }
+
+            $aTmplVarsOwners[] =  array(
+                'style_prefix' => $sStylePrefix,
+                'owner_type' => _t('_' . $sToType),
+                'owner_url' => $sToUrl,
+                'owner_username' => $sToName,
+                'bx_if:show_timeline_owner_actions' => array(
+                    'condition' => !empty($aTmplVarsActions),
+                    'content' => array(
+                        'style_prefix' => $sStylePrefix,
+                        'bx_repeat:timeline_owner_actions' => $aTmplVarsActions
+                    )
+                )
+            );
+        }
+
+        if(empty($aTmplVarsOwners))
+            return array();
+
+        return array(
+            'style_prefix' => $sStylePrefix,
+            'bx_repeat:owners' => $aTmplVarsOwners
+        );
+    }
+
+    protected function _getTmplVarsContentPost(&$aEvent, $aBrowseParams = array())
+    {
+    	$aContent = &$aEvent['content'];
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+
+        $bViewItem = isset($aBrowseParams['view']) && $aBrowseParams['view'] == BX_TIMELINE_VIEW_ITEM;
+        $bViewSearch = isset($aBrowseParams['view']) && $aBrowseParams['view'] == BX_TIMELINE_VIEW_SEARCH;
+
+        //--- Process Raw ---//
+        $sRaw = isset($aContent['raw']) ? $aContent['raw'] : '';
+
+        //--- Process Text ---//
+        $sUrl = isset($aContent['url']) ? bx_html_attribute($aContent['url']) : '';
+        $sTitle = '';
+        if(isset($aContent['title']))
+            $sTitle = bx_process_output($aContent['title']);
+
+        if(!empty($sUrl) && !empty($sTitle))
+            $sTitle = $this->parseLink($sUrl, $sTitle, array(
+            	'class' => $sStylePrefix . '-title',
+                'title' => $sTitle
+            ));
+
+        $sText = isset($aContent['text']) ? $aContent['text'] : '';
+        $sText = $this->_prepareTextForOutput($sText, $aEvent['id']);
+
+        //--- Process Links ---//
+        $bAddNofollow = $this->_oDb->getParam('sys_add_nofollow') == 'on';
+
+        $aTmplVarsLinks = array();
+        if(!empty($aContent['links']))
+            foreach($aContent['links'] as $aLink) {
+                $sLink = '';
+
+                $oEmbed = BxDolEmbed::getObjectInstance();
+                if ($oEmbed) {
+                    $sLink = $this->parseHtmlByName('link_embed_provider.html', array(
+                        'style_prefix' => $sStylePrefix,
+                        'embed' => $oEmbed->getLinkHTML($aLink['url'], $aLink['title']),
+                    ));
+                }
+                else {
+                    $aLinkAttrs = array(
+                    	'title' => $aLink['title']
+                    );
+                    if(!$this->_oConfig->isEqualUrls(BX_DOL_URL_ROOT, $aLink['url'])) {
+                        $aLinkAttrs['target'] = '_blank';
+    
+                        if($bAddNofollow)
+                    	    $aLinkAttrs['rel'] = 'nofollow';
+                    }
+
+                    $sLinkAttrs = '';
+                    foreach($aLinkAttrs as $sKey => $sValue)
+                        $sLinkAttrs .= ' ' . $sKey . '="' . bx_html_attribute($sValue) . '"';
+
+                    $sLink = $this->parseHtmlByName('link_embed_common.html', array(
+                        'bx_if:show_thumbnail' => array(
+                            'condition' => !empty($aLink['thumbnail']),
+                            'content' => array(
+                                'style_prefix' => $sStylePrefix,
+                                'thumbnail' => $aLink['thumbnail'],
+                                'link' => !empty($aLink['url']) ? $aLink['url'] : 'javascript:void(0)',
+                                'attrs' => $sLinkAttrs
+                            )
+                        ),
+                        'link' => !empty($aLink['url']) ? $aLink['url'] : 'javascript:void(0)',
+                        'attrs' => $sLinkAttrs,
+                        'content' => $aLink['title'],
+                        'bx_if:show_text' => array(
+                            'condition' => !empty($aLink['text']),
+                            'content' => array(
+                                'style_prefix' => $sStylePrefix,
+                                'text' => $aLink['text']
+                            )
+                        )
+                    ));
+                }
+
+                $aTmplVarsLinks[] = array(
+                    'style_prefix' => $sStylePrefix,
+                    'link' => $sLink
+                );
+            }
+
+        /*
+         * View Item page and Snippet in Search Results should use Gallery layout.
+         */
+        $sAttachmentsLayout = $this->_oConfig->getAttachmentsLayout();
+        if($bViewItem || $bViewSearch)
+            $sAttachmentsLayout = BX_TIMELINE_ML_GALLERY;
+
+        $iAttachmentsTotal = 0;
+        $aTmplVarsImages = $aTmplVarsVideos = $aTmplVarsAttachments = array();
+
+        //--- Process Photos ---//
+        $bImages = !empty($aContent['images']) && is_array($aContent['images']);
+        if($bImages) {
+            $aImages = $this->_getTmplVarsImages($aContent['images'], true, $aEvent, $aBrowseParams);
+            if(!empty($aImages))
+                $aTmplVarsImages = array(
+                    'style_prefix' => $sStylePrefix,
+                    'display' => $aImages['display'],
+                    'bx_repeat:items' => $aImages['items']
+                );
+        }
+
+        $bImagesAttach = !empty($aContent['images_attach']) && is_array($aContent['images_attach']);
+        if($bImagesAttach) {
+            $aImagesAttach = $this->_getTmplVarsImages($aContent['images_attach'], array('layout' => $sAttachmentsLayout, 'first' => empty($aTmplVarsAttachments)), $aEvent, $aBrowseParams);
+            if(!empty($aImagesAttach)) {
+                $iAttachmentsTotal += $aImagesAttach['total'];
+                $aTmplVarsAttachments = array_merge($aTmplVarsAttachments, $aImagesAttach['items']);
+            }
+        }
+
+        //--- Add Meta Image when Item is viewed on a separate page ---//
+        if($bViewItem) {
+            $sMetaImageSrc = '';
+            if($bImages && !empty($aContent['images'][0]['src']))
+                $sMetaImageSrc = $aContent['images'][0]['src'];
+            else if($bImagesAttach && !empty($aContent['images_attach'][0]['src']))
+                $sMetaImageSrc = $aContent['images_attach'][0]['src'];
+
+            if(!empty($sMetaImageSrc))
+                BxDolTemplate::getInstance()->addPageMetaImage($sMetaImageSrc);
+        }
+
+    	//--- Process Videos ---//
+        $bVideos = !empty($aContent['videos']) && is_array($aContent['videos']);
+        if($bVideos) {
+            $aVideos = $this->_getTmplVarsVideos($aContent['videos'], true, $aEvent, $aBrowseParams);
+            if(!empty($aVideos))
+                $aTmplVarsVideos = array(
+                    'style_prefix' => $sStylePrefix,
+                    'display' => $aVideos['display'],
+                    'bx_repeat:items' => $aVideos['items']
+                );
+        }
+
+        $bVideosAttach = !empty($aContent['videos_attach']) && is_array($aContent['videos_attach']);
+        if($bVideosAttach) {
+            $aVideosAttach = $this->_getTmplVarsVideos($aContent['videos_attach'], array('layout' => $sAttachmentsLayout, 'first' => empty($aTmplVarsAttachments)), $aEvent, $aBrowseParams);
+            if(!empty($aVideosAttach)) {
+                $iAttachmentsTotal += $aVideosAttach['total'];
+                $aTmplVarsAttachments = array_merge($aTmplVarsAttachments, $aVideosAttach['items']);
+            }
+        }
+
+        //--- Process Files ---//
+        $bFiles = !empty($aContent['files']) && is_array($aContent['files']);
+        if($bFiles) {
+            $aFiles = $this->_getTmplVarsFiles($aContent['files'], $aEvent, $aBrowseParams);
+            if(!empty($aFiles))
+                $aTmplVarsFiles = array(
+                    'style_prefix' => $sStylePrefix,
+                    'display' => $aFiles['display'],
+                    'bx_repeat:items' => $aFiles['items']
+                );
+        }
+
+        $bFilesAttach = !empty($aContent['files_attach']) && is_array($aContent['files_attach']);
+        if($bFilesAttach) {
+            $aFilesAttach = $this->_getTmplVarsFiles($aContent['files_attach'], $aEvent, $aBrowseParams);
+            if(!empty($aFilesAttach)) {
+                $iAttachmentsTotal += $aFilesAttach['total'];
+                $aTmplVarsAttachments = array_merge($aTmplVarsAttachments, $aFilesAttach['items']);
+            }
+        }
+
+        /*
+         *  Process collected attachments in case of Showcase layout.
+         */
+        $iAttachmentsShow = 4;
+        $iAttachmentsCount = count($aTmplVarsAttachments);
+        if($sAttachmentsLayout == BX_TIMELINE_ML_SHOWCASE && $iAttachmentsCount > 0) {
+            $aTmplVarsAttachments[0]['class'] .= ' ' . $sStylePrefix . '-ia-first';
+
+            if($iAttachmentsCount > $iAttachmentsShow)
+                $aTmplVarsAttachments = array_slice($aTmplVarsAttachments, 0, $iAttachmentsShow);
+
+            if($iAttachmentsTotal > $iAttachmentsShow)
+                $aTmplVarsAttachments[$iAttachmentsShow - 1]['item'] .= $this->parseHtmlByName('attach_more.html', array(
+                    'style_prefix' => $sStylePrefix,
+                    'link' => $this->_oConfig->getItemViewUrl($aEvent),
+                    'more' => $iAttachmentsTotal - $iAttachmentsShow
+                ));
+        }
+
+        return array(
+            'style_prefix' => $sStylePrefix,
+            'bx_if:show_title' => array(
+                'condition' => !empty($sTitle),
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'title' => $sTitle,
+                )
+            ),
+            'bx_if:show_content' => array(
+                'condition' => !empty($sText),
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'item_content' => $sText
+                )
+            ),
+            'bx_if:show_raw' => array(
+                'condition' => !empty($sRaw),
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'item_content_raw' => $sRaw
+                )
+            ),
+            'bx_if:show_links' => array(
+                'condition' => !empty($aTmplVarsLinks),
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'bx_repeat:links' => $aTmplVarsLinks
+                )
+            ),
+            'bx_if:show_images' => array(
+                'condition' => !empty($aTmplVarsImages),
+                'content' => $aTmplVarsImages
+            ),
+            'bx_if:show_videos' => array(
+                'condition' => !empty($aTmplVarsVideos),
+                'content' => $aTmplVarsVideos
+            ),
+            'bx_if:show_attachments' => array(
+                'condition' => !empty($aTmplVarsAttachments),
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'display' => $sAttachmentsLayout,
+                    'count' => count($aTmplVarsAttachments),
+                    'bx_repeat:items' => $aTmplVarsAttachments
+                )
+            )
+        );
+    }
+
+    protected function _getTmplVarsContentRepost(&$aEvent, $aBrowseParams = array())
+    {
+    	$aContent = &$aEvent['content'];
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+
+        $sOwnerLink = $this->parseLink($aContent['owner_url'], $aContent['owner_name']);
+
+        $sSample = _t($aContent['sample']);
+        $sSampleLink = empty($aContent['url']) ? $sSample : $this->parseLink($aContent['url'], $sSample);
+
+        $sContent = $this->_getContent($aContent['parse_type'], $aEvent, $aBrowseParams);
+
+        return array(
+            'style_prefix' => $sStylePrefix,
+            'item_owner_action' => _t('_bx_timeline_txt_reposted', $sOwnerLink, $sSampleLink),
+            'bx_if:show_content' => array(
+                'condition' => !empty($sContent),
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'content' => $sContent,
+                )
+            )
+        );
+    }
+
+    protected function _getTmplVarsNote(&$aEvent)
+    {
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+
+        $iUser = bx_get_logged_profile_id();
+        $iOwner = $this->_oConfig->isSystem($aEvent['type'], $aEvent['action']) ? $aEvent['owner_id'] : $aEvent['object_id'];
+
+        $aTmplVars = array();
+        if(!empty($iOwner) && !is_array($iOwner) && !empty($aEvent['promoted'])) {
+            $sConnection = $this->_oConfig->getObject('conn_subscriptions');
+            $oConnection = BxDolConnection::getObjectInstance($sConnection);
+            if(!$oConnection->isConnected($iUser, $iOwner))
+                $aTmplVars[] = array(
+                    'style_prefix' => $sStylePrefix,
+                    'class' => '',
+                    'bx_if:show_note_color' => array(
+                        'condition' => false,
+                        'content' => array(
+                            'item_note_color' => 'red1',
+                        )
+                    ),
+                    'item_note' => _t('_bx_timeline_txt_promoted')
+                );
+        }
+
+        //--- Awaiting status related notes.
+        if($aEvent['status'] == BX_TIMELINE_STATUS_AWAITING) {
+            $sNote = '';
+            if((int)$aEvent['published'] > (int)$aEvent['date'])
+                $sNote = _t('_bx_timeline_txt_note_scheduled_awaiting', bx_time_js($aEvent['published'], BX_FORMAT_DATE, true));
+            else
+                $sNote = _t('_bx_timeline_txt_note_processing_awaiting');
+
+            $aTmplVars[] = array(
+                'style_prefix' => $sStylePrefix,
+                'bx_if:show_note_color' => array(
+                    'condition' => true,
+                    'content' => array(
+                        'item_note_color' => 'red3'
+                    )
+                ),
+                'item_note' => $sNote
+            );
+        }
+
+        //--- Failed status related notes.
+        if($aEvent['status'] == BX_TIMELINE_STATUS_FAILED)
+            $aTmplVars[] = array(
+                'style_prefix' => $sStylePrefix,
+                'bx_if:show_note_color' => array(
+                    'condition' => true,
+                    'content' => array(
+                        'item_note_color' => 'red2'
+                    )
+                ),
+                'item_note' => _t('_bx_timeline_txt_note_processing_failed')
+            );
+
+        return empty($aTmplVars) ? array() : array(
+            'style_prefix' => $sStylePrefix,
+            'bx_repeat:notes' => $aTmplVars
+        );
+    }
+
+    protected function _getTmplVarsOwnerActions(&$aEvent, $aBrowseParams = array())
+    {
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+
+        $iUser = bx_get_logged_profile_id();
+        $iOwner = $this->_oConfig->isSystem($aEvent['type'], $aEvent['action']) ? $aEvent['object_owner_id'] : $aEvent['object_id'];
+
+        $aTmplVarsActions = array();
+        if(!empty($iUser) && !empty($iOwner) && $iUser != $iOwner) {
+            $oOwner = BxDolProfile::getInstance($iOwner);
+            if($oOwner !== false && bx_srv($oOwner->getModule(), 'check_allowed_with_content', array('subscribe_add', $oOwner->getContentId())) === CHECK_ACTION_RESULT_ALLOWED) {
+                $sJsObject = $this->_oConfig->getJsObjectView($aBrowseParams);
+                $sConnection = $this->_oConfig->getObject('conn_subscriptions');
+
+                $sContent = _t('_sys_menu_item_title_sm_subscribe');
+                $aTmplVarsActions[] = array(
+                    'style_prefix' => $sStylePrefix,
+                    'href' => "javascript:void(0)",
+                    'onclick' => "bx_conn_action(this, '" . $sConnection . "', 'add', '" . $iOwner . "', false, function(oData, eElement) {" . $sJsObject . ".onConnect(eElement, oData);})",
+                    'title' => bx_html_attribute($sContent),
+                    'content' => $sContent,
+                    'icon' => 'check'
+                );
+            }
+        }
+
+        return array(
+            'style_prefix' => $sStylePrefix,
+            'bx_repeat:owner_actions' => $aTmplVarsActions
+        );
+    }
+
+    protected function _getTmplVarsImages($aImages, $mixedLayout, &$aEvent, &$aBrowseParams)
+    {
+        if(empty($aImages) || !is_array($aImages))
+            return array();
+
+        $iTotal = 0; //--- Total count of images related to the event.
+        if(isset($aImages['total']) && isset($aImages['items'])) {
+            $iTotal = (int)$aImages['total'];
+            $aImages = $aImages['items'];
+        }
+        else
+            $iTotal = count($aImages);
+
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+        $sJsObject = $this->_oConfig->getJsObjectView($aBrowseParams);
+
+        $bViewItem = isset($aBrowseParams['view']) && $aBrowseParams['view'] == BX_TIMELINE_VIEW_ITEM;
+
+        $sDisplay = '';
+        $aTmplVarsImages = array();
+
+        $sImageSrcKey = $sImageSrcKeyBig = '';
+        $sImageSrcKeyDefault = 'src';
+        if(count($aImages) == 1) {
+            $sDisplay = BX_TIMELINE_ML_SINGLE;
+            $sImageSrcKey = $bViewItem ? 'src_orig' : 'src_medium';
+        }
+        else if(is_array($mixedLayout) && !empty($mixedLayout['layout'])) {
+            $sDisplay = $mixedLayout['layout'];
+            $sImageSrcKey = 'src';
+            $sImageSrcKeyBig = 'src_medium';
+        }
+        else {
+            $sDisplay = BX_TIMELINE_ML_GALLERY;
+            $sImageSrcKey = 'src';
+            $sImageSrcKeyBig = 'src_medium';
+        }
+
+        $bAttachFirst = false;
+        if($sDisplay == BX_TIMELINE_ML_SHOWCASE)
+            $bAttachFirst = isset($mixedLayout['first']) && $mixedLayout['first'] === true;
+
+        $aImageFirst = reset($aImages);
+        $iImageFirst = isset($aImageFirst['id']) ? (int)$aImageFirst['id'] : 0;
+
+        foreach($aImages as $aImage) {
+            $sImageSrcKeyCur = $sImageSrcKey;
+            if($bAttachFirst && isset($aImage['id']) && (int)$aImage['id'] == $iImageFirst)
+                $sImageSrcKeyCur = $sImageSrcKeyBig;
+
+            $sImageSrc = !empty($aImage[$sImageSrcKeyCur]) ? $aImage[$sImageSrcKeyCur] : $aImage[$sImageSrcKeyDefault];
+            if(empty($sImageSrc))
+                continue;
+
+            $sImage = $this->parseImage($sImageSrc, array(
+                'class' => $sStylePrefix . '-item-image'
+            ));
+
+            $aAttrs = array();
+            if(isset($aImage['onclick']))
+                $aAttrs['onclick'] = $aImage['onclick'];
+            else if(!empty($aImage['src_orig']))
+                $aAttrs['onclick'] = 'return ' . $sJsObject . '.showItem(this, \'' . $aEvent['id'] . '\', \'photo\', ' . json_encode(array('src' => base64_encode($aImage['src_orig']))) . ')'; 
+
+            $sImage = $this->parseLinkByName('image_link.html', isset($aImage['url']) ? $aImage['url'] : 'javascript:void(0)', $sImage, $aAttrs);
+
+            $aTmplVarsImages[] = array(
+                'style_prefix' => $sStylePrefix,
+                'class' => '',
+                'item' => $sImage
+            );
+        }
+        
+        return array(
+            'display' => $sDisplay,
+            'total' => $iTotal,
+            'items' => $aTmplVarsImages
+        );
+    }
+
+    protected function _getTmplVarsVideos($aVideos, $mixedLayout, &$aEvent, &$aBrowseParams)
+    {
+        if(empty($aVideos) || !is_array($aVideos))
+            return array();
+
+        $iTotal = 0; //--- Total count of videos related to the event.
+        if(isset($aVideos['total']) && isset($aVideos['items'])) {
+            $iTotal = (int)$aVideos['total'];
+            $aVideos = $aVideos['items'];
+        }
+        else
+            $iTotal = count($aVideos);
+
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+        $aTmplVarsVideos = array();
+
+        /*
+         * For now Main Section may have only one video which can use 'autoplay' feature.
+         */
+        $bMain = $mixedLayout === true;
+        if($bMain) {
+            $sDisplay = BX_TIMELINE_ML_SINGLE;
+            if(count($aVideos) > 1)
+                $aVideos = array_slice($aVideos, 0, 1);
+        }
+        else
+            $sDisplay = is_array($mixedLayout) && !empty($mixedLayout['layout']) ? $mixedLayout['layout'] : BX_TIMELINE_AML_DEFAULT;
+
+        /*
+         * Main Section: Autoplay feature is only available here.
+         */
+        $sVap = $sVapId = $sVapSrc = $sVapTmpl = '';
+        if($bMain) {
+            $sVap = $this->_oConfig->getVideosAutoplay();
+            if($sVap != BX_TIMELINE_VAP_OFF) {
+                $sVapId = $this->_oConfig->getHtmlIds('view', 'video_iframe') . $aEvent['id'] . '-';
+                $sVapSrc = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'video/' . $aEvent['id'] . '/';
+                $sVapTmpl = $this->getHtml('video_iframe.html'); 
+            }
+        }
+
+        /*
+         * Attachments Section.
+         */
+        $sAttachTmpl = '';
+        $bAttachFirst = false;
+        if($sDisplay == BX_TIMELINE_ML_SHOWCASE) {
+            $sAttachTmpl = $this->getHtml('attach_video_preview.html');
+            $bAttachFirst = isset($mixedLayout['first']) && $mixedLayout['first'] === true;
+        }
+
+        $iVideoFirst = reset($aVideos)['id'];
+        foreach($aVideos as $aVideo) {
+            $iVideo = (int)$aVideo['id'];
+
+            if($bMain && $sVap != BX_TIMELINE_VAP_OFF)
+                $aTmplVarsVideos[] = array(
+                    'style_prefix' => $sStylePrefix,
+                    'class' => '',
+                    'item' => $this->parseHtmlByContent($sVapTmpl, array(
+                        'style_prefix' => $sStylePrefix,
+                        'html_id' => $sVapId . $iVideo,
+                        'src' => $sVapSrc . $iVideo . '/'
+                    )) 
+                );
+            else {
+                if($bMain || $sDisplay == BX_TIMELINE_ML_GALLERY || ($bAttachFirst && $iVideo == $iVideoFirst))
+                    $aTmplVarsVideos[] = array(
+                        'style_prefix' => $sStylePrefix,
+                        'class' => '',
+                        'item' => BxTemplFunctions::getInstance()->videoPlayer($aVideo['src_poster'], $aVideo['src_mp4'], $aVideo['src_mp4_hd'], array(
+                            'preload' => 'auto'
+                        ), '', $aBrowseParams['dynamic_mode'])
+                    );
+                else {
+                    $bUrl = !empty($aVideo['url']);
+                    $sUrl = $bUrl ? $aVideo['url'] : '';
+                    
+                    $bDuration = !empty($aVideo['duration']);
+                    $sDuration = _t_format_duration($bDuration ? $aVideo['duration'] : 0);
+
+                    $aTmplVarsVideos[] = array(
+                        'style_prefix' => $sStylePrefix,
+                        'class' => '',
+                        'item' => $this->parseHtmlByContent($sAttachTmpl, array(
+                            'style_prefix' => $sStylePrefix,
+                            'bx_if:show_link' => array(
+                                'condition' => $bUrl,
+                                'content' => array(
+                                    'style_prefix' => $sStylePrefix,
+                                    'url' => $sUrl,
+                                    'src' => $aVideo['src_poster'],
+                                )
+                            ),
+                            'bx_if:show_non_link' => array(
+                                'condition' => !$bUrl,
+                                'content' => array(
+                                    'style_prefix' => $sStylePrefix,
+                                    'src' => $aVideo['src_poster'],
+                                )
+                            ),
+                            'bx_if:show_duration' => array(
+                                'condition' => $bDuration,
+                                'content' => array(
+                                    'style_prefix' => $sStylePrefix,
+                                    'duration' => $sDuration,
+                                )
+                            )
+                        ))
+                    );
+                }
+            }
+                
+        }
+
+        return array( 
+            'display' => $sDisplay,
+            'total' => $iTotal,
+            'items' => $aTmplVarsVideos
+        );
+    }
+
+    protected function _getTmplVarsFiles($aFiles, &$aEvent, &$aBrowseParams)
+    {
+        if(empty($aFiles) || !is_array($aFiles))
+            return array();
+
+        $iTotal = 0; //--- Total count of files related to the event.
+        if(isset($aFiles['total']) && isset($aFiles['items'])) {
+            $iTotal = (int)$aFiles['total'];
+            $aFiles = $aFiles['items'];
+        }
+        else
+            $iTotal = count($aFiles);
+
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+        $sJsObject = $this->_oConfig->getJsObjectView($aBrowseParams);
+
+        $bViewItem = isset($aBrowseParams['view']) && $aBrowseParams['view'] == BX_TIMELINE_VIEW_ITEM;
+
+        $sDisplay = '';
+        $aTmplVarsFiles = array();
+
+        $sFileSrcKey = '';
+        $sFileSrcKeyDefault = 'src';
+        if(count($aFiles) == 1) {
+            $sDisplay = 'single';
+            $sFileSrcKey = $bViewItem ? 'src_orig' : 'src_medium';
+        }
+        else {
+            $sDisplay = 'gallery';
+            $sFileSrcKey = 'src';
+        }
+
+        foreach($aFiles as $aFile) {
+            $sFileSrc = !empty($aFile[$sFileSrcKey]) ? $aFile[$sFileSrcKey] : $aFile[$sFileSrcKeyDefault];
+            if(empty($sFileSrc))
+                continue;
+
+            $sImage = $this->parseImage($sFileSrc, array(
+                'class' => $sStylePrefix . '-item-file'
+            ));
+
+            $aAttrs = array();
+            if(isset($aFile['onclick']))
+                $aAttrs['onclick'] = $aFile['onclick'];
+            else if(!$bViewItem && !empty($aFile['src_orig']))
+                $aAttrs['onclick'] = 'return ' . $sJsObject . '.showItem(this, \'' . $aEvent['id'] . '\', \'photo\', ' . json_encode(array('src' => base64_encode($aFile['src_orig']))) . ')'; 
+
+            $sImage = $this->parseLinkByName('file_link.html', isset($aFile['url']) ? $aFile['url'] : 'javascript:void(0)', $sImage, $aAttrs);
+
+            $aTmplVarsFiles[] = array(
+                'style_prefix' => $sStylePrefix,
+                'class' => '',
+                'item' => $sImage
+            );
+        }
+
+        return array(
+            'display' => $sDisplay,
+            'total' => $iTotal,
+            'items' => $aTmplVarsFiles
+        );
+    }
+
+    protected function _getSystemData(&$aEvent, $aBrowseParams = array())
+    {
+        $mixedResult = $this->_oConfig->getSystemData($aEvent, $aBrowseParams);
+        if($mixedResult === false) {
+            $sMethod = 'display' . bx_gen_method_name($aEvent['type'] . '_' . $aEvent['action']);
+            if(method_exists($this, $sMethod))
+                $mixedResult = $this->$sMethod($aEvent);
+        }
+
+        if($mixedResult === false)
+            return '';
+
+        $this->_preparetDataActions($aEvent, $mixedResult);
+        return $mixedResult;
+    }
+
+    protected function _getCommonData(&$aEvent, $aBrowseParams = array())
+    {
+        $CNF = $this->_oConfig->CNF;
+
+        $oModule = $this->getModule();
+        $sJsObject = $this->_oConfig->getJsObjectView($aBrowseParams);
+        $sPrefix = $this->_oConfig->getPrefix('common_post');
+        $sType = str_replace($sPrefix, '', $aEvent['type']);
+
+        $oObjectOwner = BxDolProfile::getInstanceMagic($aEvent['object_id']);
+
+        $iOwnerId = $aEvent['owner_id'];
+        if(is_array($aEvent['owner_id']))
+            $iOwnerId = is_numeric($aEvent['object_privacy_view']) && (int)$aEvent['object_privacy_view'] < 0 ? abs((int)$aEvent['object_privacy_view']) : (int)array_shift($aEvent['owner_id']);
+
+        $aResult = array(
+            'owner_id' => $iOwnerId,
+            'object_owner_id' => $aEvent['object_id'],
+            'icon' => $CNF['ICON'],
+            'sample' => '_bx_timeline_txt_sample_with_article',
+            'sample_wo_article' => '_bx_timeline_txt_sample',
+            'sample_action' => '_bx_timeline_txt_added_sample',
+            'content_type' => $sType,
+            'content' => array(
+                'sample' => '_bx_timeline_txt_sample_with_article',
+                'sample_wo_article' => '_bx_timeline_txt_sample',
+                'sample_action' => '_bx_timeline_txt_added_sample',
+                'url' => $this->_oConfig->getItemViewUrl($aEvent)
+            ), //a string to display or array to parse default template before displaying.
+            'views' => '',
+            'votes' => '',
+            'reactions' => '',
+            'scores' => '',
+            'reports' => '',
+            'comments' => '',
+            'title' => $aEvent['title'], //may be empty.
+            'description' => bx_replace_markers($aEvent['description'], array(
+                'profile_name' => $oObjectOwner->getDisplayName()
+            )) //may be empty.
+        );
+
+        switch($sType) {
+            case BX_TIMELINE_PARSE_TYPE_POST:
+                if(!empty($aEvent['content']))
+                    $aResult['content'] = array_merge($aResult['content'], unserialize($aEvent['content']));
+
+                $aResult['content']['links'] = $oModule->getEventLinks($aEvent['id']);
+                $aResult['content']['images_attach'] = $oModule->getEventImages($aEvent['id']);
+                $aResult['content']['videos_attach'] = $oModule->getEventVideos($aEvent['id']);
+                break;
+
+            case BX_TIMELINE_PARSE_TYPE_REPOST:
+                if(empty($aEvent['content']))
+                    return array();
+
+                $aContent = unserialize($aEvent['content']);
+
+                if(!$this->_oConfig->isSystem($aContent['type'] , $aContent['action'])) {
+                    $aEventReposted = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $aContent['object_id']));
+                    $aReposted = $this->_getCommonData($aEventReposted, $aBrowseParams);
+                } 
+                else {
+                    $aEventReposted = $this->_oDb->getEvents(array_merge(array('browse' => 'descriptor'), $aContent));
+                    $aReposted = $this->_getSystemData($aEventReposted, $aBrowseParams);
+                }
+
+                if(empty($aReposted) || !is_array($aReposted))
+                    return array();
+
+                $aResult['content'] = array_merge($aContent, $aReposted['content']);
+                $aResult['content']['parse_type'] = !empty($aReposted['content_type']) ? $aReposted['content_type'] : BX_TIMELINE_PARSE_TYPE_DEFAULT;
+
+                $sKey = 'allowed_view';
+                $aResult['content'][$sKey] = $this->_preparePrivacy($sKey, $aEventReposted, $aReposted);
+
+                $oObjectOwner = $oModule->getObjectUser($aReposted['object_owner_id']);
+                $aResult['content']['owner_id'] = $aReposted['object_owner_id'];
+                $aResult['content']['owner_name'] = $oObjectOwner->getDisplayName();
+                $aResult['content']['owner_url'] = $oObjectOwner->getUrl();
+
+                if(!empty($aReposted['sample']))
+                    $aResult['content']['sample'] = $aReposted['sample'];
+                if(!empty($aReposted['sample_wo_article']))
+                    $aResult['content']['sample'] = $aReposted['sample_wo_article'];
+
+                $sUserName = $oModule->getObjectUser($aEvent['object_id'])->getDisplayName();
+                $aResult['title'] = _t('_bx_timeline_txt_user_repost', $sUserName, _t($aResult['content']['sample']));
+                $aResult['description'] = _t('_bx_timeline_txt_user_reposted_user_sample', $sUserName, $aResult['content']['owner_name'], _t($aResult['content']['sample']));
+                $aResult['allowed_view'] = array(
+                    'module' => $this->_oConfig->getName(),
+                    'method' => 'get_timeline_repost_allowed_view',
+                );
+                break;
+        }
+
+        $this->_preparetDataActions($aEvent, $aResult);
+        return $aResult;
+    }
+
+    protected function _getFirst($aEvents, $aParams = array())
+    {
+        $CNF = $this->_oConfig->CNF;
+
+        foreach($aEvents as $aEvent)
+            if((int)$aEvent[$CNF['FIELD_STICKED']] == 0)
+                return (int)$aEvent[$CNF['FIELD_ID']];
+
+        $aParams['start'] += $aParams['per_page'];
+        $aEvents = $this->_getPosts($aParams);
+        if(!empty($aEvents) && is_array($aEvents))
+            return $this->_getFirst($aEvents, $aParams);
+
+        return 0;
+    }
+
+    protected function _preparetDataActions(&$aEvent, &$aResult)
+    {
+        if(empty($aEvent) || !is_array($aEvent) || empty($aEvent['id']))
+            return;
+
+        $oModule = $this->getModule();
+
+        $sSystem = $this->_oConfig->getObject('view');
+        if(empty($aResult['views'])) {
+            $aResult['views'] = array();
+            if($oModule->getViewObject($sSystem, $aEvent['id']) !== false)
+                $aResult['views'] = array(
+                    'system' => $sSystem,
+                    'object_id' => $aEvent['id'],
+                    'count' => $aEvent['views']
+                );
+        }
+
+        $sSystem = $this->_oConfig->getObject('vote');
+        if(empty($aResult['votes'])) {
+            $aResult['votes'] = array();
+            if($oModule->getVoteObject($sSystem, $aEvent['id']) !== false)
+                $aResult['votes'] = array(
+                    'system' => $sSystem,
+                    'object_id' => $aEvent['id'],
+                    'count' => $aEvent['votes']
+                );
+        }
+        
+        $sSystem = $this->_oConfig->getObject('reaction');
+        if(empty($aResult['reactions'])) {
+            $aResult['reactions'] = array();
+            if($oModule->getReactionObject($sSystem, $aEvent['id']) !== false)
+                $aResult['reactions'] = array(
+                    'system' => $sSystem,
+                    'object_id' => $aEvent['id'],
+                    'count' => $aEvent['rvotes']
+                );
+        }
+
+        $sSystem = $this->_oConfig->getObject('score');
+        if(empty($aResult['scores'])) {
+            $aResult['scores'] = array();
+            if($oModule->getScoreObject($sSystem, $aEvent['id']) !== false)
+                $aResult['scores'] = array(
+                    'system' => $sSystem,
+                    'object_id' => $aEvent['id'],
+                    'score' => $aEvent['score']
+                );
+        }
+
+        $sSystem = $this->_oConfig->getObject('report');
+        if(empty($aResult['reports'])) {
+            $aResult['reports'] = array();
+            if($oModule->getReportObject($sSystem, $aEvent['id']) !== false)
+                $aResult['reports'] = array(
+                    'system' => $sSystem,
+                    'object_id' => $aEvent['id'],
+                    'count' => $aEvent['reports']
+                );
+        }
+
+        $sSystem = $this->_oConfig->getObject('comment');
+        if(empty($aResult['comments'])) {
+            $aResult['comments'] = array();
+            if($oModule->getCmtsObject($sSystem, $aEvent['id']) !== false)
+                $aResult['comments'] = array(
+                    'system' => $sSystem,
+                    'object_id' => $aEvent['id'],
+                    'count' => $aEvent['comments']
+                );
+        }
+    }
+
+    protected function _prepareTextForOutput($s, $iEventId = 0)
+    {
+        if($this->_oConfig->isBriefCards())
+            $s = strip_tags($s, $this->_oConfig->getBriefCardsTags(true));
+
+    	$s = bx_process_output($s, BX_DATA_HTML);
+
+        $oMetatags = BxDolMetatags::getObjectInstance($this->_oConfig->getObject('metatags'));
+        $s = $oMetatags->metaParse($iEventId, $s);
+
+        return $s;
+    }
+    
+    protected function _preparePrivacy($sKey, $aEvent, $aEventData)
+    {
+        $iResult = CHECK_ACTION_RESULT_ALLOWED;
+        if(isset($aEventData[$sKey], $aEventData[$sKey]['module'], $aEventData[$sKey]['method']))
+            $iResult = BxDolService::call($aEventData[$sKey]['module'], $aEventData[$sKey]['method'], array($aEvent));
+        else if(($aHandler = $this->_oConfig->getHandler($aEvent)) !== false && BxDolRequest::serviceExists($aHandler['module_name'], 'get_timeline_post_allowed_view'))
+            $iResult = BxDolService::call($aHandler['module_name'], 'get_timeline_post_allowed_view', array($aEvent));
+
+        return $iResult;
+    }
+}
+
+/** @} */

+ 135 - 0
modules/boonex/timeline/updates/12.0.2_12.0.3/source/install/config.php

@@ -0,0 +1,135 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Timeline Timeline
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_timeline',
+    'title' => 'Timeline',
+    'note' => 'Timeline module.',
+    'version' => '12.0.3',
+    'vendor' => 'BoonEx',
+    'help_url' => 'http://feed.una.io/?section={module_name}',
+
+    'compatible_with' => array(
+        '12.0.0'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/timeline/',
+    'home_uri' => 'timeline',
+
+    'db_prefix' => 'bx_timeline_',
+    'class_prefix' => 'BxTimeline',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Timeline',
+
+    /**
+     * List of page triggers.
+     */
+    'page_triggers' => array (
+        'trigger_page_profile_view_entry',
+        'trigger_page_group_view_entry',
+    ),
+
+    /**
+     * Menu triggers.
+     */
+    'menu_triggers' => array(
+    	'trigger_profile_view_submenu',
+    	'trigger_group_view_submenu',
+    ),
+
+	/**
+     * Storage objects to automatically delete files from upon module uninstallation.
+     * Note. Don't add storage objects used in transcoder objects.
+     */
+    'storages' => array(
+    	'bx_timeline_photos',
+    	'bx_timeline_videos'
+    ),
+
+    /**
+     * Transcoders.
+     */
+    'transcoders' => array(
+    	'bx_timeline_photos_preview',
+    	'bx_timeline_photos_view',
+        'bx_timeline_photos_big',
+    	'bx_timeline_videos_poster',
+    	'bx_timeline_videos_mp4',
+    	'bx_timeline_videos_mp4_hd'
+    ),
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'uninstall' => array (
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+    	'update_relations_for_all' => 1,
+    	'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable_success' => array(
+    	'process_page_triggers' => 1,
+		'process_menu_triggers' => 1,
+    	'register_transcoders' => 1,
+    	'clear_db_cache' => 1,
+    ),
+    'disable' => array (
+        'execute_sql' => 1,
+    	'update_relations_for_all' => 1,
+    	'update_relations' => 1,
+    	'unregister_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable_failed' => array (
+    	'register_transcoders' => 1,
+    	'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+
+    /**
+     * Relations Section
+     */
+    'relation_handlers' => array(
+    	'on_install' => '',
+    	'on_uninstall' => 'delete_module_events',
+	    'on_enable' => 'add_handlers',
+	    'on_disable' => 'delete_handlers',
+    ),
+    'relations' => array(
+    	'bx_notifications'
+    )
+);
+
+/** @} */

+ 329 - 0
modules/boonex/timeline/updates/12.0.2_12.0.3/source/install/langs/en.xml

@@ -0,0 +1,329 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="en" flag="gb" title="English">
+    <string name="_bx_timeline"><![CDATA[Timeline]]></string>
+    <string name="_bx_timeline_cmts"><![CDATA[Timeline's Comments]]></string>
+    <string name="_bx_timeline_reactions"><![CDATA[Timeline's Reactions]]></string>
+
+    <string name="_bx_timeline_options_category_general"><![CDATA[General]]></string>
+    <string name="_bx_timeline_options_category_browse"><![CDATA[Browse]]></string>
+    <string name="_bx_timeline_options_category_card"><![CDATA[Card]]></string>
+    <string name="_bx_timeline_options_category_cache"><![CDATA[Cache]]></string>
+    <string name="_bx_timeline_options_category_post"><![CDATA[Post]]></string>
+
+    <string name="_bx_timeline_option_enable_edit"><![CDATA[Allow user to edit his items]]></string>
+    <string name="_bx_timeline_option_enable_delete"><![CDATA[Allow Timeline owner to remove items]]></string>
+    <string name="_bx_timeline_option_enable_show_all"><![CDATA[Show all items in Public Feed including ones which were posted in personal Feeds]]></string>
+    <string name="_bx_timeline_option_enable_count_all_views"><![CDATA[Count views for all items in the Feed]]></string>
+    <string name="_bx_timeline_option_events_per_page_profile"><![CDATA[Number of items on profile page]]></string>
+    <string name="_bx_timeline_option_events_per_page_account"><![CDATA[Number of items on dashboard page]]></string>
+    <string name="_bx_timeline_option_events_per_page_home"><![CDATA[Number of items on site home page]]></string>
+    <string name="_bx_timeline_option_events_per_page"><![CDATA[Number of items per page]]></string>
+    <string name="_bx_timeline_option_enable_infinite_scroll"><![CDATA[Enable Infinite Scroll (experimental)]]></string>
+    <string name="_bx_timeline_option_events_per_preload"><![CDATA[Infinite Scroll: Number of items per preload]]></string>
+    <string name="_bx_timeline_option_auto_preloads"><![CDATA[Infinite Scroll: Number of auto preloads]]></string>
+    <string name="_bx_timeline_option_rss_length"><![CDATA[The length of RSS feed]]></string>
+    <string name="_bx_timeline_option_events_hide"><![CDATA[Show events]]></string>
+    <string name="_bx_timeline_option_enable_brief_cards"><![CDATA[Enable brief cards]]></string>
+    <string name="_bx_timeline_option_videos_autoplay"><![CDATA[Videos autoplay (for Timeline view only)]]></string>
+    <string name="_bx_timeline_option_videos_autoplay_off"><![CDATA[Disabled]]></string>
+    <string name="_bx_timeline_option_videos_autoplay_on_mute"><![CDATA[Enabled without sound]]></string>
+    <string name="_bx_timeline_option_videos_autoplay_on"><![CDATA[Enabled with sound]]></string>
+    <string name="_bx_timeline_option_preload_comments"><![CDATA[Number of preloaded comments (up to 7 items)]]></string>
+    <string name="_bx_timeline_option_enable_jump_to_switcher"><![CDATA[Show 'Jump to' switcher]]></string>
+    <string name="_bx_timeline_option_attachments_layout"><![CDATA[Show attachments as]]></string>
+    <string name="_bx_timeline_option_attachments_layout_gallery"><![CDATA[Gallery]]></string>
+    <string name="_bx_timeline_option_attachments_layout_showcase"><![CDATA[Showcase]]></string>
+    <string name="_bx_timeline_option_enable_hot"><![CDATA[Enable Hot list aggregation]]></string>
+    <string name="_bx_timeline_option_hot_interval"><![CDATA[Interval of time (in hours) to get Hot events]]></string>
+    <string name="_bx_timeline_option_enable_cache_item"><![CDATA[Enable item cache]]></string>
+    <string name="_bx_timeline_option_cache_item_engine"><![CDATA[Item cache engine (other than File option may require custom server setup)]]></string>
+    <string name="_bx_timeline_option_cache_item_lifetime"><![CDATA[Item cache lifetime]]></string>
+    <string name="_bx_timeline_option_enable_cache_list"><![CDATA[Enable feed cache]]></string>
+    <string name="_bx_timeline_option_enable_editor_toolbar"><![CDATA[Enable post form editor toolbar]]></string>
+
+    <string name="_bx_timeline_form_post"><![CDATA[Post]]></string>
+    <string name="_bx_timeline_form_post_display_add"><![CDATA[Write Post]]></string>
+    <string name="_bx_timeline_form_post_display_add_public"><![CDATA[Write Public Post]]></string>
+    <string name="_bx_timeline_form_post_display_add_profile"><![CDATA[Write Profile Post]]></string>
+    <string name="_bx_timeline_form_post_display_edit"><![CDATA[Edit Post]]></string>
+    <string name="_bx_timeline_form_post_display_view"><![CDATA[View Post (for custom fields)]]></string>
+    <string name="_bx_timeline_form_post_input_sys_owner_id"><![CDATA[Owner ID]]></string>
+    <string name="_bx_timeline_form_post_input_owner_id_own"><![CDATA[Your profile]]></string>
+    <string name="_bx_timeline_form_post_input_owner_id_following_group"><![CDATA[{0}]]></string>
+    <string name="_bx_timeline_form_post_input_sys_action"><![CDATA[Action]]></string>
+    <string name="_bx_timeline_form_post_input_sys_type"><![CDATA[Type]]></string>
+    <string name="_bx_timeline_form_post_input_sys_text"><![CDATA[Content]]></string>
+    <string name="_bx_timeline_form_post_input_text"><![CDATA[]]></string>
+    <string name="_bx_timeline_form_post_input_sys_object_privacy_view"><![CDATA[Visibility]]></string>
+    <string name="_bx_timeline_form_post_input_object_privacy_view"><![CDATA[Visibility]]></string>
+    <string name="_bx_timeline_form_post_input_sys_date"><![CDATA[Created at]]></string>
+    <string name="_bx_timeline_form_post_input_date"><![CDATA[Created at]]></string>
+    <string name="_bx_timeline_form_post_input_sys_date_published"><![CDATA[Publishing time]]></string>
+    <string name="_bx_timeline_form_post_input_date_published"><![CDATA[Publishing time]]></string>
+    <string name="_bx_timeline_form_post_input_date_published_info"><![CDATA[Leave empty to publish immediately.]]></string>
+    <string name="_bx_timeline_form_post_input_sys_link"><![CDATA[Link]]></string>
+    <string name="_bx_timeline_form_post_input_link_alt"><![CDATA[Add Link]]></string>
+    <string name="_bx_timeline_form_post_input_link_err_delete"><![CDATA[Cannot remove the link. Please report.]]></string>
+    <string name="_bx_timeline_form_post_input_sys_photo"><![CDATA[Photo]]></string>
+    <string name="_bx_timeline_form_post_input_photo"><![CDATA[]]></string>
+    <string name="_bx_timeline_form_post_input_photo_alt"><![CDATA[Add Photo]]></string>
+    <string name="_bx_timeline_form_post_input_sys_video"><![CDATA[Video]]></string>
+    <string name="_bx_timeline_form_post_input_video"><![CDATA[]]></string>
+    <string name="_bx_timeline_form_post_input_video_alt"><![CDATA[Add Video]]></string>
+    <string name="_bx_timeline_form_post_input_sys_attachments"><![CDATA[Attachments]]></string>
+    <string name="_bx_timeline_form_post_input_sys_do_submit"><![CDATA[Post]]></string>
+    <string name="_bx_timeline_form_post_input_do_submit"><![CDATA[Post]]></string>
+    <string name="_bx_timeline_form_post_input_sys_do_cancel"><![CDATA[Cancel]]></string>
+    <string name="_bx_timeline_form_post_input_do_cancel"><![CDATA[Cancel]]></string>
+
+    <string name="_bx_timeline_form_attach_link"><![CDATA[Attach Link]]></string>
+    <string name="_bx_timeline_form_attach_link_display_add"><![CDATA[Attach Link]]></string>
+    <string name="_bx_timeline_form_attach_link_input_sys_event_id"><![CDATA[Event ID]]></string>
+    <string name="_bx_timeline_form_attach_link_input_sys_url"><![CDATA[Url]]></string>
+    <string name="_bx_timeline_form_attach_link_input_url"><![CDATA[Add Link]]></string>
+    <string name="_bx_timeline_form_attach_link_input_url_err"><![CDATA[Correct Link is essential. Please, fill in this field.]]></string>
+    <string name="_bx_timeline_form_attach_link_input_sys_do_submit"><![CDATA[Add]]></string>
+    <string name="_bx_timeline_form_attach_link_input_do_submit"><![CDATA[Add]]></string>
+    <string name="_bx_timeline_form_attach_link_input_do_cancel"><![CDATA[Close]]></string>
+
+    <string name="_bx_timeline_privacy_view"><![CDATA[View event]]></string>
+
+    <string name="_bx_timeline_acl_action_post"><![CDATA[Post]]></string>
+    <string name="_bx_timeline_acl_action_edit"><![CDATA[Edit Any Post]]></string>
+    <string name="_bx_timeline_acl_action_delete"><![CDATA[Delete Any Post]]></string>
+    <string name="_bx_timeline_acl_action_vote"><![CDATA[Vote]]></string>
+    <string name="_bx_timeline_acl_action_repost"><![CDATA[Repost]]></string>
+    <string name="_bx_timeline_acl_action_send"><![CDATA[Send]]></string>
+    <string name="_bx_timeline_acl_action_mute"><![CDATA[Mute Author]]></string>
+    <string name="_bx_timeline_acl_action_pin"><![CDATA['Pin here' Any Post]]></string>
+    <string name="_bx_timeline_acl_action_stick"><![CDATA['Pin for all' Any Post]]></string>
+    <string name="_bx_timeline_acl_action_promote"><![CDATA[Promote Any Post]]></string>
+
+
+    <!-- Pages -->
+    <string name="_bx_timeline_page_title_sys_view"><![CDATA[Profile Feed]]></string>
+    <string name="_bx_timeline_page_title_view"><![CDATA[Profile Feed]]></string>
+    <string name="_bx_timeline_page_title_sys_view_home"><![CDATA[Public Feed]]></string>
+    <string name="_bx_timeline_page_title_view_home"><![CDATA[Public Feed]]></string>
+    <string name="_bx_timeline_page_title_sys_view_hot"><![CDATA[Hot Feed]]></string>
+    <string name="_bx_timeline_page_title_view_hot"><![CDATA[Hot Feed]]></string>
+    <string name="_bx_timeline_page_title_sys_item"><![CDATA[Feed Item]]></string>
+    <string name="_bx_timeline_page_title_item"><![CDATA[Feed Item]]></string>
+    <string name="_bx_timeline_page_title_sys_item_brief"><![CDATA[Feed Item Preview]]></string>
+    <string name="_bx_timeline_page_title_item_brief"><![CDATA[Feed Item Preview]]></string>
+    <string name="_bx_timeline_page_title_sys_account"><![CDATA[Feed]]></string>
+    <string name="_bx_timeline_page_title_account"><![CDATA[Feed]]></string>
+    <string name="_bx_timeline_page_title_sys_manage_administration"><![CDATA[Manage All]]></string>
+    <string name="_bx_timeline_page_title_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_timeline_page_block_title_system_post_profile"><![CDATA[Post to Сontext Feed]]></string>
+    <string name="_bx_timeline_page_block_title_post_profile"><![CDATA[Post to Feed]]></string>
+    <string name="_bx_timeline_page_block_title_system_view_profile"><![CDATA[Profile Feed (Timeline)]]></string>
+    <string name="_bx_timeline_page_block_title_view_profile"><![CDATA[Profile Feed]]></string>
+    <string name="_bx_timeline_page_block_title_system_view_profile_outline"><![CDATA[Profile Feed (Outline)]]></string>
+    <string name="_bx_timeline_page_block_title_view_profile_outline"><![CDATA[Profile Feed]]></string>
+    <string name="_bx_timeline_page_block_title_item"><![CDATA[Item]]></string>
+    <string name="_bx_timeline_page_block_title_item_content"><![CDATA[Content]]></string>
+    <string name="_bx_timeline_page_block_title_item_info"><![CDATA[Info]]></string>
+    <string name="_bx_timeline_page_block_title_item_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_timeline_page_block_title_system_post_account"><![CDATA[Post to Feed]]></string>
+    <string name="_bx_timeline_page_block_title_post_account"><![CDATA[Post to Feed]]></string>
+    <string name="_bx_timeline_page_block_title_system_view_account"><![CDATA[Feed (Timeline)]]></string>
+    <string name="_bx_timeline_page_block_title_view_account"><![CDATA[Feed]]></string>
+    <string name="_bx_timeline_page_block_title_system_view_account_outline"><![CDATA[Feed (Outline)]]></string>
+    <string name="_bx_timeline_page_block_title_view_account_outline"><![CDATA[Feed]]></string>
+    <string name="_bx_timeline_page_block_title_system_views_timeline"><![CDATA[All Feeds (Timeline)]]></string>
+    <string name="_bx_timeline_page_block_title_views_timeline"><![CDATA[Feed]]></string>
+    <string name="_bx_timeline_page_block_title_system_views_outline"><![CDATA[All Feeds (Outline)]]></string>
+    <string name="_bx_timeline_page_block_title_views_outline"><![CDATA[Feed]]></string>        
+    <string name="_bx_timeline_page_block_title_system_post_home"><![CDATA[Post to Public Feed]]></string>
+    <string name="_bx_timeline_page_block_title_post_home"><![CDATA[Post to Feed]]></string>
+    <string name="_bx_timeline_page_block_title_system_view_home"><![CDATA[Public Feed (Timeline)]]></string>
+    <string name="_bx_timeline_page_block_title_view_home"><![CDATA[Public Feed]]></string>
+    <string name="_bx_timeline_page_block_title_system_view_home_outline"><![CDATA[Public Feed (Outline)]]></string>
+    <string name="_bx_timeline_page_block_title_view_home_outline"><![CDATA[Public Feed]]></string>
+    <string name="_bx_timeline_page_block_title_system_view_hot"><![CDATA[Hot Feed (Timeline)]]></string>
+    <string name="_bx_timeline_page_block_title_view_hot"><![CDATA[Hot Feed]]></string>
+    <string name="_bx_timeline_page_block_title_system_view_hot_outline"><![CDATA[Hot Feed (Outline)]]></string>
+    <string name="_bx_timeline_page_block_title_view_hot_outline"><![CDATA[Hot Feed]]></string>
+    <string name="_bx_timeline_page_block_title_browse_cmts"><![CDATA[Feeds' Comments]]></string>
+
+    <string name="_bx_timeline_page_title_sys_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_timeline_page_title_manage"><![CDATA[Manage Timeline]]></string>
+    <string name="_bx_timeline_page_block_title_system_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_timeline_page_block_title_system_manage_administration"><![CDATA[Manage All]]></string>
+    <string name="_bx_timeline_page_block_title_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_timeline_page_block_title_muted"><![CDATA[Muted]]></string>
+
+    <string name="_bx_timeline_page_content_ph_timeline"><![CDATA[Timeline: with timeline placeholder]]></string>
+    <string name="_bx_timeline_page_content_ph_outline"><![CDATA[Timeline: with outline placeholder]]></string>
+
+
+    <!-- Menus -->
+    <string name="_bx_timeline_menu_title_view"><![CDATA[View]]></string>
+    <string name="_bx_timeline_menu_set_title_view"><![CDATA[View]]></string>
+    <string name="_bx_timeline_menu_item_title_system_channels"><![CDATA[Channels]]></string>
+    <string name="_bx_timeline_menu_item_title_channels"><![CDATA[Channels]]></string>
+    <string name="_bx_timeline_menu_item_title_system_feed"><![CDATA[Feed]]></string>
+    <string name="_bx_timeline_menu_item_title_feed"><![CDATA[Feed]]></string>
+    <string name="_bx_timeline_menu_item_title_system_public"><![CDATA[Public]]></string>
+    <string name="_bx_timeline_menu_item_title_public"><![CDATA[Public]]></string>
+    <string name="_bx_timeline_menu_item_title_system_hot"><![CDATA[Hot]]></string>
+    <string name="_bx_timeline_menu_item_title_hot"><![CDATA[Hot]]></string>
+
+    <string name="_bx_timeline_menu_item_view_all"><![CDATA[All posts]]></string>
+    <string name="_bx_timeline_menu_item_view_owner"><![CDATA[Posts by {0}]]></string>
+    <string name="_bx_timeline_menu_item_view_other"><![CDATA[Posts by others]]></string>
+    <string name="_bx_timeline_menu_item_get_rss"><![CDATA[RSS]]></string>
+
+    <string name="_bx_timeline_menu_title_item_share"><![CDATA[Share Item]]></string>
+    <string name="_bx_timeline_menu_set_title_item_share"><![CDATA[Share Item]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_repost"><![CDATA[Repost]]></string>
+    <string name="_bx_timeline_menu_item_title_item_repost"><![CDATA[Repost]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_send"><![CDATA[Send]]></string>
+    <string name="_bx_timeline_menu_item_title_item_send"><![CDATA[Send to Friend]]></string>
+    <string name="_bx_timeline_menu_item_title_system_admt_timeline"><![CDATA[Timeline]]></string>
+    <string name="_bx_timeline_menu_item_title_admt_timeline"><![CDATA[Timeline]]></string>
+
+    <string name="_bx_timeline_menu_title_item_manage"><![CDATA[Manage Item]]></string>
+    <string name="_bx_timeline_menu_set_title_item_manage"><![CDATA[Manage Item]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_pin"><![CDATA[Pin here]]></string>
+    <string name="_bx_timeline_menu_item_title_item_pin"><![CDATA[Pin here]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_unpin"><![CDATA[Unpin here]]></string>
+    <string name="_bx_timeline_menu_item_title_item_unpin"><![CDATA[Unpin here]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_stick"><![CDATA[Pin for all]]></string>
+    <string name="_bx_timeline_menu_item_title_item_stick"><![CDATA[Pin for all]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_unstick"><![CDATA[Unpin for all]]></string>
+    <string name="_bx_timeline_menu_item_title_item_unstick"><![CDATA[Unpin for all]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_promote"><![CDATA[Promote]]></string>
+    <string name="_bx_timeline_menu_item_title_item_promote"><![CDATA[Promote]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_unpromote"><![CDATA[Unpromote]]></string>
+    <string name="_bx_timeline_menu_item_title_item_unpromote"><![CDATA[Unpromote]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_edit"><![CDATA[Edit]]></string>
+    <string name="_bx_timeline_menu_item_title_item_edit"><![CDATA[Edit]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_delete"><![CDATA[Delete]]></string>
+    <string name="_bx_timeline_menu_item_title_item_delete"><![CDATA[{delete_title}]]></string>
+    <string name="_bx_timeline_menu_item_title_item_delete_common"><![CDATA[Delete]]></string>
+    <string name="_bx_timeline_menu_item_title_item_delete_system"><![CDATA[Hide from feeds]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_mute"><![CDATA[Mute Author]]></string>
+    <string name="_bx_timeline_menu_item_title_item_mute"><![CDATA[Mute Author]]></string>
+
+    <string name="_bx_timeline_menu_title_item_actions"><![CDATA[Item Actions]]></string>
+    <string name="_bx_timeline_menu_set_title_item_actions"><![CDATA[Item Actions]]></string>
+    <string name="_bx_timeline_menu_title_item_actions_all"><![CDATA[Item Actions All]]></string>
+    <string name="_bx_timeline_menu_set_title_item_actions_all"><![CDATA[Item Actions All]]></string>
+    <string name="_bx_timeline_menu_title_item_counters"><![CDATA[Item Counters]]></string>
+    <string name="_bx_timeline_menu_set_title_item_counters"><![CDATA[Item Counters]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_comment"><![CDATA[Comment]]></string>
+    <string name="_bx_timeline_menu_item_title_item_comment"><![CDATA[Comment]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_view"><![CDATA[View]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_vote"><![CDATA[Vote (Like)]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_score"><![CDATA[Vote (Up/Down)]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_reaction"><![CDATA[Reaction]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_share"><![CDATA[Share]]></string>
+    <string name="_bx_timeline_menu_item_title_item_share"><![CDATA[Share]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_report"><![CDATA[Report]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_more"><![CDATA[More Actions]]></string>
+    <string name="_bx_timeline_menu_item_title_item_more"><![CDATA[]]></string>
+
+    <string name="_bx_timeline_menu_title_post_attachments"><![CDATA[Form Attachments]]></string>
+    <string name="_bx_timeline_menu_set_title_post_attachments"><![CDATA[Form Attachments]]></string>
+    <string name="_bx_timeline_menu_item_title_system_add_emoji"><![CDATA[Add Emoji]]></string>
+    <string name="_bx_timeline_menu_item_title_add_emoji"><![CDATA[Add Emoji]]></string>
+    <string name="_bx_timeline_menu_item_title_system_add_link"><![CDATA[Add Link]]></string>
+    <string name="_bx_timeline_menu_item_title_add_link"><![CDATA[Add Link]]></string>
+    <string name="_bx_timeline_menu_item_title_system_add_photo_simple"><![CDATA[Add Photo (Simple)]]></string>
+    <string name="_bx_timeline_menu_item_title_system_add_photo_html5"><![CDATA[Add Photo (HTML5)]]></string>
+    <string name="_bx_timeline_menu_item_title_add_photo"><![CDATA[Add Photo]]></string>
+    <string name="_bx_timeline_menu_item_title_system_add_video_simple"><![CDATA[Add Video (Simple)]]></string>
+    <string name="_bx_timeline_menu_item_title_system_add_video_html5"><![CDATA[Add Video (HTML5)]]></string>
+    <string name="_bx_timeline_menu_item_title_add_video"><![CDATA[Add Video]]></string>
+    <string name="_bx_timeline_menu_item_title_system_add_video_record"><![CDATA[Record Video]]></string>
+    <string name="_bx_timeline_menu_item_title_add_video_record"><![CDATA[Record Video]]></string>
+    <string name="_bx_timeline_menu_item_title_system_timeline"><![CDATA[Timeline]]></string>
+    <string name="_bx_timeline_menu_item_title_timeline"><![CDATA[Timeline]]></string>
+    <string name="_bx_timeline_menu_item_title_system_create_entry"><![CDATA[Update]]></string>
+    <string name="_bx_timeline_menu_item_title_create_entry"><![CDATA[Update]]></string>
+    <string name="_bx_timeline_menu_item_title_system_view_timeline_view"><![CDATA[Timeline]]></string>
+    <string name="_bx_timeline_menu_item_title_view_timeline_view"><![CDATA[Timeline]]></string>
+
+    <string name="_bx_timeline_menu_item_title_system_manage_my_timeline"><![CDATA[Timeline]]></string>
+    <string name="_bx_timeline_menu_item_title_manage_my_timeline"><![CDATA[Timeline]]></string>
+
+    <string name="_bx_timeline_grid_column_title_adm_active"><![CDATA[Active]]></string>
+    <string name="_bx_timeline_grid_column_title_adm_description"><![CDATA[Event]]></string>
+    <string name="_bx_timeline_grid_column_title_adm_added"><![CDATA[Added]]></string>
+    <string name="_bx_timeline_grid_column_title_adm_author"><![CDATA[Author]]></string>
+    <string name="_bx_timeline_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
+    <string name="_bx_timeline_grid_action_title_adm_audit_content"><![CDATA[Audit actions]]></string>
+    <string name="_bx_timeline_grid_txt_account_manager"><![CDATA[Redirect to manage account.]]></string>
+
+    <string name="_bx_timeline_alert_module_timeline_common_post"><![CDATA[Timeline (post)]]></string>
+    <string name="_bx_timeline_alert_module_timeline_common_repost"><![CDATA[Timeline (repost)]]></string>
+    <string name="_bx_timeline_alert_action_added"><![CDATA[add]]></string>
+    <string name="_bx_timeline_alert_action_post_common"><![CDATA[add post]]></string>
+    <string name="_bx_timeline_alert_action_repost"><![CDATA[repost]]></string>
+    <string name="_bx_timeline_alert_action_post_common_personal"><![CDATA[New content]]></string>
+    <string name="_bx_timeline_alert_action_post_common_follow_member"><![CDATA[New content]]></string>
+    <string name="_bx_timeline_alert_action_post_common_follow_context"><![CDATA[New content]]></string>
+    <string name="_bx_timeline_alert_action_repost_follow_member"><![CDATA[New content repost]]></string>
+    <string name="_bx_timeline_alert_action_repost_follow_context"><![CDATA[New content repost]]></string>
+
+    <string name="_bx_timeline_txt_msg_no_results"><![CDATA[Empty]]></string>
+    <string name="_bx_timeline_txt_msg_performed_action"><![CDATA[The action was successfully performed.]]></string>
+    <string name="_bx_timeline_txt_msg_posted"><![CDATA[Posted successfully.]]></string>
+    <string name="_bx_timeline_grid_action_err_delete"><![CDATA[Cannot delete the selected timeline events(s).]]></string>
+    <string name="_bx_timeline_txt_err_cannot_perform_action"><![CDATA[Cannot perform action. Please report.]]></string>
+    <string name="_bx_timeline_txt_err_empty_post"><![CDATA[The post is empty.]]></string>
+
+    <string name="_bx_timeline_txt_to"><![CDATA[to]]></string>
+    <string name="_bx_timeline_txt_load_more"><![CDATA[Load More]]></string>
+    <string name="_bx_timeline_txt_loading"><![CDATA[Loading...]]></string>
+    <string name="_bx_timeline_txt_loading_complete"><![CDATA[Loading complete]]></string>
+    <string name="_bx_timeline_txt_or_jump_to"><![CDATA[... or jump to:]]></string>
+    <string name="_bx_timeline_txt_jump_to_n_year"><![CDATA[Jump to {0} year]]></string>
+    <string name="_bx_timeline_txt_jump_to_recent"><![CDATA[Jump to recent posts]]></string>
+    <string name="_bx_timeline_txt_status_deleted"><![CDATA[Deleted]]></string>
+    <string name="_bx_timeline_txt_hot"><![CDATA[Hot post]]></string>
+    <string name="_bx_timeline_txt_pinned"><![CDATA[Pinned post]]></string>
+    <string name="_bx_timeline_txt_sticked"><![CDATA[Pinned for all post]]></string>
+    <string name="_bx_timeline_txt_promoted"><![CDATA[Promoted]]></string>
+    <string name="_bx_timeline_txt_note_scheduled_awaiting"><![CDATA[Update publishing date is {0}]]></string>
+    <string name="_bx_timeline_txt_note_processing_awaiting"><![CDATA[Update will be published as soon as video is converted]]></string>
+    <string name="_bx_timeline_txt_note_processing_failed"><![CDATA[Update isn't published because video conversion failed, edit video to fix the issue.]]></string>
+    <string name="_bx_timeline_txt_rss_caption"><![CDATA[{0}'s timeline]]></string>
+    <string name="_bx_timeline_txt_added_sample"><![CDATA[Added {0}]]></string>
+    <string name="_bx_timeline_txt_user_added_sample"><![CDATA[{0} added {1}]]></string>
+    <string name="_bx_timeline_txt_user_repost"><![CDATA[{0}'s repost]]></string>
+    <string name="_bx_timeline_txt_user_reposted_user_sample"><![CDATA[{0} reposted {1}'s {2}]]></string>
+    <string name="_bx_timeline_txt_sample"><![CDATA[post]]></string>
+    <string name="_bx_timeline_txt_sample_with_article"><![CDATA[a post]]></string>
+    <string name="_bx_timeline_txt_sample_ext"><![CDATA[timeline post]]></string>
+    <string name="_bx_timeline_txt_sample_comment_single"><![CDATA[comment to timeline post]]></string>
+    <string name="_bx_timeline_txt_sample_vote_single"><![CDATA[vote to timeline post]]></string>
+    <string name="_bx_timeline_txt_sample_reaction_single"><![CDATA['{0}' reaction to timeline post]]></string>
+    <string name="_bx_timeline_txt_sample_score_up_single"><![CDATA[score up vote to timeline post]]></string>
+    <string name="_bx_timeline_txt_sample_score_down_single"><![CDATA[score down vote to timeline post]]></string>
+    <string name="_bx_timeline_txt_sample_with_link"><![CDATA[with link]]></string>
+    <string name="_bx_timeline_txt_sample_with_image"><![CDATA[with image]]></string>
+    <string name="_bx_timeline_txt_sample_with_video"><![CDATA[with video]]></string>
+    <string name="_bx_timeline_txt_sample_with_media"><![CDATA[with media]]></string>
+    <string name="_bx_timeline_txt_today"><![CDATA[Today]]></string>
+    <string name="_bx_timeline_txt_some_text_here"><![CDATA[Share your thoughts, location, photos or video]]></string>
+    <string name="_bx_timeline_txt_show"><![CDATA[Show]]></string>
+    <string name="_bx_timeline_txt_new_content"><![CDATA[New content]]></string>
+
+    <string name="_bx_timeline_txt_do_repost"><![CDATA[Repost]]></string>
+    <string name="_bx_timeline_txt_reposted"><![CDATA[Reposted {0}'s {1}.]]></string>
+    <string name="_bx_timeline_txt_reposted_by"><![CDATA[Reposted by]]></string>
+    <string name="_bx_timeline_txt_err_cannot_repost"><![CDATA[Cannot repost. Please report.]]></string>
+    <string name="_bx_timeline_txt_err_already_reposted"><![CDATA[You already reposted the item.]]></string>
+    <string name="_bx_timeline_txt_msg_success_repost"><![CDATA[The item was successfully reposted.]]></string>
+    <string name="_bx_timeline_txt_object_reposted"><![CDATA[<b class="bx-ntfs-content-profile">{owner_name}</b> reposted a {entry_sample} <b class="bx-ntfs-content-entry">{entry_caption}</b>]]></string>
+
+    <!-- EMAIL TEMPLATES -->
+    <string name="_bx_timeline_et_txt_name_send"><![CDATA[Send to Friend.]]></string>
+    <string name="_bx_timeline_et_txt_subject_send"><![CDATA[It may be interesting for you.]]></string>
+    <string name="_bx_timeline_et_txt_body_send"><![CDATA[
+<p>Hello.</p>
+<p>Take a look at <a href="{ViewLink}">this post</a>, it may be interesting for you.</p>]]></string>
+</resources>

+ 500 - 0
modules/boonex/timeline/updates/12.0.2_12.0.3/source/install/sql/enable.sql

@@ -0,0 +1,500 @@
+
+-- CONTENT PLACEHOLDERS
+SET @iCPHOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_pages_content_placeholders` ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_content_placeholders` (`module`, `title`, `template`, `order`) VALUES
+('bx_timeline', '_bx_timeline_page_content_ph_timeline', 'block_async_timeline.html', @iCPHOrder + 1),
+('bx_timeline', '_bx_timeline_page_content_ph_outline', 'block_async_outline.html', @iCPHOrder + 2);
+
+
+-- PAGES & BLOCKS
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_timeline_view', '_bx_timeline_page_title_sys_view', '_bx_timeline_page_title_view', 'bx_timeline', 5, 2147483647, 1, 'timeline-view', 'page.php?i=timeline-view', '', '', '', 0, 1, 0, 'BxTimelinePageView', 'modules/boonex/timeline/classes/BxTimelinePageView.php'),
+('bx_timeline_view_home', '_bx_timeline_page_title_sys_view_home', '_bx_timeline_page_title_view_home', 'bx_timeline', 5, 2147483647, 1, 'timeline-view-home', 'page.php?i=timeline-view-home', '', '', '', 0, 1, 0, '', ''),
+('bx_timeline_view_hot', '_bx_timeline_page_title_sys_view_hot', '_bx_timeline_page_title_view_hot', 'bx_timeline', 5, 2147483647, 1, 'timeline-view-hot', 'page.php?i=timeline-view-hot', '', '', '', 0, 1, 0, '', ''),
+
+('bx_timeline_item', '_bx_timeline_page_title_sys_item', '_bx_timeline_page_title_item', 'bx_timeline', 2, 2147483647, 1, 'item', 'page.php?i=item', '', '', '', 0, 1, 0, 'BxTimelinePageViewItem', 'modules/boonex/timeline/classes/BxTimelinePageViewItem.php'),
+('bx_timeline_item_brief', '_bx_timeline_page_title_sys_item_brief', '_bx_timeline_page_title_item_brief', 'bx_timeline', 2, 2147483647, 1, 'item-quick', 'page.php?i=item-quick', '', '', '', 0, 1, 0, 'BxTimelinePageViewItem', 'modules/boonex/timeline/classes/BxTimelinePageViewItem.php'),
+
+('bx_timeline_manage', '_bx_timeline_page_title_sys_manage', '_bx_timeline_page_title_manage', 'bx_timeline', 5, 2147483647, 1, 'timeline-manage', 'page.php?i=timeline-manage', '', '', '', 0, 1, 0, '', '');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
+('bx_timeline_view', 1, 'bx_timeline', '_bx_timeline_page_block_title_system_post_profile', '_bx_timeline_page_block_title_post_profile', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:14:"get_block_post";}', 0, 0, 1, 1),
+('bx_timeline_view', 1, 'bx_timeline', '_bx_timeline_page_block_title_system_view_profile', '_bx_timeline_page_block_title_view_profile', 0, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:14:"get_block_view";}', 0, 0, 1, 2),
+('bx_timeline_view', 1, 'bx_timeline', '_bx_timeline_page_block_title_system_view_profile_outline', '_bx_timeline_page_block_title_view_profile_outline', 0, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_view_outline";}', 0, 0, 0, 3),
+
+('bx_timeline_view_home', 1, 'bx_timeline', '_bx_timeline_page_block_title_system_post_home', '_bx_timeline_page_block_title_post_home', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:19:"get_block_post_home";}', 0, 0, 1, 1),
+('bx_timeline_view_home', 1, 'bx_timeline', '_bx_timeline_page_block_title_system_view_home', '_bx_timeline_page_block_title_view_home', 0, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:19:"get_block_view_home";}', 0, 0, 0, 2),
+('bx_timeline_view_home', 1, 'bx_timeline', '_bx_timeline_page_block_title_system_view_home_outline', '_bx_timeline_page_block_title_view_home_outline', 0, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:27:"get_block_view_home_outline";}', 0, 0, 1, 3),
+
+('bx_timeline_view_hot', 1, 'bx_timeline', '_bx_timeline_page_block_title_system_view_hot', '_bx_timeline_page_block_title_view_hot', 0, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:18:"get_block_view_hot";}', 0, 1, 0, 1),
+('bx_timeline_view_hot', 1, 'bx_timeline', '_bx_timeline_page_block_title_system_view_hot_outline', '_bx_timeline_page_block_title_view_hot_outline', 0, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:26:"get_block_view_hot_outline";}', 0, 1, 1, 2),
+
+('bx_timeline_item', 1, 'bx_timeline', '', '_bx_timeline_page_block_title_item', 0, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:14:"get_block_item";}', 0, 0, 1, 1),
+('bx_timeline_item', 1, 'bx_timeline', '', '_bx_timeline_page_block_title_item_comments', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:23:"get_block_item_comments";}', 0, 0, 1, 2),
+('bx_timeline_item', 2, 'bx_timeline', '', '_bx_timeline_page_block_title_item_info', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:19:"get_block_item_info";}', 0, 0, 1, 1),
+
+('bx_timeline_item_brief', 1, 'bx_timeline', '', '_bx_timeline_page_block_title_item_content', 0, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_item_content";}', 0, 0, 1, 1),
+('bx_timeline_item_brief', 2, 'bx_timeline', '', '_bx_timeline_page_block_title_item_info', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:19:"get_block_item_info";}', 0, 0, 1, 1),
+('bx_timeline_item_brief', 2, 'bx_timeline', '', '_bx_timeline_page_block_title_item_comments', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:23:"get_block_item_comments";}', 0, 0, 1, 2),
+
+('bx_timeline_manage', 1, 'bx_timeline', '', '_bx_timeline_page_block_title_muted', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:15:"get_block_muted";}', 0, 0, 1, 1);
+
+
+-- PAGES: add page block on dashboard
+SET @iPBCellDashboard = 2;
+SET @iPBOrderDashboard = 1; --(SELECT IFNULL(MAX(`order`), 0) FROM `sys_pages_blocks` WHERE `object` = 'sys_dashboard' AND `cell_id` = @iPBCellDashboard LIMIT 1);
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `tabs`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
+('sys_dashboard', @iPBCellDashboard, 'bx_timeline', '_bx_timeline_page_block_title_system_post_account', '_bx_timeline_page_block_title_post_account', 11, 0, 2147483644, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_post_account";}', 0, 1, 0, @iPBOrderDashboard),
+('sys_dashboard', @iPBCellDashboard, 'bx_timeline', '_bx_timeline_page_block_title_system_views_timeline', '_bx_timeline_page_block_title_views_timeline', 11, 1, 2147483644, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:24:"get_block_views_timeline";s:6:"params";a:1:{i:0;s:4:"feed";}}', 0, 0, 0, @iPBOrderDashboard + 1),
+('sys_dashboard', @iPBCellDashboard, 'bx_timeline', '_bx_timeline_page_block_title_system_views_outline', '_bx_timeline_page_block_title_views_outline', 11, 1, 2147483644, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:23:"get_block_views_outline";s:6:"params";a:1:{i:0;s:4:"feed";}}', 0, 0, 0, @iPBOrderDashboard + 1);
+
+-- PAGES: add page block on home
+SET @iPBCellHome = 3;
+SET @iPBOrderHome = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_pages_blocks` WHERE `object` = 'sys_home' AND `cell_id` = @iPBCellHome ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `tabs`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('sys_home', @iPBCellHome, 'bx_timeline', '_bx_timeline_page_block_title_system_post_home', '_bx_timeline_page_block_title_post_home', 11, 0, 2147483644, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:19:"get_block_post_home";}', 0, 1, 0, @iPBOrderHome + 1),
+('sys_home', @iPBCellHome, 'bx_timeline', '_bx_timeline_page_block_title_system_views_timeline', '_bx_timeline_page_block_title_views_timeline', 11, 1, 2147483644, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:24:"get_block_views_timeline";s:6:"params";a:1:{i:0;s:4:"feed";}}', 0, 0, 1, @iPBOrderHome + 2);
+
+SET @iPBCellHome = 4;
+SET @iPBOrderHome = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_pages_blocks` WHERE `object` = 'sys_home' AND `cell_id` = @iPBCellHome ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('sys_home', @iPBCellHome, 'bx_timeline', '_bx_timeline_page_block_title_system_view_home_outline', '_bx_timeline_page_block_title_view_home_outline', 0, 1, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:27:"get_block_view_home_outline";}', 0, 0, 1, @iPBOrderHome + 1);
+
+-- PAGES: add page block to profiles modules (trigger* page objects are processed separately upon modules enable/disable)
+SET @iPBCellProfile = 2;
+SET @iPBCellGroup = 4;
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
+('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_timeline', '_bx_timeline_page_block_title_system_post_profile', '_bx_timeline_page_block_title_post_profile', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_post_profile";s:6:"params";a:1:{i:0;s:6:"{type}";}}', 0, 0, 1, 0),
+('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_timeline', '_bx_timeline_page_block_title_system_view_profile', '_bx_timeline_page_block_title_view_profile', 0, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_view_profile";s:6:"params";a:1:{i:0;s:6:"{type}";}}', 0, 0, 1, 0),
+('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_timeline', '_bx_timeline_page_block_title_system_view_profile_outline', '_bx_timeline_page_block_title_view_profile_outline', 0, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:30:"get_block_view_profile_outline";s:6:"params";a:1:{i:0;s:6:"{type}";}}', 0, 0, 0, 0),
+
+('trigger_page_group_view_entry', @iPBCellGroup, 'bx_timeline', '_bx_timeline_page_block_title_system_post_profile', '_bx_timeline_page_block_title_post_profile', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_post_profile";s:6:"params";a:1:{i:0;s:6:"{type}";}}', 0, 0, 1, 0),
+('trigger_page_group_view_entry', @iPBCellGroup, 'bx_timeline', '_bx_timeline_page_block_title_system_view_profile', '_bx_timeline_page_block_title_view_profile', 0, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_view_profile";s:6:"params";a:1:{i:0;s:6:"{type}";}}', 0, 0, 1, 0),
+('trigger_page_group_view_entry', @iPBCellGroup, 'bx_timeline', '_bx_timeline_page_block_title_system_view_profile_outline', '_bx_timeline_page_block_title_view_profile_outline', 0, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:30:"get_block_view_profile_outline";s:6:"params";a:1:{i:0;s:6:"{type}";}}', 0, 0, 0, 0);
+
+-- PAGE: module manage all
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_timeline_administration', '_bx_timeline_page_title_sys_manage_administration', '_bx_timeline_page_title_manage', 'bx_timeline', 5, 192, 1, 'timeline-administration', 'page.php?i=timeline-administration', '', '', '', 0, 1, 0, 'BxTimelinePageBrowse', 'modules/boonex/timeline/classes/BxTimelinePageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_timeline_administration', 1, 'bx_timeline', '_bx_timeline_page_block_title_system_manage_administration', '_bx_timeline_page_block_title_manage', 11, 192, 'service', 'a:3:{s:6:\"module\";s:11:\"bx_timeline\";s:6:\"method\";s:12:\"manage_tools\";s:6:\"params\";a:1:{i:0;s:14:\"administration\";}}', 0, 1, 0);
+
+
+-- PAGE: service blocks
+SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = '' AND `cell_id` = 0 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `tabs`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('', 0, 'bx_timeline', '_bx_timeline_page_block_title_system_views_timeline', '_bx_timeline_page_block_title_views_timeline', 11, 1, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:24:"get_block_views_timeline";}', 0, 1, 1, @iPBOrderHome + 1),
+('', 0, 'bx_timeline', '_bx_timeline_page_block_title_system_views_outline', '_bx_timeline_page_block_title_views_outline', 11, 1, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:23:"get_block_views_outline";}', 0, 1, 1, @iPBOrderHome + 2),
+('', 0, 'bx_timeline', '_bx_timeline_page_block_title_system_view_home', '_bx_timeline_page_block_title_view_home', 0, 0, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:19:"get_block_view_home";}', 0, 1, 1, @iBlockOrder + 3),
+('', 0, 'bx_timeline', '_bx_timeline_page_block_title_system_view_home_outline', '_bx_timeline_page_block_title_view_home_outline', 0, 0, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:27:"get_block_view_home_outline";}', 0, 1, 1, @iBlockOrder + 4),
+('', 0, 'bx_timeline', '_bx_timeline_page_block_title_system_view_account', '_bx_timeline_page_block_title_view_account', 0, 0, 2147483644, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_view_account";}', 0, 1, 1, @iBlockOrder + 5),
+('', 0, 'bx_timeline', '_bx_timeline_page_block_title_system_view_account_outline', '_bx_timeline_page_block_title_view_account_outline', 0, 0, 2147483644, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:30:"get_block_view_account_outline";}', 0, 1, 1, @iBlockOrder + 6);
+
+
+-- MENU: Feeds
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_timeline_menu_view', '_bx_timeline_menu_title_view', 'bx_timeline_menu_view', 'bx_timeline', 15, 0, 1, 'BxTimelineMenuView', 'modules/boonex/timeline/classes/BxTimelineMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_timeline_menu_view', 'bx_timeline', '_bx_timeline_menu_set_title_view', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
+('bx_timeline_menu_view', 'bx_timeline', 'feed', '_bx_timeline_menu_item_title_system_feed', '_bx_timeline_menu_item_title_feed', 'javascript:void(0)', 'javascript:{js_object_view}.changeView(this, ''feed'')', '_self', '', '', 2147483647, 1, 0, 1),
+('bx_timeline_menu_view', 'bx_timeline', 'public', '_bx_timeline_menu_item_title_system_public', '_bx_timeline_menu_item_title_public', 'javascript:void(0)', 'javascript:{js_object_view}.changeView(this, ''public'')', '_self', '', '', 2147483647, 1, 0, 2),
+('bx_timeline_menu_view', 'bx_timeline', 'channels', '_bx_timeline_menu_item_title_system_channels', '_bx_timeline_menu_item_title_channels', 'javascript:void(0)', 'javascript:{js_object_view}.changeView(this, ''channels'')', '_self', '', '', 2147483647, 0, 0, 3),
+('bx_timeline_menu_view', 'bx_timeline', 'hot', '_bx_timeline_menu_item_title_system_hot', '_bx_timeline_menu_item_title_hot', 'javascript:void(0)', 'javascript:{js_object_view}.changeView(this, ''hot'')', '_self', '', '', 2147483647, 1, 0, 4);
+
+-- MENU: Item Share (Repost, Send to Friend, etc)
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_timeline_menu_item_share', '_bx_timeline_menu_title_item_share', 'bx_timeline_menu_item_share', 'bx_timeline', 6, 0, 1, 'BxTimelineMenuItemShare', 'modules/boonex/timeline/classes/BxTimelineMenuItemShare.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_timeline_menu_item_share', 'bx_timeline', '_bx_timeline_menu_set_title_item_share', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
+('bx_timeline_menu_item_share', 'bx_timeline', 'item-repost', '_bx_timeline_menu_item_title_system_item_repost', '_bx_timeline_menu_item_title_item_repost', 'javascript:void(0)', 'javascript:{js_onclick_repost}', '_self', 'redo', '', 2147483647, 1, 0, 1),
+('bx_timeline_menu_item_share', 'bx_timeline', 'item-send', '_bx_timeline_menu_item_title_system_item_send', '_bx_timeline_menu_item_title_item_send', 'page.php?i=start-convo&et={et_send}', '', '_self', 'envelope', '', 2147483647, 1, 0, 2);
+
+-- MENU: Item Manage (Pin, Delete, etc)
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_timeline_menu_item_manage', '_bx_timeline_menu_title_item_manage', 'bx_timeline_menu_item_manage', 'bx_timeline', 20, 0, 1, 'BxTimelineMenuItemManage', 'modules/boonex/timeline/classes/BxTimelineMenuItemManage.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_timeline_menu_item_manage', 'bx_timeline', '_bx_timeline_menu_set_title_item_manage', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_timeline_menu_item_manage', 'bx_timeline', 'item-pin', '_bx_timeline_menu_item_title_system_item_pin', '_bx_timeline_menu_item_title_item_pin', 'javascript:void(0)', 'javascript:{js_object_view}.pinPost(this, {content_id}, 1)', '_self', 'thumbtack', '', 2147483647, 1, 0, 0),
+('bx_timeline_menu_item_manage', 'bx_timeline', 'item-unpin', '_bx_timeline_menu_item_title_system_item_unpin', '_bx_timeline_menu_item_title_item_unpin', 'javascript:void(0)', 'javascript:{js_object_view}.pinPost(this, {content_id}, 0)', '_self', 'thumbtack', '', 2147483647, 1, 0, 1),
+('bx_timeline_menu_item_manage', 'bx_timeline', 'item-stick', '_bx_timeline_menu_item_title_system_item_stick', '_bx_timeline_menu_item_title_item_stick', 'javascript:void(0)', 'javascript:{js_object_view}.stickPost(this, {content_id}, 1)', '_self', 'thumbtack', '', 2147483647, 1, 0, 2),
+('bx_timeline_menu_item_manage', 'bx_timeline', 'item-unstick', '_bx_timeline_menu_item_title_system_item_unstick', '_bx_timeline_menu_item_title_item_unstick', 'javascript:void(0)', 'javascript:{js_object_view}.stickPost(this, {content_id}, 0)', '_self', 'thumbtack', '', 2147483647, 1, 0, 3),
+('bx_timeline_menu_item_manage', 'bx_timeline', 'item-promote', '_bx_timeline_menu_item_title_system_item_promote', '_bx_timeline_menu_item_title_item_promote', 'javascript:void(0)', 'javascript:{js_object_view}.promotePost(this, {content_id}, 1)', '_self', 'certificate ', '', 2147483647, 1, 0, 4),
+('bx_timeline_menu_item_manage', 'bx_timeline', 'item-unpromote', '_bx_timeline_menu_item_title_system_item_unpromote', '_bx_timeline_menu_item_title_item_unpromote', 'javascript:void(0)', 'javascript:{js_object_view}.promotePost(this, {content_id}, 0)', '_self', 'certificate', '', 2147483647, 1, 0, 5),
+('bx_timeline_menu_item_manage', 'bx_timeline', 'item-report', '_bx_timeline_menu_item_title_system_item_report', '', 'javascript:void(0)', '', '', '', '', 2147483647, 1, 0, 6),
+('bx_timeline_menu_item_manage', 'bx_timeline', 'item-mute', '_bx_timeline_menu_item_title_system_item_mute', '_bx_timeline_menu_item_title_item_mute', 'javascript:void(0)', 'javascript:{js_object_view}.muteAuthor(this, {content_id})', '_self', 'user-slash', '', 2147483647, 1, 0, 7),
+('bx_timeline_menu_item_manage', 'bx_timeline', 'item-edit', '_bx_timeline_menu_item_title_system_item_edit', '_bx_timeline_menu_item_title_item_edit', 'javascript:void(0)', 'javascript:{js_object_view}.editPost(this, {content_id})', '_self', 'pencil-alt', '', 2147483647, 1, 0, 8),
+('bx_timeline_menu_item_manage', 'bx_timeline', 'item-delete', '_bx_timeline_menu_item_title_system_item_delete', '_bx_timeline_menu_item_title_item_delete', 'javascript:void(0)', 'javascript:{js_object_view}.deletePost(this, {content_id})', '_self', 'remove', '', 2147483647, 1, 0, 9);
+
+-- MENU: Item Actions (Comment, Vote, Share, Report, etc)
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_timeline_menu_item_actions', '_bx_timeline_menu_title_item_actions', 'bx_timeline_menu_item_actions', 'bx_timeline', 15, 0, 1, 'BxTimelineMenuItemActions', 'modules/boonex/timeline/classes/BxTimelineMenuItemActions.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_timeline_menu_item_actions', 'bx_timeline', '_bx_timeline_menu_set_title_item_actions', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `submenu_popup`, `visible_for_levels`, `active`, `copyable`, `editable`, `order`) VALUES
+('bx_timeline_menu_item_actions', 'bx_timeline', 'item-view', '_bx_timeline_menu_item_title_system_item_view', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 0, 0, 1, 0),
+('bx_timeline_menu_item_actions', 'bx_timeline', 'item-comment', '_bx_timeline_menu_item_title_system_item_comment', '_bx_timeline_menu_item_title_item_comment', 'javascript:void(0)', 'javascript:{comment_onclick}', '_self', 'comment', '', '', 0, 2147483647, 1, 0, 1, 10),
+('bx_timeline_menu_item_actions', 'bx_timeline', 'item-vote', '_bx_timeline_menu_item_title_system_item_vote', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 0, 0, 1, 20),
+('bx_timeline_menu_item_actions', 'bx_timeline', 'item-reaction', '_bx_timeline_menu_item_title_system_item_reaction', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 1, 0, 1, 30),
+('bx_timeline_menu_item_actions', 'bx_timeline', 'item-score', '_bx_timeline_menu_item_title_system_item_score', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 0, 0, 1, 40),
+('bx_timeline_menu_item_actions', 'bx_timeline', 'item-share', '_bx_timeline_menu_item_title_system_item_share', '_bx_timeline_menu_item_title_item_share', 'javascript:void(0)', 'bx_menu_popup(''bx_timeline_menu_item_share'', this, {''id'':''bx_timeline_menu_item_share_{content_id}''}, {content_id:{content_id}, name:''{name}'', view:''{view}'', type:''{type}''});', '', 'share-alt', '', 'bx_timeline_menu_item_share', 1, 2147483647, 1, 0, 1, 50),
+('bx_timeline_menu_item_actions', 'bx_timeline', 'item-more', '_bx_timeline_menu_item_title_system_item_more', '_bx_timeline_menu_item_title_item_more', 'javascript:void(0)', 'bx_menu_popup(''bx_timeline_menu_item_manage'', this, {''id'':''bx_timeline_menu_item_manage_{content_id}''}, {content_id:{content_id}, name:''{name}'', view:''{view}'', type:''{type}''});', '', 'ellipsis-v', '', 'bx_timeline_menu_item_manage', 1, 2147483647, 0, 0, 1, 60);
+
+-- MENU: all actions menu for view entry 
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_timeline_menu_item_actions_all', '_bx_timeline_menu_title_item_actions_all', 'bx_timeline_menu_item_actions_all', 'bx_timeline', 15, 0, 0, 'BxTimelineMenuItemActionsAll', 'modules/boonex/timeline/classes/BxTimelineMenuItemActionsAll.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_timeline_menu_item_actions_all', 'bx_timeline', '_bx_timeline_menu_set_title_item_actions_all', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `submenu_popup`, `visible_for_levels`, `active`, `copyable`, `editable`, `order`) VALUES 
+('bx_timeline_menu_item_actions_all', 'bx_timeline', 'item-view', '_bx_timeline_menu_item_title_system_item_view', '', '', '', '', '', '', '', 0, 2147483647, 0, 0, 1, 0),
+('bx_timeline_menu_item_actions_all', 'bx_timeline', 'item-comment', '_bx_timeline_menu_item_title_system_item_comment', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 1, 10),
+('bx_timeline_menu_item_actions_all', 'bx_timeline', 'item-vote', '_bx_timeline_menu_item_title_system_item_vote', '', '', '', '', '', '', '', 0, 2147483647, 0, 0, 1, 20),
+('bx_timeline_menu_item_actions_all', 'bx_timeline', 'item-reaction', '_bx_timeline_menu_item_title_system_item_reaction', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 1, 30),
+('bx_timeline_menu_item_actions_all', 'bx_timeline', 'item-score', '_bx_timeline_menu_item_title_system_item_score', '', '', '', '', '', '', '', 0, 2147483647, 0, 0, 1, 40),
+('bx_timeline_menu_item_actions_all', 'bx_timeline', 'item-share', '_bx_timeline_menu_item_title_system_item_share', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 1, 50),
+('bx_timeline_menu_item_actions_all', 'bx_timeline', 'item-pin', '_bx_timeline_menu_item_title_system_item_pin', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 1, 100),
+('bx_timeline_menu_item_actions_all', 'bx_timeline', 'item-unpin', '_bx_timeline_menu_item_title_system_item_unpin', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 1, 110),
+('bx_timeline_menu_item_actions_all', 'bx_timeline', 'item-stick', '_bx_timeline_menu_item_title_system_item_stick', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 1, 120),
+('bx_timeline_menu_item_actions_all', 'bx_timeline', 'item-unstick', '_bx_timeline_menu_item_title_system_item_unstick', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 1, 130),
+('bx_timeline_menu_item_actions_all', 'bx_timeline', 'item-promote', '_bx_timeline_menu_item_title_system_item_promote', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 1, 140),
+('bx_timeline_menu_item_actions_all', 'bx_timeline', 'item-unpromote', '_bx_timeline_menu_item_title_system_item_unpromote', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 1, 150),
+('bx_timeline_menu_item_actions_all', 'bx_timeline', 'item-report', '_bx_timeline_menu_item_title_system_item_report', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 1, 160),
+('bx_timeline_menu_item_actions_all', 'bx_timeline', 'item-mute', '_bx_timeline_menu_item_title_system_item_mute', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 1, 165),
+('bx_timeline_menu_item_actions_all', 'bx_timeline', 'item-edit', '_bx_timeline_menu_item_title_system_item_edit', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 1, 170),
+('bx_timeline_menu_item_actions_all', 'bx_timeline', 'item-delete', '_bx_timeline_menu_item_title_system_item_delete', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 1, 180),
+('bx_timeline_menu_item_actions_all', 'bx_timeline', 'more-auto', '_sys_menu_item_title_system_va_more_auto', '_sys_menu_item_title_va_more_auto', 'javascript:void(0)', '', '', 'ellipsis-v', '', '', 0, 2147483647, 1, 0, 1, 9999);
+
+-- MENU: Item Counters (Comments, Votes, Reactions, etc)
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_timeline_menu_item_counters', '_bx_timeline_menu_title_item_counters', 'bx_timeline_menu_item_counters', 'bx_timeline', 15, 0, 1, 'BxTimelineMenuItemCounters', 'modules/boonex/timeline/classes/BxTimelineMenuItemCounters.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_timeline_menu_item_counters', 'bx_timeline', '_bx_timeline_menu_set_title_item_counters', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `submenu_popup`, `visible_for_levels`, `active`, `copyable`, `editable`, `order`) VALUES
+('bx_timeline_menu_item_counters', 'bx_timeline', 'item-vote', '_bx_timeline_menu_item_title_system_item_vote', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 0, 0, 1, 0),
+('bx_timeline_menu_item_counters', 'bx_timeline', 'item-reaction', '_bx_timeline_menu_item_title_system_item_reaction', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 1, 0, 1, 10),
+('bx_timeline_menu_item_counters', 'bx_timeline', 'item-score', '_bx_timeline_menu_item_title_system_item_score', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 0, 0, 1, 20),
+('bx_timeline_menu_item_counters', 'bx_timeline', 'item-view', '_bx_timeline_menu_item_title_system_item_view', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 0, 0, 1, 30),
+('bx_timeline_menu_item_counters', 'bx_timeline', 'item-comment', '_bx_timeline_menu_item_title_system_item_comment', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 1, 0, 1, 40);
+
+-- MENU: Item Meta Info
+INSERT INTO `sys_objects_menu` (`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
+('bx_timeline_menu_item_meta', '_sys_menu_title_snippet_meta', 'bx_timeline_menu_item_meta', 'bx_timeline', 15, 0, 1, 'BxTimelineMenuSnippetMeta', 'modules/boonex/timeline/classes/BxTimelineMenuSnippetMeta.php');
+
+INSERT INTO `sys_menu_sets` (`set_name`, `module`, `title`, `deletable`) VALUES
+('bx_timeline_menu_item_meta', 'bx_timeline', '_sys_menu_set_title_snippet_meta', 0);
+
+-- comment meta info menu
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `submenu_popup`, `visible_for_levels`, `active`, `copyable`, `editable`, `order`) VALUES 
+('bx_timeline_menu_item_meta', 'bx_timeline', 'date', '_sys_menu_item_title_system_sm_date', '_sys_menu_item_title_sm_date', '', '', '', '', '', '', 0, 2147483647, 1, 0, 1, 1),
+('bx_timeline_menu_item_meta', 'bx_timeline', 'membership', '_sys_menu_item_title_system_sm_membership', '_sys_menu_item_title_sm_membership', '', '', '', '', '', '', 0, 2147483647, 0, 0, 1, 2);
+
+-- MENU: Post form attachments (Link, Photo, Video)
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_timeline_menu_post_attachments', '_bx_timeline_menu_title_post_attachments', 'bx_timeline_menu_post_attachments', 'bx_timeline', 23, 0, 1, 'BxTimelineMenuPostAttachments', 'modules/boonex/timeline/classes/BxTimelineMenuPostAttachments.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_timeline_menu_post_attachments', 'bx_timeline', '_bx_timeline_menu_set_title_post_attachments', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `editable`, `order`) VALUES 
+('bx_timeline_menu_post_attachments', 'bx_timeline', 'add-emoji', '_bx_timeline_menu_item_title_system_add_emoji', '_bx_timeline_menu_item_title_add_emoji', 'javascript:void(0)', '', '_self', 'far smile', '', '', 2147483647, 0, 0, 1, 0),
+('bx_timeline_menu_post_attachments', 'bx_timeline', 'add-link', '_bx_timeline_menu_item_title_system_add_link', '_bx_timeline_menu_item_title_add_link', 'javascript:void(0)', 'javascript:{js_object}.showAttachLink(this, {content_id});', '_self', 'link', '', '', 2147483647, 1, 0, 1, 1),
+('bx_timeline_menu_post_attachments', 'bx_timeline', 'add-photo-simple', '_bx_timeline_menu_item_title_system_add_photo_simple', '_bx_timeline_menu_item_title_add_photo', 'javascript:void(0)', 'javascript:{js_object_add_photo_simple}.showUploaderForm();', '_self', 'camera', '', '', 2147483647, 0, 0, 1, 2),
+('bx_timeline_menu_post_attachments', 'bx_timeline', 'add-photo-html5', '_bx_timeline_menu_item_title_system_add_photo_html5', '_bx_timeline_menu_item_title_add_photo', 'javascript:void(0)', 'javascript:{js_object_add_photo_html5}.showUploaderForm();', '_self', 'camera', '', '', 2147483647, 1, 0, 1, 3),
+('bx_timeline_menu_post_attachments', 'bx_timeline', 'add-video-simple', '_bx_timeline_menu_item_title_system_add_video_simple', '_bx_timeline_menu_item_title_add_video', 'javascript:void(0)', 'javascript:{js_object_add_video_simple}.showUploaderForm();', '_self', 'video', '', '', 2147483647, 0, 0, 1, 4),
+('bx_timeline_menu_post_attachments', 'bx_timeline', 'add-video-html5', '_bx_timeline_menu_item_title_system_add_video_html5', '_bx_timeline_menu_item_title_add_video', 'javascript:void(0)', 'javascript:{js_object_add_video_html5}.showUploaderForm();', '_self', 'video', '', '', 2147483647, 1, 0, 1, 5),
+('bx_timeline_menu_post_attachments', 'bx_timeline', 'add-video-record', '_bx_timeline_menu_item_title_system_add_video_record', '_bx_timeline_menu_item_title_add_video_record', 'javascript:void(0)', 'javascript:{js_object_add_video_record}.showUploaderForm();', '_self', 'fas circle', '', '', 2147483647, 1, 0, 1, 6);
+
+-- MENU: add to "add content" menu
+SET @iAddMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_add_content_links' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_add_content_links', 'bx_timeline', 'create-item', '_bx_timeline_menu_item_title_system_create_entry', '_bx_timeline_menu_item_title_create_entry', 'page.php?i=timeline-view', '', '', 'far clock col-green1', '', 2147483647, 1, 1, IFNULL(@iAddMenuOrder, 0) + 1);
+
+-- MENU: add menu item to profiles modules (trigger* menu sets are processed separately upon modules enable/disable)
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('trigger_profile_view_submenu', 'bx_timeline', 'timeline-view', '_bx_timeline_menu_item_title_system_view_timeline_view', '_bx_timeline_menu_item_title_view_timeline_view', 'page.php?i=timeline-view&profile_id={profile_id}', '', '', 'far clock col-green1', '', 2147483647, 1, 0, 0),
+('trigger_group_view_submenu', 'bx_timeline', 'timeline-view', '_bx_timeline_menu_item_title_system_view_timeline_view', '_bx_timeline_menu_item_title_view_timeline_view', 'page.php?i=timeline-view&profile_id={profile_id}', '', '', 'far clock col-green1', '', 2147483647, 1, 0, 0);
+
+-- MENU: profile stats
+SET @iPStatsMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name` = 'sys_profile_stats' AND `active` = 1 LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
+('sys_profile_stats', 'bx_timeline', 'profile-stats-manage-timeline', '_bx_timeline_menu_item_title_system_manage_my_timeline', '_bx_timeline_menu_item_title_manage_my_timeline', 'page.php?i=timeline-manage', '', '_self', 'far clock col-green1', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:28:"get_menu_addon_profile_stats";}', '', 2147483646, 1, 0, @iPStatsMenuOrder + 2);
+
+-- MENU: dashboard manage tools
+SET @iManageMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name`='sys_account_dashboard_manage_tools' LIMIT 1);
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_account_dashboard_manage_tools', 'bx_timeline', 'timeline-administration', '_bx_timeline_menu_item_title_system_admt_timeline', '_bx_timeline_menu_item_title_admt_timeline', 'page.php?i=timeline-administration', '', '_self', 'clock', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:27:"get_menu_addon_manage_tools";}', '', 192, 1, 0, @iManageMenuOrder + 1);
+
+-- 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_timeline', '_bx_timeline', 'bx_timeline@modules/boonex/timeline/|std-icon.svg', IF(ISNULL(@iTypeOrder), 1, @iTypeOrder + 1));
+SET @iTypeId = LAST_INSERT_ID();
+
+-- Category: General
+INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
+VALUES (@iTypeId, 'bx_timeline_general', '_bx_timeline_options_category_general', 1);
+SET @iCategId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_params`, `check_error`, `extra`, `order`) VALUES
+('bx_timeline_enable_edit', 'on', @iCategId, '_bx_timeline_option_enable_edit', 'checkbox', '', '', '', '', 1),
+('bx_timeline_enable_delete', 'on', @iCategId, '_bx_timeline_option_enable_delete', 'checkbox', '', '', '', '', 2),
+('bx_timeline_enable_count_all_views', '', @iCategId, '_bx_timeline_option_enable_count_all_views', 'checkbox', '', '', '', '', 3),
+('bx_timeline_events_hide', '', @iCategId, '_bx_timeline_option_events_hide', 'rlist', '', '', '', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:21:"get_actions_checklist";}', 4);
+
+-- Category: Browse
+INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
+VALUES (@iTypeId, 'bx_timeline_browse', '_bx_timeline_options_category_browse', 2);
+SET @iCategId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_params`, `check_error`, `extra`, `order`) VALUES
+('bx_timeline_enable_show_all', '', @iCategId, '_bx_timeline_option_enable_show_all', 'checkbox', '', '', '', '', 1),
+('bx_timeline_enable_jump_to_switcher', '', @iCategId, '_bx_timeline_option_enable_jump_to_switcher', 'checkbox', '', '', '', '', 2),
+
+('bx_timeline_events_per_page_profile', '12', @iCategId, '_bx_timeline_option_events_per_page_profile', 'digit', '', '', '', '', 10),
+('bx_timeline_events_per_page_account', '12', @iCategId, '_bx_timeline_option_events_per_page_account', 'digit', '', '', '', '', 11),
+('bx_timeline_events_per_page_home', '24', @iCategId, '_bx_timeline_option_events_per_page_home', 'digit', '', '', '', '', 12),
+('bx_timeline_events_per_page', '24', @iCategId, '_bx_timeline_option_events_per_page', 'digit', '', '', '', '', 13),
+('bx_timeline_rss_length', '5', @iCategId, '_bx_timeline_option_rss_length', 'digit', '', '', '', '', 14),
+
+('bx_timeline_enable_infinite_scroll', '', @iCategId, '_bx_timeline_option_enable_infinite_scroll', 'checkbox', '', '', '', '', 20),
+('bx_timeline_events_per_preload', '5', @iCategId, '_bx_timeline_option_events_per_preload', 'digit', '', '', '', '', 21),
+('bx_timeline_auto_preloads', '10', @iCategId, '_bx_timeline_option_auto_preloads', 'digit', '', '', '', '', 22),
+
+('bx_timeline_enable_hot', 'on', @iCategId, '_bx_timeline_option_enable_hot', 'checkbox', '', '', '', '', 30),
+('bx_timeline_hot_interval', '48', @iCategId, '_bx_timeline_option_hot_interval', 'digit', '', '', '', '', 31);
+
+-- Category: Card
+INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
+VALUES (@iTypeId, 'bx_timeline_card', '_bx_timeline_options_category_card', 3);
+SET @iCategId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_params`, `check_error`, `extra`, `order`) VALUES
+('bx_timeline_enable_brief_cards', '', @iCategId, '_bx_timeline_option_enable_brief_cards', 'checkbox', '', '', '', '', 2),
+('bx_timeline_videos_autoplay', 'off', @iCategId, '_bx_timeline_option_videos_autoplay', 'select', '', '', '', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:27:"get_options_videos_autoplay";}', 10),
+('bx_timeline_preload_comments', '0', @iCategId, '_bx_timeline_option_preload_comments', 'digit', '', '', '', '', 20),
+('bx_timeline_attachments_layout', 'gallery', @iCategId, '_bx_timeline_option_attachments_layout', 'select', '', '', '', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:30:"get_options_attachments_layout";}', 30);
+
+-- Category: Cache
+INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
+VALUES (@iTypeId, 'bx_timeline_cache', '_bx_timeline_options_category_cache', 4);
+SET @iCategId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_params`, `check_error`, `extra`, `order`) VALUES
+('bx_timeline_enable_cache_item', 'on', @iCategId, '_bx_timeline_option_enable_cache_item', 'checkbox', '', '', '', '', 1),
+('bx_timeline_cache_item_engine', 'File', @iCategId, '_bx_timeline_option_cache_item_engine', 'select', '', '', '', 'File,Memcache,APC,XCache', 2),
+('bx_timeline_cache_item_lifetime', '604800', @iCategId, '_bx_timeline_option_cache_item_lifetime', 'digit', '', '', '', '', 3),
+('bx_timeline_enable_cache_list', 'on', @iCategId, '_bx_timeline_option_enable_cache_list', 'checkbox', '', '', '', '', 4);
+
+-- Category: Post form
+INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
+VALUES (@iTypeId, 'bx_timeline_post', '_bx_timeline_options_category_post', 5);
+SET @iCategId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_params`, `check_error`, `extra`, `order`) VALUES
+('bx_timeline_enable_editor_toolbar', '', @iCategId, '_bx_timeline_option_enable_editor_toolbar', 'checkbox', '', '', '', '', 1);
+
+
+-- PRIVACY 
+INSERT INTO `sys_objects_privacy` (`object`, `module`, `action`, `title`, `default_group`, `table`, `table_field_id`, `table_field_author`, `override_class_name`, `override_class_file`) VALUES
+('bx_timeline_privacy_view', 'bx_timeline', 'view', '_bx_timeline_privacy_view', '3', 'bx_timeline_events', 'id', 'owner_id', 'BxTimelinePrivacy', 'modules/boonex/timeline/classes/BxTimelinePrivacy.php');
+
+
+-- ACL
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_timeline', 'post', NULL, '_bx_timeline_acl_action_post', '', 1, 3);
+SET @iIdActionPost = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_timeline', 'edit', NULL, '_bx_timeline_acl_action_edit', '', 1, 3);
+SET @iIdActionEdit = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_timeline', 'delete', NULL, '_bx_timeline_acl_action_delete', '', 1, 3);
+SET @iIdActionDelete = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_timeline', 'vote', NULL, '_bx_timeline_acl_action_vote', '', 1, 0);
+SET @iIdActionVote = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_timeline', 'repost', NULL, '_bx_timeline_acl_action_repost', '', 1, 3);
+SET @iIdActionRepost = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_timeline', 'send', NULL, '_bx_timeline_acl_action_send', '', 1, 3);
+SET @iIdActionSend = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_timeline', 'mute', NULL, '_bx_timeline_acl_action_mute', '', 1, 3);
+SET @iIdActionMute = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_timeline', 'pin', NULL, '_bx_timeline_acl_action_pin', '', 1, 3);
+SET @iIdActionPin = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_timeline', 'stick', NULL, '_bx_timeline_acl_action_stick', '', 1, 3);
+SET @iIdActionStick = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_timeline', 'promote', NULL, '_bx_timeline_acl_action_promote', '', 1, 3);
+SET @iIdActionPromote = LAST_INSERT_ID();
+
+SET @iUnauthenticated = 1;
+SET @iAccount = 2;
+SET @iStandard = 3;
+SET @iUnconfirmed = 4;
+SET @iPending = 5;
+SET @iSuspended = 6;
+SET @iModerator = 7;
+SET @iAdministrator = 8;
+SET @iPremium = 9;
+
+INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
+
+-- post
+(@iStandard, @iIdActionPost),
+(@iModerator, @iIdActionPost),
+(@iAdministrator, @iIdActionPost),
+(@iPremium, @iIdActionPost),
+
+-- edit any post
+(@iModerator, @iIdActionEdit),
+(@iAdministrator, @iIdActionEdit),
+
+-- delete any post
+(@iModerator, @iIdActionDelete),
+(@iAdministrator, @iIdActionDelete),
+
+-- vote
+(@iStandard, @iIdActionVote),
+(@iModerator, @iIdActionVote),
+(@iAdministrator, @iIdActionVote),
+(@iPremium, @iIdActionVote),
+
+-- repost
+(@iStandard, @iIdActionRepost),
+(@iModerator, @iIdActionRepost),
+(@iAdministrator, @iIdActionRepost),
+(@iPremium, @iIdActionRepost),
+
+-- send
+(@iStandard, @iIdActionSend),
+(@iModerator, @iIdActionSend),
+(@iAdministrator, @iIdActionSend),
+(@iPremium, @iIdActionSend),
+
+-- mute
+(@iStandard, @iIdActionMute),
+(@iModerator, @iIdActionMute),
+(@iAdministrator, @iIdActionMute),
+(@iPremium, @iIdActionMute),
+
+-- pin any post
+(@iModerator, @iIdActionPin),
+(@iAdministrator, @iIdActionPin),
+
+-- stick any post
+(@iModerator, @iIdActionStick),
+(@iAdministrator, @iIdActionStick),
+
+-- promote any post
+(@iModerator, @iIdActionPromote),
+(@iAdministrator, @iIdActionPromote);
+
+
+-- ALERTS
+INSERT INTO `sys_alerts_handlers`(`name`, `class`, `file`, `service_call`) VALUES 
+('bx_timeline', 'BxTimelineResponse', 'modules/boonex/timeline/classes/BxTimelineResponse.php', '');
+SET @iHandler := LAST_INSERT_ID();
+
+INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
+('system', 'clear_cache', @iHandler),
+('account', 'confirm', @iHandler),
+('account', 'unconfirm', @iHandler),
+('profile', 'approve', @iHandler),
+('profile', 'disapprove', @iHandler),
+('profile', 'activate', @iHandler),
+('profile', 'suspend', @iHandler),
+('profile', 'delete', @iHandler),
+
+('bx_timeline_videos_mp4', 'transcoded', @iHandler);
+
+
+-- SEARCH
+SET @iSearchOrder = (SELECT IFNULL(MAX(`Order`), 0) FROM `sys_objects_search`);
+INSERT INTO `sys_objects_search` (`ObjectName`, `Title`, `Order`, `ClassName`, `ClassPath`) VALUES
+('bx_timeline', '_bx_timeline', @iSearchOrder + 1, 'BxTimelineSearchResult', 'modules/boonex/timeline/classes/BxTimelineSearchResult.php'),
+('bx_timeline_cmts', '_bx_timeline_cmts', @iSearchOrder + 2, 'BxTimelineCmtsSearchResult', 'modules/boonex/timeline/classes/BxTimelineCmtsSearchResult.php');
+
+
+-- GRIDS: connection mute
+INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `field_active`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_fields_translatable`, `filter_mode`, `sorting_fields`, `sorting_fields_translatable`, `visible_for_levels`, `responsive`, `override_class_name`, `override_class_file`) VALUES
+('bx_timeline_mute', 'Sql', 'SELECT `p`.`id`, `c`.`added`, `c`.`mutual` FROM `sys_profiles` AS `p` INNER JOIN `sys_accounts` AS `a` ON (`a`.`id` = `p`.`account_id`) {join_connections}', 'sys_profiles', 'id', 'c`.`added', '', '', 10, NULL, 'start', '', 'name,email', '', 'auto', '', '', 2147483647, 0, 'BxTimelineGridMute', 'modules/boonex/timeline/classes/BxTimelineGridMute.php');
+
+INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `params`, `hidden_on`, `order`) VALUES
+('bx_timeline_mute', 'name', '_sys_name', '60%', '', '', 1),
+('bx_timeline_mute', 'info', '', '20%', '', '1', 2),
+('bx_timeline_mute', 'actions', '', '20%', '', '', 3);
+
+INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
+('bx_timeline_mute', 'single', 'delete', '', 'remove', 0, 1, 2);
+
+-- GRIDS: moderation tools
+INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `field_active`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_fields_translatable`, `filter_mode`, `sorting_fields`, `sorting_fields_translatable`, `visible_for_levels`, `override_class_name`, `override_class_file`) VALUES
+('bx_timeline_administration', 'Sql', 'SELECT * FROM `bx_timeline_events` WHERE 1 AND `active`=''1'' ', 'bx_timeline_events', 'id', 'date', 'status', '', 20, NULL, 'start', '', 'title,description', '', 'like', 'reports', '', 192, 'BxTimelineGridAdministration', 'modules/boonex/timeline/classes/BxTimelineGridAdministration.php');
+
+INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
+('bx_timeline_administration', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
+('bx_timeline_administration', 'switcher', '_bx_timeline_grid_column_title_adm_active', '8%', 0, '', '', 2),
+('bx_timeline_administration', 'reports', '_sys_txt_reports_title', '5%', 0, '', '', 3),
+('bx_timeline_administration', 'description', '_bx_timeline_grid_column_title_adm_description', '25%', 0, '25', '', 4),
+('bx_timeline_administration', 'date', '_bx_timeline_grid_column_title_adm_added', '20%', 1, '25', '', 5),
+('bx_timeline_administration', 'owner_id', '_bx_timeline_grid_column_title_adm_author', '20%', 0, '25', '', 6),
+('bx_timeline_administration', 'actions', '', '20%', 0, '', '', 7);
+
+INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
+('bx_timeline_administration', 'bulk', 'delete', '_bx_timeline_grid_action_title_adm_delete', '', 0, 1, 1),
+('bx_timeline_administration', 'single', 'delete', '_bx_timeline_grid_action_title_adm_delete', 'remove', 1, 1, 2),
+('bx_timeline_administration', 'single', 'audit_content', '_bx_timeline_grid_action_title_adm_audit_content', 'search', 1, 0, 4);
+
+
+-- METATAGS
+INSERT INTO `sys_objects_metatags` (`object`, `table_keywords`, `table_locations`, `table_mentions`, `override_class_name`, `override_class_file`) VALUES
+('bx_timeline', 'bx_timeline_meta_keywords', 'bx_timeline_meta_locations', 'bx_timeline_meta_mentions', '', '');
+
+
+-- CONNECTIONS
+INSERT INTO `sys_objects_connection` (`object`, `table`, `type`, `override_class_name`, `override_class_file`) VALUES
+('bx_timeline_mute', 'bx_timeline_mute', 'one-way', '', '');
+
+
+-- EMAIL TEMPLATES
+INSERT INTO `sys_email_templates` (`Module`, `NameSystem`, `Name`, `Subject`, `Body`) VALUES 
+('bx_timeline', '_bx_timeline_et_txt_name_send', 'bx_timeline_send', '_bx_timeline_et_txt_subject_send', '_bx_timeline_et_txt_body_send');
+
+
+-- CRON
+INSERT INTO `sys_cron_jobs` (`name`, `time`, `class`, `file`, `service_call`) VALUES
+('bx_timeline_hot', '0 * * * *', 'BxTimelineCronHot', 'modules/boonex/timeline/classes/BxTimelineCronHot.php', ''),
+('bx_timeline_publishing', '* * * * *', 'BxTimelineCronPublishing', 'modules/boonex/timeline/classes/BxTimelineCronPublishing.php', '');
+
+
+-- PRELOADER
+SET @iOrderPreloader = (SELECT IFNULL(MAX(`order`), 9999) FROM `sys_preloader` WHERE `type`='js_system' AND `order` > 9999 LIMIT 1);
+INSERT INTO `sys_preloader`(`module`, `type`, `content`, `active`, `order`) VALUES
+('bx_timeline', 'js_system', 'modernizr.min.js', 1, @iOrderPreloader + 1);

+ 1204 - 0
modules/boonex/timeline/updates/12.0.2_12.0.3/source/js/view.js

@@ -0,0 +1,1204 @@
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Timeline Timeline
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+function BxTimelineView(oOptions) {
+    BxTimelineMain.call(this, oOptions);
+
+    this._sActionsUri = oOptions.sActionUri;
+    this._sActionsUrl = oOptions.sActionUrl;
+    this._sObjName = oOptions.sObjName == undefined ? 'oTimelineView' : oOptions.sObjName;
+    this._iOwnerId = oOptions.iOwnerId == undefined ? 0 : oOptions.iOwnerId;
+    this._sReferrer = oOptions.sReferrer == undefined ? '' : oOptions.sReferrer;
+    this._sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'slide' : oOptions.sAnimationEffect;
+    this._iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed;
+    this._sVideosAutoplay = oOptions.sVideosAutoplay == undefined ? 'off' : oOptions.sVideosAutoplay;
+    this._bEventsToLoad = oOptions.bEventsToLoad == undefined ? false : oOptions.bEventsToLoad;
+    this._aHtmlIds = oOptions.aHtmlIds == undefined ? {} : oOptions.aHtmlIds;
+    this._oRequestParams = oOptions.oRequestParams == undefined ? {} : oOptions.oRequestParams;
+
+    this._bInit = oOptions.bInit == undefined ? true : oOptions.bInit;
+    this._bInfScroll = oOptions.bInfScroll == undefined ? false : oOptions.bInfScroll;
+    this._iInfScrollAutoPreloads = oOptions.iInfScrollAutoPreloads == undefined ? 10 : oOptions.iInfScrollAutoPreloads;
+    this._sInfScrollAfter = 'item';
+    this._iInfScrollAfterItem = 2; //--- Preload more info when scroll reached N item from the end of Timeline block.
+    this._fInfScrollAfterPercent = 0.25; //--- Preload more info when specified portion of Timeline block's content was already scrolled.
+    this._bInfScrollBusy = false;
+    this._iInfScrollPreloads = 1; //--- First portion is loaded with page loading or 'Load More' button click.
+
+    this._fOutsideOffset = 0.8;
+    this._oSaved = {};
+
+    this._fVapOffsetStart = 0.8;
+    this._fVapOffsetStop = 0.2;
+
+    this._bLiveUpdatePaused = false;
+
+    if(typeof window.glBxTimelineVapPlayers === 'undefined')
+        window.glBxTimelineVapPlayers = [];
+
+    this.initView();
+
+    if(this._bInit) {
+        var $this = this;
+        $(document).ready(function() {
+            $this.init();
+        });
+    }
+}
+
+BxTimelineView.prototype = Object.create(BxTimelineMain.prototype);
+BxTimelineView.prototype.constructor = BxTimelineView;
+
+BxTimelineView.prototype.init = function(bForceInit)
+{
+    var $this = this;
+
+    if(!this.oView || bForceInit)
+        this.initView();
+
+    if(this.bViewTimeline) {
+        //-- Check content to show 'See More'
+        this.initSeeMore(this.oView, true);
+
+        //--- Hide timeline Events which are outside the viewport
+        this.hideEvents(this.oView.find('.' + this.sClassItem), this._fOutsideOffset);
+
+        //--- Init Video Autoplay
+        if(this._sVideosAutoplay != 'off') {
+            this.initVideosAutoplay(this.oView);
+
+            this.oView.on('hide')
+
+            $(window).on('scroll', function() {
+                if(!$this.oView.is(':visible'))
+                    return;
+
+                if(!window.requestAnimationFrame) 
+                    setTimeout(function() {
+                        $this.autoplayVideos($this.oView, $this._fVapOffsetStart, $this._fVapOffsetStop);
+                    }, 100);
+                else
+                    window.requestAnimationFrame(function() {
+                        $this.autoplayVideos($this.oView, $this._fVapOffsetStart, $this._fVapOffsetStop);
+                    });
+            });
+        }
+
+        //--- Blink (highlight) necessary items
+        this.blink(this.oView);
+
+        //--- Load 'Jump To'
+        this.initJumpTo(this.oView);
+
+        //--- Init 'Infinite Scroll'
+        this.initInfiniteScroll(this.oView);
+    }
+
+    if(this.bViewOutline) {
+        this.initMasonry();
+
+        this.oView.find('.' + this.sClassItem).resize(function() {
+            $this.reloadMasonry();
+        });
+        this.oView.find('img.' + this.sClassItemImage).load(function() {
+            $this.reloadMasonry();
+        });
+
+        //--- Init Video Layout
+        if(this._sVideosAutoplay != 'off')
+            this.initVideos(this.oView);
+
+        //--- Blink (highlight) necessary items
+        this.blink(this.oView);
+
+        //--- Load 'Jump To'
+        this.initJumpTo(this.oView);
+
+        //--- Init 'Infinite Scroll'
+        this.initInfiniteScroll(this.oView);
+    }
+
+    if(this.bViewItem) {
+        //-- Check content to show 'See More'
+        this.initSeeMore(this.oView, false);
+        
+        this.oView.find('.bx-tl-item-text .bx-tl-content').checkOverflowHeight(this.sSP + '-overflow', function(oElement) {
+            $this.onFindOverflow(oElement);
+        });
+
+        //--- Init Video Layout
+        if(this._sVideosAutoplay != 'off')
+            this.initVideos(this.oView);
+    }
+
+    //--- Init Flickity
+    this.initFlickity();
+};
+
+BxTimelineView.prototype.initView = function() 
+{   
+    BxTimelineMain.prototype.initView.call(this);
+
+    this.oView = $(this._getHtmlId('main', this._oRequestParams));
+    if(!this.oView.length) 
+        return;
+
+    if(this.oView.hasClass(this.sClassView + '-timeline'))
+        this.bViewTimeline = true;
+    else if(this.oView.hasClass(this.sClassView + '-outline'))
+        this.bViewOutline = true;
+    else if(this.oView.hasClass(this.sClassView + '-item'))
+        this.bViewItem = true;
+};
+
+BxTimelineView.prototype.initSeeMore = function(oParent, bInItems)
+{
+    var $this = this;
+
+    var oSubParent = oParent;
+    if(bInItems)
+        oSubParent = oParent.find('.' + this.sClassItem);
+
+    oSubParent.find('.bx-tl-item-text .bx-tl-content').checkOverflowHeight(this.sSP + '-overflow', function(oElement) {
+        $this.onFindOverflow(oElement);
+    });
+};
+
+BxTimelineView.prototype.initJumpTo = function(oParent)
+{
+    var oJumpTo = $(oParent).find('.' + this.sClassJumpTo);
+    if(!oJumpTo || oJumpTo.length == 0 || oJumpTo.html() != '')
+        return;
+
+    bx_loading_btn(oJumpTo, true);
+
+    jQuery.post (
+        this._sActionsUrl + 'get_jump_to/',
+        this._getDefaultData(oParent),
+        function(oData) {
+            oData.holder = oJumpTo;
+
+            processJsonData(oData);
+        },
+        'json'
+    );
+};
+
+BxTimelineView.prototype.onGetJumpTo = function(oData)
+{
+    if(!oData.holder || oData.content == undefined)
+        return;
+
+    $(oData.holder).html(oData.content);
+};
+
+BxTimelineView.prototype.initInfiniteScroll = function(oParent)
+{
+    var $this = this;
+
+    if(!this._bInfScroll || !this._bEventsToLoad)
+        return;
+
+    $(window).bind('scroll', function(oEvent) {
+        if(!$this._bEventsToLoad || $this._bInfScrollBusy || $this._iInfScrollPreloads >= $this._iInfScrollAutoPreloads)
+            return;
+
+        var iScrollTop = parseInt($(window).scrollTop());
+        var iWindowHeight = $(window).height();
+
+        //--- Auto-scroll by reaching the N item from the end of parent block.
+        if($this._sInfScrollAfter == 'item') {
+            var oItems = oParent.find('.' + $this.sClassItem);
+            if((iScrollTop + iWindowHeight) <= ($(oItems.get(oItems.length - $this._iInfScrollAfterItem)).offset().top))
+                return;
+        }
+
+        //--- Auto-scroll by reaching the percent of parent block's height.
+        if($this._sInfScrollAfter == 'percent') {
+            var iParentTop = parseInt(oParent.offset().top);
+            var iParentHeight = parseInt(oParent.height());
+            if((iScrollTop + iWindowHeight) <= (iParentTop + iParentHeight * $this._fInfScrollAfterPercent))
+                return;
+        }
+
+        $this._bInfScrollBusy = true;
+        $this._getPage(undefined, $this._oRequestParams.start + $this._oRequestParams.per_page, $this._oRequestParams.per_page, function(oData) {
+            $this._bEventsToLoad = oData.events_to_load;
+            $this._iInfScrollPreloads += 1;
+            $this._bInfScrollBusy = false;
+        });
+    });
+};
+
+BxTimelineView.prototype.initVideosAutoplay = function(oParent)
+{
+    var $this = this;
+
+    if(this._sVideosAutoplay == 'off')
+        return;
+
+    this.initVideos(oParent);
+
+    var sPrefix = oParent.hasClass(this.sClassView) ? oParent.attr('id') : oParent.parents('.' + this.sClassView + ':first').attr('id');
+
+    oParent.find('iframe').each(function() {
+        var sPlayer = sPrefix + '_' + $(this).attr('id');
+        if(window.glBxTimelineVapPlayers[sPlayer])
+            return;
+
+        var oPlayer = new playerjs.Player(this);
+        if($this._sVideosAutoplay == 'on_mute')
+            oPlayer.mute();
+
+        var fFixHeight = function () {
+            $('#' + sPlayer).height(($('#' + sPlayer).contents().find('video').height()) + 'px');
+        };
+        oPlayer.on('ready', fFixHeight);
+        oPlayer.on('play', fFixHeight);
+
+        window.glBxTimelineVapPlayers[sPlayer] = oPlayer;
+    });
+};
+
+BxTimelineView.prototype.hideEvents = function(oEvents, fOffset)
+{
+    var $this = this;
+
+    oEvents.each(function(iIndex, oEvent) {
+        $this.hideEvent($(oEvent), fOffset, iIndex, false);
+    });
+
+    //--- on scolling, show/animate timeline Events when enter the viewport
+    $(window).on('scroll', function() {
+        if(!window.requestAnimationFrame) 
+            setTimeout(function() {
+                $this.showEvents(oEvents, $this._fOutsideOffset);
+            }, 100);
+        else
+            window.requestAnimationFrame(function() {
+                $this.showEvents(oEvents, $this._fOutsideOffset);
+            });
+    });
+};
+
+BxTimelineView.prototype.hideEvent = function(oEvent, fOffset, iIndex, bInitAutoShow)
+{
+    var $this = this;
+
+    iIndex >=3 && oEvent.offset().top > ($(window).scrollTop() + $(window).height() * fOffset) && oEvent.find('.bx-tl-item-type, .bx-tl-item-cnt').addClass('is-hidden');
+
+    if(bInitAutoShow)
+        $(window).on('scroll', function() {
+            if(!window.requestAnimationFrame) 
+                setTimeout(function() {
+                    $this.showEvent(oEvent, $this._fOutsideOffset);
+                }, 100);
+            else
+                window.requestAnimationFrame(function() {
+                    $this.showEvent(oEvent, $this._fOutsideOffset);
+                });
+        });
+};
+
+BxTimelineView.prototype.showEvents = function(oEvents, fOffset)
+{
+    var $this = this;
+    oEvents.each(function() {
+        $this.showEvent($(this), fOffset);
+    });
+};
+
+BxTimelineView.prototype.showEvent = function(oEvent, fOffset)
+{
+    oEvent.offset().top <= ($(window).scrollTop() + $(window).height() * fOffset) && oEvent.find('.bx-tl-item-type').hasClass('is-hidden') && oEvent.find('.bx-tl-item-type, .bx-tl-item-cnt').removeClass('is-hidden').addClass('bounce-in');
+};
+
+BxTimelineView.prototype.autoplayVideos = function(oView, fOffsetStart, fOffsetStop)
+{
+    var $this = this;
+
+    var oItems = oView.find('.' + this.sClassItem);
+    var sPrefix = oView.attr('id') + '_';
+
+    oItems.each(function() {
+        $(this).find('iframe').each(function() {
+            var oFrame = $(this);
+            var oPlayer = window.glBxTimelineVapPlayers[sPrefix + oFrame.attr('id')];
+            if(!oPlayer)
+                return;
+
+            var iFrameTop = oFrame.offset().top;
+            var iFrameBottom = iFrameTop + oFrame.height();
+            var iWindowTop = $(window).scrollTop();
+            var iWindowHeight = $(window).height();
+            if(iFrameTop <= iWindowTop + iWindowHeight * fOffsetStart && iFrameBottom >= iWindowTop + iWindowHeight * fOffsetStop)
+                oPlayer.play();
+            else
+                oPlayer.pause();
+        });
+    });
+};
+
+BxTimelineView.prototype.playVideos = function(oView)
+{
+    var $this = this;
+
+    var oItems = oView.find('.' + this.sClassItem);
+    var sPrefix = oView.attr('id') + '_';
+
+    oItems.each(function() {
+        $(this).find('iframe').each(function() {
+            var oFrame = $(this);
+            var oPlayer = window.glBxTimelineVapPlayers[sPrefix + oFrame.attr('id')];
+            if(!oPlayer)
+                return;
+
+            oPlayer.play();
+        });
+    });
+};
+
+BxTimelineView.prototype.pauseVideos = function(oView)
+{
+    var $this = this;
+
+    var oItems = oView.find('.' + this.sClassItem);
+    var sPrefix = oView.attr('id') + '_';
+
+    oItems.each(function() {
+        $(this).find('iframe').each(function() {
+            var oFrame = $(this);
+            var oPlayer = window.glBxTimelineVapPlayers[sPrefix + oFrame.attr('id')];
+            if(!oPlayer)
+                return;
+
+            oPlayer.pause();
+        });
+    });
+};
+
+BxTimelineView.prototype.changeView = function(oLink, sType, oRequestParams)
+{
+    var $this = this;
+    var oViews = $(this._getHtmlId('views_content', this._oRequestParams, {with_type: false})); 
+
+    var oViewBefore = $(this._getHtmlId('main', this._oRequestParams));
+    if(!oViewBefore.length)
+        oViewBefore = oViews.children(':visible');
+
+    if(this._sVideosAutoplay != 'off')
+        this.pauseVideos(oViewBefore);
+
+    this._oRequestParams.start = 0;
+    this._oRequestParams.type = sType;
+
+    var oTab = $(oLink);
+    var sTabActive = 'bx-menu-tab-active';
+    oTab.parents('.bx-db-menu:first').find('li.' + sTabActive).removeClass(sTabActive);
+    oTab.parents('li:first').addClass(sTabActive);
+
+    var sView = this._getHtmlId('main', this._oRequestParams);
+    if(oViews.find(sView).length !== 0) {
+        oViewBefore.hide();
+        oViews.find(sView).show();
+
+        return;
+    }
+
+    var oData = this._getDefaultData(oLink);
+    if(oRequestParams != undefined)
+        oData = jQuery.extend({}, oData, oRequestParams);
+
+    this.loadingIn(oLink, true);
+
+    jQuery.get (
+        this._sActionsUrl + 'get_view',
+        oData,
+        function(oResponse) {
+            if(oLink)
+                $this.loadingIn(oLink, false);
+
+            if(!oResponse.content)
+                return;
+
+            var oContent = $(oResponse.content);
+            oContent.filter(sView).hide();
+
+            oViewBefore.hide();
+            oViews.append(oContent).find(sView).bxProcessHtml().show(function() {
+                $this.init(true);
+            });
+        },
+        'json'
+    );
+};
+
+BxTimelineView.prototype.changePage = function(oLink, iStart, iPerPage, onLoad)
+{
+    if(this._bInfScroll)
+        this._iInfScrollPreloads = 1;
+
+    this._getPage(oLink, iStart, iPerPage, onLoad);
+};
+
+BxTimelineView.prototype.changeFilter = function(oLink)
+{
+    var sId = $(oLink).attr('id');
+    sId = sId.substr(sId.lastIndexOf('-') + 1, sId.length);
+
+    this.loadingInBlock(oLink, true);
+
+    this._oRequestParams.start = 0;
+    this._oRequestParams.filter = sId;
+    this._getPosts(oLink);
+};
+
+BxTimelineView.prototype.changeTimeline = function(oLink, sDate)
+{
+    var $this = this;
+
+    oLink = $(oLink);
+    var bLink = oLink.length > 0;
+    var bLoadingInButton = bLink && oLink.hasClass('bx-btn');
+
+    if(bLink) {
+        if(bLoadingInButton)
+            this.loadingInButton(oLink, true);
+        else
+            this.loadingInBlock(oLink, true);
+    }
+
+    this._oRequestParams.start = 0;
+    this._oRequestParams.timeline = sDate;
+    this._getPosts(oLink, function(oData) {
+        if(bLink) {
+            if(bLoadingInButton)
+                $this.loadingInButton(oLink, false);
+            else
+                $this.loadingInBlock(oLink, false);
+        }
+
+        window.scrollTo(0, $this.oView.offset().top - 150);
+
+        processJsonData(oData);
+    });
+};
+
+BxTimelineView.prototype.showCalendar = function(oLink)
+{
+    var $this = this;
+    var oInput = $(oLink).siblings('.' + this.sSP + '-jump-to-calendar');
+    if(!oInput.length)
+        return;
+
+    var sClassProcessed = this.sSP + '-datepicker-processed';
+    if(!oInput.hasClass(sClassProcessed)) {
+        oInput.datepicker({
+            changeYear: true,
+            changeMonth: true,
+            dateFormat: 'yy-mm-dd',
+            yearRange: '1900:2100',
+            onSelect: function(sDate, oPicker){
+		$this.changeTimeline(oLink, sDate);
+            }
+        });
+        oInput.addClass(sClassProcessed);
+    }
+
+    oInput.datepicker('show');
+};
+
+BxTimelineView.prototype.showMore = function(oLink)
+{
+    var sClassOverflow = this.sSP + '-overflow';
+
+    $(oLink).parents('.' + this.sClassItem + ':first').find('.' + sClassOverflow).css('max-height', 'none').removeClass(sClassOverflow);
+    $(oLink).parents('.' + this.sSP + '-content-show-more:first').remove();
+
+    if(this.bViewOutline)
+        this.reloadMasonry();
+};
+
+BxTimelineView.prototype.showItem = function(oLink, iId, sMode, oParams)
+{
+    var oData = $.extend({}, this._getDefaultData(), {id: iId, mode: sMode}, (oParams != undefined ? oParams : {}));
+
+    $(".bx-popup-full-screen.bx-popup-applied:visible").dolPopupHide();
+
+    $(window).dolPopupAjax({
+        id: {
+            value: this._getHtmlId('item_popup', this._oRequestParams, {whole: false, hash: false}) + iId, 
+            force: true
+        },
+        url: bx_append_url_params(this._sActionsUrl + 'get_item_brief', oData),
+        closeOnOuterClick: false,
+        removeOnClose: true,
+        fullScreen: true
+    });
+
+    return false;
+};
+
+BxTimelineView.prototype.commentItem = function(oLink, sSystem, iId)
+{
+    var $this = this;
+    var oData = this._getDefaultData(oLink);
+    oData['system'] = sSystem;
+    oData['id'] = iId;
+
+    var oComments = $(oLink).parents('.' + this.sClassItem + ':first').find('.' + this.sClassItemComments);
+    if(oComments.children().length > 0) {
+        oComments.bx_anim('toggle', this._sAnimationEffect, this._iAnimationSpeed);
+        $(oLink).parents('.cmt-counter').toggleClass('cmt-counter-opened');
+    	return;
+    }
+
+    if(oLink)
+    	this.loadingInItem(oLink, true);
+
+    jQuery.get (
+        this._sActionsUrl + 'get_comments',
+        oData,
+        function(oData) {
+            if(oLink)
+                $this.loadingInItem(oLink, false);
+
+            if(!oData.content)
+                return;
+
+            oComments.html($(oData.content).hide()).children(':hidden').bxProcessHtml().bx_anim('show', $this._sAnimationEffect, $this._iAnimationSpeed);
+            $(oLink).parents('.cmt-counter').toggleClass('cmt-counter-opened');
+        },
+        'json'
+    );
+};
+
+BxTimelineView.prototype.pinPost = function(oLink, iId, iWay)
+{
+    this._markPost(oLink, iId, iWay, 'pin');
+};
+
+BxTimelineView.prototype.onPinPost = function(oData)
+{
+    this._onMarkPost(oData, 'pin');
+};
+
+BxTimelineView.prototype.stickPost = function(oLink, iId, iWay)
+{
+    this._markPost(oLink, iId, iWay, 'stick');
+};
+
+BxTimelineView.prototype.onStickPost = function(oData)
+{
+    this._onMarkPost(oData, 'stick');
+};
+
+BxTimelineView.prototype.promotePost = function(oLink, iId, iWay)
+{
+    var $this = this;
+    var oData = this._getDefaultData();
+    oData['id'] = iId;
+
+    $(oLink).parents('.bx-popup-applied:first:visible').dolPopupHide({
+        onHide: function(oPopup) {
+            $(oPopup).remove();
+        }
+    });
+
+    var oLoadingContainer = $(this._getHtmlId('item', this._oRequestParams, {whole: false}) + iId);
+
+    this.loadingInItem(oLoadingContainer, true);
+
+    $.post(
+        this._sActionsUrl + 'promote/',
+        oData,
+        function(oData) {
+            $this.loadingInItem(oLoadingContainer, false);
+
+            processJsonData(oData);
+        },
+        'json'
+    );
+};
+
+BxTimelineView.prototype.muteAuthor = function(oLink, iId)
+{
+    var $this = this;
+    var oData = this._getDefaultData();
+    oData['id'] = iId;
+
+    $(oLink).parents('.bx-popup-applied:first:visible').dolPopupHide({
+        onHide: function(oPopup) {
+            $(oPopup).remove();
+        }
+    });
+
+    var oLoadingContainer = $(this._getHtmlId('item', this._oRequestParams, {whole: false}) + iId);
+
+    this.loadingInItem(oLoadingContainer, true);
+
+    $.post(
+        this._sActionsUrl + 'mute/',
+        oData,
+        function(oData) {
+            $this.loadingInItem(oLoadingContainer, false);
+
+            processJsonData(oData);
+        },
+        'json'
+    );
+};
+
+BxTimelineView.prototype.initFormEdit = function(sFormId)
+{
+    var $this = this;
+    var oForm = $('#' + sFormId);
+
+    autosize(oForm.find('textarea'));
+    oForm.ajaxForm({
+        dataType: "json",
+        beforeSubmit: function (formData, jqForm, options) {
+            window[$this._sObjName].beforeFormEditSubmit(oForm);
+        },
+        success: function (oData) {
+            window[$this._sObjName].afterFormEditSubmit(oForm, oData);
+        }
+    });
+};
+
+BxTimelineView.prototype.beforeFormEditSubmit = function(oForm)
+{
+    this.loadingInButton($(oForm).children().find(':submit'), true);
+};
+
+BxTimelineView.prototype.afterFormEditSubmit = function (oForm, oData)
+{
+    var $this = this;
+    var fContinue = function() {
+        if(oData && oData.id != undefined) {
+            var iId = parseInt(oData.id);
+            if(iId <= 0) 
+                return;
+
+            $this._getPost($this.oView, iId, $this._oRequestParams);
+            return;
+        }
+
+        if(oData && oData.form != undefined && oData.form_id != undefined) {
+            $('#' + oData.form_id).replaceWith(oData.form);
+            $this.initFormEdit(oData.form_id);
+
+            return;
+        }
+    };
+
+    this.loadingInButton($(oForm).children().find(':submit'), false);
+
+    if(oData && oData.message != undefined)
+        bx_alert(oData.message, fContinue);
+    else
+        fContinue();
+};
+
+BxTimelineView.prototype.editPost = function(oLink, iId)
+{
+    var $this = this;
+    var oData = this._getDefaultData(oLink);
+    oData['id'] = iId;
+
+    $(oLink).parents('.bx-popup-applied:first:visible').dolPopupHide();
+
+    var oItem = this.oView.find(this._getHtmlId('item', this._oRequestParams, {whole: false}) + iId);
+
+    var oContent = oItem.find('.' + this.sClassItemContent);
+    if(oContent.find('form').length) {
+        $(oContent).bx_anim('hide', this._sAnimationEffect, this._iAnimationSpeed, function() {
+            $(this).html($this._oSaved[iId]).bx_anim('show', $this._sAnimationEffect, $this._iAnimationSpeed);
+        });
+        return;
+    }
+    else
+        this._oSaved[iId] = oContent.html();
+
+    this.loadingInItem(oItem, true);
+
+    jQuery.post (
+        this._sActionsUrl + 'get_edit_form/' + iId + '/',
+        oData,
+        function (oData) {
+            processJsonData(oData);
+        },
+        'json'
+    );
+};
+
+BxTimelineView.prototype.onEditPost = function(oData)
+{
+    var $this = this;
+
+    if(!oData || !oData.id)
+        return;
+
+    var oItem = $(this._getHtmlId('item', this._oRequestParams, {whole: false}) + oData.id);
+
+    this.loadingInItem(oItem, false);
+
+    if(oData && oData.form != undefined && oData.form_id != undefined) {
+        oItem.find('.' + this.sClassItemContent).bx_anim('hide', this._sAnimationEffect, this._iAnimationSpeed, function() {
+            $(this).html(oData.form).bx_anim('show', $this._sAnimationEffect, $this._iAnimationSpeed, function() {
+                $this.initFormEdit(oData.form_id);
+            });
+        });
+    }
+};
+
+BxTimelineView.prototype.editPostCancel = function(oButton, iId)
+{
+    this.editPost(oButton, iId);
+};
+
+BxTimelineView.prototype.deletePost = function(oLink, iId)
+{
+    var $this = this;
+
+    $(oLink).parents('.bx-popup-applied:first:visible').dolPopupHide();
+
+    bx_confirm('', function() {
+        var oData = $this._getDefaultData();
+        oData['id'] = iId;
+
+        $this.loadingInItem($($this._getHtmlId('item', $this._oRequestParams, {whole: false}) + iId), true);
+
+        $.post(
+            $this._sActionsUrl + 'delete/',
+            oData,
+            function(oData) {
+                processJsonData(oData);
+            },
+            'json'
+        );
+    });
+};
+
+BxTimelineView.prototype.onDeletePost = function(oData)
+{
+    var $this = this;
+    var oItem = $(this._getHtmlId('item', this._oRequestParams, {whole: false}) + oData.id);
+
+    //--- Delete from 'Timeline' (if available)
+    if(this.bViewTimeline) {
+        oItem.bx_anim('hide', this._sAnimationEffect, this._iAnimationSpeed, function() {
+            $(this).remove();
+
+            if($this.oView.find('.' + $this.sClassItem).length == 0) {
+                $this.oView.find('.' + $this.sClassDividerToday).hide();
+                $this.oView.find('.' + $this.sSP + '-load-more').hide();
+                $this.oView.find('.' + $this.sSP + '-empty').show();
+            }
+        });
+
+        return;
+    }
+
+    //--- Delete from 'Outline' (if available)
+    if(this.bViewOutline) {
+        oItem.bx_anim('hide', this._sAnimationEffect, this._iAnimationSpeed, function() {
+            $(this).remove();
+
+            if($this.oView.find('.' + $this.sClassItem).length == 0) {
+                $this.destroyMasonry();
+
+                $this.oView.find('.' + $this.sSP + '-load-more').hide();
+                $this.oView.find('.' + $this.sSP + '-empty').show();
+            } 
+            else
+                $this.reloadMasonry();
+        });
+
+        return;
+    }
+
+    //--- Delete from 'View Item' page.
+    if(this._sReferrer.length != 0)
+        document.location = this._sReferrer;
+};
+
+BxTimelineView.prototype.onConnect = function(eElement, oData)
+{
+    $(eElement).remove();
+};
+
+/*----------------------------*/
+/*--- Live Updates methods ---*/
+/*----------------------------*/
+BxTimelineView.prototype.goTo = function(oLink, sGoToId, sBlinkIds, onLoad)
+{
+    var $this = this;
+
+    this.loadingInPopup(oLink, true);
+
+    this._oRequestParams.start = 0;
+    this._oRequestParams.blink = sBlinkIds;
+    this._getPosts(this.oView, function(oData) {
+        $this.loadingInPopup(oLink, false);
+
+        $(oLink).parents('.bx-popup-applied:first:visible').dolPopupHide();
+
+        oData.go_to = sGoToId;
+        processJsonData(oData);
+    });
+};
+
+BxTimelineView.prototype.goToBtn = function(oLink, sGoToId, sBlinkIds, onLoad)
+{
+    var $this = this;
+
+    this.loadingInButton(oLink, true);
+
+    this._oRequestParams.start = 0;
+    this._oRequestParams.blink = sBlinkIds;
+    this._getPosts(this.oView, function(oData) {
+        oData.go_to = sGoToId;
+        processJsonData(oData);
+
+        $this.loadingInButton(oLink, false);
+        $(oLink).parents('.' + $this.sSP + '-live-update-button:first').remove();
+
+        $this.resumeLiveUpdates();
+    });
+};
+
+/*
+ * Show only one live update notification for all new events.
+ * 
+ * Note. oData.count_old and oData.count_new are also available and can be checked or used in notification popup.  
+ */
+BxTimelineView.prototype.showLiveUpdate = function(oData)
+{
+    if(!oData.code)
+        return;
+
+    var oButton = $(oData.code);
+    var sId = oButton.attr('id');
+    $('#' + sId).remove();
+
+    oButton.prependTo(this.oView);
+};
+
+/*
+ * Show separate live update notification for each new Event.
+ * 
+ * Note. This way to display live update notifications isn't used for now. 
+ * See BxTimelineView::showLiveUpdate method instead.
+ * 
+ * Note. oData.count_old and oData.count_new are also available and can be checked or used in notification popup.  
+ */
+BxTimelineView.prototype.showLiveUpdates = function(oData)
+{
+    if(!oData.code)
+        return;
+
+    var $this = this;
+
+    var oItems = $(oData.code);
+    var sId = oItems.attr('id');
+    $('#' + sId).remove();
+
+    oItems.prependTo('body').dolPopup({
+        position: 'fixed',
+        left: '1rem',
+        top: 'auto',
+        bottom: '1rem',
+        fog: false,
+        onBeforeShow: function() {
+        },
+        onBeforeHide: function() {
+        },
+        onShow: function() {
+            setTimeout(function() {
+                $('.bx-popup-chain.bx-popup-applied:visible:first').dolPopupHide();
+            }, 5000);
+        },
+        onHide: function() {
+            $this.resumeLiveUpdates();
+        }
+    });
+};
+
+BxTimelineView.prototype.previousLiveUpdate = function(oLink)
+{
+    var fPrevious = function() {
+        var sClass = 'bx-popup-chain-item';
+        $(oLink).parents('.' + sClass + ':first').hide().prev('.' + sClass).show();
+    };
+
+    if(!this.pauseLiveUpdates(fPrevious));
+        fPrevious();
+};
+
+BxTimelineView.prototype.hideLiveUpdate = function(oLink)
+{
+    $(oLink).parents('.bx-popup-applied:visible:first').dolPopupHide();
+};
+
+BxTimelineView.prototype.resumeLiveUpdates = function(onLoad)
+{
+    if(!this._bLiveUpdatePaused)
+        return false;
+
+    var $this = this;
+    this.changeLiveUpdates('resume_live_update', function() {
+        $this._bLiveUpdatePaused = false;
+
+        if(typeof onLoad == 'function')
+            onLoad();
+    });
+
+    return true;
+};
+
+BxTimelineView.prototype.pauseLiveUpdates = function(onLoad)
+{
+    if(this._bLiveUpdatePaused)
+        return false;
+
+    var $this = this;
+    this.changeLiveUpdates('pause_live_update', function() {
+        $this._bLiveUpdatePaused = true;
+
+        if(typeof onLoad == 'function')
+            onLoad();
+    });
+
+    return true;
+};
+
+BxTimelineView.prototype.changeLiveUpdates = function(sAction, onLoad)
+{
+    var $this = this;
+    var oParams = this._getDefaultActions();
+    oParams['action'] = sAction;
+
+    jQuery.get(
+        this._sActionsUrl + sAction + '/',
+        oParams,
+        function() {
+            if(typeof onLoad == 'function')
+                onLoad();
+        }
+    );
+};
+
+BxTimelineView.prototype.blink = function(oParent)
+{
+	oParent.find('.' + this.sClassBlink + '-plate:visible').animate({
+		opacity: 0
+	}, 
+	5000, 
+	function() {
+		oParent.find('.' + this.sClassBlink).removeClass(this.sClassBlink);
+	});
+};
+
+
+/*------------------------------------*/
+/*--- Internal (protected) methods ---*/
+/*------------------------------------*/
+BxTimelineView.prototype._getPage = function(oElement, iStart, iPerPage, onLoad)
+{
+    var $this = this;
+
+    if(oElement)
+        this.loadingIn(oElement, true);
+
+    this._oRequestParams.start = iStart;
+    this._oRequestParams.per_page = iPerPage;
+    this._getPosts(oElement, function(oData) {
+        if(oElement)
+            $this.loadingIn(oElement, false);
+
+    	var sItems = $.trim(oData.items);
+
+        if($this.bViewTimeline)
+            $this.oView.find('.' + $this.sClassItems).append($(sItems).hide()).find('.' + $this.sClassItem + ':hidden').bx_anim('show', $this._sAnimationEffect, $this._iAnimationSpeed, function() {
+                $(this).bxProcessHtml();
+
+                //-- Check content to show 'See More'
+                $this.initSeeMore($(this), false);
+
+                //-- Init Flickity
+                $this.initFlickity();
+
+                //--- Init Video Autoplay
+                $this.initVideosAutoplay($this.oView);
+            });
+
+        if($this.bViewOutline)
+            $this.appendMasonry($(sItems).bxProcessHtml(), function(oItems) {
+                //-- Check content to show 'See More'
+                $this.initSeeMore(oItems, false);
+
+                //-- Init Flickity
+                $this.initFlickity();
+
+                //--- Init Video Layout
+                if($this._sVideosAutoplay != 'off') 
+                    $this.initVideos($this.oView);
+            });
+
+    	if(oData && oData.load_more != undefined)
+            $this.oView.find('.' + $this.sSP + '-load-more-holder').html($.trim(oData.load_more));
+
+    	if(oData && oData.back != undefined)
+            $this.oView.find('.' + $this.sSP + '-back-holder').html($.trim(oData.back));
+
+    	if(oData && oData.empty != undefined && !$this.oView.find('.' + $this.sClassItem).length)
+            $this.oView.find('.' + $this.sSP + '-empty-holder').html($.trim(oData.empty));
+
+        if(typeof onLoad == 'function')
+            onLoad(oData);
+    });
+};
+
+BxTimelineView.prototype._getPosts = function(oElement, onComplete)
+{
+    var $this = this;
+    var oData = this._getDefaultData(oElement);
+
+    jQuery.get(
+        this._sActionsUrl + 'get_posts/',
+        oData,
+        function(oData) {
+            if(typeof onComplete === 'function')
+                return onComplete(oData);
+
+            if(oElement)
+                $this.loadingInBlock(oElement, false);
+
+            processJsonData(oData);
+        },
+        'json'
+    );
+};
+
+BxTimelineView.prototype._onGetPosts = function(oData)
+{
+    var $this = this;
+
+    var onComplete = function() {
+        if(oData && oData.go_to != undefined)
+            location.hash = oData.go_to;
+
+        if(oData && oData.load_more != undefined)
+            $this.oView.find('.' + $this.sSP + '-load-more-holder').html($.trim(oData.load_more));
+
+        if(oData && oData.back != undefined)
+            $this.oView.find('.' + $this.sSP + '-back-holder').html($.trim(oData.back));
+
+        if(oData && oData.empty != undefined)
+            $this.oView.find('.' + $this.sSP + '-empty-holder').html($.trim(oData.empty));
+    };
+
+    if(oData && oData.items != undefined) {
+        var sItems = $.trim(oData.items);
+
+        if(this.bViewTimeline) {
+            var oItems = this.oView.find('.' + this.sClassItems);
+            oItems.html(sItems).bxProcessHtml();
+
+            this.blink(oItems);
+            this.initFlickity();
+
+            onComplete();
+            return;
+        }
+
+        if(this.bViewOutline) {
+            oItems = this.oView.find('.' + this.sClassItems);
+            oItems.html(sItems).bxProcessHtml();
+
+            if(this.isMasonry())
+                this.destroyMasonry();
+
+            if(!this.isMasonryEmpty())
+                this.initMasonry();
+
+            this.blink(oItems);
+            this.initFlickity();
+
+            onComplete();
+            return;
+        }
+    }
+};
+
+BxTimelineView.prototype._onGetPost = function(oData)
+{
+    if(!$.trim(oData.item).length) 
+        return;
+
+    var $this = this;
+    var sItem = this._getHtmlId('item', this._oRequestParams, {whole:false}) + oData.id;
+    this.oView.find(sItem).replaceWith($(oData.item).bxProcessHtml());
+    this.oView.find(sItem).find('.bx-tl-item-text .bx-tl-content').checkOverflowHeight(this.sSP + '-overflow', function(oElement) {
+        $this.onFindOverflow(oElement);
+    });
+
+    this.initFlickity();
+};
+
+BxTimelineView.prototype._markPost = function(oLink, iId, iWay, sAction)
+{
+    var oData = this._getDefaultData();
+    oData['id'] = iId;
+
+    $(oLink).parents('.bx-popup-applied:first:visible').dolPopupHide({
+        onHide: function(oPopup) {
+            $(oPopup).remove();
+        }
+    });
+
+    this.loadingInItem($(this._getHtmlId('item', this._oRequestParams, {whole:false}) + iId), true);
+
+    $.post(
+        this._sActionsUrl + sAction + '/',
+        oData,
+        function(oData) {
+        	processJsonData(oData);
+        },
+        'json'
+    );
+};
+
+BxTimelineView.prototype._onMarkPost = function(oData, sAction)
+{
+    var $this = this;
+    var sItem = this._getHtmlId('item', this._oRequestParams, {whole:false}) + oData.id;
+
+    this._oRequestParams.start = 0;
+
+    //--- Mark on Timeline (if available)
+    if(this.bViewTimeline)
+        this._getPosts(this.oView, function(oData) {
+            $(sItem).bx_anim('hide', $this._sAnimationEffect, $this._iAnimationSpeed, function() {
+                $(this).remove();
+
+                processJsonData(oData);
+            });
+        });
+
+    //--- Mark on Outline (if available)
+    if(this.bViewOutline)
+        this._getPosts(this.oView, function(oData) {
+            $this.removeMasonry(sItem, function() {
+                processJsonData(oData);
+            });
+        });
+};

+ 78 - 0
modules/boonex/timeline/updates/12.0.2_12.0.3/source/template/block_async_outline.html

@@ -0,0 +1,78 @@
+<style>
+    .bx-tl-cont-ph-boxes {
+        display: -webkit-flex;
+        display: flex;
+        -webkit-justify-content: space-between;
+        justify-content: space-between;
+    }
+    .bx-tl-cont-ph-boxes .bx-def-box {
+        width: 30%;
+    }
+
+    .bx-cont-ph-u {
+        display: -webkit-flex;
+        display: flex;
+        -webkit-align-items: center;
+        align-items: center;
+    }
+    .bx-cont-ph-ut {
+        -webkit-flex: 0 0 auto;
+        -ms-flex: 0 0 auto;
+        flex: 0 0 auto;
+    }
+    .bx-cont-ph-ui {
+        -webkit-flex: 1 1 auto;
+        -ms-flex: 1 1 auto;
+        flex: 1 1 auto;
+    }
+    
+</style>
+<div class="bx-tl-cont-ph-boxes">
+    <div class="bx-def-box bx-def-padding-topbottom bx-def-round-corners bx-def-color-bg-box bx-def-margin-bottom">
+        <div class="bx-cont-ph-u bx-def-padding">
+            <div class="bx-cont-ph-ut bx-cont-ph bx-def-thumb-size bx-def-thumb bx-def-box-sizing">&nbsp;</div>
+            <div class="bx-cont-ph-ui bx-def-margin-left">
+                <span class="bx-cont-ph-inline" style="width:100%;">&nbsp;</span><br />
+                <span class="bx-cont-ph-inline bx-def-margin-thd-top bx-def-font-small" style="width:70%;">&nbsp;</span>
+            </div>
+        </div>
+        <div class="bx-cont-ph" style="height:20rem;"></div>
+        <div class="bx-def-padding-lefttopright">
+            <span class="bx-cont-ph-inline bx-def-font-h3" style="width:85%;">&nbsp;</span>
+        </div>
+    </div>
+    <div class="bx-def-box bx-def-padding-topbottom bx-def-round-corners bx-def-color-bg-box bx-def-margin-bottom">
+        <div class="bx-cont-ph-u bx-def-padding">
+            <div class="bx-cont-ph-ut bx-cont-ph bx-def-thumb-size bx-def-thumb bx-def-box-sizing">&nbsp;</div>
+            <div class="bx-cont-ph-ui bx-def-margin-left">
+                <span class="bx-cont-ph-inline" style="width:100%;">&nbsp;</span><br />
+                <span class="bx-cont-ph-inline bx-def-margin-thd-top bx-def-font-small" style="width:70%;">&nbsp;</span>
+            </div>
+        </div>
+        <div class="bx-def-padding-rightbottomleft">
+            <div class="bx-cont-ph bx-def-margin-thd-bottom">&nbsp;</div>
+            <div class="bx-cont-ph bx-def-margin-thd-bottom">&nbsp;</div>
+            <div class="bx-cont-ph bx-def-margin-thd-bottom">&nbsp;</div>
+            <div class="bx-cont-ph bx-def-margin-thd-bottom">&nbsp;</div>
+        </div>
+    </div>
+    <div class="bx-def-box bx-def-padding-topbottom bx-def-round-corners bx-def-color-bg-box bx-def-margin-bottom">
+        <div class="bx-cont-ph-u bx-def-padding">
+            <div class="bx-cont-ph-ut bx-cont-ph bx-def-thumb-size bx-def-thumb bx-def-box-sizing">&nbsp;</div>
+            <div class="bx-cont-ph-ui bx-def-margin-left">
+                <span class="bx-cont-ph-inline" style="width:100%;">&nbsp;</span><br />
+                <span class="bx-cont-ph-inline bx-def-margin-thd-top bx-def-font-small" style="width:70%;">&nbsp;</span>
+            </div>
+        </div>
+        <div class="bx-cont-ph" style="height:20rem;"></div>
+        <div class="bx-def-padding-lefttopright">
+            <span class="bx-cont-ph-inline bx-def-font-h3" style="width:85%;">&nbsp;</span>
+        </div>
+    </div>
+</div>
+<script>
+    $(document).ready(function () {
+        var iBlockID = '__id__';
+        getHtmlData($('#bx-page-block-' + iBlockID), bx_append_url_params(document.location.href, 'dynamic=tab&pageBlock=' + iBlockID), undefined, 'post', false, {includedCss: JSON.stringify(aIncludedCss), includedJs: JSON.stringify(aIncludedJs)}, false);
+    });
+</script>

+ 9 - 3
studio/classes/BxDolStudioOAuthOAuth2.php

@@ -28,8 +28,8 @@ class BxDolStudioOAuthOAuth2 extends BxDolStudioOAuth implements iBxDolSingleton
         $this->sSessionKeyCsrfToken = 'bx_studio_store_csrf_token';
         $this->sSessionKeyCsrfToken = 'bx_studio_store_csrf_token';
         $this->sSessionKeyCsrfTokenTime = 'bx_studio_store_csrf_token_time';
         $this->sSessionKeyCsrfTokenTime = 'bx_studio_store_csrf_token_time';
 
 
-        $this->sKey = getParam('sys_oauth_key');
-        $this->sSecret = getParam('sys_oauth_secret');
+        $this->sKey = $this->_getCredential('key');
+        $this->sSecret = $this->_getCredential('secret');
         $this->sApiUrl = BX_DOL_MARKET_URL_ROOT . 'm/oauth2/';
         $this->sApiUrl = BX_DOL_MARKET_URL_ROOT . 'm/oauth2/';
         $this->sScope = 'market';
         $this->sScope = 'market';
         $this->sPageHandle = BX_DOL_URL_STUDIO . 'store.php?page=goodies';
         $this->sPageHandle = BX_DOL_URL_STUDIO . 'store.php?page=goodies';
@@ -155,6 +155,12 @@ class BxDolStudioOAuthOAuth2 extends BxDolStudioOAuth implements iBxDolSingleton
     	return false;
     	return false;
     }
     }
 
 
+    protected function _getCredential($sName)
+    {
+        $sResult = getParam('sys_oauth_' . $sName);
+        return $sResult !== false ? trim($sResult) : '';
+    }
+
     protected function _genState()
     protected function _genState()
     {
     {
         $sResult = $this->_genCsrfToken();
         $sResult = $this->_genCsrfToken();
@@ -173,7 +179,7 @@ class BxDolStudioOAuthOAuth2 extends BxDolStudioOAuth implements iBxDolSingleton
         return $this->_getStateToken();
         return $this->_getStateToken();
     }
     }
 
 
-	protected function _genCsrfToken()
+    protected function _genCsrfToken()
     {
     {
         if(getParam('sys_security_form_token_enable') != 'on' || defined('BX_DOL_CRON_EXECUTE'))
         if(getParam('sys_security_form_token_enable') != 'on' || defined('BX_DOL_CRON_EXECUTE'))
             return false;
             return false;

+ 9 - 0
upgrade/files/12.0.0.RC1-12.0.0/check.php

@@ -0,0 +1,9 @@
+<?php
+
+$mixCheckResult = 'Update can not be applied';
+
+$sVer = $this->oDb->getOne("SELECT `version` FROM `sys_modules` WHERE `name` = 'system'");
+if ('12.0.0.RC1' == $sVer || '12.0.0-RC1' == $sVer)
+    $mixCheckResult = true;
+
+return $mixCheckResult;

+ 192 - 0
upgrade/files/12.0.0.RC1-12.0.0/files/inc/js/classes/BxDolMenuMoreAuto.js

@@ -0,0 +1,192 @@
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    UnaCore UNA Core
+ * @{
+ */
+
+function BxDolMenuMoreAuto(options)
+{
+    this._sObject = options.sObject;
+    this._iItemsStatic = undefined == options.iItemsStatic ? 0 : options.iItemsStatic;
+    this._bItemsStaticOnly = undefined == options.bItemsStaticOnly ? 0 : options.bItemsStaticOnly;
+    this._aHtmlIds = undefined == options.aHtmlIds ? {} : options.aHtmlIds;  
+
+    this._sKeyWidth = 'bx-mma-width';
+
+    this._sClassReady = 'bx-mma-ready';
+    this._sClassItem = '.bx-menu-item';
+    this._sClassItemMore = this._sClassItem + '.bx-menu-item-more-auto';
+    this._sClassItemMoreSubmenu = '.bx-menu-submenu-more-auto';
+    this._sClassItemStatic = 'bx-menu-item-static';
+
+    this._bStaticMode = this._bItemsStaticOnly && this._iItemsStatic > 0;
+    this._bTrackContainerResize = false;
+}
+
+BxDolMenuMoreAuto.prototype.init = function() {
+    var $this = this;
+
+    var oMenu = $('#' + this._aHtmlIds['main']);
+    if(!oMenu.length) 
+        return;
+
+    //--- Initialize ---//
+    var oItemMore = oMenu.find(this._sClassItemMore);
+    var oItemMoreSubmenu = oItemMore.find(this._sClassItemMoreSubmenu);
+
+    for(var i = 0; i < this._iItemsStatic; i++)
+        oItemMore.prevAll(this._sClassItem + ':not(.' + this._sClassItemStatic + '):last').addClass(this._sClassItemStatic);
+
+    var iMenu = 0;
+    oMenu.children(this._sClassItem + ':visible').each(function() {
+        iMenu += $this._getWidth($(this));
+    });
+
+    var iParent = oMenu.parent().width();
+    var iItemMore = oItemMore.outerWidth(true);
+
+    oMenu.css('overflow', 'visible');
+
+    if(iMenu >= iParent || this._bStaticMode)
+        this._moveToSubmenu(oMenu, oItemMore, oItemMoreSubmenu, iParent, iItemMore);
+    else
+        oMenu.parents('.bx-menu-more-auto-wrapper:first').css('overflow', 'visible');
+
+    //--- Add event handlers ---//
+    if(!this._bStaticMode) {
+        $(window).on('resize', function() {
+           $this.update();
+        });
+
+        if(this._bTrackContainerResize)
+            setTimeout(function () {
+                oMenu.find(this._sClassItem).on('resize', function() {
+                    $this.update(true);
+                });
+            }, 200);
+    }
+};
+
+BxDolMenuMoreAuto.prototype.update = function(bForceCalculate)
+{
+    if(this._bStaticMode)
+        return;
+
+    var $this = this;
+    var oMenu = $('#' + this._aHtmlIds['main']);
+    var oItemMore = oMenu.find(this._sClassItemMore);
+    var oItemMoreSubmenu = oItemMore.find(this._sClassItemMoreSubmenu);
+
+    var iMenu = 0;
+    oMenu.children(this._sClassItem + ':visible').each(function() {
+        iMenu += $this._getWidth($(this), bForceCalculate);
+    });
+
+    var iParent = oMenu.parent().width();
+    var iItemMore = oItemMore.outerWidth(true);
+
+    if(iMenu > iParent)
+        this._moveToSubmenu(oMenu, oItemMore, oItemMoreSubmenu, iParent, iItemMore);
+    if(iMenu < iParent)
+        this._moveFromSubmenu(oMenu, oItemMore, oItemMoreSubmenu, iParent, iMenu);
+};
+
+BxDolMenuMoreAuto.prototype.more = function(oElement)
+{
+    var oElement = $(oElement);
+
+    oElement.parents('li:first').find('#' + this._aHtmlIds['more_auto_popup']).dolPopup({
+        pointer: {
+            el: oElement
+        }, 
+        moveToDocRoot: false
+    });
+}
+
+BxDolMenuMoreAuto.prototype._moveToSubmenu = function(oMenu, oItemMore, oItemMoreSubmenu, iParent, iItemMore)
+{
+    var $this = this;
+
+    var bRelocateOthers = false;
+    var iWidthTotal = iItemMore;
+    var oSubmenuItemFirst = oItemMoreSubmenu.children(this._sClassItem + ':first');
+
+    oMenu.children(this._sClassItem + ':not(' + this._sClassItemMore + ')').each(function() {
+        var oItem = $(this);
+        var iItem = $this._getWidth(oItem);
+        if(($this._bStaticMode || bRelocateOthers || iWidthTotal + iItem > iParent) && !oItem.hasClass($this._sClassItemStatic)) {
+            oItem.addClass('bx-def-color-bg-hl-hover');
+            oItem.find('a').each(function() {
+                if($(this).hasClass('bx-btn'))
+                    $(this).removeClass('bx-btn').addClass('!bx-btn');
+
+                if($(this).hasClass('bx-btn-height'))
+                    $(this).removeClass('bx-btn-height').addClass('!bx-btn-height');
+            });
+
+            if(!oSubmenuItemFirst.length)
+                oItemMoreSubmenu.append(oItem.detach());
+            else
+                oSubmenuItemFirst.before(oItem.detach());
+            bRelocateOthers = true;
+            return;
+        }
+
+        iWidthTotal += iItem;
+    });
+
+    if(oItemMoreSubmenu.find('li').length)
+        oItemMore.show(function() {
+            oMenu.addClass($this._sClassReady).parents('.bx-menu-more-auto-wrapper:first').css('overflow', 'visible');
+        });
+};
+
+BxDolMenuMoreAuto.prototype._moveFromSubmenu = function(oMenu, oItemMore, oItemMoreSubmenu, iParent, iMenu)
+{
+    var $this = this;
+
+    var bStopRelocation = false;
+    var iWidthTotal = iMenu;
+    oItemMoreSubmenu.children(this._sClassItem).each(function() {
+        if(bStopRelocation) 
+            return;
+
+        var oItem = $(this);
+        var iItem = $this._getWidth(oItem);
+        if(iWidthTotal + iItem > iParent) {
+            bStopRelocation = true;
+            return;
+        }
+
+        oItem.removeClass('bx-def-color-bg-hl-hover');
+        oItem.find('a').each(function() {
+            if($(this).hasClass('!bx-btn'))
+                $(this).removeClass('!bx-btn').addClass('bx-btn');
+
+            if($(this).hasClass('!bx-btn-height'))
+                $(this).removeClass('!bx-btn-height').addClass('bx-btn-height');
+        });
+
+        oItemMore.before(oItem.detach());
+        iWidthTotal += iItem;
+    });
+
+    if(!oItemMoreSubmenu.find('li').length)
+        oItemMore.hide();
+};
+
+BxDolMenuMoreAuto.prototype._getWidth = function(oItem, bForceCalculate)
+{
+    var iItem = parseInt(oItem.attr(this._sKeyWidth));
+    if(!bForceCalculate && iItem)
+        return iItem;
+
+    iItem = oItem.outerWidth(true);
+    if(iItem)
+        oItem.attr(this._sKeyWidth, iItem);
+
+    return iItem;
+}
+/** @} */

+ 12 - 0
upgrade/files/12.0.0.RC1-12.0.0/files/inc/version.inc.php

@@ -0,0 +1,12 @@
+<?php defined('BX_DOL') or defined('BX_DOL_INSTALL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    UnaCore UNA Core
+ * @{
+ */
+
+define('BX_DOL_VERSION', '12.0.0'); ///< system files version, for DB version @see bx_get_ver, DB and files version must match
+
+/** @} */

+ 540 - 0
upgrade/files/12.0.0.RC1-12.0.0/files/template/css/cmts.css

@@ -0,0 +1,540 @@
+    /*--- General Styles ---*/
+    div.cmts {}
+
+    ul.cmts {
+    	position: relative;
+        margin: 0px;
+        padding: 0px;
+        list-style: none;
+    }
+    ul.cmts-margin,
+    div.cmt-reply-margin {
+    	margin-top: 20px;
+    	margin-top: 1.2rem;
+
+		padding-left: 60px;
+    	padding-left: 3.75rem;
+    }
+    li.cmt {
+    	position: relative;
+    }
+    li.cmt-no .bx-msg-box-container {
+        margin-top: 0px;
+        margin-bottom: 0px;
+    }
+    li.cmt-err {
+        color: red;
+    }
+    li.cmt-hidden {
+       display: none;
+    }
+    li.cmt-replacement {
+    	position: relative;
+		height: 30px;
+		height: 1.875rem;
+		background-color: #ededed;
+		text-indent: 10px;
+    	text-indent: 0.5rem;
+		line-height: 30px;
+    	line-height: 1.875rem;
+    	overflow: hidden;
+    }
+    li.cmt-blink div.cmt-blink-plate {
+		display: block;
+    }
+    div.cmt-cnt {
+		position: relative;
+    }
+
+	/*--- More ---*/
+    li.cmt-more,
+	li.cmt-more-root {
+		text-transform:uppercase;
+	}
+
+	div.cmt-more-cont {
+		font-weight: bold;
+	}
+
+	
+    li.cmt-more-root div.cmt-more-cont {
+    	position: relative;
+    }
+    li.cmt-more-root .bx-btn {
+    	position: relative;
+		float: none;
+    	display: inline-block;
+    	text-transform: uppercase;
+    }    
+
+    /*--- Comment ---*/
+	div.cmt-avatar {
+		position: absolute;
+		top: 0px;
+		left: 0px;
+    	text-align: center;
+    }
+    div.cmt-avatar .sys-icon {
+    	font-size: 60px;
+		font-size: 3.75rem;
+    }
+    div.cmt-info {
+    	position: relative;
+    }
+    div.cmt-blink-plate {
+        position: absolute;
+        display: none;
+        top: -10px;
+        left: -10px;
+        width: 100%;
+        height: 100%;
+        padding: 10px;
+        background-color: rgb(255, 244, 213);
+        background-color: rgba(255, 234, 193, 0.5);
+    }
+    div.cmt-head {
+        text-align: left;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        overflow: hidden;
+    }
+    div.cmt-head > span {
+        vertical-align: middle;
+    }
+    span.cmt-reply-to a {
+        text-decoration: none;
+    }
+    span.cmt-reply-to a > i,
+    span.cmt-reply-to a > span,
+    span.cmt-reply-to a > div {
+        vertical-align: middle;
+    }
+    span.cmt-reply-to a .bx-base-pofile-unit-wo-info {
+        display: inline-block;
+    }
+    span.cmt-reply-to a .bx-base-pofile-unit-wo-info .bx-def-unit-img .bx-base-pofile-unit-thumb {
+        display: block;
+        border-width: 1px;
+    }
+    span.cmt-reply-to a .bx-base-pofile-unit-wo-info .bx-base-pofile-unit-online {
+        display: none;
+    }
+    span.cmt-reply-to a .bx-def-icon-size {
+        width: 1.0rem;
+        height: 1.0rem;
+        line-height: 0.875rem;
+        font-size: 0.6rem;
+    }
+    span.cmt-posted-ago {
+        text-transform: lovercase;
+    }
+    span.cmt-points {
+        text-transform: lovercase;
+    }
+
+    /*--- unit meta ---*/
+    .cmt-meta.bx-base-general-unit-meta {
+        display: inline-block;
+
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        text-align: left;
+    }
+    .cmt-meta.bx-base-general-unit-meta .bx-menu-custom.bx-menu-custom-hor {
+        margin: 0;
+    }
+
+    /*--- Comment Body ---*/
+    div.cmt-cont {
+        position: relative;
+    	text-align: left;
+    }
+    div.cmt-cont .bullet {
+        padding: 0px 5px;
+        padding: 0px 0.3rem;
+    }
+    div.cmt-cont .cmt-body > p:first-child {
+        margin-top: 0;
+        margin-bottom: 0;
+    }
+    div.cmt-cont .cmt-body img {
+        max-width: 100%;
+    	height: auto;
+    }
+    div.cmt-cont .cmt-post-reply .bx-form-element-wrapper {
+        margin-top: 10px;
+    	margin-top: 0.5rem;
+    }
+    div.cmt-cont .cmt-post-reply .bx-form-element-wrapper:first-child {
+        margin-top: 0px;
+    }
+    span.cmt-body-see-more a {
+        font-weight: bold;
+    }
+    div.cmt-reactions .bx-vote-counter-wrapper {
+        line-height: 2.0rem;
+        font-size: 1.2rem;
+    }
+    div.cmt-attached-preview {
+        overflow:hidden;
+    }
+    div.cmt-attached-preview,
+    div.cmt-attached-preview img {
+    	width: 100px;
+    	width: 6.25rem;
+    	height: 100px;
+    	height: 6.25rem;
+    }
+    div.cmt-attached-preview {
+    	position: relative;
+    	float: left;
+	}
+    div.cmt-attached-preview img {
+        background-position: center center;
+        background-repeat: no-repeat;
+        background-size: contain;
+    }
+
+    /*--- Comment Actions ---*/
+    div.cmt-actions {
+        position: relative;
+        text-align: left;
+    }
+    div.cmt-meta-ago,
+    div.cmt-comment-manage-link, 
+    div.cmt-actions ul.bx-menu-hor,
+    div.cmt-points-wrp {
+        position: relative;
+        float: left;
+    }
+    div.cmt-actions li .bx-vote {
+       margin-right: 1.25rem;
+    }
+    div.cmt-comment-manage .bx-menu-ver li {
+		white-space: nowrap;
+    }
+
+    /*--- Add Comment/Reply Styles ---*/
+    div.cmt-reply {
+		position: relative;
+    }
+	div.cmt-post-reply {
+        position: relative;
+    }
+
+    /*--- Add Comment/Reply Form Styles ---*/
+    form.cmt-post-reply .bx-form-input-textarea {
+		height: 64px;
+    	height: 4rem;
+    }
+    form.cmt-post-reply div#bx-form-element-cmt_image,
+    form.cmt-post-reply .bx-form-input-files-uploaders {
+		margin-top: 0px;
+    }
+
+    a.cmts-uploader-button {
+		position: absolute;
+    	z-index: 1;
+    	right: 0px;
+
+    	text-decoration: none;
+    }
+    div.cmts-uploader-file {
+        position: relative;
+    	float: left;
+    }
+    div.cmts-uploader-file-preview {
+        overflow: hidden;
+    }
+    div.cmts-uploader-file-preview,
+    div.cmts-uploader-file-preview img,
+    div.cmts-uploader-file-title {
+        width: 100px;
+    	width: 6.25rem;
+    }
+    div.cmts-uploader-file-preview,
+    div.cmts-uploader-file-preview img {
+        height: 100px;
+    	height: 6.25rem;
+    }
+    div.cmts-uploader-file-preview img {
+        background-position: center center;
+        background-repeat: no-repeat;
+    }
+    div.cmts-uploader-file-title {
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
+    
+    /*--- Minified Post Form ---*/
+    div.cmt-reply.cmt-reply-min div.cmt-body {
+        display: none;
+    }
+    div.cmt-reply div.cmt-body-min {
+        position: relative;
+        display: none;
+    }
+    div.cmt-reply.cmt-reply-min div.cmt-body-min {
+        display: block;
+    }
+    div.cmt-reply div.cmt-body-min .cmt-bm-user {
+        position: absolute;
+        top: 0;
+        left: 0;
+    }
+    div.cmt-reply div.cmt-body-min .cmt-bm-content {
+        display: -webkit-flex;
+        display: flex;
+        -webkit-align-items: center;
+        align-items: center;
+        -webkit-justify-content: stretch;
+        justify-content: stretch;
+    }
+    div.cmt-reply div.cmt-body-min .cmt-bm-content .bx-form-element-wrapper {
+        position: relative;
+        width: 100%;
+    }
+
+    /*--- Live Update Alert Styles ---*/
+    div.cmt-lu-button {
+        position: relative;
+        text-align: center;
+    }
+    @supports(position:sticky) {
+        div.cmt-lu-button {
+            position: sticky;
+            top: 1rem;
+            z-index: 1;
+        }
+    }
+    @supports(position:-webkit-sticky) {
+        div.cmt-lu-button {
+            position: -webkit-sticky;
+            top: 1rem;
+            z-index: 1;
+        }
+    }
+    div.cmt-lu-button .bx-btn {
+        display: inline-block;
+        float: none;
+    }
+
+    /*--- Live Update Notifications Styles ---*/
+    .cmt-lu-notif {
+        position: relative;
+        display: block;
+    }
+    div.cmt-lu-notif-cnt {
+        position: relative;
+    }
+    div.cmt-lu-notif-avatar {
+        position: absolute;
+        top: 0px;
+        left: 0px;
+        text-align: center;
+    }
+    div.cmt-lu-notif-info {
+        position: realtive;
+        display: -webkit-flex;
+        display: flex;
+        -webkit-align-items: center;
+        align-items: center;
+    }
+    div.cmt-lu-notifi-username {
+        white-space: nowrap;
+        text-overflow: ellipsis;
+        overflow: hidden;
+    }
+
+/*--- Comment Element Styles ---*/
+div.cmt div.cmt-element-holder,
+div.cmt div.cmt-counter-holder {
+    position: relative;
+    float: left;
+}
+span.cmt span.cmt-element-holder,
+span.cmt span.cmt-counter-holder {
+    position: relative;
+    display: inline-block;
+    vertical-align: middle;
+}
+
+.cmt .cmt-element-holder,
+.cmt .cmt-counter-holder {
+    line-height: 20px;
+    line-height: 1.25rem;
+}
+
+.cmt-button .cmt-element-holder,
+.cmt-button .cmt-counter-holder {
+    line-height: 36px;
+    line-height: 2.2rem;
+}
+
+.cmt-button-small .cmt-element-holder,
+.cmt-button-small .cmt-counter-holder {
+    line-height: 24px;
+    line-height: 1.6rem;
+}
+
+.cmt .cmt-element-holder .cmt-do-comment.cmt-disabled,
+.cmt .cmt-element-holder .cmt-do-comment.cmt-disabled .sys-icon {
+    color: #ddd;
+}
+
+.cmt-button .cmt-counter-holder .bx-btn-height,
+.cmt-button-small .cmt-counter-holder .bx-btn-height {
+    font-size: 1.5rem;
+}
+
+.cmt-link .cmt-counter-holder.bx-btn-border {
+    border-width: 0px;
+}
+
+/* +++ Comment Element: Counter +++ */
+.cmt-counter {
+    position: relative;
+    display: -webkit-flex;
+    display: flex;
+    -webkit-align-items: center;
+    align-items: center;
+    -webkit-flex-wrap:nowrap;
+    flex-wrap:nowrap;
+}
+.cmt-counter > * {
+    position: relative;
+}
+.cmt-counter div.cmt-counter-icon,
+.cmt-counter div.bx-base-pofile-unit-wo-info {
+    margin-left: -0.5rem;
+}
+.cmt-counter div.cmt-counter-icon:first-child,
+.cmt-counter div.bx-base-pofile-unit-wo-info:first-child {
+    margin-left: 0 !important;
+}
+.bx-media-phone .cmt-counter div.cmt-counter-icon,
+.bx-media-phone .cmt-counter div.bx-base-pofile-unit-wo-info {
+    margin-left: -1.0rem;
+}
+.bx-media-tablet .bx-layout-column-thin .cmt-counter div.bx-base-pofile-unit-wo-info,
+.bx-media-tablet .bx-layout-column-half .cmt-counter div.bx-base-pofile-unit-wo-info {
+    display: none;
+}
+.cmt-counter div.cmt-counter-icon {
+    box-sizing: border-box;
+    z-index: 2;
+
+    margin-right: 0.5rem;
+
+    background-color: rgba(232, 232, 232, 1.0);
+    border: 1px solid #ffffff;
+    border-radius: 1rem;
+
+    text-align: center;
+}
+.cmt-counter div.cmt-counter-icon .sys-icon {
+    vertical-align: top;
+}
+.cmt-counter .bx-def-icon-size {
+    width: 2.0rem;
+    height: 2.0rem;
+
+    font-size: 1.0rem;
+}
+.cmt-counter p.bx-base-pofile-unit-thumb.bx-def-icon-size {
+    display: -webkit-flex;
+    display: flex;
+
+    -webkit-justify-content: center;
+    justify-content: center;
+
+    -webkit-align-items: center;
+    align-items: center;
+
+    font-size: 1.0rem;
+}
+.cmt-counter .bx-def-icon-size-min-height {
+    min-height: 1.0rem;
+}
+
+.cmt-counter .bx-def-icon-size-max-height {
+    max-height: 1.0rem;
+}
+
+.cmt-counter .bx-def-icon-size-left-indent {
+    margin-left: 1.25rem;
+}
+
+.cmt-counter .bx-def-unit-img .bx-base-pofile-unit-thumb {
+    display: block;
+    border-width: 1px;
+}
+
+.cmt-counter .bx-base-pofile-unit-online {
+    display: none;
+}
+
+
+/*----------------------*/
+/*--- Reviews Styles ---*/
+/*----------------------*/
+
+/*--- Mood Element Styles ---*/
+div.cmt-mood {
+    position: relative;
+    display: inline-block;
+}
+div.cmt-mood-underlay {}
+div.cmt-mood-slider {
+    position: absolute;
+    z-index: 1;
+    top: 0px;
+    left: 0px;
+    white-space: nowrap;
+    overflow: hidden;
+}
+div.cmt-mood a.cmt-mood-button,
+div.cmt-mood i.cmt-mood-star {
+    position: relative;
+    display: inline-block;
+    vertical-align: top;
+    height: 16px;
+    width: 16px;
+    margin: 0;
+    padding: 0;
+    text-align: center;
+}
+div.cmt-mood-underlay i.cmt-mood-star {
+    color: rgba(255, 204, 102, 1);
+}
+div.cmt-mood-slider i.cmt-mood-star,
+div.cmt-mood-buttons a:hover i.cmt-mood-star {
+    color: rgba(255, 100, 0, 1);
+}
+
+div.cmt-mood-buttons {
+    position: absolute;
+    z-index: 2;
+    top: 0px;
+    left: 0px;
+}
+div.cmt-mood-buttons a:hover {
+	text-decoration: none;
+}
+div.cmt-mood-buttons i.cmt-mood-star {
+    color: transparent;
+}
+.cmt-meta .bx-badges-list,
+.cmt-meta .bx-badge-compact {
+    display: inline-block;
+}
+
+/*--- Rating Block Styles ---*/
+.cmts-box-rating div.cmt-mood i.cmt-mood-star,
+.cmt-rating-element div.cmt-mood i.cmt-mood-star,
+.cmt-rating-element div.cmt-mood a.cmt-mood-button {
+    height: 24px;
+    width: 24px;
+    font-size: 20px;
+}

+ 80 - 0
upgrade/files/12.0.0.RC1-12.0.0/files/template/css/report.css

@@ -0,0 +1,80 @@
+/*--- Do Form ---*/
+div.bx-report-do-form {}
+div.bx-report-do-form-cnt {
+    min-width: 220px;
+    min-width: 13.75rem;
+    overflow: hidden;
+}
+
+/*--- Reported By List ---*/
+div.bx-report-by-list {}
+div.bx-report-by-list-cnt {
+    max-height: 400px;
+    max-height: 25rem;
+    min-width: 220px;
+    min-width: 13.75rem;
+    max-width: 320px;
+    max-width: 20rem;
+    overflow: auto;
+}
+div.bx-report-by-list div.bx-def-unit {
+    float: none;
+    margin-right: 0px;
+    margin-bottom: 0px;
+}
+div.bx-report-bi-thumbnail,
+div.bx-report-bi-info {
+    position: relative;
+}
+div.bx-report-bi-info p {
+    margin: 0px; 
+}
+
+/*--- Report Element Styles ---*/
+div.bx-report div.bx-report-element-holder,
+div.bx-report div.bx-report-counter-holder {
+    position: relative;
+    float: left;
+}
+
+/*--- Report Element Styles ---*/
+.bx-report-report .bx-report-element-holder,
+.bx-report-report .bx-report-counter-holder {
+    line-height: 20px;
+    line-height: 1.25rem;
+}
+
+.bx-report-button .bx-report-element-holder,
+.bx-report-button .bx-report-counter-holder {
+    line-height: 36px;
+    line-height: 2.2rem;
+}
+
+.bx-report-button-small .bx-report-element-holder,
+.bx-report-button-small .bx-report-counter-holder {
+    line-height: 24px;
+    line-height: 1.6rem;
+}
+
+.bx-report .bx-report-element-holder .bx-report-do-report.bx-report-disabled,
+.bx-report .bx-report-element-holder .bx-report-do-report.bx-report-disabled .sys-icon {
+    color: #ddd;
+}
+
+.bx-report .bx-report-element-holder .bx-btn.bx-report-do-report.bx-report-reported:not(.bx-btn-disabled):not(.bx-report-disabled) {
+    background-color: #efefef;
+}
+
+.bx-menu-item-more-popup .bx-menu-submenu-more-auto .bx-report .bx-report-element-holder .bx-btn.bx-report-do-report.bx-report-reported:not(.bx-btn-disabled):not(.bx-report-disabled) {
+    background-color: transparent;
+}
+
+.bx-report-button .bx-report-counter-holder .bx-btn-height,
+.bx-report-button-small .bx-report-counter-holder .bx-btn-height {
+    font-size: 1.5rem;
+}
+
+/*--- Counter Styles ---*/
+.bx-report-counter-holder .bx-report-counter {
+    line-height: normal;
+}

+ 101 - 0
upgrade/files/12.0.0.RC1-12.0.0/files/template/css/score.css

@@ -0,0 +1,101 @@
+/*--- Comment Voted By ---*/
+div.bx-score-by-list {}
+div.bx-score-by-list-cnt {
+	max-height: 200px;
+	max-height: 12.5rem;
+	min-width: 220px;
+	min-width: 13.75rem;
+	overflow: auto;
+}
+div.bx-score-by-list div.bx-base-pofile-unit {
+	float: none;
+	margin-right: 0px;
+	margin-bottom: 0px;
+}
+div.bx-score-by-item {
+	display: -webkit-flex;
+    display: flex;
+    align-items: center;
+    -webkit-align-items: center;
+	flex-wrap: nowrap;
+    -webkit-flex-wrap: nowrap;
+}
+div.bx-score-by-item .bx-score-bi-user,
+div.bx-score-by-item .bx-score-bi-info,
+div.bx-score-by-item .bx-score-bi-vote {
+	-webkit-flex: 0 1 auto; 
+    -ms-flex: 0 1 auto; 
+    flex: 0 1 auto;
+}
+div.bx-score-by-item .bx-score-bi-info {
+	-webkit-flex-grow: 3; 
+    flex-grow: 3;
+}
+div.bx-score-by-item .bx-score-bi-vote {
+	width: 1.25rem;
+    height: 1.25rem;
+}
+
+/*--- Vote Element Styles ---*/
+div.bx-score-element-holder,
+div.bx-score-counter-holder {
+    position: relative;
+    float: left;
+
+    line-height: 20px;
+    line-height: 1.25rem;
+}
+
+.bx-score-button .bx-score-element-holder,
+.bx-score-button .bx-score-counter-holder {
+    line-height: 36px;
+    line-height: 2.2rem;
+}
+
+.bx-score-button-small .bx-score-element-holder,
+.bx-score-button-small .bx-score-counter-holder {
+    line-height: 24px;
+    line-height: 1.6rem;
+}
+
+.bx-score-element-holder .bx-score-do-vote.bx-score-disabled,
+.bx-score-element-holder .bx-score-do-vote.bx-score-disabled .sys-icon {
+    color: #ddd;
+}
+
+.bx-score:not(.bx-score-button):not(.bx-score-button-small) .bx-score-counter-holder.bx-btn-border {
+    border-width: 0px;
+}
+
+.bx-score-button .bx-score-counter-holder .bx-btn-height,
+.bx-score-button-small .bx-score-counter-holder .bx-btn-height {
+    font-size: 1.5rem;
+}
+
+/*--- Counter Styles ---*/
+.bx-score-counter .bx-score-counter-label.bx-def-valign-center .bx-score-counter-text {
+    line-height: normal;
+}
+.bx-score-counter span.bx-score-counter-icon {
+    position: relative;
+    box-sizing: border-box;
+
+    width: 2.0rem;
+    height: 2.0rem;
+
+    background-color: rgba(232, 232, 232, 1.0);
+    border: 1px solid #ffffff;
+    border-radius: 1rem;
+
+    line-height: normal;
+    font-size: 1.0rem;
+}
+.bx-score-counter span.bx-score-counter-icon:not(.bx-def-align-center) {
+    display: inline-block;
+
+    line-height: 1.9rem;
+    text-align: center;
+}
+.bx-score-counter span.bx-score-counter-icon .sys-icon {
+    vertical-align: top;
+}

+ 92 - 0
upgrade/files/12.0.0.RC1-12.0.0/files/template/css/view.css

@@ -0,0 +1,92 @@
+/*--- Comment Viewed By ---*/
+div.bx-view-by-list {}
+div.bx-view-by-list-cnt {
+	max-height: 200px;
+	max-height: 12.5rem;
+	min-width: 220px;
+	min-width: 13.75rem;
+	overflow: auto;
+}
+div.bx-view-user {
+    position: relative;
+}
+div.bx-view-user-avatar {
+    position: absolute;
+    top: 0px;
+    left: 0px;
+}
+div.bx-view-user-info {
+    display: -webkit-flex;
+    display: flex;
+    -webkit-align-items: center;
+    align-items: center;
+}
+div.bx-view-user-name {
+    text-overflow: ellipsis;
+    overflow: hidden;
+}
+div.bx-view-user-name a.bx-view-user-name {
+    font-weight: 700;
+}
+div.bx-view-user-name span.bx-view-user-info {
+    white-space: nowrap;
+}
+
+/*--- View Element Styles ---*/
+div.bx-view-element-holder,
+div.bx-view-counter-holder {
+    position: relative;
+    float: left;
+
+    line-height: 20px;
+    line-height: 1.25rem;
+}
+
+.bx-view-button .bx-view-element-holder,
+.bx-view-button .bx-view-counter-holder {
+    line-height: 36px;
+    line-height: 2.2rem;
+}
+
+.bx-view-button-small .bx-view-element-holder,
+.bx-view-button-small .bx-view-counter-holder {
+    line-height: 24px;
+    line-height: 1.6rem;
+}
+
+.bx-view-element-holder .bx-view-do-view.bx-view-disabled,
+.bx-view-element-holder .bx-view-do-view.bx-view-disabled .sys-icon {
+    color: #ddd;
+}
+
+.bx-view-button .bx-view-counter-holder .bx-btn-height,
+.bx-view-button-small .bx-view-counter-holder .bx-btn-height {
+    font-size: 1.5rem;
+}
+
+/*--- Counter Styles ---*/
+.bx-view-counter .bx-view-counter-label.bx-def-valign-center .bx-view-counter-text {
+    line-height: normal;
+}
+.bx-view-counter span.bx-view-counter-icon {
+    position: relative;
+    box-sizing: border-box;
+
+    width: 2.0rem;
+    height: 2.0rem;
+
+    background-color: rgba(232, 232, 232, 1.0);
+    border: 1px solid #ffffff;
+    border-radius: 1rem;
+
+    font-size: 1.0rem;
+}
+.bx-view-counter span.bx-view-counter-icon:not(.bx-def-align-center) {
+    display: inline-block;
+
+    line-height: 1.9rem;
+    text-align: center;
+}
+.bx-view-counter span.bx-view-counter-icon .sys-icon {
+    vertical-align: top;
+}

+ 383 - 0
upgrade/files/12.0.0.RC1-12.0.0/files/template/css/vote.css

@@ -0,0 +1,383 @@
+/*--- Voted By ---*/
+div.bx-vote-by-list {}
+div.bx-vote-by-list-cnt {
+    max-height: 200px;
+    max-height: 12.5rem;
+    min-width: 220px;
+    min-width: 13.75rem;
+    overflow: auto;
+}
+div.bx-vote-by-list div.bx-base-pofile-unit {
+    float: none;
+    margin-right: 0px;
+    margin-bottom: 0px;
+}
+
+/*--- Vote Element Styles ---*/
+div.bx-vote div.bx-vote-element-holder,
+div.bx-vote div.bx-vote-counter-holder {
+	position: relative;
+	float: left;
+}
+
+
+/*----------------------------------*/
+/*--- Likes based Element Styles ---*/
+/*----------------------------------*/
+.bx-vote-likes .bx-vote-element-holder,
+.bx-vote-likes .bx-vote-counter-holder {
+    line-height: 20px;
+    line-height: 1.25rem;
+}
+
+.bx-vote-likes-button .bx-vote-element-holder,
+.bx-vote-likes-button .bx-vote-counter-holder {
+    line-height: 36px;
+    line-height: 2.2rem;
+}
+
+.bx-vote-likes-button-small .bx-vote-element-holder,
+.bx-vote-likes-button-small .bx-vote-counter-holder {
+    line-height: 24px;
+    line-height: 1.6rem;
+}
+
+.bx-vote-likes .bx-vote-element-holder .bx-vote-do-vote.bx-vote-disabled,
+.bx-vote-likes .bx-vote-element-holder .bx-vote-do-vote.bx-vote-disabled .sys-icon {
+    color: #ddd;
+}
+
+.bx-vote-likes-button .bx-vote-counter-holder .bx-btn-height,
+.bx-vote-likes-button-small .bx-vote-counter-holder .bx-btn-height {
+    font-size: 1.5rem;
+}
+
+.bx-vote-likes .bx-vote-counter-holder.bx-btn-border {
+    border-width: 0px;
+}
+
+
+/*--------------------------------------*/
+/*--- Reactions based Element Styles ---*/
+/*--------------------------------------*/
+.bx-vote-reactions .bx-vote-element-holder,
+.bx-vote-reactions .bx-vote-counter-holder {
+	line-height: 20px;
+	line-height: 1.25rem;
+}
+
+.bx-vote-reactions-button .bx-vote-element-holder,
+.bx-vote-reactions-button .bx-vote-counter-holder {
+	line-height: 36px;
+	line-height: 2.2rem;
+}
+
+.bx-vote-reactions-button-small .bx-vote-element-holder,
+.bx-vote-reactions-button-small .bx-vote-counter-holder {
+	line-height: 24px;
+	line-height: 1.6rem;
+}
+
+.bx-vote-reactions .bx-vote-element-holder .bx-vote-do-vote.bx-vote-disabled,
+.bx-vote-reactions .bx-vote-element-holder .bx-vote-do-vote.bx-vote-disabled .sys-icon {
+	color: #ddd;
+}
+
+.bx-vote-reactions-button .bx-vote-counter-holder,
+.bx-vote-reactions-button-small .bx-vote-counter-holder {
+	font-size: 1.5rem;
+}
+
+.bx-vote-reactions .bx-vote-element-holder a.bx-vote-do-vote {
+    position: relative;
+    display: inline-block;
+}
+
+.bx-vote-reactions .bx-vote-counter-holder.bx-btn-border {
+    border-width: 0px;
+}
+
+.bx-vote-counter-wrapper-reactions .bx-vote-counter {
+    display: inline-block;
+}
+.bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound {
+    position: relative;
+}
+.bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound .bx-vote-counter {
+    display: block;
+}
+.bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-divided a.bx-vote-counter {
+    margin-right: 0.5rem;
+}
+.bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound a.bx-vote-counter.total-count,
+.bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound span.bx-vote-counter.total-count {
+    margin-left: 0.5rem;
+}
+.bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound span.bx-vote-counter:not(.total-count) {
+    width: 2.0rem;
+    height: 2.0rem;
+    box-sizing: border-box;
+
+    margin-left: -0.5rem;
+}
+.bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound div.bx-vote-counter-wrapper-cnt {
+    margin-left: 0.5rem;
+}
+.bx-media-phone .bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound span.bx-vote-counter:not(.total-count),
+.bx-media-tablet .bx-layout-column-thin .bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound span.bx-vote-counter:not(.total-count),
+.bx-media-tablet .bx-layout-column-half .bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound span.bx-vote-counter:not(.total-count) {
+    margin-left: -1.0rem;
+}
+.bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound span.bx-vote-counter:not(.total-count) span.bx-vote-counter-text {
+    display: none;
+}
+.bx-vote-counter-wrapper-reactions.bx-vc-hidden,
+.bx-vote-counter-wrapper-reactions .bx-vote-counter.bx-vc-hidden {
+    display: none;
+}
+.bx-menu-object-sys_vote_reactions_do li .sys-icon {
+    font-size: 1.5rem;
+}
+
+/*--- Counter Styles ---*/
+.bx-vote-counter .bx-vote-counter-label.bx-def-valign-center .bx-vote-counter-text {
+    line-height: normal;
+}
+
+.bx-vote-counter.bx-vote-counter-likes span.bx-vote-counter-icon,
+.bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound .bx-vote-counter.bx-vote-counter-reactions span.bx-vote-counter-icon {
+    position: relative;
+    box-sizing: border-box;
+
+    width: 2.0rem;
+    height: 2.0rem;
+
+    background-color: rgba(232, 232, 232, 1.0);
+    border: 1px solid #ffffff;
+    border-radius: 1rem;
+
+    line-height: normal;
+    font-size: 1.0rem;
+}
+.bx-vote-counter.bx-vote-counter-likes span.bx-vote-counter-icon:not(.bx-def-align-center),
+.bx-vote-counter-wrapper-reactions.bx-vote-counter-wrapper-reactions-compound .bx-vote-counter.bx-vote-counter-reactions span.bx-vote-counter-icon:not(.bx-def-align-center) {
+    display: inline-block;
+
+    line-height: 1.9rem;
+    text-align: center;
+}
+.bx-vote-counter span.bx-vote-counter-icon .sys-icon {
+    vertical-align: top;
+}
+
+
+/*--- Voted By ---*/
+div.bx-vote-by-list {}
+div.bx-vote-by-list-cnt {
+    max-height: 200px;
+    max-height: 12.5rem;
+    min-width: 220px;
+    min-width: 13.75rem;
+    overflow: auto;
+}
+div.bx-vote-by-list div.bx-base-pofile-unit {
+    float: none;
+    margin-right: 0px;
+    margin-bottom: 0px;
+}
+.bx-vote-bls-header {
+    display: -webkit-flex;
+    display: flex;
+
+    margin: -1.25rem -1.25rem 0 -1.25rem;
+    
+    border-bottom-color: #e6f0fa;
+    border-bottom-width: 2px;
+}
+.bx-vote-bls-content {
+    margin-left: -0.5rem;
+    margin-right: -0.5rem;
+}
+.bx-vote-bls-title,
+.bx-vote-bls-submenu {
+    -webkit-flex: 0 1 auto; 
+    -ms-flex:  0 1 auto; 
+    flex:  0 1 auto;
+    line-height: 3.125rem;
+}
+.bx-vote-bls-title,
+.bx-vote-bls-submenu-cnt,
+.bx-vote-bls-filler {
+    height: 3.125rem;
+}
+.bx-vote-bls-title,
+.bx-vote-bls-filler {
+    -webkit-flex-grow: 3;
+    flex-grow: 3;
+
+    border-bottom: 2px solid rgba(232, 232, 232, 1.0);
+}
+.bx-vote-bls-title {
+    display: none;
+
+    white-space: nowrap;
+    font-size: 1rem;
+    font-weight: 400;
+}
+.bx-vote-bls-submenu {
+    overflow-x: auto;
+    overflow-y: hidden;
+
+    -webkit-overflow-scrolling: touch;
+}
+.bx-vote-bls-submenu-cnt {
+    box-sizing: border-box;
+    padding: 0 0.5rem;
+    border-bottom: 2px solid rgba(232, 232, 232, 1.0);
+}
+.bx-vote-bls-submenu::-webkit-scrollbar {
+    width: 0.5rem;
+}
+.bx-vote-bls-submenu::-webkit-scrollbar-track {
+    -webkit-border-radius: 0.5rem;
+    border-radius: 0.5rem;
+
+    background-color: rgba(0, 0, 0, 0.1); 
+}
+.bx-vote-bls-submenu::-webkit-scrollbar-thumb {
+    -webkit-border-radius: 0.5rem;
+    border-radius: 0.5rem;
+
+    background: rgba(255, 255, 255, 0.9); 
+    -webkit-box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.5);
+}
+.bx-vote-bls-submenu::-webkit-scrollbar-thumb:window-inactive {
+    background: rgba(255, 255, 255, 0.4); 
+}
+.bx-vote-bls-submenu-cnt ul {
+    display: -webkit-flex;
+    display: flex;
+}
+.bx-vote-bls-submenu-cnt ul li {
+    -webkit-flex: 0 1 auto; 
+    -ms-flex:  0 1 auto; 
+    flex:  0 1 auto;
+    box-sizing: border-box;
+    height: 3.125rem;
+
+    border-bottom: 2px solid rgba(232, 232, 232, 1.0);
+    border-radius: 0;
+
+    line-height: 3.125rem;
+    white-space: nowrap;
+}
+.bx-vote-bls-submenu-cnt ul li div {
+    padding: 0 0.625rem;
+}
+.bx-vote-bls-submenu-cnt ul li.bx-menu-inter-act {
+    border-bottom-color: #364f6b;
+}
+.bx-vote-bls-submenu-cnt ul li.bx-menu-inter-act > div {
+    font-weight: bold;
+}
+.bx-vote-bls-content .bx-vote-by-list:not(.bx-vote-bl-summary) {
+    display: none;
+}
+.bx-vote-bls-content .bx-vote-by-items {
+    padding-left: 0.5rem;
+    padding-right: 0.5rem;
+}
+.bx-vote-bls-content .bx-vote-by-item {
+    position: relative;
+    display: -webkit-flex;
+    display: flex;
+    -webkit-justify-content: space-between;
+    justify-content: space-between;
+    -webkit-align-items: center;
+    align-items: center;
+}
+.bx-vote-bls-content .bx-vote-by-item:first-child {
+    padding-top: 1rem;
+}
+.bx-vote-bls-content .bx-vote-by-item:last-child {
+    padding-bottom: 0;
+}
+
+.bx-vote-bls-content .bx-vote-by-item:before,
+.bx-vote-bls-content .bx-vote-by-item:after {
+    display: none;
+}
+
+
+/*----------------------------------*/
+/*--- Stars based Element Styles ---*/
+/*----------------------------------*/
+.bx-vote-stars,
+.bx-vote-stars .bx-vote-do,
+.bx-vote-stars .bx-vote-element-holder,
+.bx-vote-stars .bx-vote-counter-holder {
+    position: relative;
+    display: inline-block;
+    vertical-align: top;
+
+    line-height: 16px;
+    line-height: 1rem;
+    font-size: 16px;
+    font-size: 1rem;
+}
+
+.bx-vote-stars .bx-vote-counter-holder {
+    border-width: 0px;
+}
+
+
+/*--- Stars Styles ---*/
+div.bx-vote-element {
+    position: relative;
+    display: inline-block;
+}
+div.bx-vote-underlay {}
+div.bx-vote-slider {
+    position: absolute;
+    z-index: 1;
+    top: 0px;
+    left: 0px;
+    white-space: nowrap;
+    overflow: hidden;
+}
+.bx-vote-stars .bx-vote-element-holder a.bx-vote-button,
+.bx-vote-stars .bx-vote-element-holder i.bx-vote-star,
+.bx-vote-stars .bx-vote-element-holder span.bx-vote-star {
+    position: relative;
+    display: inline-block;
+    vertical-align: top;
+    height: 16px;
+    width: 16px;
+    margin: 0;
+    padding: 0;
+    text-align: center;
+}
+div.bx-vote-underlay i.bx-vote-star,
+div.bx-vote-underlay span.bx-vote-star {
+    color: rgba(255, 204, 102, 1);
+}
+div.bx-vote-slider i.bx-vote-star,
+div.bx-vote-slider span.bx-vote-star,
+div.bx-vote-buttons a:hover i.bx-vote-star,
+div.bx-vote-buttons a:hover span.bx-vote-star {
+    color: rgba(255, 100, 0, 1);
+}
+
+div.bx-vote-buttons {
+    position: absolute;
+    z-index: 2;
+    top: 0px;
+    left: 0px;
+}
+div.bx-vote-buttons a:hover {
+	text-decoration: none;
+}
+div.bx-vote-buttons i.bx-vote-star,
+div.bx-vote-buttons span.bx-vote-star {
+	color: transparent;
+}

+ 1369 - 0
upgrade/files/12.0.0.RC1-12.0.0/files/template/scripts/BxBaseCmts.php

@@ -0,0 +1,1369 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    UnaBaseView UNA Base Representation Classes
+ * @{
+ */
+
+/**
+ * @see BxDolCmts
+ */
+class BxBaseCmts extends BxDolCmts
+{
+    protected static $_sTmplContentElementBlock;
+    protected static $_sTmplContentElementInline;
+    protected static $_sTmplContentDoCommentLabel;
+    protected static $_sTmplContentCounter;
+
+    protected $_sTmplNameItem;
+    protected $_sTmplNameItemContent;
+
+    protected $_sJsObjClass;
+    protected $_sJsObjName;
+    protected $_sStylePrefix;
+
+    protected $_aHtmlIds;
+
+    protected $_aElementDefaults;
+
+    function __construct( $sSystem, $iId, $iInit = true, $oTemplate = false)
+    {
+        parent::__construct($sSystem, $iId, $iInit, $oTemplate);
+        if (empty($sSystem))
+            return;
+
+        $this->_sTmplNameItem = 'comment.html';
+        $this->_sTmplNameItemContent = 'comment_content.html';
+
+        $this->_sJsObjClass = 'BxDolCmts';
+        $this->_sJsObjName = 'oCmts' . bx_gen_method_name($sSystem, array('_' , '-')) . $iId;
+        $this->_sStylePrefix = isset($this->_aSystem['root_style_prefix']) ? $this->_aSystem['root_style_prefix'] : 'cmt';
+
+        $sHtmlId = str_replace(array('_' , ' '), array('-', '-'), $sSystem) . '-' . $iId;
+
+        $this->_aHtmlIds = array(
+            'main' => 'bx-cmt-' . $sHtmlId,
+            'counter' => 'bx-cmt-counter-' . $sHtmlId
+        );
+
+        $this->_aElementDefaults = array(
+            'show_do_comment_as_button' => false,
+            'show_do_comment_as_button_small' => false,
+            'show_do_comment_image' => false,
+            'show_do_comment_icon' => true,
+            'show_do_comment_label' => false,
+            'show_counter' => true,
+            'show_counter_empty' => false
+        );
+
+        if(empty(self::$_sTmplContentElementBlock))
+            self::$_sTmplContentElementBlock = $this->_oTemplate->getHtml('comment_element_block.html');
+
+        if(empty(self::$_sTmplContentElementInline))
+            self::$_sTmplContentElementInline = $this->_oTemplate->getHtml('comment_element_inline.html');
+
+        if(empty(self::$_sTmplContentDoCommentLabel))
+            self::$_sTmplContentDoCommentLabel = $this->_oTemplate->getHtml('comment_do_comment_label.html');
+
+        if(empty(self::$_sTmplContentCounter))
+            self::$_sTmplContentCounter = $this->_oTemplate->getHtml('comment_counter.html');
+
+        $this->_oTemplate->addJsTranslation('_sys_txt_cmt_loading');
+    }
+
+    /**
+     * Add comments CSS/JS
+     */
+    public function addCssJs ()
+    {
+        $oForm = BxDolForm::getObjectInstance($this->_sFormObject, $this->_sFormDisplayPost);
+        $oForm->addCssJs();
+    }
+
+    public function getJsObjectName()
+    {
+        return $this->_sJsObjName;
+    }
+
+    /**
+     * Get initialization section of comments box
+     *
+     * @return string
+     */
+    public function getJsScript($aBp = array(), $aDp = array())
+    {
+        $bMinPostForm = isset($aDp['min_post_form']) ? $aDp['min_post_form'] : $this->_bMinPostForm;
+
+        $aParams = array(
+            'sObjName' => $this->_sJsObjName,
+            'sRootUrl' => BX_DOL_URL_ROOT,
+            'sSystem' => $this->getSystemName(),
+            'iAuthorId' => $this->_getAuthorId(),
+            'iObjId' => $this->getId(),
+            'sBaseUrl' => $this->getBaseUrl(),
+            'sPostFormPosition' => $this->_aSystem['post_form_position'],
+            'sBrowseType' => $this->_sBrowseType,
+            'sDisplayType' => $this->_sDisplayType,
+            'iDisplayStructure' => isset($aDp['structure']) && !empty($aDp['structure']) ? 1 : 0,
+            'iMinPostForm' => $bMinPostForm ? 1 : 0,
+            'sStylePrefix' => $this->_sStylePrefix,
+        );
+
+        $this->addCssJs();
+        return $this->_oTemplate->_wrapInTagJsCode("if(window['" . $this->_sJsObjName . "'] == undefined) var " . $this->_sJsObjName . " = new " . $this->_sJsObjClass . "(" . json_encode($aParams) . "); " . $this->_sJsObjName . ".cmtInit();");
+    }
+
+    /**
+     * get full comments block with initializations
+     */
+    function getCommentsBlock($aBp = array(), $aDp = array())
+    {
+        $mixedResult = $this->isViewAllowed();
+        if($mixedResult !== CHECK_ACTION_RESULT_ALLOWED)
+            return $mixedResult;
+        
+        $this->_getParams($aBp, $aDp);
+
+        //add live update
+        $this->actionResumeLiveUpdate();
+
+        $sServiceCall = BxDolService::getSerializedService('system', 'get_live_update', array($this->_sSystem, $this->_iId, $this->_getAuthorId(), '{count}'), 'TemplCmtsServices');
+        BxDolLiveUpdates::getInstance()->add($this->_sSystem . '_live_updates_cmts_' . $this->_iId, 1, $sServiceCall);
+        //add live update
+
+        $sCaption = _t($this->_aT['block_comments_title'], $this->getCommentsCountAll());
+        $sContent = $this->_oTemplate->parseHtmlByName('comments_block.html', array(
+            'system' => $this->_sSystem,
+            'list_anchor' => $this->getListAnchor(),
+            'id' => $this->getId(),
+            'comments' => $this->getComments($aBp, $aDp),
+            'post_form_top' => $this->getFormBoxPost($aBp, array_merge($aDp, array('type' => $this->_sDisplayType, 'position' => BX_CMT_PFP_TOP))),
+            'post_form_bottom'  => $this->getFormBoxPost($aBp, array_merge($aDp, array('type' => $this->_sDisplayType, 'position' => BX_CMT_PFP_BOTTOM))),
+            'view_image_popup' => $this->_getViewImagePopup(),
+            'script' => $this->getJsScript($aBp, $aDp)
+        ));
+
+        return $aDp['in_designbox'] ? DesignBoxContent($sCaption, $sContent, BX_DB_DEF, $this->_getControlsBox()) : array(
+            'title' => $sCaption,
+            'content' => $sContent,
+            'menu' => $this->_getControlsBox(),
+        );
+    }
+
+    /**
+     * get comments list for specified parent comment
+     *
+     * @param array $aBp - browse params array
+     * @param array $aDp - display params array
+     *
+     */
+    function getComments($aBp = array(), $aDp = array())
+    {
+        $this->_prepareParams($aBp, $aDp);
+
+        $aCmts = $this->getCommentsArray($aBp['vparent_id'], $aBp['filter'], $aBp['order'], $aBp['start'], $aBp['per_view']);
+        if(empty($aCmts) || !is_array($aCmts)) {
+            if((int)$aBp['parent_id'] == 0 && !isLogged()) {
+                $oPermalink = BxDolPermalinks::getInstance();
+                return MsgBox(_t('_cmt_msg_login_required', $oPermalink->permalink('page.php?i=login'), $oPermalink->permalink('page.php?i=create-account')));
+            }
+
+            return isset($aDp['show_empty']) && $aDp['show_empty'] === true ? $this->_getEmpty($aDp) : '';
+        }
+
+        $sCmts = '';
+        foreach($aCmts as $k => $aCmt)
+            $sCmts .= $this->getComment($aCmt, $aBp, $aDp);
+
+        $sCmts = $this->_getMoreLink($sCmts, $aBp, $aDp);
+        return $sCmts;
+    }
+
+    public function getCommentsByStructure($aBp = array(), $aDp = array())
+    {
+        if(empty($aDp['structure']))
+            return isset($aDp['show_empty']) && $aDp['show_empty'] === true ? $this->_getEmpty($aDp) : '';
+
+        $aBp['count'] = count($aDp['structure']);
+        $this->_prepareParams($aBp, $aDp);
+        $aDp['structure'] = array_slice($aDp['structure'], $aBp['start'], $aBp['per_view'], true);
+
+        $sCmts = '';
+        foreach($aDp['structure'] as $iCmtId => $aCmt)
+            $sCmts .= $this->getComment($iCmtId, $aBp, $aDp);
+
+        $sCmts = $this->_getMoreLink($sCmts, $aBp, $aDp);
+        return $sCmts;
+    }    
+
+    /**
+     * get comment view block with initializations
+     */
+    function getCommentBlock($iCmtId = 0, $aBp = array(), $aDp = array())
+    {
+        $mixedResult = $this->isViewAllowed();
+        if($mixedResult !== CHECK_ACTION_RESULT_ALLOWED)
+            return $mixedResult;
+
+        $aBp = array_merge(array('type' => $this->_sBrowseType), $aBp);
+        $aDp = array_merge(array('type' => BX_CMT_DISPLAY_THREADED), $aDp);
+
+        //--- Beg: Using pregenerated structure
+        $mixedStructure = $this->getCommentStructure((int)$iCmtId, $aBp, $aDp);
+        if($mixedStructure !== false)
+            $aDp['structure'] = $mixedStructure;
+        //--- End: Using pregenerated structure
+
+        $sComment = $this->getComment($iCmtId, $aBp, $aDp);
+        if (!$sComment)
+            return '';
+
+        return $this->_oTemplate->parseHtmlByName('comment_block.html', array(
+            'system' => $this->_sSystem,
+            'id' => $this->getId(),
+            'comment' => $sComment,
+            'view_image_popup' => $this->_getViewImagePopup(), 
+            'script' => $this->getJsScript($aBp, $aDp)
+        ));
+    }
+    
+    /**
+     * get one just posted comment
+     *
+     * @param  int    $iCmtId - comment id
+     * @return string
+     */
+    function getComment($mixedCmt, $aBp = array(), $aDp = array())
+    {
+        $iUserId = $this->_getAuthorId();
+        $aCmt = !is_array($mixedCmt) ? $this->getCommentRow((int)$mixedCmt) : $mixedCmt;
+        if (!$aCmt)
+            return '';
+
+        list($sAuthorName, $sAuthorLink, $sAuthorIcon) = $this->_getAuthorInfo($aCmt['cmt_author_id']);
+
+        $sClass = $sClassCnt = '';
+        if(isset($aCmt['vote_rate']) && (float)$aCmt['vote_rate'] < $this->_aSystem['viewing_threshold']) {
+            $this->_oTemplate->pareseHtmlByName('comment_hidden.html', array(
+                'js_object' => $this->_sJsObjName,
+                'id' => $aCmt['cmt_id'],
+                'title' => bx_process_output(_t('_hidden_comment', $sAuthorName)),
+                'bx_if:show_replies' => array(
+                    'condition' => $aCmt['cmt_replies'] > 0,
+                    'content' => array(
+                        'replies' => _t('_Show N replies', $aCmt['cmt_replies'])
+                    )
+                )
+            ));
+
+            $sClass = ' ' . $this->_sStylePrefix . '-hidden';
+        }
+
+        if($aCmt['cmt_author_id'] == $iUserId)
+            $sClass .= ' ' . $this->_sStylePrefix . '-mine';
+
+        if(!empty($aDp['blink']) && in_array($aCmt['cmt_id'], $aDp['blink']))
+            $sClass .= ' ' . $this->_sStylePrefix . '-blink';
+
+        if(!empty($aDp['class_comment']))
+            $sClass .= ' ' . $aDp['class_comment'];
+
+        if(!empty($aDp['class_comment_content']))
+            $sClassCnt .= ' ' . $aDp['class_comment_content'];
+
+        $sActions = $this->_getActionsBox($aCmt, $aDp);
+
+        $aTmplReplyTo = array();
+        if((int)$aCmt['cmt_parent_id'] != 0) {
+            $aParent = $this->getCommentRow($aCmt['cmt_parent_id']);
+
+            if(!empty($aParent) && is_array($aParent)) {
+                $oProfile = $this->_getAuthorObject($aParent['cmt_author_id']);
+                $sParAuthorName = $oProfile->getDisplayName();
+                $sParAuthorUnit = $oProfile->getUnit(0, array('template' => array('name' => 'unit_wo_info_links', 'size' => 'icon')));
+
+                $aTmplReplyTo = array(
+                    'style_prefix' => $this->_sStylePrefix,
+                    'par_cmt_link' => $this->getItemUrl($aCmt['cmt_parent_id']),
+                    'par_cmt_title' => bx_html_attribute(_t('_in_reply_to_x', $sParAuthorName)),
+                    'par_cmt_author' => $sParAuthorName,
+                    'par_cmt_author_unit' => $sParAuthorUnit
+                );
+            }
+        }
+
+        $sReplies = '';
+        if(!empty($aDp)) {
+            $aDp['show_empty'] = false;
+
+            if(!empty($aDp['structure'][$aCmt['cmt_id']]) && is_array($aDp['structure'][$aCmt['cmt_id']])) {
+                if(!empty($aDp['structure'][$aCmt['cmt_id']]['items'])) {
+                    $aDp['structure'] = $aDp['structure'][$aCmt['cmt_id']]['items'];
+                    $sReplies = $this->getCommentsByStructure(array('parent_id' => $aCmt['cmt_id'], 'type' => $aBp['type']), $aDp);
+                }
+            } 
+            else if((int)$aCmt['cmt_replies'] > 0 && $aDp['type'] == BX_CMT_DISPLAY_THREADED)
+                $sReplies = $this->getComments(array('parent_id' => $aCmt['cmt_id'], 'vparent_id' => $aCmt['cmt_id'], 'type' => $aBp['type']), $aDp);
+        }
+
+        $aTmplVarsMeta = array();
+        if(!empty($this->_sMenuObjMeta)) {
+            $oMenuMeta = BxDolMenu::getObjectInstance($this->_sMenuObjMeta, $this->_oTemplate);
+            if($oMenuMeta) {
+                $oMenuMeta->setCmtsData($this, $aCmt['cmt_id']);
+
+                $aTmplVarsMeta = array(
+                    'style_prefix' => $this->_sStylePrefix,
+                    'meta' => $oMenuMeta->getCode()
+                );
+            }
+        }
+
+        $sContent = $this->_getContent($aCmt);
+
+        $sResult = $this->_oTemplate->parseHtmlByName($this->_sTmplNameItem, array_merge(array(
+            'system' => $this->_sSystem,
+            'style_prefix' => $this->_sStylePrefix,
+            'js_object' => $this->_sJsObjName,
+            'id' => $aCmt['cmt_id'],
+            'anchor' => $this->getItemAnchor($aCmt['cmt_id']),
+            'class' => $sClass,
+            'class_cnt' => $sClassCnt,
+            'bx_if:show_reply_to' => array(
+                'condition' => !empty($aTmplReplyTo),
+                'content' => $aTmplReplyTo
+            ),
+            'bx_if:meta' => array(
+                'condition' => !empty($aTmplVarsMeta),
+                'content' => $aTmplVarsMeta
+            ),
+            'bx_if:show_pinned' => array(
+                'condition' => (int)$aCmt['cmt_pinned'] > 0,
+                'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
+                )
+            ),
+            'content' => $sContent,
+            'actions' => $sActions,
+            'replies' =>  $sReplies,
+        ), $this->_getTmplVarsAuthor($aCmt)));
+        
+        bx_alert('system', 'view_comment', $aCmt['cmt_id'], 0, array('comment' => $aCmt, 'system' => $this->_sSystem, 'override_result' => &$sResult));
+        
+        return $sResult;
+    }
+
+    public function getCommentStructure($iCmtId, $aBp = array(), $aDp = array())
+    {
+        $aRoot = $this->getCommentRow((int)$iCmtId);
+
+        $aBps = $aBp;
+        if(!empty($aRoot))
+            $aBps['parent_id'] = $aRoot['cmt_id'];
+        $this->_prepareStructureBp($aDp['type'], $aBps);
+
+        $iLevel = 0;
+        $aStructure = array();
+        $this->_getStructure($aRoot, $aBps, $iLevel, $aStructure);
+
+        return !empty($aStructure) && is_array($aStructure) ? $aStructure : false;
+    }
+
+    function getCommentSearch($iCmtId, &$sAddon)
+    {
+        $aBp = array();
+        $aDp = array(
+            'type' => BX_CMT_DISPLAY_FLAT, 
+            'view_only' => true
+        );
+
+        if(empty($sAddon))
+            $sAddon = $this->getJsScript($aBp, $aDp);
+
+        return $this->_oTemplate->parseHtmlByName('comment_search.html', array(
+            'comment' => $this->getComment($iCmtId, $aBp, $aDp),
+            'view_image_popup' => $this->_getViewImagePopup(), 
+        )); 
+    }
+
+    /**
+     * get one comment for "Live Search"
+     *
+     * @param  int    $iCmtId - comment id
+     * @return string
+     */
+    function getCommentLiveSearch($mixedCmt, $aParams = array())
+    {
+        $aCmt = !is_array($mixedCmt) ? $this->getCommentRow((int)$mixedCmt) : $mixedCmt;
+
+        list($sAuthorName, $sAuthorLink, $sAuthorIcon) = $this->_getAuthorInfo($aCmt['cmt_author_id']);
+        $bAuthorIcon = !empty($sAuthorIcon);
+
+        $sViewLink = $this->getViewUrl($aCmt['cmt_id']);
+        if(empty($sViewLink))
+            $sViewLink = '#';
+
+        return $this->_oTemplate->parseHtmlByName('comment_live_search.html', array(
+            'bx_if:show_icon' => array(
+                'condition' => $bAuthorIcon,
+                'content' => array(
+                    'author_icon' => $sAuthorIcon,
+        			'view_link' => $sViewLink
+                )
+            ),
+            'bx_if:show_icon_empty' => array(
+                'condition' => !$bAuthorIcon,
+                'content' => array()
+            ),
+            'view_link' => $sViewLink,
+            'text' => BxTemplFunctions::getInstance()->getStringWithLimitedLength(strip_tags($aCmt['cmt_text']), $this->_sSnippetLenthLiveSearch),
+            'sample' => isset($aParams['txt_sample_single']) ? _t($aParams['txt_sample_single']) : ''
+        ));
+    }
+
+    function getFormBoxPost($aBp = array(), $aDp = array())
+    {
+        return $this->_getFormBox(BX_CMT_ACTION_POST, $aBp, $aDp);
+    }
+
+    function getFormBoxEdit($aBp = array(), $aDp = array())
+    {
+        return $this->_getFormBox(BX_CMT_ACTION_EDIT, $aBp, $aDp);
+    }
+
+    function getFormPost($iCmtParentId = 0, $aDp = array())
+    {
+        return $this->_getFormPost($iCmtParentId, $aDp);
+    }
+
+    function getFormEdit($iCmtId, $aDp = array())
+    {
+        return $this->_getFormEdit($iCmtId, $aDp);
+    }
+
+    function getLiveUpdate($iCountOld = 0, $iCountNew = 0)
+    {
+        $iCount = (int)$iCountNew - (int)$iCountOld;
+        if($iCount < 0)
+            return '';
+
+        $aComments = $this->_oQuery->getCommentsBy(array('type' => 'latest', 'object_id' => $this->_iId, 'author' => $this->_getAuthorId(), 'others' => 1, 'start' => '0', 'per_page' => $iCount));
+        if(empty($aComments) || !is_array($aComments))
+            return '';
+
+        $aComment = array_shift($aComments);
+        if(empty($aComment) || !is_array($aComment))
+            return '';
+
+        $sJsObject = $this->getJsObjectName();
+        return $this->_oTemplate->parseHtmlByName('comments_lu_button.html', array(
+            'style_prefix' => $this->_sStylePrefix,
+            'html_id' => $this->getNotificationId(),
+            'onclick_show' => "javascript:" . $sJsObject . ".goToBtn(this, '" . $this->getItemAnchor($aComment['cmt_id']) . "', '" . $aComment['cmt_id'] . "');",
+        ));
+    }
+
+    function getLiveUpdates($iCountOld = 0, $iCountNew = 0)
+    {
+        $bShowAll = true;
+        $bShowActions = false;
+
+        $iCount = (int)$iCountNew - (int)$iCountOld;
+        if($iCount < 0)
+            return '';
+
+        $aComments = $this->_oQuery->getCommentsBy(array('type' => 'latest', 'object_id' => $this->_iId, 'author' => $this->_getAuthorId(), 'others' => 1, 'start' => '0', 'per_page' => $iCount));
+        if(empty($aComments) || !is_array($aComments))
+            return '';
+
+        $sJsObject = $this->getJsObjectName();
+
+        $iUserId = $this->_getAuthorId();
+        $bModerator = $this->isModerator();
+
+        $aComments = array_reverse($aComments);
+        $iComments = count($aComments);
+
+        $aTmplVarsNotifs = array();
+        foreach($aComments as $iIndex => $aComment) {
+            $iCommentId = $aComment['cmt_id'];
+
+            $sShowOnClick = "javascript:" . $sJsObject . ".goTo(this, '" .  $this->getItemAnchor($iCommentId) . "', '" . $iCommentId . "');";
+            $sReplyOnClick = "javascript:" . $sJsObject . ".goToAndReply(this, '" . $this->getItemAnchor($iCommentId) . "', '" . $iCommentId . "');";
+
+            $iAuthorId = (int)$aComment['cmt_author_id'];
+            if($iAuthorId < 0) {
+                if(abs($iAuthorId) == $iUserId)
+                    continue;
+                else if($bModerator)
+                    $iAuthorId *= -1;
+            }
+
+            $oAuthor = $this->_getAuthorObject($iAuthorId);
+            $sAuthorName = $oAuthor->getDisplayName();
+
+            $aTmplVarsNotifs[] = array(
+                'bx_if:show_as_hidden' => array(
+                    'condition' => !$bShowAll && $iIndex < ($iComments - 1),
+                    'content' => array(),
+                ),
+                'item' => $this->_oTemplate->parseHtmlByName('comments_lu_notifications.html', array(
+                    'style_prefix' => $this->_sStylePrefix,
+                    'onclick_show' => $sShowOnClick,
+                    'onclick_reply' => $sReplyOnClick,
+                    'author_link' => $oAuthor->getUrl(), 
+                    'author_title' => bx_html_attribute($sAuthorName),
+                    'author_name' => $sAuthorName,
+                    'author_unit' => $oAuthor->getUnit(0, array('template' => 'unit_wo_info_links')), 
+                    'text' => _t('_cmt_txt_added_sample')
+                )),
+                'bx_if:show_previous' => array(
+                    'condition' => $bShowActions && $iIndex > 0,
+                    'content' => array(
+                        'onclick_previous' => $sJsObject . '.previousLiveUpdate(this)'
+                    )
+                ),
+                'bx_if:show_close' => array(
+                    'condition' => $bShowActions,
+                    'content' => array(
+                        'onclick_close' => $sJsObject . '.hideLiveUpdate(this)'
+                    )
+                )
+            );
+        }
+
+        return $this->_oTemplate->parseHtmlByName('popup_chain.html', array(
+            'html_id' => $this->getNotificationId(),
+            'bx_repeat:items' => $aTmplVarsNotifs
+        ));
+    }
+
+    public function getElementBlock($aParams = array())
+    {
+        $aParams['usage'] = BX_CMT_USAGE_BLOCK;
+
+        return $this->getElement($aParams);
+    }
+
+    public function getElementInline($aParams = array())
+    {
+        $aParams['usage'] = BX_CMT_USAGE_INLINE;
+
+        return $this->getElement($aParams);
+    }
+
+    public function getElement($aParams = array())
+    {
+    	$aParams = array_merge($this->_aElementDefaults, $aParams);
+
+        $bShowDoCommentAsButtonSmall = isset($aParams['show_do_comment_as_button_small']) && $aParams['show_do_comment_as_button_small'] == true;
+        $bShowDoCommentAsButton = !$bShowDoCommentAsButtonSmall && isset($aParams['show_do_comment_as_button']) && $aParams['show_do_comment_as_button'] == true;
+        $bShowCounterEmpty = isset($aParams['show_counter_empty']) && $aParams['show_counter_empty'] == true;
+
+        $iObjectId = $this->getId();
+        $iAuthorId = $this->_getAuthorId();
+        $iAuthorIp = $this->_getAuthorIp();
+
+        $iCount = $this->getCommentsCountAll();
+        $bCount = (int)$iCount != 0;
+
+        $isAllowedComment = $this->isPostAllowed();
+
+        //--- Do Comment
+        $bTmplVarsDoComment = $this->_isShowDoComment($aParams, $isAllowedComment, $bCount);
+        $aTmplVarsDoComment = array();
+        if($bTmplVarsDoComment) {
+            $sClass = '';
+            if($bShowDoCommentAsButton)
+                $sClass = 'bx-btn';
+            else if ($bShowDoCommentAsButtonSmall)
+                $sClass = 'bx-btn bx-btn-small';
+
+            if(!$isAllowedComment)
+                $sClass .= $bShowDoCommentAsButton || $bShowDoCommentAsButtonSmall ? ' bx-btn-disabled' : 'bx-cmts-disabled';
+
+            $aTmplVarsDoComment = array(
+                'style_prefix' => $this->_sStylePrefix,
+                'do_comment' => $this->_oTemplate->parseLink($this->getListUrl(), $this->_getLabelDo($aParams), array(
+                    'class' => $this->_sStylePrefix . '-do-comment ' . $this->_sStylePrefix . '-dc ' . $sClass,
+                    'title' => _t($this->_getTitleDo())
+                )),
+            );
+        }
+
+        //--- Counter
+        $bTmplVarsCounter = $this->_isShowCounter($aParams, $isAllowedComment, $bCount);
+
+        $aTmplVarsCounter = array();
+        if($bTmplVarsCounter)
+            $aTmplVarsCounter = array(
+                'style_prefix' => $this->_sStylePrefix,
+                'bx_if:show_hidden' => array(
+                    'condition' => !$bShowCounterEmpty && !$bCount,
+                    'content' => array()
+                ),
+                'counter' => $this->getCounter($aParams)
+            );
+
+        if(!$bTmplVarsDoComment && !$bTmplVarsCounter)
+            return '';
+
+        $sTmplName = $this->{'_getTmplElement' . bx_gen_method_name(!empty($aParams['usage']) ? $aParams['usage'] : BX_CMT_USAGE_DEFAULT)}();
+        return $this->_oTemplate->parseHtmlByContent($sTmplName, array(
+            'style_prefix' => $this->_sStylePrefix,
+            'html_id' => $this->_aHtmlIds['main'],
+            'class' => $this->_sStylePrefix . ($bShowDoCommentAsButton ? '-button' : '') . ($bShowDoCommentAsButtonSmall ? '-button-small' : ''),
+            'count' => $iCount,
+            'bx_if:show_do_comment' => array(
+                'condition' => $bTmplVarsDoComment,
+                'content' => $aTmplVarsDoComment
+            ),
+            'bx_if:show_counter' => array(
+                'condition' => $bTmplVarsCounter,
+                'content' => $aTmplVarsCounter
+            ),
+            'script' => ''
+        ));
+    }
+
+    public function getCounter($aParams = array())
+    {
+        $bShowEmpty = isset($aParams['show_counter_empty']) && $aParams['show_counter_empty'] == true;
+        $bShowDoCommentAsButtonSmall = isset($aParams['show_do_comment_as_button_small']) && $aParams['show_do_comment_as_button_small'] == true;
+        $bShowDoCommentAsButton = !$bShowDoCommentAsButtonSmall && isset($aParams['show_do_comment_as_button']) && $aParams['show_do_comment_as_button'] == true;
+
+        $iCount = (int)$this->getCommentsCountAll();
+        if($iCount == 0 && !$bShowEmpty)
+            return '';
+
+        $sClass = $this->_sStylePrefix . '-counter';
+        if($bShowDoCommentAsButtonSmall)
+            $sClass .= ' bx-btn-small-height';
+        if($bShowDoCommentAsButton)
+            $sClass .= ' bx-btn-height';
+
+        $iCmtsLimit = 5;
+        $aCmts = $this->_oQuery->getCommentsBy(array('type' => 'object_id', 'object_id' => $this->getId(), 'order_way' => 'desc', 'start' => 0, 'per_page' => $iCmtsLimit * 4));
+        $aCmts = array_reverse($aCmts);
+
+        $aTmplVarsProfiles = array();
+        foreach($aCmts as $aCmt) {
+            $iAuthor = (int)$aCmt['cmt_author_id'];
+            if(array_key_exists($iAuthor, $aTmplVarsProfiles))
+                continue;
+
+            $oAuthor = BxDolProfile::getInstanceMagic($iAuthor);
+            if(!$oAuthor)
+                continue;
+
+            $aTmplVarsProfiles[$iAuthor] = array(
+                'icon' => $oAuthor->getUnit(0, array('template' => array('name' => 'unit_wo_info_links', 'size' => 'icon'))) 
+            );
+
+            if(count($aTmplVarsProfiles) >= $iCmtsLimit)
+                break;
+        }
+        $aTmplVarsProfiles = array_values($aTmplVarsProfiles);
+
+        $sHref = !empty($aParams['overwrite_counter_link_href']) ? $aParams['overwrite_counter_link_href'] : $this->getListUrl();
+        $sOnclick = '';
+        if(!empty($aParams['overwrite_counter_link_onclick']))
+            $sOnclick = $aParams['overwrite_counter_link_onclick'];
+
+        return $this->_oTemplate->parseHtmlByContent($this->_getTmplCounter(), array(
+            'id' => $this->_aHtmlIds['counter'],
+            'class' => $sClass,
+            'href' => $sHref,
+            'bx_if:show_onclick' => array(
+                'condition' => !empty($sOnclick),
+                'content' => array(
+                    'onclick' => $sOnclick
+                )
+            ),
+            'content' => $this->_getCounterLabel($iCount),
+            'bx_repeat:profiles' => $aTmplVarsProfiles,
+            'bx_if:show_icon' => array(
+                'condition' => $bShowEmpty || !empty($aTmplVarsProfiles),
+                'content' => array(
+                    'sp' => $this->_sStylePrefix
+                )
+            )
+        ));
+    }
+
+    protected function _getLabelDo($aParams = array())
+    {
+        return $this->_oTemplate->parseHtmlByContent($this->_getTmplLabelDo(), array(
+            'style_prefix' => $this->_sStylePrefix,
+            'bx_if:show_image' => array(
+                'condition' => isset($aParams['show_do_comment_image']) && $aParams['show_do_comment_image'] == true,
+                'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
+                    'src' => $this->_getImageDo()
+                )
+            ),
+            'bx_if:show_icon' => array(
+                'condition' => isset($aParams['show_do_comment_icon']) && $aParams['show_do_comment_icon'] == true,
+                'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
+                    'name' => $this->_getIconDo()
+                )
+            ),
+            'bx_if:show_text' => array(
+                'condition' => isset($aParams['show_do_comment_label']) && $aParams['show_do_comment_label'] == true,
+                'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
+                    'text' => _t($this->_getTitleDo())
+                )
+            )
+        ));
+    }
+
+    protected function _getCounterLabel($iCount)
+    {
+        return (int)$iCount != 0 ? _t('_cmt_txt_counter', $iCount) : _t('_cmt_txt_counter_empty');
+    }
+
+    protected function _getTmplElementBlock()
+    {
+        return self::$_sTmplContentElementBlock;
+    }
+
+    protected function _getTmplElementInline()
+    {
+        return self::$_sTmplContentElementInline;
+    }
+
+    protected function _getTmplLabelDo()
+    {
+        return self::$_sTmplContentDoCommentLabel;
+    }
+
+    protected function _getTmplCounter()
+    {
+        return self::$_sTmplContentCounter;
+    }
+
+
+    /**
+     * private functions
+     */
+    protected function _getControlsBox()
+    {
+        $sDisplay = '';
+        $bDisplay = (int)$this->_aSystem['is_display_switch'] == 1;
+        if($bDisplay) {
+            $aDisplayLinks = array(
+                array('id' => $this->_sSystem . '-flat', 'name' => $this->_sSystem . '-flat', 'class' => '', 'title' => '_cmt_display_flat', 'target' => '_self', 'onclick' => 'javascript:' . $this->_sJsObjName . '.cmtChangeDisplay(this, \'flat\');'),
+                array('id' => $this->_sSystem . '-threaded', 'name' => $this->_sSystem . '-threaded', 'class' => '', 'title' => '_cmt_display_threaded', 'target' => '_self', 'onclick' => 'javascript:' . $this->_sJsObjName . '.cmtChangeDisplay(this, \'threaded\');')
+            );
+
+            $oMenu = new BxTemplMenuInteractive(array('template' => 'menu_interactive_vertical.html', 'menu_id'=> $this->_sSystem . '-display', 'menu_items' => $aDisplayLinks));
+            $oMenu->setSelected('', $this->_sSystem . '-' . $this->_sDisplayType);
+            $sDisplay = $oMenu->getCode();
+        }
+
+        $sBrowseType = '';
+        $bBrowseType = (int)$this->_aSystem['is_browse_switch'] == 1;
+        if($bBrowseType) {
+            $aBrowseLinks = array(
+                array('id' => $this->_sSystem . '-tail', 'name' => $this->_sSystem . '-tail', 'class' => '', 'title' => '_cmt_browse_tail', 'target' => '_self', 'onclick' => 'javascript:' . $this->_sJsObjName . '.cmtChangeBrowse(this, \'tail\');'),
+                array('id' => $this->_sSystem . '-head', 'name' => $this->_sSystem . '-head', 'class' => '', 'title' => '_cmt_browse_head', 'target' => '_self', 'onclick' => 'javascript:' . $this->_sJsObjName . '.cmtChangeBrowse(this, \'head\');'),
+                array('id' => $this->_sSystem . '-popular', 'name' => $this->_sSystem . '-popular', 'class' => '', 'title' => '_cmt_browse_popular', 'target' => '_self', 'onclick' => 'javascript:' . $this->_sJsObjName . '.cmtChangeBrowse(this, \'popular\');'),
+            );
+
+            $oMenu = new BxTemplMenuInteractive(array('template' => 'menu_interactive_vertical.html', 'menu_id'=> $this->_sSystem . '-browse', 'menu_items' => $aBrowseLinks));
+            $oMenu->setSelected('', $this->_sSystem . '-' . $this->_sBrowseType);
+            $sBrowseType = $oMenu->getCode();
+        }
+
+        $sBrowseFilter = '';
+        $bBrowseFilter = (int)$this->_aSystem['is_browse_filter'] == 1;
+        if($bBrowseFilter) {
+            $aFilterLinks = array(
+                array('id' => $this->_sSystem . '-all', 'name' => $this->_sSystem . '-all', 'class' => '', 'title' => '_cmt_browse_all', 'target' => '_self', 'onclick' => 'javascript:' . $this->_sJsObjName . '.cmtChangeFilter(this, \'all\');'),
+                array('id' => $this->_sSystem . '-friends', 'name' => $this->_sSystem . '-friends', 'class' => '', 'title' => '_cmt_browse_friends', 'target' => '_self', 'onclick' => 'javascript:' . $this->_sJsObjName . '.cmtChangeFilter(this, \'friends\');'),
+                array('id' => $this->_sSystem . '-subscriptions', 'name' => $this->_sSystem . '-subscriptions', 'class' => '', 'title' => '_cmt_browse_subscriptions', 'target' => '_self', 'onclick' => 'javascript:' . $this->_sJsObjName . '.cmtChangeFilter(this, \'subscriptions\');')
+            );
+
+            $oMenu = new BxTemplMenuInteractive(array('template' => 'menu_interactive_vertical.html', 'menu_id'=> $this->_sSystem . '-filter', 'menu_items' => $aFilterLinks));
+            $oMenu->setSelected('', $this->_sSystem . '-' . $this->_sBrowseFilter);
+            $sBrowseFilter = $oMenu->getCode();
+        }
+
+        return $this->_oTemplate->parseHtmlByName('comments_controls.html', array(
+            'display_switcher' => $bDisplay ? $sDisplay : '',
+            'bx_if:is_divider_1' => array(
+                'condition' => $bDisplay && $bBrowseType,
+                'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
+                )
+            ),
+            'browse_switcher' => $bBrowseType ? $sBrowseType : '',
+            'bx_if:is_divider_2' => array(
+                'condition' => $bBrowseType && $bBrowseFilter,
+                'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
+                )
+            ),
+            'filter_switcher' => $bBrowseFilter ? $sBrowseFilter : '',
+        ));
+    }
+
+    protected function _getActionsBox(&$aCmt, $aDp = array())
+    {
+    	$bViewOnly = isset($aDp['view_only']) && $aDp['view_only'] === true;
+    	$bDynamicMode = isset($aDp['dynamic_mode']) && $aDp['dynamic_mode'] === true;
+
+        $sMenuActions = '';
+		if(!$bViewOnly) {
+	        $oMenuActions = BxDolMenu::getObjectInstance($this->_sMenuObjActions);
+	        $oMenuActions->setCmtsData($this, $aCmt['cmt_id']);
+	        $oMenuActions->setDynamicMode($bDynamicMode);
+	        $sMenuActions = $oMenuActions->getCode();
+		}
+
+        return $this->_oTemplate->parseHtmlByName('comment_actions.html', array(
+            'id' => $aCmt['cmt_id'],
+            'js_object' => $this->_sJsObjName,
+            'style_prefix' => $this->_sStylePrefix,
+            'menu_actions' => $sMenuActions,
+        ));
+    }
+
+    protected function _getFormBox($sType, $aBp, $aDp)
+    {
+        $iCmtParentId = isset($aBp['parent_id']) ? (int)$aBp['parent_id'] : 0;
+        $sPosition = isset($aDp['position']) ? $aDp['position'] : '';
+        $bQuote = isset($aDp['quote']) && (bool)$aDp['quote'];
+        $bFormMin = $iCmtParentId == 0 && isset($aDp['min_post_form']) && (bool)$aDp['min_post_form'];
+
+        $sPositionSystem = $this->_aSystem['post_form_position'];
+        if(!empty($sPosition) && $sPositionSystem != $sPosition)
+            return '';
+
+        $sClass = '';
+        if(!empty($sPosition))
+            $sClass .= ' ' . $this->_sStylePrefix . '-reply-' . $sPosition;
+        if($bQuote)
+            $sClass .= ' ' . $this->_sStylePrefix . '-reply-quote';
+        if($bFormMin)
+            $sClass .= ' ' . $this->_sStylePrefix . '-reply-min';
+        if(!empty($aDp['class']))
+            $sClass .= ' ' . $aDp['class'];
+
+        $sClassBody = '';
+        if(!empty($aDp['class_body']))
+            $sClassBody .= ' ' . $aDp['class_body'];
+
+        $aTmplVarsFormMin = array();
+        if($bFormMin) {
+            list($sAuthorName, $sAuthorLink, $sAuthorIcon, $sAuthorUnit) = $this->_getAuthorInfo($this->_getAuthorId());
+
+            $oForm = new BxTemplFormView(array());
+            $aInputPlaceholder = array(
+                'type' => 'text',
+                'name' => 'comment',
+                'caption' => '',
+                'attrs' => array(
+                    'onclick' => 'javascript:' . $this->_sJsObjName . '.cmtShowForm(this)',
+                    'placeholder' => _t($this->_aT['txt_min_form_placeholder'], $sAuthorName)
+                ),
+                'value' => '',
+            );
+
+            $sClassBodyMin = '';
+            if(!empty($aDp['class_body_min']))
+                $sClassBodyMin .= ' ' . $aDp['class_body_min'];
+
+            $aTmplVarsFormMin = array(
+                'js_object' => $this->_sJsObjName,
+                'class_body_min' => $sClassBodyMin,
+                'style_prefix' => $this->_sStylePrefix,
+                'author_unit' => $sAuthorUnit,
+                'placeholder' => $oForm->genRow($aInputPlaceholder)
+            );
+        }
+
+        $aForm = $this->{'_getForm' . ucfirst($sType)}($iCmtParentId, $aDp);
+        if(empty($aForm['form']))
+            return !empty($aForm['msg']) && (isLogged() || $iCmtParentId != 0 || $this->getCommentsCount() > 0) ? MsgBox($aForm['msg']) : '';
+
+        return $this->_oTemplate->parseHtmlByName('comment_reply_box.html', array(
+            'js_object' => $this->_sJsObjName,
+            'style_prefix' => $this->_sStylePrefix,
+            'class' => $sClass,
+            'class_body' => $sClassBody,
+            'bx_if:show_form_min' => array(
+                'condition' => $bFormMin,
+                'content' => $aTmplVarsFormMin
+            ),
+            'form' => $aForm['form'],
+            'form_id' => $aForm['form_id'],
+        ));
+    }
+
+    protected function _getFormAdd($aValues)
+    {
+        $iCmtAuthorId = isset($aValues['cmt_author_id']) ? (int)$aValues['cmt_author_id'] : $this->_getAuthorId();
+        $iCmtParentId = isset($aValues['cmt_parent_id']) ? (int)$aValues['cmt_parent_id'] : 0;
+
+        $oForm = $this->_getForm(BX_CMT_ACTION_POST, $iCmtParentId);
+        $oForm->aFormAttrs['method'] = BX_DOL_FORM_METHOD_SPECIFIC;
+        $oForm->aParams['csrf']['disable'] = true;
+        $oForm->aInputs['cmt_parent_id']['value'] = $iCmtParentId;
+        if(!empty($oForm->aParams['db']['submit_name'])) {            
+            $sSubmitName = false;
+            if(is_array($oForm->aParams['db']['submit_name']))
+                foreach($oForm->aParams['db']['submit_name'] as $sVal) {
+                    if(isset($oForm->aInputs[$sVal])) {
+                        $sSubmitName = $sVal;
+                        break;
+                    }
+                }
+            else
+                $sSubmitName = $oForm->aParams['db']['submit_name'];
+
+            if($sSubmitName && isset($oForm->aInputs[$sSubmitName]))
+                $aValues[$sSubmitName] = $oForm->aInputs[$sSubmitName]['value'];
+        }
+
+        $oForm->initChecker(array(), $aValues);
+        if(!$oForm->isSubmittedAndValid()) 
+            return array('code' => 1, 'message' => '_sys_txt_error_occured');
+
+        $iLevel = 0;
+        $iCmtVisualParentId = 0;
+        if((int)$iCmtParentId > 0) {
+            $aParent = $this->getCommentRow($iCmtParentId);
+
+            $iLevel = (int)$aParent['cmt_level'] + 1;
+            $iCmtVisualParentId = $iLevel > $this->getMaxLevel() ? $aParent['cmt_vparent_id'] : $iCmtParentId;
+        }
+
+        $iCmtId = (int)$oForm->insert(array('cmt_vparent_id' => $iCmtVisualParentId, 'cmt_object_id' => $this->_iId, 'cmt_author_id' => $iCmtAuthorId, 'cmt_level' => $iLevel, 'cmt_time' => time()));
+        if(!$iCmtId) {
+            if(!$oForm->isValid())
+                return array('code' => 1, 'message' => '_sys_txt_error_occured');
+            else
+                return array('code' => 2, 'message' => '_cmt_err_cannot_perform_action');
+        }
+
+        $iCmtUniqId = $this->_oQuery->getUniqId($this->_aSystem['system_id'], $iCmtId, $iCmtAuthorId);
+
+        if($iCmtParentId) {
+            $this->_oQuery->updateRepliesCount($iCmtParentId, 1);
+
+            if(!BxDolModuleQuery::getInstance()->isEnabledByName('bx_notifications'))
+                $this->_sendNotificationEmail($iCmtId, $iCmtParentId);
+        }
+
+        $this->_triggerComment();
+
+        if($this->_sMetatagsObj && ($oMetatags = BxDolMetatags::getObjectInstance($this->_sMetatagsObj)) !== false)
+            $oMetatags->metaAdd($iCmtUniqId, $aValues['cmt_text']);
+
+        $mixedResult = $this->onPostAfter($iCmtId);
+        if($mixedResult === false)
+            return array('code' => 2, 'message' => '_cmt_err_cannot_perform_action');
+
+        return $mixedResult;
+    }
+
+    protected function _getFormPost($iCmtParentId = 0, $aDp = array())
+    {
+        $bCmtParentId = !empty($iCmtParentId);
+        if(!$bCmtParentId && !$this->isPostAllowed())
+            return array('msg' => $this->msgErrPostAllowed());
+
+        if($bCmtParentId && !$this->isReplyAllowed($iCmtParentId))
+            return array('msg' => $this->msgErrReplyAllowed());
+
+        $bDynamic = isset($aDp['dynamic_mode']) && (bool)$aDp['dynamic_mode'];
+        $bQuote = isset($aDp['quote']) && (bool)$aDp['quote'];
+
+        $oForm = $this->_getForm(BX_CMT_ACTION_POST, $iCmtParentId);
+        $oForm->aInputs['cmt_parent_id']['value'] = $iCmtParentId;
+
+        if($bQuote) {
+            $aCmtParent = $this->getCommentRow((int)$iCmtParentId);
+            if(!empty($aCmtParent['cmt_text']))
+                $oForm->aInputs['cmt_text']['value'] = $this->_oTemplate->parseHtmlByName('comment_quote.html', array(
+                    'content' => $aCmtParent['cmt_text']
+                ));
+        }
+
+        $oForm->initChecker();
+        if($oForm->isSubmittedAndValid()) {
+            $iCmtAuthorId = $this->_getAuthorId();
+            $iCmtParentId = (int)$oForm->getCleanValue('cmt_parent_id');
+            
+            //--- Process Text ---//
+            $sCmtText = $oForm->getCleanValue('cmt_text');
+            $bCmtText = !empty($sCmtText);
+
+            //--- Process Media ---//
+            $aImageIds = $oForm->getCleanValue('cmt_image');
+            $bImageIds = !empty($aImageIds) && is_array($aImageIds);
+
+            if(!$bCmtText && !$bImageIds) {
+                $oForm->aInputs['cmt_text']['error'] =  _t('_Please enter characters');
+                $oForm->setValid(false);
+
+            	return array('form' => $oForm->getCode($bDynamic), 'form_id' => $oForm->id);
+            }
+
+            $aParent = array();
+            if($iCmtParentId > 0) {
+                $aParent = $this->getCommentRow($iCmtParentId);
+                if(empty($aParent) || !is_array($aParent)) {
+                    $iCmtParentId = 0;
+                    $oForm->setSubmittedValue('cmt_parent_id', $iCmtParentId, $oForm->aFormAttrs['method']);
+                }
+            }
+
+            $iLevel = 0;
+            $iCmtVisualParentId = 0;
+            if($iCmtParentId > 0) {
+                $iLevel = (int)$aParent['cmt_level'] + 1;
+                $iCmtVisualParentId = $iLevel > $this->getMaxLevel() ? $aParent['cmt_vparent_id'] : $iCmtParentId;
+            }
+
+            $iCmtId = (int)$oForm->insert(array('cmt_vparent_id' => $iCmtVisualParentId, 'cmt_object_id' => $this->_iId, 'cmt_author_id' => $iCmtAuthorId, 'cmt_level' => $iLevel, 'cmt_time' => time()));
+            if($iCmtId != 0) {
+                $iCmtUniqId = $this->_oQuery->getUniqId($this->_aSystem['system_id'], $iCmtId, $iCmtAuthorId);
+
+                if($this->isAttachImageEnabled())
+                    $oForm->processImages($this, 'cmt_image', $iCmtUniqId, $iCmtId, $iCmtAuthorId, true);
+
+                if($iCmtParentId > 0) {
+                    $this->_oQuery->updateRepliesCount($iCmtParentId, 1);
+
+                    if(!BxDolModuleQuery::getInstance()->isEnabledByName('bx_notifications'))
+                        $this->_sendNotificationEmail($iCmtId, $iCmtParentId);
+                }
+
+                $this->_triggerComment();
+
+                if($iCmtParentId > 0)
+                    $this->isReplyAllowed($iCmtParentId, true);
+                else
+                    $this->isPostAllowed(true);
+
+                if($this->_sMetatagsObj && ($oMetatags = BxDolMetatags::getObjectInstance($this->_sMetatagsObj)) !== false)
+                    $oMetatags->metaAdd($iCmtUniqId, $sCmtText);
+
+                if(($mixedResult = $this->onPostAfter($iCmtId)) !== false)
+                    return $mixedResult;
+            }
+
+            return array('msg' => _t('_cmt_err_cannot_perform_action'));
+        }
+
+        return array('form' => $oForm->getCode($bDynamic), 'form_id' => $oForm->id);
+    }
+
+    protected function _getFormEdit($iCmtId, $aDp = array())
+    {
+        $bDynamic = isset($aDp['dynamic_mode']) && (bool)$aDp['dynamic_mode'];
+
+        $aCmt = $this->getCommentSimple($iCmtId);
+        if(!$aCmt)
+            return array('msg' => _t('_No such comment'));
+
+        $iCmtAuthorId = $this->_getAuthorId();
+        if(!$this->isEditAllowed($aCmt))
+            return array('msg' => $aCmt['cmt_author_id'] == $iCmtAuthorId ? strip_tags($this->msgErrEditAllowed()) : _t('_Access denied'));
+
+        $oForm = $this->_getForm(BX_CMT_ACTION_EDIT, $aCmt['cmt_id']);
+
+        $oForm->initChecker($aCmt);
+        if($oForm->isSubmittedAndValid()) {
+            $sCmtText = $oForm->getCleanValue('cmt_text');
+
+            if($oForm->update($iCmtId) !== false) {
+                $iCmtUniqId = $this->_oQuery->getUniqId($this->_aSystem['system_id'], $iCmtId, (int)$aCmt['cmt_author_id']);
+
+                if($this->isAttachImageEnabled())
+                    $oForm->processImages($this, 'cmt_image', $iCmtUniqId, $iCmtId, $iCmtAuthorId, false);
+
+                $this->isEditAllowed($aCmt, true);
+
+                if($this->_sMetatagsObj && ($oMetatags = BxDolMetatags::getObjectInstance($this->_sMetatagsObj)) !== false)
+                    $oMetatags->metaAdd($iCmtUniqId, $sCmtText);
+
+                if(($mixedResult = $this->onEditAfter($iCmtId)) !== false)
+                    return $mixedResult;
+            }
+
+            return array('msg' => _t('_cmt_err_cannot_perform_action'));
+        }
+
+        return array('form' => $oForm->getCode($bDynamic), 'form_id' => $oForm->id);
+    }
+
+    protected function _getForm($sAction, $iId)
+    {
+        $oForm = $this->_getFormObject($sAction);
+        $oForm->setId(sprintf($oForm->getAttributeMask('id'), $sAction, $this->_sSystem, $iId));
+        $oForm->setName(sprintf($oForm->getAttributeMask('name'), $sAction, $this->_sSystem, $iId));
+        $oForm->aParams['db']['table'] = $this->_aSystem['table'];
+        $oForm->aInputs['sys']['value'] = $this->_sSystem;
+        $oForm->aInputs['id']['value'] = $this->_iId;
+        $oForm->aInputs['action']['value'] = 'Submit' . ucfirst($sAction) . 'Form';
+
+        if(!$this->isAttachImageEnabled())
+            unset($oForm->aInputs['cmt_image']);
+
+        if(isset($oForm->aInputs['cmt_text'])) {
+            $oForm->aInputs['cmt_text']['html'] = $this->_aSystem['html'];
+            $oForm->aInputs['cmt_text']['db']['pass'] = $this->isHtml() ? 'XssHtml' : 'XssMultiline';
+
+            if(isset($oForm->aInputs['cmt_text']['checker']['func']) && strtolower($oForm->aInputs['cmt_text']['checker']['func']) == 'length') {
+                $iCmtTextMin = (int)$this->_aSystem['chars_post_min'];
+                $iCmtTextMax = (int)$this->_aSystem['chars_post_max'];
+                $oForm->aInputs['cmt_text']['checker']['params'] = array($iCmtTextMin, $iCmtTextMax);
+                $oForm->aInputs['cmt_text']['checker']['error'] = _t('_Please enter n1-n2 characters', $iCmtTextMin, $iCmtTextMax);
+            }
+        }
+
+        if($sAction == BX_CMT_ACTION_EDIT && isset($oForm->aInputs['cmt_controls']))
+            foreach($oForm->aInputs['cmt_controls'] as $mixedKey => $mixedValue) {
+                if(!is_numeric($mixedKey) || empty($mixedValue['name']) || $mixedValue['name'] != 'cmt_cancel')
+                    continue;
+
+                if(!isset($oForm->aInputs['cmt_controls'][$mixedKey]['attrs']))
+                    $oForm->aInputs['cmt_controls'][$mixedKey]['attrs'] = array();
+
+                $oForm->aInputs['cmt_controls'][$mixedKey]['attrs']['onclick'] = $this->_sJsObjName . '.cmtEdit(this, ' . $iId . ', false)';
+            }
+
+        return $oForm;
+    }
+
+    protected function _getContent($aCmt)
+    {
+        $sAttachments = $this->_getAttachments($aCmt);
+
+        $sReactions = '';
+        if(($oReaction = $this->getReactionObject($aCmt['cmt_unique_id'])) !== false)
+            $sReactions = $oReaction->getCounter(array(
+                'show_counter' => true
+            ));
+
+        return $this->_oTemplate->parseHtmlByName($this->_sTmplNameItemContent, array_merge(array(
+            'style_prefix' => $this->_sStylePrefix,
+            'js_object' => $this->_sJsObjName,
+            'bx_if:show_attached' => array(
+                'condition' => !empty($sAttachments),
+                'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
+                    'attached' => $sAttachments
+                )
+            ),
+            'reactions' => $sReactions,
+        ), $this->_getTmplVarsText($aCmt)));
+    }
+
+    protected function _getMoreLink($sCmts, $aBp = array(), $aDp = array())
+    {
+        $iStart = $iPerView = 0;
+        switch($aBp['type']) {
+            case BX_CMT_BROWSE_HEAD:
+            case BX_CMT_BROWSE_POPULAR:
+            case BX_CMT_BROWSE_CONNECTION:
+                $iPerView = $aBp['per_view'];
+
+                $iStart = $aBp['start'] + $iPerView;
+                if($iStart >= $aBp['count'])
+                    return $sCmts;
+
+                break;
+
+            case BX_CMT_BROWSE_TAIL:
+                $iPerView = $aBp['per_view'];
+
+                $iStart = $aBp['start'] - $iPerView;
+                if($iStart < 0) {
+                    $iPerView += $iStart;
+                    $iStart = 0;
+                }
+
+                if($iStart == 0 && $iPerView == 0)
+                    return $sCmts;
+
+                break;
+        }
+
+        $sParentKey = isset($aBp['vparent_id']) ? 'vparent_id' : 'parent_id';
+        $bRoot = (int)$aBp[$sParentKey] <= 0;
+
+        $sMore = $this->_oTemplate->parseHtmlByName('comment_more.html', array(
+            'js_object' => $this->_sJsObjName,
+            'style_prefix' => $this->_sStylePrefix,
+            'bx_if:is_root' => array(
+                'condition' => $bRoot,
+                'content' => array()
+            ),
+            'parent_id' => $aBp[$sParentKey],
+            'start' => $iStart,
+            'per_view' => $iPerView,
+            'title' => _t('_cmt_load_more_' . ($aBp[$sParentKey] == 0 ? 'comments' : 'replies') . '_' . $aBp['type'])
+        ));
+
+        switch($aBp['type']) {
+            case BX_CMT_BROWSE_HEAD:
+                case BX_CMT_BROWSE_POPULAR:
+                case BX_CMT_BROWSE_CONNECTION:
+                $sCmts .= $sMore;
+                break;
+
+            case BX_CMT_BROWSE_TAIL:
+                $sCmts = $sMore . $sCmts;
+                break;
+        }
+
+        return $sCmts;
+    }
+
+    protected function _getEmpty($aDp = array())
+    {
+        $sClass = '';
+        if(!empty($aDp['class']))
+            $sClass .= ' ' . $aDp['class'];
+
+        return $this->_oTemplate->parseHtmlByName('comment_empty.html', array(
+            'style_prefix' => $this->_sStylePrefix,
+            'class' => $sClass,
+            'content' => MsgBox(_t('_Empty'))
+        ));
+    }
+
+    protected function _getViewImagePopup()
+    {
+    	$sViewImagePopupId = 'cmts-box-' . $this->_sSystem . '-' . $this->getId() . '-view-image-popup' ;
+        $sViewImagePopupContent = $this->_oTemplate->parseHtmlByName('popup_image.html', array(
+            'image_url' => ''
+    	));
+
+    	return BxTemplFunctions::getInstance()->transBox($sViewImagePopupId, $sViewImagePopupContent, true);
+    }
+
+    protected function _getAttachments($aCmt)
+    {
+        $aTmplImages = array();
+        if(!$this->isAttachImageEnabled())
+            return ''; 
+
+        $aFiles = $this->_oQuery->getFiles($this->_aSystem['system_id'], $aCmt['cmt_id']);
+        if(!empty($aFiles) && is_array($aFiles)) {
+            $oStorage = BxDolStorage::getObjectInstance($this->getStorageObjectName());
+            $oTranscoder = BxDolTranscoderImage::getObjectInstance($this->getTranscoderPreviewName());
+
+            foreach($aFiles as $aFile) {
+                $bImage = $oTranscoder && $oTranscoder->isMimeTypeSupported($aFile['mime_type']);
+
+                $sPreview = '';
+                if($oTranscoder && $bImage)
+                    $sPreview = $oTranscoder->getFileUrl($aFile['image_id']);
+
+                if(!$sPreview)
+                    $sPreview = $this->_oTemplate->getIconUrl($oStorage->getIconNameByFileName($aFile['file_name']));
+
+                $aTmplVarsFile = array(
+                    'js_object' => $this->_sJsObjName,
+                    'preview' => $sPreview,
+                    'file' => $oStorage->getFileUrlById($aFile['image_id']),
+                    'file_name' => $aFile['file_name'],
+                    'file_icon' => $oStorage->getFontIconNameByFileName($aFile['file_name']),
+                    'file_size' => _t_format_size($aFile['size']),
+                );
+
+                $aTmplImages[] = array(
+                    'style_prefix' => $this->_sStylePrefix,
+                    'bx_if:show_image' => array(
+                        'condition' => $bImage,
+                        'content' => $aTmplVarsFile
+                    ),
+                    'bx_if:show_file' => array(
+                        'condition' => !$bImage,
+                        'content' => $aTmplVarsFile
+                    ),
+                );
+            }
+        }
+
+        return $this->_oTemplate->parseHtmlByName('comment_attachments.html', array(
+            'bx_repeat:attached' => $aTmplImages
+        ));
+    }
+
+    protected function _getTmplVarsAuthor($aCmt)
+    {
+    	list($sAuthorName, $sAuthorLink, $sAuthorIcon, $sAuthorUnit) = $this->_getAuthorInfo($aCmt['cmt_author_id']);
+    	$bAuthorIcon = !empty($sAuthorIcon);
+
+    	return array(
+    	    'author_unit' => $sAuthorUnit,
+            'bx_if:show_icon' => array(
+                'condition' => $bAuthorIcon,
+                'content' => array(
+                    'author_icon' => $sAuthorIcon
+                )
+            ),
+            'bx_if:show_icon_empty' => array(
+                'condition' => !$bAuthorIcon,
+                'content' => array()
+            ),
+            'bx_if:show_author_link' => array(
+                'condition' => !empty($sAuthorLink),
+                'content' => array(
+                    'author_link' => $sAuthorLink,
+            		'author_title' => bx_html_attribute($sAuthorName),
+                    'author_name' => $sAuthorName
+                )
+            ),
+            'bx_if:show_author_text' => array(
+                'condition' => empty($sAuthorLink),
+                'content' => array(
+                    'author_name' => $sAuthorName
+                )
+            ),
+    	);
+    }
+
+    protected function _getTmplVarsText($aCmt)
+    {
+    	$sText = $aCmt['cmt_text'];
+        $sTextMore = '';
+
+        if(!$this->isHtml()) {
+            $iMaxLength = (int)$this->_aSystem['chars_display_max'];
+            if(strlen($sText) > $iMaxLength) {
+                $iLength = strpos($sText, ' ', $iMaxLength);
+    
+                $sTextMore = trim(substr($sText, $iLength));
+                $sText = trim(substr($sText, 0, $iLength));
+            }
+        }
+
+        $sText = $this->_prepareTextForOutput($sText, $aCmt['cmt_id']);
+        $sTextMore = $this->_prepareTextForOutput($sTextMore, $aCmt['cmt_id']);
+
+        return array(
+			'text' => $sText,
+            'bx_if:show_more' => array(
+                'condition' => !empty($sTextMore),
+                'content' => array(
+                    'style_prefix' => $this->_sStylePrefix,
+                    'js_object' => $this->_sJsObjName,
+                    'text_more' => $sTextMore
+                )
+            ),
+        );
+    }
+}
+
+/** @} */

+ 3 - 0
upgrade/files/12.0.0.RC1-12.0.0/script.php

@@ -0,0 +1,3 @@
+<?php
+
+    return true;

+ 7 - 0
upgrade/files/12.0.0.RC1-12.0.0/sql.sql

@@ -0,0 +1,7 @@
+
+UPDATE `sys_options` SET `value` = 'stable' WHERE `name` = 'sys_upgrade_channel';
+
+-- Last step is to update current version
+
+UPDATE `sys_modules` SET `version` = '12.0.0' WHERE (`version` = '12.0.0.RC1' OR `version` = '12.0.0-RC1') AND `name` = 'system';
+