AntonLV пре 9 година
родитељ
комит
c78e9c3dde
51 измењених фајлова са 2676 додато и 0 уклоњено
  1. 227 0
      modules/boonex/russian/data/langs/bx_videos/ru.xml
  2. 21 0
      modules/boonex/videos/classes/BxVideosAlertsResponse.php
  3. 24 0
      modules/boonex/videos/classes/BxVideosCmtsSearchResult.php
  4. 151 0
      modules/boonex/videos/classes/BxVideosConfig.php
  5. 34 0
      modules/boonex/videos/classes/BxVideosDb.php
  6. 117 0
      modules/boonex/videos/classes/BxVideosFormEntry.php
  7. 23 0
      modules/boonex/videos/classes/BxVideosFormsEntryHelper.php
  8. 21 0
      modules/boonex/videos/classes/BxVideosGridAdministration.php
  9. 21 0
      modules/boonex/videos/classes/BxVideosGridCommon.php
  10. 24 0
      modules/boonex/videos/classes/BxVideosMenu.php
  11. 25 0
      modules/boonex/videos/classes/BxVideosMenuManageTools.php
  12. 24 0
      modules/boonex/videos/classes/BxVideosMenuView.php
  13. 34 0
      modules/boonex/videos/classes/BxVideosModule.php
  14. 24 0
      modules/boonex/videos/classes/BxVideosPageAuthor.php
  15. 24 0
      modules/boonex/videos/classes/BxVideosPageBrowse.php
  16. 44 0
      modules/boonex/videos/classes/BxVideosPageEntry.php
  17. 137 0
      modules/boonex/videos/classes/BxVideosSearchResult.php
  18. 129 0
      modules/boonex/videos/classes/BxVideosTemplate.php
  19. 28 0
      modules/boonex/videos/classes/BxVideosUploaderHTML5.php
  20. 28 0
      modules/boonex/videos/classes/BxVideosUploaderSimple.php
  21. 135 0
      modules/boonex/videos/install/config.php
  22. 20 0
      modules/boonex/videos/install/installer.php
  23. 227 0
      modules/boonex/videos/install/langs/en.xml
  24. 63 0
      modules/boonex/videos/install/sql/disable.sql
  25. 373 0
      modules/boonex/videos/install/sql/enable.sql
  26. 355 0
      modules/boonex/videos/install/sql/install.sql
  27. 66 0
      modules/boonex/videos/install/sql/uninstall.sql
  28. 56 0
      modules/boonex/videos/js/manage_tools.js
  29. 18 0
      modules/boonex/videos/request.php
  30. 1 0
      modules/boonex/videos/template/attachments.html
  31. 1 0
      modules/boonex/videos/template/author.html
  32. 1 0
      modules/boonex/videos/template/author_link.html
  33. 1 0
      modules/boonex/videos/template/css/forms.css
  34. 53 0
      modules/boonex/videos/template/css/main.css
  35. 1 0
      modules/boonex/videos/template/css/manage_tools.css
  36. 1 0
      modules/boonex/videos/template/entry-all-actions.html
  37. 1 0
      modules/boonex/videos/template/entry-location.html
  38. 1 0
      modules/boonex/videos/template/entry-share.html
  39. 1 0
      modules/boonex/videos/template/entry-text.html
  40. 1 0
      modules/boonex/videos/template/entry-video.html
  41. 1 0
      modules/boonex/videos/template/form_ghost_template.html
  42. 18 0
      modules/boonex/videos/template/form_ghost_template_video.html
  43. 52 0
      modules/boonex/videos/template/images/icons/std-icon.svg
  44. 1 0
      modules/boonex/videos/template/title_link.html
  45. 19 0
      modules/boonex/videos/template/unit.html
  46. 17 0
      modules/boonex/videos/template/unit_full.html
  47. 1 0
      modules/boonex/videos/template/unit_full_private.html
  48. 28 0
      modules/boonex/videos/template/unit_gallery.html
  49. 1 0
      modules/boonex/videos/template/unit_gallery_private.html
  50. 1 0
      modules/boonex/videos/template/unit_live_search.html
  51. 1 0
      modules/boonex/videos/template/unit_private.html

+ 227 - 0
modules/boonex/russian/data/langs/bx_videos/ru.xml

@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="ru" flag="ru" title="Russian">
+
+	<string name="_bx_videos"><![CDATA[Видео]]></string>
+	<string name="_bx_videos_cmts"><![CDATA[Видео - Комментарии]]></string>
+
+	<string name="_bx_videos_option_summary_chars"><![CDATA[Количество символов в автогенерируемой сводке к видео]]></string>
+	<string name="_bx_videos_option_plain_summary_chars"><![CDATA[Количество символов в описании видео при отсутствующей картинке видео]]></string>
+    <string name="_bx_videos_option_per_page_browse"><![CDATA[Количество элементов на странице]]></string>
+    <string name="_bx_videos_option_per_page_profile"><![CDATA[Количество элементов на странице профайла]]></string>
+	<string name="_bx_videos_option_rss_num"><![CDATA[Количество элементов в ленте RSS]]></string>
+	<string name="_bx_videos_option_searchable_fields"><![CDATA[Поля для поиска по ключевому слову]]></string>
+
+	<string name="_bx_videos_form_entry"><![CDATA[Видео]]></string>
+	<string name="_bx_videos_form_entry_display_add"><![CDATA[Добавить видео]]></string>
+	<string name="_bx_videos_form_entry_display_edit"><![CDATA[Редактировать видео]]></string>
+	<string name="_bx_videos_form_entry_display_delete"><![CDATA[Удалить видео]]></string>
+	<string name="_bx_videos_form_entry_display_view"><![CDATA[Просмотреть видео]]></string>
+	<string name="_bx_videos_form_entry_input_author"><![CDATA[Автор]]></string>
+	<string name="_bx_videos_form_entry_input_sys_do_submit"><![CDATA[Выполнить]]></string>
+	<string name="_bx_videos_form_entry_input_do_submit"><![CDATA[Выполнить]]></string>
+	<string name="_bx_videos_form_entry_input_sys_do_publish"><![CDATA[Опубликовать]]></string>
+	<string name="_bx_videos_form_entry_input_do_publish"><![CDATA[Опубликовать]]></string>
+	<string name="_bx_videos_form_entry_input_sys_title"><![CDATA[Заголовок]]></string>
+	<string name="_bx_videos_form_entry_input_title"><![CDATA[Заголовок]]></string>
+	<string name="_bx_videos_form_entry_input_title_err"><![CDATA[Заголовок обязателен. Пожалуйста, заполните это поле]]></string>
+	<string name="_bx_videos_form_entry_input_sys_cat"><![CDATA[Категория]]></string>
+	<string name="_bx_videos_form_entry_input_cat"><![CDATA[Категория]]></string>
+	<string name="_bx_videos_form_entry_input_cat_err"><![CDATA[Нужно обязательно выбрать категорию]]></string>
+	<string name="_bx_videos_form_entry_input_sys_text"><![CDATA[Текст]]></string>
+	<string name="_bx_videos_form_entry_input_text"><![CDATA[Текст]]></string>
+	<string name="_bx_videos_form_entry_input_sys_duration"><![CDATA[Продолжительность]]></string>
+    <string name="_bx_videos_form_entry_input_duration"><![CDATA[Продолжительность]]></string>
+	<string name="_bx_videos_form_entry_input_sys_delete_confirm"><![CDATA[Удалить подтверждение]]></string>
+	<string name="_bx_videos_form_entry_input_delete_confirm"><![CDATA[Я уверен(а), что хочу удалить это видео]]></string>
+	<string name="_bx_videos_form_entry_input_delete_confirm_info"><![CDATA[Это действие не может быть отменено]]></string>
+	<string name="_bx_videos_form_entry_input_delete_confirm_error"><![CDATA[Пожалуйста, отметьте этот флажок, если действительно хотите удалить видео]]></string>
+	<string name="_bx_videos_form_entry_input_sys_pictures"><![CDATA[Картинки]]></string>
+	<string name="_bx_videos_form_entry_input_pictures"><![CDATA[Картинки]]></string>
+	<string name="_bx_videos_form_entry_input_sys_videos"><![CDATA[Видео]]></string>
+    <string name="_bx_videos_form_entry_input_videos"><![CDATA[Видео]]></string>
+    <string name="_bx_videos_form_entry_input_videos_upload"><![CDATA[Загрузить]]></string>
+    <string name="_bx_videos_form_entry_input_sys_allow_view_to"><![CDATA[Видимость]]></string>
+    <string name="_bx_videos_form_entry_input_allow_view_to"><![CDATA[Видимость]]></string>
+    <string name="_bx_videos_form_entry_input_picture_use_as_thumb"><![CDATA[Изображение обложки]]></string>
+    <string name="_bx_videos_form_entry_input_sys_date_added"><![CDATA[Создано]]></string>
+    <string name="_bx_videos_form_entry_input_date_added"><![CDATA[Создано]]></string>
+    <string name="_bx_videos_form_entry_input_sys_date_changed"><![CDATA[Обновлено]]></string>
+    <string name="_bx_videos_form_entry_input_date_changed"><![CDATA[Обновлено]]></string>
+
+	<string name="_bx_videos_acl_action_create_entry"><![CDATA[Создать видео]]></string>
+	<string name="_bx_videos_acl_action_delete_entry"><![CDATA[Удалить видео]]></string>
+	<string name="_bx_videos_acl_action_view_entry"><![CDATA[Просмотреть видео]]></string>
+	<string name="_bx_videos_acl_action_set_thumb"><![CDATA[Назначить значок видео]]></string>
+	<string name="_bx_videos_acl_action_edit_any_entry"><![CDATA[Редактировать любое видео]]></string>
+
+	<string name="_bx_videos_page_title_sys_create_entry"><![CDATA[Новое видео]]></string>
+	<string name="_bx_videos_page_title_create_entry"><![CDATA[Новое видео]]></string>
+	<string name="_bx_videos_page_block_title_create_entry"><![CDATA[Новое видео]]></string>
+	<string name="_bx_videos_page_title_sys_edit_entry"><![CDATA[Редактировать видео]]></string>
+	<string name="_bx_videos_page_title_edit_entry"><![CDATA[Редактировать видео]]></string>
+	<string name="_bx_videos_page_block_title_edit_entry"><![CDATA[Редактировать видео]]></string>
+    <string name="_bx_videos_page_title_sys_delete_entry"><![CDATA[Удалить видео]]></string>
+    <string name="_bx_videos_page_title_delete_entry"><![CDATA[Удалить видео]]></string>
+    <string name="_bx_videos_page_block_title_delete_entry"><![CDATA[Удалить видео]]></string>
+	<string name="_bx_videos_page_title_sys_view_entry"><![CDATA[Просмотреть видео]]></string>
+	<string name="_bx_videos_page_title_view_entry"><![CDATA[{title}]]></string>
+	<string name="_bx_videos_page_block_title_entry_text"><![CDATA[Текст]]></string>
+	<string name="_bx_videos_page_block_title_entry_video"><![CDATA[Видео]]></string>
+	<string name="_bx_videos_page_title_browse"><![CDATA[Видео]]></string>
+	<string name="_bx_videos_page_title_search_results"><![CDATA[Видео, соответствующие "{0}"]]></string>
+	<string name="_bx_videos_page_title_browse_by_author"><![CDATA[Видео {display_name}]]></string>
+	<string name="_bx_videos_page_title_browse_featured"><![CDATA[Продвинутые видео]]></string>
+    <string name="_bx_videos_page_title_browse_recent"><![CDATA[Недавние видео]]></string>
+    <string name="_bx_videos_page_title_browse_popular"><![CDATA[Популярные видео]]></string>
+    <string name="_bx_videos_page_title_browse_updated"><![CDATA[Обновлённые видео]]></string>
+    <string name="_bx_videos_page_title_sys_home"><![CDATA[Видео - Домой]]></string>
+    <string name="_bx_videos_page_title_home"><![CDATA[Видео]]></string>
+    <string name="_bx_videos_page_block_title_featured_entries"><![CDATA[Продвинутые видео (Галерея)]]></string>
+    <string name="_bx_videos_page_block_title_featured_entries_view_extended"><![CDATA[Продвинутые видео]]></string>
+    <string name="_bx_videos_page_block_title_featured_entries_view_full"><![CDATA[Продвинутые видео (Полный просмотр)]]></string>
+    <string name="_bx_videos_page_block_title_recent_entries"><![CDATA[Новые видео (Галерея)]]></string>
+    <string name="_bx_videos_page_block_title_recent_entries_view_extended"><![CDATA[Новые видео]]></string>
+    <string name="_bx_videos_page_block_title_recent_entries_view_full"><![CDATA[Новые видео (Полный просмотр)]]></string>
+    <string name="_bx_videos_page_block_title_entry_social_sharing"><![CDATA[Поделиться]]></string>
+    <string name="_bx_videos_page_block_title_entry_author"><![CDATA[Автор]]></string>
+    <string name="_bx_videos_page_block_title_entry_actions"><![CDATA[Действия]]></string>
+    <string name="_bx_videos_page_block_title_entry_comments"><![CDATA[Комментарии]]></string>
+    <string name="_bx_videos_page_block_title_entry_comments_link"><![CDATA[Комментарии к <a href="{entry_link}">{title}</a>]]></string>
+    <string name="_bx_videos_page_block_title_entry_location"><![CDATA[Расположение]]></string>
+    <string name="_bx_videos_page_block_title_entry_attachments"><![CDATA[Прикрепления]]></string>
+    <string name="_bx_videos_page_block_title_entry_all_actions"><![CDATA[Все действия]]></string>
+    <string name="_bx_videos_page_title_sys_entries_popular"><![CDATA[Популярные видео]]></string>
+    <string name="_bx_videos_page_title_entries_popular"><![CDATA[Популярные видео]]></string>
+    <string name="_bx_videos_page_title_sys_entries_updated"><![CDATA[Обновленные видео]]></string>
+    <string name="_bx_videos_page_title_entries_updated"><![CDATA[Обновленные видео]]></string>
+    <string name="_bx_videos_page_title_sys_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_videos_page_title_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_videos_page_block_title_search_form"><![CDATA[Форма поиска]]></string>
+    <string name="_bx_videos_page_block_title_search_results"><![CDATA[Результаты поиска]]></string>
+    <string name="_bx_videos_page_block_title_search_form_cmts"><![CDATA[Форма поиска комментариев]]></string>
+    <string name="_bx_videos_page_block_title_search_results_cmts"><![CDATA[Результаты поиска комментариев]]></string>
+    <string name="_bx_videos_page_block_title_popular_entries"><![CDATA[Популярные видео]]></string>
+    <string name="_bx_videos_page_block_title_popular_entries_view_extended"><![CDATA[Популярные видео (Расширенный просмотр)]]></string>
+    <string name="_bx_videos_page_block_title_popular_entries_view_full"><![CDATA[Популярные видео (Полный просмотр)]]></string>
+    <string name="_bx_videos_page_block_title_updated_entries"><![CDATA[Обновленные видео]]></string>
+    <string name="_bx_videos_page_title_sys_view_entry_comments"><![CDATA[Комментарии к видео]]></string>
+    <string name="_bx_videos_page_title_view_entry_comments"><![CDATA[Комментарии к {title}]]></string>
+    <string name="_bx_videos_page_title_sys_entries_of_author"><![CDATA[Видео автора]]></string>
+    <string name="_bx_videos_page_title_entries_of_author"><![CDATA[{display_name} - Видео]]></string>
+    <string name="_bx_videos_page_block_title_favorites_of_author"><![CDATA[<a href="{profile_link}">{display_name}</a> - Избранное]]></string>   
+    <string name="_bx_videos_page_block_title_sys_favorites_of_author"><![CDATA[Избранное автора]]></string>
+    <string name="_bx_videos_page_block_title_entries_of_author"><![CDATA[<a href="{profile_link}">{display_name}</a> - Видео]]></string>   
+    <string name="_bx_videos_page_block_title_sys_entries_of_author"><![CDATA[Видео автора]]></string>   
+    <string name="_bx_videos_page_block_title_entries_actions"><![CDATA[Видео - Действия]]></string>
+    <string name="_bx_videos_page_block_title_browse_cmts"><![CDATA[Видео - Комментарии]]></string>
+	<string name="_bx_videos_page_title_sys_manage"><![CDATA[Управление собственными видео]]></string>
+	<string name="_bx_videos_page_title_sys_manage_administration"><![CDATA[Управление всеми видео]]></string>
+	<string name="_bx_videos_page_title_manage"><![CDATA[Управление]]></string>
+	<string name="_bx_videos_page_block_title_system_manage"><![CDATA[Управление собственными видео]]></string>
+	<string name="_bx_videos_page_block_title_system_manage_administration"><![CDATA[Управление всеми видео]]></string>
+	<string name="_bx_videos_page_block_title_manage"><![CDATA[Управление]]></string>    
+	<string name="_bx_videos_page_block_title_popular_keywords"><![CDATA[Популярные хэштеги]]></string>
+    <string name="_bx_videos_page_block_title_cats"><![CDATA[Видео категории]]></string>
+    <string name="_bx_videos_page_block_title_entry_info"><![CDATA[Инфо]]></string>
+    <string name="_bx_videos_page_block_title_my_entries"><![CDATA[Мои видео]]></string>
+
+    <string name="_bx_videos_menu_set_title_view_entry"><![CDATA[Публикация - Действия]]></string>
+    <string name="_bx_videos_menu_title_view_entry"><![CDATA[Публикация - Действия]]></string>
+    <string name="_bx_videos_menu_title_submenu"><![CDATA[Видео - Подменю]]></string>
+    <string name="_bx_videos_menu_set_title_submenu"><![CDATA[Видео - Подменю]]></string>
+    <string name="_bx_videos_menu_item_title_system_create_entry"><![CDATA[Новое видео]]></string>
+    <string name="_bx_videos_menu_item_title_create_entry"><![CDATA[Новое видео]]></string>
+    <string name="_bx_videos_menu_item_title_system_edit_entry"><![CDATA[Редактировать видео]]></string>
+    <string name="_bx_videos_menu_item_title_edit_entry"><![CDATA[Редактировать видео]]></string>
+    <string name="_bx_videos_menu_item_title_system_delete_entry"><![CDATA[Удалить видео]]></string>
+    <string name="_bx_videos_menu_item_title_delete_entry"><![CDATA[Удалить видео]]></string>
+    <string name="_bx_videos_menu_item_title_system_view_entry"><![CDATA[Просмотреть видео]]></string>
+    <string name="_bx_videos_menu_item_title_system_entries_home"><![CDATA[Видео]]></string>
+    <string name="_bx_videos_menu_item_title_entries_home"><![CDATA[Видео]]></string>
+    <string name="_bx_videos_menu_item_title_system_entries_public"><![CDATA[Новые]]></string>
+    <string name="_bx_videos_menu_item_title_entries_public"><![CDATA[Новые]]></string>
+    <string name="_bx_videos_menu_item_title_system_entries_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_videos_menu_item_title_entries_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_videos_menu_item_title_system_entries_popular"><![CDATA[Популярные]]></string>
+    <string name="_bx_videos_menu_item_title_entries_popular"><![CDATA[Популярные]]></string>
+    <string name="_bx_videos_menu_item_title_system_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_videos_menu_item_title_entries_search"><![CDATA[Поиск]]></string>
+    <string name="_bx_videos_menu_title_view_entry_submenu"><![CDATA[Просмотреть видео - Подменю]]></string>
+    <string name="_bx_videos_menu_set_title_view_entry_submenu"><![CDATA[Просмотреть видео - Подменю]]></string>
+    <string name="_bx_videos_menu_item_title_view_entry_submenu_entry"><![CDATA[Публикация]]></string>
+    <string name="_bx_videos_menu_item_title_view_entry_submenu_comments"><![CDATA[Комментарии]]></string>
+    <string name="_bx_videos_menu_item_title_system_view_entry_comments"><![CDATA[Комментарии к видео]]></string>
+    <string name="_bx_videos_menu_item_title_system_view_entries_author"><![CDATA[Видео]]></string>
+    <string name="_bx_videos_menu_item_title_view_entries_author"><![CDATA[Видео]]></string>
+    <string name="_bx_videos_menu_title_entries_my"><![CDATA[Мои видео - Меню действий]]></string>
+    <string name="_bx_videos_menu_set_title_entries_my"><![CDATA[Мои видео - Меню]]></string>
+	<string name="_bx_videos_menu_item_title_system_manage_my_posts"><![CDATA[Мои видео]]></string>
+    <string name="_bx_videos_menu_item_title_manage_my_posts"><![CDATA[{addon} видео]]></string>
+    <string name="_bx_videos_menu_set_title_manage_tools"><![CDATA[Инструменты управления - Подменю]]></string>
+    <string name="_bx_videos_menu_title_manage_tools"><![CDATA[Инструменты управления - Подменю]]></string>
+    <string name="_bx_videos_menu_item_title_system_manage_account"><![CDATA[Управление аккаунтом]]></string>
+    <string name="_bx_videos_menu_item_title_manage_account"><![CDATA[Управление аккаунтом]]></string>
+	<string name="_bx_videos_menu_item_title_system_admt_posts"><![CDATA[Видео]]></string>
+	<string name="_bx_videos_menu_item_title_admt_posts"><![CDATA[Видео - {addon} спрятано]]></string>
+	<string name="_bx_videos_menu_item_title_manage_my"><![CDATA[Мои видео]]></string>
+	<string name="_bx_videos_menu_item_title_manage_all"><![CDATA[Все видео]]></string>
+
+	<string name="_bx_videos_grid_filter_item_title_adm_select_one_filter1"><![CDATA[Все статусы]]></string>
+	<string name="_bx_videos_grid_filter_item_title_adm_active"><![CDATA[Активные]]></string>
+	<string name="_bx_videos_grid_filter_item_title_adm_hidden"><![CDATA[Спрятанные]]></string>
+	<string name="_bx_videos_grid_column_title_adm_active"><![CDATA[Активные]]></string>
+    <string name="_bx_videos_grid_column_title_adm_title"><![CDATA[Заголовок]]></string>
+    <string name="_bx_videos_grid_column_title_adm_added"><![CDATA[Добавленные]]></string>
+    <string name="_bx_videos_grid_column_title_adm_author"><![CDATA[Автор]]></string>
+    <string name="_bx_videos_grid_action_title_adm_edit"><![CDATA[Редактировать]]></string>
+    <string name="_bx_videos_grid_action_title_adm_delete"><![CDATA[Удалить]]></string>
+    <string name="_bx_videos_grid_action_title_adm_more_actions"><![CDATA[Дополнительные действия]]></string>
+    <string name="_bx_videos_grid_action_err_delete"><![CDATA[Невозможно удалить выбранное(ные) видео.]]></string>
+    <string name="_bx_videos_grid_txt_account_manager"><![CDATA[Перенаправить в Управление аккаунтом.]]></string>
+
+    <string name="_bx_videos_chart_growth"><![CDATA[Видео: Развитие]]></string>
+    <string name="_bx_videos_chart_growth_speed"><![CDATA[Видео: Скорость развития]]></string>
+
+    <string name="_bx_videos_search_extended"><![CDATA[Поиск видео]]></string>
+    <string name="_bx_videos_search_extended_cmts"><![CDATA[Поиск комментариев к видео]]></string>
+
+    <string name="_bx_videos_pre_lists_cats"><![CDATA[Видео категории]]></string>
+    <string name="_bx_videos_cat_Animals_Pets"><![CDATA[Животные]]></string>
+    <string name="_bx_videos_cat_Architecture"><![CDATA[Архитектура]]></string>
+    <string name="_bx_videos_cat_Art"><![CDATA[Искусство]]></string>
+    <string name="_bx_videos_cat_Cars_Motorcycles"><![CDATA[Авто и мото]]></string>
+    <string name="_bx_videos_cat_Celebrities"><![CDATA[Знаменитости]]></string>
+    <string name="_bx_videos_cat_Design"><![CDATA[Дизайн]]></string>
+    <string name="_bx_videos_cat_DIY_Crafts"><![CDATA[Сделай сам]]></string>
+    <string name="_bx_videos_cat_Education"><![CDATA[Образование]]></string>
+    <string name="_bx_videos_cat_Film_Music_Books"><![CDATA[Фильмы, музыка и книги]]></string>
+    <string name="_bx_videos_cat_Food_Drink"><![CDATA[Еда и напитки]]></string>
+    <string name="_bx_videos_cat_Gardening"><![CDATA[Сад и огород]]></string>
+    <string name="_bx_videos_cat_Geek"><![CDATA[Гик]]></string>
+    <string name="_bx_videos_cat_Hair_Beauty"><![CDATA[Причёски и макияж]]></string>
+    <string name="_bx_videos_cat_Health_Fitness"><![CDATA[Здоровье и фитнесс]]></string>
+    <string name="_bx_videos_cat_History"><![CDATA[История]]></string>
+    <string name="_bx_videos_cat_Holidays_Events"><![CDATA[Праздники и события]]></string>
+    <string name="_bx_videos_cat_Home_Decor"><![CDATA[Интерьер]]></string>
+    <string name="_bx_videos_cat_Humor"><![CDATA[Юмор]]></string>
+    <string name="_bx_videos_cat_Illustrations_Posters"><![CDATA[Иллюстрации и постеры]]></string>
+    <string name="_bx_videos_cat_Kids_Parenting"><![CDATA[Дети и родители]]></string>
+    <string name="_bx_videos_cat_Mens_Fashion"><![CDATA[Мужская мода]]></string>
+    <string name="_bx_videos_cat_Outdoors"><![CDATA[Туризм]]></string>
+    <string name="_bx_videos_cat_Photography"><![CDATA[Фотография]]></string>
+    <string name="_bx_videos_cat_Products"><![CDATA[Продукты]]></string>
+    <string name="_bx_videos_cat_Quotes"><![CDATA[Цитаты]]></string>
+    <string name="_bx_videos_cat_Science_Nature"><![CDATA[Наука и природа]]></string>
+    <string name="_bx_videos_cat_Sports"><![CDATA[Спорт]]></string>
+    <string name="_bx_videos_cat_Tattoos"><![CDATA[Татуеровки]]></string>
+    <string name="_bx_videos_cat_Technology"><![CDATA[Технологии]]></string>
+    <string name="_bx_videos_cat_Travel"><![CDATA[Путешествия]]></string>
+    <string name="_bx_videos_cat_Weddings"><![CDATA[Свадьба]]></string>
+    <string name="_bx_videos_cat_Womens_Fashion"><![CDATA[Женская мода]]></string>
+
+    <string name="_bx_videos_txt_all_entries_by"><![CDATA[<a href="{0}">Все видео от {1} ({2})</a>]]></string>
+    <string name="_bx_videos_txt_sample_single"><![CDATA[видео]]></string>
+    <string name="_bx_videos_txt_sample_single_with_article"><![CDATA[видео]]></string>
+    <string name="_bx_videos_txt_sample_comment_single"><![CDATA[комментарий к видео]]></string>
+    <string name="_bx_videos_txt_sample_vote_single"><![CDATA[голос за видео]]></string>
+</resources>

+ 21 - 0
modules/boonex/videos/classes/BxVideosAlertsResponse.php

@@ -0,0 +1,21 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxVideosAlertsResponse extends BxBaseModTextAlertsResponse
+{
+    public function __construct()
+    {
+        $this->MODULE = 'bx_videos';
+        parent::__construct();
+    }
+}
+
+/** @} */

+ 24 - 0
modules/boonex/videos/classes/BxVideosCmtsSearchResult.php

@@ -0,0 +1,24 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxVideosCmtsSearchResult extends BxBaseModGeneralCmtsSearchResult
+{
+    function __construct($sMode = '', $aParams = array())
+    {
+    	$this->sModule = 'bx_videos';
+
+        parent::__construct($sMode, $aParams);
+
+        $this->aCurrent['title'] = _t('_bx_videos_page_block_title_browse_cmts');
+    }
+}
+
+/** @} */

+ 151 - 0
modules/boonex/videos/classes/BxVideosConfig.php

@@ -0,0 +1,151 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxVideosConfig extends BxBaseModTextConfig
+{
+    function __construct($aModule)
+    {
+        parent::__construct($aModule);
+
+        $aMenuItems2Methods = array (
+            'edit-video' => 'checkAllowedEdit',
+            'delete-video' => 'checkAllowedDelete',
+        );
+
+        $this->CNF = array (
+
+            // module icon
+            'ICON' => 'film col-gray',
+
+            // database tables
+            'TABLE_ENTRIES' => $aModule['db_prefix'] . 'entries',
+        	'TABLE_ENTRIES_FULLTEXT' => 'title_text',
+
+            // database fields
+            'FIELD_ID' => 'id',
+            'FIELD_AUTHOR' => 'author',
+            'FIELD_ADDED' => 'added',
+            'FIELD_CHANGED' => 'changed',
+            'FIELD_TITLE' => 'title',
+            'FIELD_TEXT' => 'text',
+            'FIELD_TEXT_ID' => 'video-text',
+            'FIELD_DURATION' => 'duration',
+            'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
+            'FIELD_PHOTO' => 'pictures',
+            'FIELD_THUMB' => 'thumb',
+        	'FIELD_VIDEOS' => 'videos',
+            'FIELD_VIDEO' => 'video',
+            'FIELD_COMMENTS' => 'comments',
+	        'FIELD_STATUS' => 'status',
+        	'FIELD_STATUS_ADMIN' => 'status_admin',
+            'FIELD_LOCATION_PREFIX' => 'location',
+            'FIELDS_WITH_KEYWORDS' => 'auto', // can be 'auto', array of fields or comma separated string of field names, works only when OBJECT_METATAGS is specified
+
+            // page URIs
+            'URI_VIEW_ENTRY' => 'view-video',
+            'URI_AUTHOR_ENTRIES' => 'videos-author',
+            'URI_ADD_ENTRY' => 'create-video',
+        	'URI_EDIT_ENTRY' => 'edit-video',
+        	'URI_MANAGE_COMMON' => 'videos-manage',
+
+            'URL_HOME' => 'page.php?i=videos-home',
+            'URL_POPULAR' => 'page.php?i=videos-popular',
+            'URL_UPDATED' => 'page.php?i=videos-updated',
+        	'URL_MANAGE_COMMON' => 'page.php?i=videos-manage',
+        	'URL_MANAGE_ADMINISTRATION' => 'page.php?i=videos-administration',
+
+            // some params
+            'PARAM_CHARS_SUMMARY' => 'bx_videos_summary_chars',
+            'PARAM_CHARS_SUMMARY_PLAIN' => 'bx_videos_plain_summary_chars',
+            'PARAM_NUM_RSS' => 'bx_videos_rss_num',
+        	'PARAM_SEARCHABLE_FIELDS' => 'bx_videos_searchable_fields',
+
+            // objects
+            'OBJECT_STORAGE' => 'bx_videos_photos',
+        	'OBJECT_STORAGE_VIDEOS' => 'bx_videos_videos',
+            'OBJECT_IMAGES_TRANSCODER_PREVIEW' => 'bx_videos_preview',
+            'OBJECT_IMAGES_TRANSCODER_GALLERY' => 'bx_videos_gallery',
+        	'OBJECT_IMAGES_TRANSCODER_COVER' => 'bx_videos_cover',
+            'OBJECT_VIDEOS_TRANSCODERS' => array(
+            	'poster' => 'bx_videos_video_poster_cover', 
+            	'poster_preview' => 'bx_videos_video_poster_preview',
+                'poster_gallery' => 'bx_videos_video_poster_gallery',  
+            	'mp4' => 'bx_videos_video_mp4', 
+            	'webm' => 'bx_videos_video_webm'
+            ),
+        	'OBJECT_VIDEO_TRANSCODER_HEIGHT' => '480px',
+        	'OBJECT_REPORTS' => 'bx_videos',
+            'OBJECT_VIEWS' => 'bx_videos',
+            'OBJECT_VOTES' => 'bx_videos',
+        	'OBJECT_FAVORITES' => 'bx_videos',
+            'OBJECT_FEATURED' => 'bx_videos',
+            'OBJECT_METATAGS' => 'bx_videos',
+            'OBJECT_COMMENTS' => 'bx_videos',
+            'OBJECT_PRIVACY_VIEW' => 'bx_videos_allow_view_to',
+            'OBJECT_FORM_ENTRY' => 'bx_videos',
+            'OBJECT_FORM_ENTRY_DISPLAY_VIEW' => 'bx_videos_entry_view',
+            'OBJECT_FORM_ENTRY_DISPLAY_ADD' => 'bx_videos_entry_add',
+            'OBJECT_FORM_ENTRY_DISPLAY_EDIT' => 'bx_videos_entry_edit',
+            'OBJECT_FORM_ENTRY_DISPLAY_DELETE' => 'bx_videos_entry_delete',
+            'OBJECT_MENU_ACTIONS_VIEW_ENTRY' => 'bx_videos_view', // actions menu on view entry page
+            'OBJECT_MENU_ACTIONS_MY_ENTRIES' => 'bx_videos_my', // actions menu on my entries page
+            'OBJECT_MENU_SUBMENU' => 'bx_videos_submenu', // main module submenu
+            'OBJECT_MENU_SUBMENU_VIEW_ENTRY' => 'bx_videos_view_submenu', // view entry submenu
+            'OBJECT_MENU_SUBMENU_VIEW_ENTRY_MAIN_SELECTION' => 'videos-home', // first item in view entry submenu from main module submenu
+            'OBJECT_MENU_MANAGE_TOOLS' => 'bx_videos_menu_manage_tools', //manage menu in content administration tools
+            'OBJECT_GRID_ADMINISTRATION' => 'bx_videos_administration',
+        	'OBJECT_GRID_COMMON' => 'bx_videos_common',
+            'OBJECT_UPLOADERS' => array('sys_simple', 'sys_html5'),
+
+            // menu items which visibility depends on custom visibility checking
+            'MENU_ITEM_TO_METHOD' => array (
+                'bx_videos_my' => array (
+                    'create-video' => 'checkAllowedAdd',
+                ),
+                'bx_videos_view' => $aMenuItems2Methods,
+            ),
+
+            // some language keys
+            'T' => array (
+                'txt_sample_single' => '_bx_videos_txt_sample_single',
+            	'txt_sample_single_with_article' => '_bx_videos_txt_sample_single_with_article',
+            	'txt_sample_comment_single' => '_bx_videos_txt_sample_comment_single',
+            	'txt_sample_vote_single' => '_bx_videos_txt_sample_vote_single',
+                'form_field_author' => '_bx_videos_form_entry_input_author',
+            	'grid_action_err_delete' => '_bx_videos_grid_action_err_delete',
+            	'grid_txt_account_manager' => '_bx_videos_grid_txt_account_manager',
+				'filter_item_active' => '_bx_videos_grid_filter_item_title_adm_active',
+            	'filter_item_hidden' => '_bx_videos_grid_filter_item_title_adm_hidden',
+            	'filter_item_select_one_filter1' => '_bx_videos_grid_filter_item_title_adm_select_one_filter1',
+            	'menu_item_manage_my' => '_bx_videos_menu_item_title_manage_my',
+            	'menu_item_manage_all' => '_bx_videos_menu_item_title_manage_all',
+                'txt_all_entries_by' => '_bx_videos_txt_all_entries_by',
+                'txt_all_entries_by_author' => '_bx_videos_page_title_browse_by_author',
+            	'txt_pict_use_as_thumb' => '_bx_videos_form_entry_input_picture_use_as_thumb'
+            ),
+        );
+
+        $this->_aJsClasses = array(
+        	'manage_tools' => 'BxVideosManageTools'
+        );
+
+        $this->_aJsObjects = array(
+        	'manage_tools' => 'oBxVideosManageTools'
+        );
+
+        $this->_aGridObjects = array(
+        	'common' => $this->CNF['OBJECT_GRID_COMMON'],
+        	'administration' => $this->CNF['OBJECT_GRID_ADMINISTRATION']
+        );
+    }
+}
+
+/** @} */

+ 34 - 0
modules/boonex/videos/classes/BxVideosDb.php

@@ -0,0 +1,34 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/*
+ * Module database queries
+ */
+class BxVideosDb extends BxBaseModTextDb
+{
+    function __construct(&$oConfig)
+    {
+        parent::__construct($oConfig);
+    }
+
+    public function updateEntries($aParamsSet, $aParamsWhere)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        if(empty($aParamsSet) || empty($aParamsWhere))
+            return false;
+
+        $sSql = "UPDATE `" . $CNF['TABLE_ENTRIES'] . "` SET " . $this->arrayToSQL($aParamsSet) . " WHERE " . $this->arrayToSQL($aParamsWhere, " AND ");
+        return $this->query($sSql);
+    }
+}
+
+/** @} */

+ 117 - 0
modules/boonex/videos/classes/BxVideosFormEntry.php

@@ -0,0 +1,117 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * Create/Edit entry form
+ */
+class BxVideosFormEntry extends BxBaseModTextFormEntry
+{
+    protected $_sGhostTemplateVideo = 'form_ghost_template_video.html';
+
+    public function __construct($aInfo, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_videos';
+        parent::__construct($aInfo, $oTemplate);
+
+        $CNF = &$this->_oModule->_oConfig->CNF;
+
+        if (isset($this->aInputs[$CNF['FIELD_VIDEOS']])) {
+            $this->aInputs[$CNF['FIELD_VIDEOS']]['storage_object'] = $CNF['OBJECT_STORAGE_VIDEOS'];
+            $this->aInputs[$CNF['FIELD_VIDEOS']]['uploaders'] = !empty($this->aInputs[$CNF['FIELD_VIDEOS']]['value']) ? unserialize($this->aInputs[$CNF['FIELD_VIDEOS']]['value']) : $CNF['OBJECT_UPLOADERS'];
+            $this->aInputs[$CNF['FIELD_VIDEOS']]['upload_buttons_titles'] = _t('_bx_videos_form_entry_input_videos_upload');
+            $this->aInputs[$CNF['FIELD_VIDEOS']]['images_transcoder'] = $CNF['OBJECT_VIDEOS_TRANSCODERS']['poster_preview'];
+            $this->aInputs[$CNF['FIELD_VIDEOS']]['storage_private'] = 0;
+            $this->aInputs[$CNF['FIELD_VIDEOS']]['multiple'] = false;
+            $this->aInputs[$CNF['FIELD_VIDEOS']]['content_id'] = 0;
+            $this->aInputs[$CNF['FIELD_VIDEOS']]['ghost_template'] = '';
+        }
+    }
+    
+    public function initChecker ($aValues = array (), $aSpecificValues = array())
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+
+        if (isset($this->aInputs[$CNF['FIELD_VIDEOS']])) {
+
+            $aContentInfo = false;
+            if ($aValues && !empty($aValues['id'])) {
+                $aContentInfo = $this->_oModule->_oDb->getContentInfoById ($aValues['id']);
+                $this->aInputs[$CNF['FIELD_VIDEOS']]['content_id'] = $aValues['id'];
+            }
+
+            $this->aInputs[$CNF['FIELD_VIDEOS']]['ghost_template'] = $this->_oModule->_oTemplate->parseHtmlByName($this->_sGhostTemplateVideo, $this->_getVideoGhostTmplVars($aContentInfo));
+        }
+
+        return parent::initChecker($aValues, $aSpecificValues);
+    }
+
+    public function insert ($aValsToAdd = array(), $isIgnore = false)
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+
+        $aValsToAdd[$CNF['FIELD_VIDEO']] = isset($_POST[$CNF['FIELD_VIDEO']]) ? bx_process_input($_POST[$CNF['FIELD_VIDEO']], BX_DATA_INT) : 0;
+
+        $iContentId = parent::insert ($aValsToAdd, $isIgnore);
+        if(!empty($iContentId))
+            $this->processFiles($CNF['FIELD_VIDEOS'], $iContentId, true);
+
+        return $iContentId;
+    }
+
+    public function update ($iContentId, $aValsToAdd = array(), &$aTrackTextFieldsChanges = null)
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+
+        $aValsToAdd[$CNF['FIELD_VIDEO']] = isset($_POST[$CNF['FIELD_VIDEO']]) ? bx_process_input($_POST[$CNF['FIELD_VIDEO']], BX_DATA_INT) : 0;
+
+        $iRet = parent::update ($iContentId, $aValsToAdd, $aTrackTextFieldsChanges);
+
+        $this->processFiles($CNF['FIELD_VIDEOS'], $iContentId, false);
+
+        return $iRet;
+    }
+
+    function delete ($iContentId, $aContentInfo = array())
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+
+    	$bResult = parent::delete($iContentId, $aContentInfo);
+        if(!$bResult)
+			return $bResult;
+
+        // delete associated files
+        if (!empty($CNF['OBJECT_STORAGE_VIDEOS'])) {
+            $oStorage = BxDolStorage::getObjectInstance($CNF['OBJECT_STORAGE_VIDEOS']);
+            if($oStorage)
+                $oStorage->queueFilesForDeletionFromGhosts($aContentInfo[$CNF['FIELD_AUTHOR']], $iContentId);
+        }
+
+		return $bResult;
+    }
+
+    protected function genCustomViewRowValueDuration(&$aInput)
+    {
+        return _t_format_duration($aInput['value']);
+    }
+
+    protected function _getVideoGhostTmplVars($aContentInfo = array())
+    {
+    	$CNF = &$this->_oModule->_oConfig->CNF;
+
+    	return array (
+			'name' => $this->aInputs[$CNF['FIELD_VIDEOS']]['name'],
+    		'name_thumb' => isset($CNF['FIELD_VIDEO']) ? $CNF['FIELD_VIDEO'] : '',
+			'content_id' => $this->aInputs[$CNF['FIELD_VIDEOS']]['content_id'],
+		);
+    }
+}
+
+/** @} */

+ 23 - 0
modules/boonex/videos/classes/BxVideosFormsEntryHelper.php

@@ -0,0 +1,23 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * Entry forms helper functions
+ */
+class BxVideosFormsEntryHelper extends BxBaseModTextFormsEntryHelper
+{
+    public function __construct($oModule)
+    {
+        parent::__construct($oModule);
+    }
+}
+
+/** @} */

+ 21 - 0
modules/boonex/videos/classes/BxVideosGridAdministration.php

@@ -0,0 +1,21 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ * 
+ * @{
+ */
+
+class BxVideosGridAdministration extends BxBaseModTextGridAdministration
+{
+    public function __construct ($aOptions, $oTemplate = false)
+    {
+    	$this->MODULE = 'bx_videos';
+        parent::__construct ($aOptions, $oTemplate);
+    }
+}
+
+/** @} */

+ 21 - 0
modules/boonex/videos/classes/BxVideosGridCommon.php

@@ -0,0 +1,21 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ * 
+ * @{
+ */
+
+class BxVideosGridCommon extends BxBaseModTextGridCommon
+{
+    public function __construct ($aOptions, $oTemplate = false)
+    {
+    	$this->MODULE = 'bx_videos';
+        parent::__construct ($aOptions, $oTemplate);
+    }
+}
+
+/** @} */

+ 24 - 0
modules/boonex/videos/classes/BxVideosMenu.php

@@ -0,0 +1,24 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * General class for module menu.
+ */
+class BxVideosMenu extends BxBaseModTextMenu
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_videos';
+        parent::__construct($aObject, $oTemplate);
+    }
+}
+
+/** @} */

+ 25 - 0
modules/boonex/videos/classes/BxVideosMenuManageTools.php

@@ -0,0 +1,25 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * 'Videos manage tools' menu.
+ */
+class BxVideosMenuManageTools extends BxBaseModTextMenuManageTools
+{
+
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_videos';
+        parent::__construct($aObject, $oTemplate);
+    }
+}
+
+/** @} */

+ 24 - 0
modules/boonex/videos/classes/BxVideosMenuView.php

@@ -0,0 +1,24 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * View entry menu
+ */
+class BxVideosMenuView extends BxBaseModTextMenuView
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_videos';
+        parent::__construct($aObject, $oTemplate);
+    }
+}
+
+/** @} */

+ 34 - 0
modules/boonex/videos/classes/BxVideosModule.php

@@ -0,0 +1,34 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * Videos module
+ */
+class BxVideosModule extends BxBaseModTextModule
+{
+    function __construct(&$aModule)
+    {
+        parent::__construct($aModule);
+    }
+
+    public function serviceEntityVideoBlock ($iContentId = 0)
+    {
+        $mixedContent = $this->_getContent($iContentId);
+        if($mixedContent === false)
+            return false;
+
+        list($iContentId, $aContentInfo) = $mixedContent;
+
+        return $this->_oTemplate->entryVideo($aContentInfo);
+    }
+}
+
+/** @} */

+ 24 - 0
modules/boonex/videos/classes/BxVideosPageAuthor.php

@@ -0,0 +1,24 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * Profile's entries page.
+ */
+class BxVideosPageAuthor extends BxBaseModTextPageAuthor
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        parent::__construct($aObject, $oTemplate);
+    }
+
+}
+
+/** @} */

+ 24 - 0
modules/boonex/videos/classes/BxVideosPageBrowse.php

@@ -0,0 +1,24 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * Browse entries pages.
+ */
+class BxVideosPageBrowse extends BxBaseModTextPageBrowse
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_videos';
+        parent::__construct($aObject, $oTemplate);
+    }
+}
+
+/** @} */

+ 44 - 0
modules/boonex/videos/classes/BxVideosPageEntry.php

@@ -0,0 +1,44 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * Entry create/edit pages
+ */
+class BxVideosPageEntry extends BxBaseModTextPageEntry
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_videos';
+        parent::__construct($aObject, $oTemplate);
+    }
+
+    protected function _setSubmenu($aParams)
+    {
+    	parent::_setSubmenu(array_merge($aParams, array(
+    		'icon' => ''
+    	)));
+    }
+
+    protected function _getThumbForMetaObject ()
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+
+        if(!empty($CNF['FIELD_THUMB']) && !empty($this->_aContentInfo[$CNF['FIELD_THUMB']]))
+            return array('id' => $this->_aContentInfo[$CNF['FIELD_THUMB']], 'transcoder' => $CNF['OBJECT_IMAGES_TRANSCODER_COVER']);
+
+        if(!empty($CNF['FIELD_VIDEO']) && !empty($this->_aContentInfo[$CNF['FIELD_VIDEO']]))
+            return array('id' => $this->_aContentInfo[$CNF['FIELD_VIDEO']], 'transcoder' => $CNF['OBJECT_VIDEOS_TRANSCODERS']['poster']);
+
+        return false;
+    }
+}
+
+/** @} */

+ 137 - 0
modules/boonex/videos/classes/BxVideosSearchResult.php

@@ -0,0 +1,137 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxVideosSearchResult extends BxBaseModTextSearchResult
+{
+    function __construct($sMode = '', $aParams = array())
+    {
+        parent::__construct($sMode, $aParams);
+
+        $this->aCurrent = array(
+            'name' => 'bx_videos',
+            'module_name' => 'bx_videos',
+            'object_metatags' => 'bx_videos',
+            'title' => _t('_bx_videos_page_title_browse'),
+            'table' => 'bx_videos_entries',
+            'ownFields' => array('id', 'title', 'text', 'duration', 'thumb', 'video', 'author', 'added'),
+            'searchFields' => array(),
+            'restriction' => array(
+                'author' => array('value' => '', 'field' => 'author', 'operator' => '='),
+        		'featured' => array('value' => '', 'field' => 'featured', 'operator' => '<>'),
+        		'status' => array('value' => 'active', 'field' => 'status', 'operator' => '='),
+            ),
+            'paginate' => array('perPage' => getParam('bx_videos_per_page_browse'), 'start' => 0),
+            'sorting' => 'last',
+            'rss' => array(
+                'title' => '',
+                'link' => '',
+                'image' => '',
+                'profile' => 0,
+                'fields' => array (
+                    'Guid' => 'link',
+                    'Link' => 'link',
+                    'Title' => 'title',
+                    'DateTimeUTS' => 'added',
+                    'Desc' => 'text',
+                ),
+            ),
+            'ident' => 'id',
+        );
+
+        $this->sFilterName = 'bx_videos_filter';
+        $this->oModule = $this->getMain();
+        $this->aCurrent['searchFields'] = explode(',', getParam($this->oModule->_oConfig->CNF['PARAM_SEARCHABLE_FIELDS']));
+
+        $oProfileAuthor = null;
+
+        $CNF = &$this->oModule->_oConfig->CNF;
+
+        switch ($sMode) {
+            case 'author':
+                if(!$this->_updateCurrentForAuthor($sMode, $aParams, $oProfileAuthor)) {
+                    $this->isError = true;
+                    break;
+                }
+                break;
+
+            case 'favorite':
+                if(!$this->_updateCurrentForFavorite($sMode, $aParams, $oProfileAuthor)) {
+                    $this->isError = true;
+                    break;
+                }
+                break;
+
+            case 'public':
+                $this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_HOME']);
+                $this->aCurrent['title'] = _t('_bx_videos_page_title_browse_recent');
+                $this->aCurrent['rss']['link'] = 'modules/?r=videos/rss/' . $sMode;
+                break;
+
+            case 'featured':
+                $this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_HOME']);
+                $this->aCurrent['title'] = _t('_bx_videos_page_title_browse_featured');
+                $this->aCurrent['restriction']['featured']['value'] = '0';
+                $this->aCurrent['rss']['link'] = 'modules/?r=videos/rss/' . $sMode;
+                $this->aCurrent['sorting'] = 'featured';
+                break;
+
+            case 'popular':
+                $this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_POPULAR']);
+                $this->aCurrent['title'] = _t('_bx_videos_page_title_browse_popular');
+                $this->aCurrent['rss']['link'] = 'modules/?r=videos/rss/' . $sMode;
+                $this->aCurrent['sorting'] = 'popular';
+                break;
+
+            case 'updated':
+                $this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_UPDATED']);
+                $this->aCurrent['title'] = _t('_bx_videos_page_title_browse_updated');
+                $this->aCurrent['rss']['link'] = 'modules/?r=videos/rss/' . $sMode;
+                $this->aCurrent['sorting'] = 'updated';
+                break;
+
+            case '': // search results
+                $this->sBrowseUrl = BX_DOL_SEARCH_KEYWORD_PAGE;
+                $this->aCurrent['title'] = _t('_bx_videos');
+                unset($this->aCurrent['paginate']['perPage'], $this->aCurrent['rss']);
+                break;
+
+            default:
+                $sMode = '';
+                $this->isError = true;
+        }
+
+        $this->processReplaceableMarkers($oProfileAuthor);
+
+        $this->addConditionsForPrivateContent($CNF, $oProfileAuthor);
+    }
+
+    function getAlterOrder()
+    {
+        $aSql = array();
+        switch ($this->aCurrent['sorting']) {
+            case 'last':
+                $aSql['order'] = ' ORDER BY `bx_videos_entries`.`added` DESC';
+                break;
+            case 'featured':
+                $aSql['order'] = ' ORDER BY `bx_videos_entries`.`featured` DESC';
+                break;
+            case 'updated':
+                $aSql['order'] = ' ORDER BY `bx_videos_entries`.`changed` DESC';
+                break;
+            case 'popular':
+                $aSql['order'] = ' ORDER BY `bx_videos_entries`.`views` DESC';
+                break;
+        }
+        return $aSql;
+    }
+}
+
+/** @} */

+ 129 - 0
modules/boonex/videos/classes/BxVideosTemplate.php

@@ -0,0 +1,129 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/*
+ * Module representation.
+ */
+class BxVideosTemplate extends BxBaseModTextTemplate
+{
+    /**
+     * Constructor
+     */
+    public function __construct(&$oConfig, &$oDb)
+    {
+        $this->MODULE = 'bx_videos';
+        parent::__construct($oConfig, $oDb);
+    }
+
+    public function entryVideo ($aContentInfo, $mixedContext = false)
+    {
+        $CNF = &$this->getModule()->_oConfig->CNF;
+
+        $oStorage = BxDolStorage::getObjectInstance($CNF['OBJECT_STORAGE_VIDEOS']);
+
+        $aTranscodersVideo = false;
+        if($CNF['OBJECT_VIDEOS_TRANSCODERS'])
+            $aTranscodersVideo = array (
+                'poster' => BxDolTranscoderImage::getObjectInstance($CNF['OBJECT_VIDEOS_TRANSCODERS']['poster']),
+                'mp4' => BxDolTranscoderImage::getObjectInstance($CNF['OBJECT_VIDEOS_TRANSCODERS']['mp4']),
+                'webm' => BxDolTranscoderImage::getObjectInstance($CNF['OBJECT_VIDEOS_TRANSCODERS']['webm']),
+            );
+
+        $iFile = (int)$aContentInfo[$CNF['FIELD_VIDEO']];
+        $aFile = $oStorage->getFile($iFile);
+        if(empty($aFile) || !is_array($aFile) || strncmp('video/', $aFile['mime_type'], 6) !== 0)
+            return '';
+
+        $sTitle = bx_process_output($aContentInfo['title']);
+        $sTitleAttr = bx_html_attribute($aContentInfo['title']);
+
+        $this->_checkDuration($aContentInfo);
+
+        return $this->parseHtmlByName('entry-video.html', array(
+            'img_title' => $sTitle,
+            'img_title_attr' => $sTitleAttr,
+            'img_src' => $aTranscodersVideo['poster']->getFileUrl($iFile),
+            'video' => BxTemplFunctions::getInstance()->videoPlayer(
+                $aTranscodersVideo['poster']->getFileUrl($iFile), 
+                $aTranscodersVideo['mp4']->getFileUrl($iFile), 
+                $aTranscodersVideo['webm']->getFileUrl($iFile),
+                false, 'max-height:' . $CNF['OBJECT_VIDEO_TRANSCODER_HEIGHT']
+            )
+        ));
+    }
+
+    protected function getUnit($aData, $aParams = array())
+    {
+        $CNF = &$this->getModule()->_oConfig->CNF;
+
+        $this->_checkDuration($aData);
+
+        $aUnit = parent::getUnit($aData, $aParams);
+        $aUnit['bx_if:thumb']['content']['duration'] = _t_format_duration($aData[$CNF['FIELD_DURATION']]);
+
+        return $aUnit;
+    }
+
+    /**
+     * Use Gallery image for both because currently there is no Unit types with small thumbnails.
+     */
+    protected function getUnitThumbAndGallery ($aData)
+    {
+        $CNF = &$this->getModule()->_oConfig->CNF;
+
+        $sImage = $this->_getUnitThumbAndGallery($CNF['FIELD_THUMB'], $CNF['OBJECT_IMAGES_TRANSCODER_GALLERY'], $aData);
+        if(!empty($sImage))
+            return array($sImage, $sImage);
+
+        $sImage = $this->_getUnitThumbAndGallery($CNF['FIELD_VIDEO'], $CNF['OBJECT_VIDEOS_TRANSCODERS']['poster_gallery'], $aData);
+        if(!empty($sImage))
+            return array($sImage, $sImage);
+
+        return array('', '');
+    }
+    
+    protected function _getUnitThumbAndGallery ($sField, $sTranscoder, &$aData)
+    {
+        $CNF = &$this->getModule()->_oConfig->CNF;
+
+        $sImage = '';
+        if(empty($sField) || empty($aData[$sField])) 
+            return $sImage;
+
+        $oImagesTranscoder = BxDolTranscoderImage::getObjectInstance($sTranscoder);
+        if($oImagesTranscoder)
+            $sImage = $oImagesTranscoder->getFileUrl($aData[$sField]);
+
+        return $sImage;
+    }
+
+    protected function _checkDuration(&$aContentInfo) 
+    {
+        $CNF = &$this->getModule()->_oConfig->CNF;
+
+        $iVideo = (int)$aContentInfo[$CNF['FIELD_VIDEO']];
+        if(empty($iVideo) || !empty($aContentInfo[$CNF['FIELD_DURATION']]))
+            return;
+
+        $sFile = BxDolTranscoderImage::getObjectInstance($CNF['OBJECT_VIDEOS_TRANSCODERS']['mp4'])->getFileUrl($iVideo);
+        if(empty($sFile))
+            return;
+
+        $iDuration = BxDolTranscoderVideo::getDuration($sFile);
+        if(empty($iDuration))
+            return;
+
+        $this->_oDb->updateEntries(array($CNF['FIELD_DURATION'] => $iDuration), array($CNF['FIELD_ID'] => $aContentInfo[$CNF['FIELD_ID']]));
+    }
+
+}
+
+/** @} */

+ 28 - 0
modules/boonex/videos/classes/BxVideosUploaderHTML5.php

@@ -0,0 +1,28 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxVideosUploaderHTML5 extends BxTemplUploaderHTML5
+{
+    protected $_oModule;
+
+    public function __construct ($aObject, $sStorageObject, $sUniqId, $oTemplate)
+    {
+        parent::__construct($aObject, $sStorageObject, $sUniqId, $oTemplate);
+        $this->_oModule = BxDolModule::getInstance('bx_videos');
+    }
+
+    protected function isAdmin ($iContentId = 0)
+    {
+        return $this->_oModule->_isModerator (false);
+    }
+}
+
+/** @} */

+ 28 - 0
modules/boonex/videos/classes/BxVideosUploaderSimple.php

@@ -0,0 +1,28 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxVideosUploaderSimple extends BxTemplUploaderSimple
+{
+    protected $_oModule;
+
+    public function __construct ($aObject, $sStorageObject, $sUniqId, $oTemplate)
+    {
+        parent::__construct($aObject, $sStorageObject, $sUniqId, $oTemplate);
+        $this->_oModule = BxDolModule::getInstance('bx_videos');
+    }
+
+    protected function isAdmin ($iContentId = 0)
+    {
+        return $this->_oModule->_isModerator (false);
+    }
+}
+
+/** @} */

+ 135 - 0
modules/boonex/videos/install/config.php

@@ -0,0 +1,135 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_videos',
+    'title' => 'Videos',
+    'note' => 'Basic video posting module.',
+    'version' => '9.0.0.DEV',
+    'vendor' => 'BoonEx',
+	'help_url' => 'http://feed.boonex.com/?section={module_name}',
+
+    'compatible_with' => array(
+        '9.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/videos/',
+    'home_uri' => 'videos',
+
+    'db_prefix' => 'bx_videos_',
+    'class_prefix' => 'BxVideos',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Videos',
+
+    /**
+     * List of page triggers.
+     */
+    'page_triggers' => array (
+    	'trigger_page_profile_view_entry',
+    ),
+    
+    /**
+     * Menu triggers.
+     */
+    'menu_triggers' => array(
+    	'trigger_profile_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_videos_files'
+    ),
+
+    /**
+     * Transcoders.
+     */
+    'transcoders' => array(
+		'bx_videos_preview',
+        'bx_videos_gallery',
+        'bx_videos_cover'
+    ),
+
+    /**
+     * Extended Search Forms.
+     */
+    'esearches' => array(
+        'bx_videos',
+    	'bx_videos_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'
+    ),
+
+);
+
+/** @} */

+ 20 - 0
modules/boonex/videos/install/installer.php

@@ -0,0 +1,20 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxVideosInstaller extends BxBaseModTextInstaller
+{
+    function __construct($aConfig)
+    {
+        parent::__construct($aConfig);
+    }
+}
+
+/** @} */

+ 227 - 0
modules/boonex/videos/install/langs/en.xml

@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="en" flag="gb" title="English">
+
+	<string name="_bx_videos"><![CDATA[Videos]]></string>
+	<string name="_bx_videos_cmts"><![CDATA[Videos' Comments]]></string>
+
+	<string name="_bx_videos_option_summary_chars"><![CDATA[Number of characters in auto-cropped video summary]]></string>
+	<string name="_bx_videos_option_plain_summary_chars"><![CDATA[Number of characters in plain video description when video hasn't thumb]]></string>
+	<string name="_bx_videos_option_per_page_browse"><![CDATA[Number of items per page]]></string>
+	<string name="_bx_videos_option_per_page_profile"><![CDATA[Number of items on profile/group page]]></string>
+	<string name="_bx_videos_option_rss_num"><![CDATA[Number of items in RSS feed]]></string>
+	<string name="_bx_videos_option_searchable_fields"><![CDATA[Searchable fields for keyword search]]></string>
+
+	<string name="_bx_videos_form_entry"><![CDATA[Videos]]></string>
+	<string name="_bx_videos_form_entry_display_add"><![CDATA[Add Video]]></string>
+	<string name="_bx_videos_form_entry_display_edit"><![CDATA[Edit Video]]></string>
+	<string name="_bx_videos_form_entry_display_delete"><![CDATA[Delete Video]]></string>
+	<string name="_bx_videos_form_entry_display_view"><![CDATA[View Video]]></string>
+	<string name="_bx_videos_form_entry_input_author"><![CDATA[Author]]></string>
+	<string name="_bx_videos_form_entry_input_sys_do_submit"><![CDATA[Submit]]></string>
+	<string name="_bx_videos_form_entry_input_do_submit"><![CDATA[Submit]]></string>
+	<string name="_bx_videos_form_entry_input_sys_do_publish"><![CDATA[Publish]]></string>
+	<string name="_bx_videos_form_entry_input_do_publish"><![CDATA[Publish]]></string>
+	<string name="_bx_videos_form_entry_input_sys_title"><![CDATA[Title]]></string>
+	<string name="_bx_videos_form_entry_input_title"><![CDATA[Title]]></string>
+	<string name="_bx_videos_form_entry_input_title_err"><![CDATA[Title is essential. Please, fill in this field]]></string>
+	<string name="_bx_videos_form_entry_input_sys_cat"><![CDATA[Category]]></string>
+	<string name="_bx_videos_form_entry_input_cat"><![CDATA[Category]]></string>
+    <string name="_bx_videos_form_entry_input_cat_err"><![CDATA[Please select category]]></string>
+	<string name="_bx_videos_form_entry_input_sys_text"><![CDATA[Text]]></string>
+	<string name="_bx_videos_form_entry_input_text"><![CDATA[Text]]></string>
+	<string name="_bx_videos_form_entry_input_sys_duration"><![CDATA[Duration]]></string>
+    <string name="_bx_videos_form_entry_input_duration"><![CDATA[Duration]]></string>
+	<string name="_bx_videos_form_entry_input_sys_delete_confirm"><![CDATA[Delete confirmation]]></string>
+	<string name="_bx_videos_form_entry_input_delete_confirm"><![CDATA[I am sure I want to delete this video]]></string>
+	<string name="_bx_videos_form_entry_input_delete_confirm_info"><![CDATA[This action can not be undone]]></string>
+	<string name="_bx_videos_form_entry_input_delete_confirm_error"><![CDATA[Please check this checkbox if you really want to delete the video]]></string>
+	<string name="_bx_videos_form_entry_input_sys_pictures"><![CDATA[Pictures]]></string>
+	<string name="_bx_videos_form_entry_input_pictures"><![CDATA[Pictures]]></string>
+	<string name="_bx_videos_form_entry_input_sys_videos"><![CDATA[Video]]></string>
+    <string name="_bx_videos_form_entry_input_videos"><![CDATA[Video]]></string>
+    <string name="_bx_videos_form_entry_input_videos_upload"><![CDATA[Upload]]></string>
+    <string name="_bx_videos_form_entry_input_sys_allow_view_to"><![CDATA[Visibility]]></string>
+    <string name="_bx_videos_form_entry_input_allow_view_to"><![CDATA[Visibility]]></string>
+    <string name="_bx_videos_form_entry_input_picture_use_as_thumb"><![CDATA[Cover Image]]></string>
+    <string name="_bx_videos_form_entry_input_sys_date_added"><![CDATA[Created]]></string>
+    <string name="_bx_videos_form_entry_input_date_added"><![CDATA[Created]]></string>
+    <string name="_bx_videos_form_entry_input_sys_date_changed"><![CDATA[Updated]]></string>
+    <string name="_bx_videos_form_entry_input_date_changed"><![CDATA[Updated]]></string>
+
+	<string name="_bx_videos_acl_action_create_entry"><![CDATA[Create Video]]></string>
+	<string name="_bx_videos_acl_action_delete_entry"><![CDATA[Delete Video]]></string>
+	<string name="_bx_videos_acl_action_view_entry"><![CDATA[View Video]]></string>
+	<string name="_bx_videos_acl_action_set_thumb"><![CDATA[Set Video Thumbnail]]></string>
+	<string name="_bx_videos_acl_action_edit_any_entry"><![CDATA[Edit Any Video]]></string>
+
+	<string name="_bx_videos_page_title_sys_create_entry"><![CDATA[New Video]]></string>
+	<string name="_bx_videos_page_title_create_entry"><![CDATA[New Video]]></string>
+	<string name="_bx_videos_page_block_title_create_entry"><![CDATA[New Video]]></string>
+	<string name="_bx_videos_page_title_sys_edit_entry"><![CDATA[Edit]]></string>
+	<string name="_bx_videos_page_title_edit_entry"><![CDATA[Edit]]></string>
+	<string name="_bx_videos_page_block_title_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_videos_page_title_sys_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_videos_page_title_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_videos_page_block_title_delete_entry"><![CDATA[Delete]]></string>
+	<string name="_bx_videos_page_title_sys_view_entry"><![CDATA[View Video]]></string>
+	<string name="_bx_videos_page_title_view_entry"><![CDATA[{title}]]></string>
+	<string name="_bx_videos_page_block_title_entry_text"><![CDATA[Text]]></string>
+	<string name="_bx_videos_page_block_title_entry_video"><![CDATA[Video]]></string>
+	<string name="_bx_videos_page_title_browse"><![CDATA[Videos]]></string>
+	<string name="_bx_videos_page_title_search_results"><![CDATA[Videos matching "{0}"]]></string>
+	<string name="_bx_videos_page_title_browse_by_author"><![CDATA[Videos of {display_name}]]></string>
+	<string name="_bx_videos_page_title_browse_featured"><![CDATA[Featured Videos]]></string>
+    <string name="_bx_videos_page_title_browse_recent"><![CDATA[Latest Videos]]></string>
+    <string name="_bx_videos_page_title_browse_popular"><![CDATA[Popular Videos]]></string>
+    <string name="_bx_videos_page_title_browse_updated"><![CDATA[Updated Videos]]></string>
+    <string name="_bx_videos_page_title_sys_home"><![CDATA[Videos Home]]></string>
+    <string name="_bx_videos_page_title_home"><![CDATA[Videos]]></string>
+    <string name="_bx_videos_page_block_title_featured_entries"><![CDATA[Featured Videos (Gallery View)]]></string>
+    <string name="_bx_videos_page_block_title_featured_entries_view_extended"><![CDATA[Featured Videos]]></string>
+    <string name="_bx_videos_page_block_title_featured_entries_view_full"><![CDATA[Featured Videos (Full View)]]></string>
+    <string name="_bx_videos_page_block_title_recent_entries"><![CDATA[Latest Videos (Gallery View)]]></string>
+    <string name="_bx_videos_page_block_title_recent_entries_view_extended"><![CDATA[Latest Videos]]></string>
+    <string name="_bx_videos_page_block_title_recent_entries_view_full"><![CDATA[Latest Videos (Full View)]]></string>
+    <string name="_bx_videos_page_block_title_entry_social_sharing"><![CDATA[Share]]></string>
+    <string name="_bx_videos_page_block_title_entry_author"><![CDATA[Author]]></string>
+    <string name="_bx_videos_page_block_title_entry_actions"><![CDATA[Actions]]></string>
+    <string name="_bx_videos_page_block_title_entry_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_videos_page_block_title_entry_comments_link"><![CDATA[Comments to <a href="{entry_link}">{title}</a>]]></string>
+    <string name="_bx_videos_page_block_title_entry_location"><![CDATA[Location]]></string>
+    <string name="_bx_videos_page_block_title_entry_attachments"><![CDATA[Attachments]]></string>
+    <string name="_bx_videos_page_block_title_entry_all_actions"><![CDATA[All Actions]]></string>
+    <string name="_bx_videos_page_title_sys_entries_popular"><![CDATA[Popular Videos]]></string>
+    <string name="_bx_videos_page_title_entries_popular"><![CDATA[Popular Videos]]></string>
+    <string name="_bx_videos_page_title_sys_entries_updated"><![CDATA[Updated Videos]]></string>
+    <string name="_bx_videos_page_title_entries_updated"><![CDATA[Updated Videos]]></string>
+    <string name="_bx_videos_page_title_sys_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_videos_page_title_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_videos_page_block_title_search_form"><![CDATA[Search Form]]></string>
+    <string name="_bx_videos_page_block_title_search_results"><![CDATA[Search Results]]></string>
+    <string name="_bx_videos_page_block_title_search_form_cmts"><![CDATA[Comments Search Form]]></string>
+    <string name="_bx_videos_page_block_title_search_results_cmts"><![CDATA[Comments Search Results]]></string>
+    <string name="_bx_videos_page_block_title_popular_entries"><![CDATA[Popular Videos]]></string>
+    <string name="_bx_videos_page_block_title_popular_entries_view_extended"><![CDATA[Popular Videos (Extended View)]]></string>
+    <string name="_bx_videos_page_block_title_popular_entries_view_full"><![CDATA[Popular Videos (Full View)]]></string>
+    <string name="_bx_videos_page_block_title_updated_entries"><![CDATA[Updated Videos]]></string>
+    <string name="_bx_videos_page_title_sys_view_entry_comments"><![CDATA[Video Comments]]></string>
+    <string name="_bx_videos_page_title_view_entry_comments"><![CDATA[Comments to {title}]]></string>
+    <string name="_bx_videos_page_title_sys_entries_of_author"><![CDATA[Videos of author]]></string>
+    <string name="_bx_videos_page_title_entries_of_author"><![CDATA[Videos by {display_name}]]></string>
+    <string name="_bx_videos_page_block_title_favorites_of_author"><![CDATA[Favorites by <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_videos_page_block_title_sys_favorites_of_author"><![CDATA[Favorites of author]]></string>
+    <string name="_bx_videos_page_block_title_entries_of_author"><![CDATA[Videos by <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_videos_page_block_title_sys_entries_of_author"><![CDATA[Videos of author]]></string>   
+    <string name="_bx_videos_page_block_title_entries_actions"><![CDATA[Videos actions]]></string>
+    <string name="_bx_videos_page_block_title_browse_cmts"><![CDATA[Videos' Comments]]></string>
+	<string name="_bx_videos_page_title_sys_manage"><![CDATA[Manage Own]]></string>
+	<string name="_bx_videos_page_title_sys_manage_administration"><![CDATA[Manage All]]></string>
+	<string name="_bx_videos_page_title_manage"><![CDATA[Manage]]></string>
+	<string name="_bx_videos_page_block_title_system_manage"><![CDATA[Manage Own]]></string>
+	<string name="_bx_videos_page_block_title_system_manage_administration"><![CDATA[Manage All]]></string>
+	<string name="_bx_videos_page_block_title_manage"><![CDATA[Manage]]></string>    
+	<string name="_bx_videos_page_block_title_popular_keywords"><![CDATA[Popular Hashtags]]></string>
+	<string name="_bx_videos_page_block_title_cats"><![CDATA[Videos Categories]]></string>
+	<string name="_bx_videos_page_block_title_entry_info"><![CDATA[Info]]></string>
+	<string name="_bx_videos_page_block_title_my_entries"><![CDATA[My Videos]]></string>
+
+    <string name="_bx_videos_menu_set_title_view_entry"><![CDATA[Video Actions]]></string>
+    <string name="_bx_videos_menu_title_view_entry"><![CDATA[Video Actions]]></string>
+    <string name="_bx_videos_menu_title_submenu"><![CDATA[Videos Submenu]]></string>
+    <string name="_bx_videos_menu_set_title_submenu"><![CDATA[Videos Submenu]]></string>
+    <string name="_bx_videos_menu_item_title_system_create_entry"><![CDATA[New Video]]></string>
+    <string name="_bx_videos_menu_item_title_create_entry"><![CDATA[New Video]]></string>
+    <string name="_bx_videos_menu_item_title_system_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_videos_menu_item_title_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_videos_menu_item_title_system_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_videos_menu_item_title_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_videos_menu_item_title_system_view_entry"><![CDATA[View Video]]></string>
+    <string name="_bx_videos_menu_item_title_system_entries_home"><![CDATA[Videos]]></string>
+    <string name="_bx_videos_menu_item_title_entries_home"><![CDATA[Videos]]></string>
+    <string name="_bx_videos_menu_item_title_system_entries_public"><![CDATA[Latest]]></string>
+    <string name="_bx_videos_menu_item_title_entries_public"><![CDATA[Latest]]></string>
+    <string name="_bx_videos_menu_item_title_system_entries_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_videos_menu_item_title_entries_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_videos_menu_item_title_system_entries_popular"><![CDATA[Popular]]></string>
+    <string name="_bx_videos_menu_item_title_entries_popular"><![CDATA[Popular]]></string>
+    <string name="_bx_videos_menu_item_title_system_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_videos_menu_item_title_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_videos_menu_title_view_entry_submenu"><![CDATA[View Video Submenu]]></string>
+    <string name="_bx_videos_menu_set_title_view_entry_submenu"><![CDATA[View Video Submenu]]></string>
+    <string name="_bx_videos_menu_item_title_view_entry_submenu_entry"><![CDATA[Video]]></string>
+    <string name="_bx_videos_menu_item_title_view_entry_submenu_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_videos_menu_item_title_system_view_entry_comments"><![CDATA[Video Comments]]></string>
+    <string name="_bx_videos_menu_item_title_system_view_entries_author"><![CDATA[Videos]]></string>
+    <string name="_bx_videos_menu_item_title_view_entries_author"><![CDATA[Videos]]></string>
+    <string name="_bx_videos_menu_title_entries_my"><![CDATA[My Videos Action Menu]]></string>
+    <string name="_bx_videos_menu_set_title_entries_my"><![CDATA[My Videos Menu]]></string>
+	<string name="_bx_videos_menu_item_title_system_manage_my_videos"><![CDATA[My videos]]></string>
+    <string name="_bx_videos_menu_item_title_manage_my_videos"><![CDATA[{addon} videos]]></string>
+    <string name="_bx_videos_menu_set_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_videos_menu_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_videos_menu_item_title_system_manage_account"><![CDATA[Manage account]]></string>
+    <string name="_bx_videos_menu_item_title_manage_account"><![CDATA[Manage account]]></string>
+	<string name="_bx_videos_menu_item_title_system_admt_videos"><![CDATA[Videos]]></string>
+	<string name="_bx_videos_menu_item_title_admt_videos"><![CDATA[Videos - {addon} hidden]]></string>
+	<string name="_bx_videos_menu_item_title_manage_my"><![CDATA[My Videos]]></string>
+	<string name="_bx_videos_menu_item_title_manage_all"><![CDATA[All Videos]]></string>
+
+	<string name="_bx_videos_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
+	<string name="_bx_videos_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
+	<string name="_bx_videos_grid_filter_item_title_adm_hidden"><![CDATA[Hidden]]></string>
+	<string name="_bx_videos_grid_column_title_adm_active"><![CDATA[Active]]></string>
+    <string name="_bx_videos_grid_column_title_adm_title"><![CDATA[Title]]></string>
+    <string name="_bx_videos_grid_column_title_adm_added"><![CDATA[Added]]></string>
+    <string name="_bx_videos_grid_column_title_adm_author"><![CDATA[Author]]></string>
+    <string name="_bx_videos_grid_action_title_adm_edit"><![CDATA[Edit]]></string>
+    <string name="_bx_videos_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
+    <string name="_bx_videos_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
+    <string name="_bx_videos_grid_action_err_delete"><![CDATA[Cannot delete the selected video(s).]]></string>
+    <string name="_bx_videos_grid_txt_account_manager"><![CDATA[Redirect to manage account.]]></string>
+
+    <string name="_bx_videos_chart_growth"><![CDATA[Videos: Growth]]></string>
+    <string name="_bx_videos_chart_growth_speed"><![CDATA[Videos: Growth Speed]]></string>
+
+    <string name="_bx_videos_search_extended"><![CDATA[Videos Search]]></string>
+    <string name="_bx_videos_search_extended_cmts"><![CDATA[Videos Comments Search]]></string>
+
+    <string name="_bx_videos_pre_lists_cats"><![CDATA[Video categories]]></string>
+    <string name="_bx_videos_cat_Animals_Pets"><![CDATA[Animals & Pets]]></string>
+    <string name="_bx_videos_cat_Architecture"><![CDATA[Architecture]]></string>
+    <string name="_bx_videos_cat_Art"><![CDATA[Art]]></string>
+    <string name="_bx_videos_cat_Cars_Motorcycles"><![CDATA[Cars & Motorcycles]]></string>
+    <string name="_bx_videos_cat_Celebrities"><![CDATA[Celebrities]]></string>
+    <string name="_bx_videos_cat_Design"><![CDATA[Design]]></string>
+    <string name="_bx_videos_cat_DIY_Crafts"><![CDATA[DIY & Crafts]]></string>
+    <string name="_bx_videos_cat_Education"><![CDATA[Education]]></string>
+    <string name="_bx_videos_cat_Film_Music_Books"><![CDATA[Film, Music & Books]]></string>
+    <string name="_bx_videos_cat_Food_Drink"><![CDATA[Food & Drink]]></string>
+    <string name="_bx_videos_cat_Gardening"><![CDATA[Gardening]]></string>
+    <string name="_bx_videos_cat_Geek"><![CDATA[Geek]]></string>
+    <string name="_bx_videos_cat_Hair_Beauty"><![CDATA[Hair & Beauty]]></string>
+    <string name="_bx_videos_cat_Health_Fitness"><![CDATA[Health & Fitness]]></string>
+    <string name="_bx_videos_cat_History"><![CDATA[History]]></string>
+    <string name="_bx_videos_cat_Holidays_Events"><![CDATA[Holidays & Events]]></string>
+    <string name="_bx_videos_cat_Home_Decor"><![CDATA[Home Decor]]></string>
+    <string name="_bx_videos_cat_Humor"><![CDATA[Humor]]></string>
+    <string name="_bx_videos_cat_Illustrations_Posters"><![CDATA[Illustrations & Posters]]></string>
+    <string name="_bx_videos_cat_Kids_Parenting"><![CDATA[Kids & Parenting]]></string>
+    <string name="_bx_videos_cat_Mens_Fashion"><![CDATA[Men's Fashion]]></string>
+    <string name="_bx_videos_cat_Outdoors"><![CDATA[Outdoors]]></string>
+    <string name="_bx_videos_cat_Photography"><![CDATA[Photography]]></string>
+    <string name="_bx_videos_cat_Products"><![CDATA[Products]]></string>
+    <string name="_bx_videos_cat_Quotes"><![CDATA[Quotes]]></string>
+    <string name="_bx_videos_cat_Science_Nature"><![CDATA[Science & Nature]]></string>
+    <string name="_bx_videos_cat_Sports"><![CDATA[Sports]]></string>
+    <string name="_bx_videos_cat_Tattoos"><![CDATA[Tattoos]]></string>
+    <string name="_bx_videos_cat_Technology"><![CDATA[Technology]]></string>
+    <string name="_bx_videos_cat_Travel"><![CDATA[Travel]]></string>
+    <string name="_bx_videos_cat_Weddings"><![CDATA[Weddings]]></string>
+    <string name="_bx_videos_cat_Womens_Fashion"><![CDATA[Women's Fashion]]></string>
+
+    <string name="_bx_videos_txt_all_entries_by"><![CDATA[<a href="{0}">All Videos by {1} ({2})</a>]]></string>
+    <string name="_bx_videos_txt_sample_single"><![CDATA[video]]></string>
+    <string name="_bx_videos_txt_sample_single_with_article"><![CDATA[a video]]></string>
+    <string name="_bx_videos_txt_sample_comment_single"><![CDATA[comment to video]]></string>
+    <string name="_bx_videos_txt_sample_vote_single"><![CDATA[vote to video]]></string>
+</resources>

+ 63 - 0
modules/boonex/videos/install/sql/disable.sql

@@ -0,0 +1,63 @@
+
+-- SETTINGS
+SET @iTypeId = (SELECT `ID` FROM `sys_options_types` WHERE `name` = 'bx_videos' LIMIT 1);
+SET @iCategId = (SELECT `ID` FROM `sys_options_categories` WHERE `type_id` = @iTypeId LIMIT 1);
+DELETE FROM `sys_options` WHERE `category_id` = @iCategId;
+DELETE FROM `sys_options_categories` WHERE `type_id` = @iTypeId;
+DELETE FROM `sys_options_types` WHERE `id` = @iTypeId;
+
+
+-- PAGES
+DELETE FROM `sys_objects_page` WHERE `module` = 'bx_videos';
+DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_videos' OR `object` IN('bx_videos_create_entry', 'bx_videos_edit_entry', 'bx_videos_delete_entry', 'bx_videos_view_entry', 'bx_videos_view_entry_comments', 'bx_videos_home', 'bx_videos_popular', 'bx_videos_updated', 'bx_videos_author', 'bx_videos_search', 'bx_videos_manage');
+
+
+-- MENU
+DELETE FROM `sys_objects_menu` WHERE `module` = 'bx_videos';
+DELETE FROM `sys_menu_sets` WHERE `module` = 'bx_videos';
+DELETE FROM `sys_menu_items` WHERE `module` = 'bx_videos' OR `set_name` IN('bx_videos_view', 'bx_videos_submenu', 'bx_videos_view_submenu', 'bx_videos_my');
+
+
+-- PRIVACY 
+DELETE FROM `sys_objects_privacy` WHERE `object` = 'bx_videos_allow_view_to';
+
+
+-- ACL
+DELETE `sys_acl_actions`, `sys_acl_matrix` FROM `sys_acl_actions`, `sys_acl_matrix` WHERE `sys_acl_matrix`.`IDAction` = `sys_acl_actions`.`ID` AND `sys_acl_actions`.`Module` = 'bx_videos';
+DELETE FROM `sys_acl_actions` WHERE `Module` = 'bx_videos';
+
+
+-- SEARCH
+DELETE FROM `sys_objects_search` WHERE `ObjectName` IN ('bx_videos', 'bx_videos_cmts');
+
+
+-- METATAGS
+DELETE FROM `sys_objects_metatags` WHERE `object` = 'bx_videos';
+
+
+-- CATEGORY
+DELETE FROM `sys_objects_category` WHERE `object` = 'bx_videos_cats';
+
+
+-- STATS
+DELETE FROM `sys_statistics` WHERE `name` LIKE 'bx_videos%';
+
+
+-- CHARTS
+DELETE FROM `sys_objects_chart` WHERE `object` LIKE 'bx_videos%';
+
+
+-- GRIDS
+DELETE FROM `sys_objects_grid` WHERE `object` IN ('bx_videos_administration', 'bx_videos_common');
+DELETE FROM `sys_grid_fields` WHERE `object` IN ('bx_videos_administration', 'bx_videos_common');
+DELETE FROM `sys_grid_actions` WHERE `object` IN ('bx_videos_administration', 'bx_videos_common');
+
+
+-- UPLOADERS
+DELETE FROM `sys_objects_uploader` WHERE `object` IN('bx_videos_simple', 'bx_videos_html5');
+
+
+-- ALERTS
+SET @iHandler := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_videos' LIMIT 1);
+DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandler;
+DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandler;

+ 373 - 0
modules/boonex/videos/install/sql/enable.sql

@@ -0,0 +1,373 @@
+
+-- 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_videos', '_bx_videos', 'bx_videos@modules/boonex/videos/|std-icon.svg', IF(ISNULL(@iTypeOrder), 1, @iTypeOrder + 1));
+SET @iTypeId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
+VALUES (@iTypeId, 'bx_videos', '_bx_videos', 1);
+SET @iCategId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `extra`, `order`) VALUES
+('bx_videos_summary_chars', '700', @iCategId, '_bx_videos_option_summary_chars', 'digit', '', '', '', 1),
+('bx_videos_plain_summary_chars', '240', @iCategId, '_bx_videos_option_plain_summary_chars', 'digit', '', '', '', 2),
+('bx_videos_per_page_browse', '12', @iCategId, '_bx_videos_option_per_page_browse', 'digit', '', '', '', 10),
+('bx_videos_per_page_profile', '3', @iCategId, '_bx_videos_option_per_page_profile', 'digit', '', '', '', 12),
+('bx_videos_rss_num', '10', @iCategId, '_bx_videos_option_rss_num', 'digit', '', '', '', 20),
+('bx_videos_searchable_fields', 'title,text', @iCategId, '_bx_videos_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:21:"get_searchable_fields";}', 30);
+
+
+-- PAGE: create entry
+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_videos_create_entry', '_bx_videos_page_title_sys_create_entry', '_bx_videos_page_title_create_entry', 'bx_videos', 5, 2147483647, 1, 'create-video', 'page.php?i=create-video', '', '', '', 0, 1, 0, 'BxVideosPageBrowse', 'modules/boonex/videos/classes/BxVideosPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_videos_create_entry', 1, 'bx_videos', '_bx_videos_page_block_title_create_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:13:"entity_create";}', 0, 1, 1);
+
+-- PAGE: edit entry
+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_videos_edit_entry', '_bx_videos_page_title_sys_edit_entry', '_bx_videos_page_title_edit_entry', 'bx_videos', 5, 2147483647, 1, 'edit-video', '', '', '', '', 0, 1, 0, 'BxVideosPageEntry', 'modules/boonex/videos/classes/BxVideosPageEntry.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_videos_edit_entry', 1, 'bx_videos', '_bx_videos_page_block_title_edit_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:11:"entity_edit";}', 0, 0, 0);
+
+-- PAGE: delete entry
+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_videos_delete_entry', '_bx_videos_page_title_sys_delete_entry', '_bx_videos_page_title_delete_entry', 'bx_videos', 5, 2147483647, 1, 'delete-video', '', '', '', '', 0, 1, 0, 'BxVideosPageEntry', 'modules/boonex/videos/classes/BxVideosPageEntry.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_videos_delete_entry', 1, 'bx_videos', '_bx_videos_page_block_title_delete_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:13:"entity_delete";}', 0, 0, 0);
+
+-- PAGE: view entry
+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_videos_view_entry', '_bx_videos_page_title_sys_view_entry', '_bx_videos_page_title_view_entry', 'bx_videos', 10, 2147483647, 1, 'view-video', '', '', '', '', 0, 1, 0, 'BxVideosPageEntry', 'modules/boonex/videos/classes/BxVideosPageEntry.php');
+
+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_videos_view_entry', 1, 'bx_videos', '', '_bx_videos_page_block_title_entry_video', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:18:"entity_video_block";}', 0, 0, 1, 0),
+('bx_videos_view_entry', 1, 'bx_videos', '', '_bx_videos_page_block_title_entry_text', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:17:"entity_text_block";}', 0, 0, 1, 1),
+('bx_videos_view_entry', 2, 'bx_videos', '', '_bx_videos_page_block_title_entry_author', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:13:"entity_author";}', 0, 0, 1, 0),
+('bx_videos_view_entry', 3, 'bx_videos', '', '_bx_videos_page_block_title_entry_info', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:11:"entity_info";}', 0, 0, 1, 1),
+('bx_videos_view_entry', 3, 'bx_videos', '', '_bx_videos_page_block_title_entry_location', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:15:"entity_location";}', 0, 0, 0, 2),
+('bx_videos_view_entry', 4, 'bx_videos', '', '_bx_videos_page_block_title_entry_all_actions', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:18:"entity_all_actions";}', 0, 0, 1, 0),
+('bx_videos_view_entry', 4, 'bx_videos', '', '_bx_videos_page_block_title_entry_actions', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:14:"entity_actions";}', 0, 0, 0, 1),
+('bx_videos_view_entry', 4, 'bx_videos', '', '_bx_videos_page_block_title_entry_social_sharing', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:21:"entity_social_sharing";}', 0, 0, 0, 2),
+('bx_videos_view_entry', 4, 'bx_videos', '', '_bx_videos_page_block_title_entry_attachments', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:18:"entity_attachments";}', 0, 0, 0, 3),
+('bx_videos_view_entry', 4, 'bx_videos', '', '_bx_videos_page_block_title_entry_comments', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:15:"entity_comments";}', 0, 0, 1, 4),
+('bx_videos_view_entry', 4, 'bx_videos', '', '_bx_videos_page_block_title_entry_location', 3, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:13:"locations_map";s:6:"params";a:2:{i:0;s:9:"bx_videos";i:1;s:4:"{id}";}s:5:"class";s:20:"TemplServiceMetatags";}', 0, 0, 1, 5);
+
+-- PAGE: view entry comments
+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_videos_view_entry_comments', '_bx_videos_page_title_sys_view_entry_comments', '_bx_videos_page_title_view_entry_comments', 'bx_videos', 5, 2147483647, 1, 'view-video-comments', '', '', '', '', 0, 1, 0, 'BxVideosPageEntry', 'modules/boonex/videos/classes/BxVideosPageEntry.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_videos_view_entry_comments', 1, 'bx_videos', '_bx_videos_page_block_title_entry_comments', '_bx_videos_page_block_title_entry_comments_link', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:15:"entity_comments";}', 0, 0, 1);
+
+-- PAGE: popular entries
+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_videos_popular', '_bx_videos_page_title_sys_entries_popular', '_bx_videos_page_title_entries_popular', 'bx_videos', 5, 2147483647, 1, 'videos-popular', 'page.php?i=videos-popular', '', '', '', 0, 1, 0, 'BxVideosPageBrowse', 'modules/boonex/videos/classes/BxVideosPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_videos_popular', 1, 'bx_videos', '_bx_videos_page_block_title_popular_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:14:"browse_popular";s:6:"params";a:3:{s:9:"unit_view";s:7:"gallery";s:13:"empty_message";b:1;s:13:"ajax_paginate";b:0;}}', 0, 1, 1);
+
+-- PAGE: recently updated entries
+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_videos_updated', '_bx_videos_page_title_sys_entries_updated', '_bx_videos_page_title_entries_updated', 'bx_videos', 5, 2147483647, 1, 'videos-updated', 'page.php?i=videos-updated', '', '', '', 0, 1, 0, 'BxVideosPageBrowse', 'modules/boonex/videos/classes/BxVideosPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_videos_updated', 1, 'bx_videos', '_bx_videos_page_block_title_updated_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:14:"browse_updated";s:6:"params";a:3:{s:9:"unit_view";s:7:"gallery";s:13:"empty_message";b:1;s:13:"ajax_paginate";b:0;}}', 0, 1, 1);
+
+-- PAGE: entries of author
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_author', 'videos-author', '_bx_videos_page_title_sys_entries_of_author', '_bx_videos_page_title_entries_of_author', 'bx_videos', 5, 2147483647, 1, '', '', '', '', 0, 1, 0, 'BxVideosPageAuthor', 'modules/boonex/videos/classes/BxVideosPageAuthor.php');
+
+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_videos_author', 1, 'bx_videos', '', '_bx_videos_page_block_title_entries_actions', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:18:"my_entries_actions";}', 0, 0, 1, 1),
+('bx_videos_author', 1, 'bx_videos', '_bx_videos_page_block_title_sys_favorites_of_author', '_bx_videos_page_block_title_favorites_of_author', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:15:"browse_favorite";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}', 0, 1, 1, 2),
+('bx_videos_author', 1, 'bx_videos', '_bx_videos_page_block_title_sys_entries_of_author', '_bx_videos_page_block_title_entries_of_author', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:13:"browse_author";}', 0, 0, 1, 3);
+
+-- PAGE: module home
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_home', 'videos-home', '_bx_videos_page_title_sys_home', '_bx_videos_page_title_home', 'bx_videos', 2, 2147483647, 1, 'page.php?i=videos-home', '', '', '', 0, 1, 0, 'BxVideosPageBrowse', 'modules/boonex/videos/classes/BxVideosPageBrowse.php');
+
+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_videos_home', 1, 'bx_videos', '', '_bx_videos_page_block_title_featured_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:15:"browse_featured";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, 1, 0),
+('bx_videos_home', 1, 'bx_videos', '', '_bx_videos_page_block_title_recent_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:13:"browse_public";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, 1, 1),
+('bx_videos_home', 2, 'bx_videos', '', '_bx_videos_page_block_title_popular_keywords', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:14:"keywords_cloud";s:6:"params";a:2:{i:0;s:9:"bx_videos";i:1;s:9:"bx_videos";}s:5:"class";s:20:"TemplServiceMetatags";}', 0, 1, 1, 0),
+('bx_videos_home', 2, 'bx_videos', '', '_bx_videos_page_block_title_cats', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:15:"categories_list";s:6:"params";a:2:{i:0;s:14:"bx_videos_cats";i:1;a:1:{s:10:"show_empty";b:1;}}s:5:"class";s:20:"TemplServiceCategory";}', 0, 1, 1, 1);
+
+-- PAGE: search for entries
+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_videos_search', '_bx_videos_page_title_sys_entries_search', '_bx_videos_page_title_entries_search', 'bx_videos', 5, 2147483647, 1, 'videos-search', 'page.php?i=videos-search', '', '', '', 0, 1, 0, 'BxVideosPageBrowse', 'modules/boonex/videos/classes/BxVideosPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_videos_search', 1, 'bx_videos', '_bx_videos_page_block_title_search_form', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:8:"get_form";s:6:"params";a:1:{i:0;a:1:{s:6:"object";s:9:"bx_videos";}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 1, 1),
+('bx_videos_search', 1, 'bx_videos', '_bx_videos_page_block_title_search_results', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_results";s:6:"params";a:1:{i:0;a:2:{s:6:"object";s:9:"bx_videos";s:10:"show_empty";b:1;}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 1, 2),
+('bx_videos_search', 1, 'bx_videos', '_bx_videos_page_block_title_search_form_cmts', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:8:"get_form";s:6:"params";a:1:{i:0;a:1:{s:6:"object";s:14:"bx_videos_cmts";}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 0, 3),
+('bx_videos_search', 1, 'bx_videos', '_bx_videos_page_block_title_search_results_cmts', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_results";s:6:"params";a:1:{i:0;a:2:{s:6:"object";s:14:"bx_videos_cmts";s:10:"show_empty";b:1;}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 0, 4);
+
+-- PAGE: module manage own
+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_videos_manage', '_bx_videos_page_title_sys_manage', '_bx_videos_page_title_manage', 'bx_videos', 5, 2147483647, 1, 'videos-manage', 'page.php?i=videos-manage', '', '', '', 0, 1, 0, 'BxVideosPageBrowse', 'modules/boonex/videos/classes/BxVideosPageBrowse.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_videos_manage', 1, 'bx_videos', '_bx_videos_page_block_title_system_manage', '_bx_videos_page_block_title_manage', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:12:"manage_tools";}}', 0, 1, 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_videos_administration', '_bx_videos_page_title_sys_manage_administration', '_bx_videos_page_title_manage', 'bx_videos', 5, 192, 1, 'videos-administration', 'page.php?i=videos-administration', '', '', '', 0, 1, 0, 'BxVideosPageBrowse', 'modules/boonex/videos/classes/BxVideosPageBrowse.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_videos_administration', 1, 'bx_videos', '_bx_videos_page_block_title_system_manage_administration', '_bx_videos_page_block_title_manage', 11, 192, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:12:"manage_tools";s:6:"params";a:1:{i:0;s:14:"administration";}}', 0, 1, 0);
+
+-- PAGE: add block to homepage
+SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = 'sys_home' AND `cell_id` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('sys_home', 1, 'bx_videos', '_bx_videos_page_block_title_recent_entries', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:13:"browse_public";}', 1, 0, 0, IFNULL(@iBlockOrder, 0) + 1);
+
+-- PAGES: add page block to profiles modules (trigger* page objects are processed separately upon modules enable/disable)
+SET @iPBCellProfile = 3;
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_videos', '_bx_videos_page_block_title_my_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:13:"browse_author";s:6:"params";a:2:{i:0;s:12:"{profile_id}";i:1;a:1:{s:8:"per_page";s:26:"bx_videos_per_page_profile";}}}', 0, 0, 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`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('', 0, 'bx_videos', '_bx_videos_page_block_title_recent_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:13:"browse_public";s:6:"params";a:1:{i:0;s:4:"gallery";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 1),
+('', 0, 'bx_videos', '_bx_videos_page_block_title_recent_entries_view_full', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:13:"browse_public";s:6:"params";a:1:{i:0;s:4:"full";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 2),
+('', 0, 'bx_videos', '_bx_videos_page_block_title_popular_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:14:"browse_popular";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 3),
+('', 0, 'bx_videos', '_bx_videos_page_block_title_popular_entries_view_full', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:14:"browse_popular";s:6:"params";a:1:{i:0;s:4:"full";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 4),
+('', 0, 'bx_videos', '_bx_videos_page_block_title_featured_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:15:"browse_featured";s:6:"params";a:1:{i:0;s:7:"gallery";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 5),
+('', 0, 'bx_videos', '_bx_videos_page_block_title_featured_entries_view_full', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:15:"browse_featured";s:6:"params";a:1:{i:0;s:4:"full";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 6);
+
+
+-- MENU: add to site menu
+SET @iSiteMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_site' 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_site', 'bx_videos', 'videos-home', '_bx_videos_menu_item_title_system_entries_home', '_bx_videos_menu_item_title_entries_home', 'page.php?i=videos-home', '', '', 'film col-gray', 'bx_videos_submenu', 2147483647, 1, 1, IFNULL(@iSiteMenuOrder, 0) + 1);
+
+-- MENU: add to homepage menu
+SET @iHomepageMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_homepage' 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_homepage', 'bx_videos', 'videos-home', '_bx_videos_menu_item_title_system_entries_home', '_bx_videos_menu_item_title_entries_home', 'page.php?i=videos-home', '', '', 'film col-gray', 'bx_videos_submenu', 2147483647, 1, 1, IFNULL(@iHomepageMenuOrder, 0) + 1);
+
+-- 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_videos', 'create-video', '_bx_videos_menu_item_title_system_create_entry', '_bx_videos_menu_item_title_create_entry', 'page.php?i=create-video', '', '', 'film col-gray', '', 2147483647, 1, 1, IFNULL(@iAddMenuOrder, 0) + 1);
+
+-- MENU: 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_videos_view', '_bx_videos_menu_title_view_entry', 'bx_videos_view', 'bx_videos', 9, 0, 1, 'BxVideosMenuView', 'modules/boonex/videos/classes/BxVideosMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_videos_view', 'bx_videos', '_bx_videos_menu_set_title_view_entry', 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_videos_view', 'bx_videos', 'edit-video', '_bx_videos_menu_item_title_system_edit_entry', '_bx_videos_menu_item_title_edit_entry', 'page.php?i=edit-video&id={content_id}', '', '', 'pencil', '', 2147483647, 1, 0, 1),
+('bx_videos_view', 'bx_videos', 'delete-video', '_bx_videos_menu_item_title_system_delete_entry', '_bx_videos_menu_item_title_delete_entry', 'page.php?i=delete-video&id={content_id}', '', '', 'remove', '', 2147483647, 1, 0, 2);
+
+-- MENU: actions menu for my entries
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_my', '_bx_videos_menu_title_entries_my', 'bx_videos_my', 'bx_videos', 9, 0, 1, 'BxVideosMenu', 'modules/boonex/videos/classes/BxVideosMenu.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_videos_my', 'bx_videos', '_bx_videos_menu_set_title_entries_my', 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_videos_my', 'bx_videos', 'create-video', '_bx_videos_menu_item_title_system_create_entry', '_bx_videos_menu_item_title_create_entry', 'page.php?i=create-video', '', '', 'plus', '', 2147483647, 1, 0, 0);
+
+-- MENU: module sub-menu
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_submenu', '_bx_videos_menu_title_submenu', 'bx_videos_submenu', 'bx_videos', 8, 0, 1, '', '');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_videos_submenu', 'bx_videos', '_bx_videos_menu_set_title_submenu', 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_videos_submenu', 'bx_videos', 'videos-home', '_bx_videos_menu_item_title_system_entries_public', '_bx_videos_menu_item_title_entries_public', 'page.php?i=videos-home', '', '', '', '', 2147483647, 1, 1, 1),
+('bx_videos_submenu', 'bx_videos', 'videos-popular', '_bx_videos_menu_item_title_system_entries_popular', '_bx_videos_menu_item_title_entries_popular', 'page.php?i=videos-popular', '', '', '', '', 2147483647, 1, 1, 2),
+('bx_videos_submenu', 'bx_videos', 'videos-search', '_bx_videos_menu_item_title_system_entries_search', '_bx_videos_menu_item_title_entries_search', 'page.php?i=videos-search', '', '', '', '', 2147483647, 1, 1, 3),
+('bx_videos_submenu', 'bx_videos', 'videos-manage', '_bx_videos_menu_item_title_system_entries_manage', '_bx_videos_menu_item_title_entries_manage', 'page.php?i=videos-manage', '', '', '', '', 2147483646, 1, 1, 4);
+
+-- MENU: sub-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_videos_view_submenu', '_bx_videos_menu_title_view_entry_submenu', 'bx_videos_view_submenu', 'bx_videos', 8, 0, 1, 'BxVideosMenuView', 'modules/boonex/videos/classes/BxVideosMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_videos_view_submenu', 'bx_videos', '_bx_videos_menu_set_title_view_entry_submenu', 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_videos_view_submenu', 'bx_videos', 'view-video', '_bx_videos_menu_item_title_system_view_entry', '_bx_videos_menu_item_title_view_entry_submenu_entry', 'page.php?i=view-video&id={content_id}', '', '', '', '', 2147483647, 0, 0, 1),
+('bx_videos_view_submenu', 'bx_videos', 'view-video-comments', '_bx_videos_menu_item_title_system_view_entry_comments', '_bx_videos_menu_item_title_view_entry_submenu_comments', 'page.php?i=view-video-comments&id={content_id}', '', '', '', '', 2147483647, 0, 0, 2);
+
+-- MENU: profile stats
+SET @iNotifMenuOrder = (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_videos', 'profile-stats-manage-videos', '_bx_videos_menu_item_title_system_manage_my_videos', '_bx_videos_menu_item_title_manage_my_videos', 'page.php?i=videos-manage', '', '_self', 'film col-gray', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:41:"get_menu_addon_manage_tools_profile_stats";}', '', 2147483646, 1, 0, @iNotifMenuOrder + 1);
+
+-- MENU: manage tools submenu
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_menu_manage_tools', '_bx_videos_menu_title_manage_tools', 'bx_videos_menu_manage_tools', 'bx_videos', 6, 0, 1, 'BxVideosMenuManageTools', 'modules/boonex/videos/classes/BxVideosMenuManageTools.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_videos_menu_manage_tools', 'bx_videos', '_bx_videos_menu_set_title_manage_tools', 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_videos_menu_manage_tools', 'bx_videos', 'delete-with-content', '_bx_videos_menu_item_title_system_delete_with_content', '_bx_videos_menu_item_title_delete_with_content', 'javascript:void(0)', 'javascript:{js_object}.onClickDeleteWithContent({content_id});', '_self', 'trash-o', '', 128, 1, 0, 0);
+
+-- 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_videos', 'videos-administration', '_bx_videos_menu_item_title_system_admt_videos', '_bx_videos_menu_item_title_admt_videos', 'page.php?i=videos-administration', '', '_self', '', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:27:"get_menu_addon_manage_tools";}', '', 192, 1, 0, @iManageMenuOrder + 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_videos', 'videos-author', '_bx_videos_menu_item_title_system_view_entries_author', '_bx_videos_menu_item_title_view_entries_author', 'page.php?i=videos-author&profile_id={profile_id}', '', '', 'film col-gray', '', 2147483647, 1, 0, 0);
+
+
+-- 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_videos_allow_view_to', 'bx_videos', 'view', '_bx_videos_form_entry_input_allow_view_to', '3', 'bx_videos_entries', 'id', 'author', '', '');
+
+
+-- ACL
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_videos', 'create entry', NULL, '_bx_videos_acl_action_create_entry', '', 1, 3);
+SET @iIdActionEntryCreate = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_videos', 'delete entry', NULL, '_bx_videos_acl_action_delete_entry', '', 1, 3);
+SET @iIdActionEntryDelete = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_videos', 'view entry', NULL, '_bx_videos_acl_action_view_entry', '', 1, 0);
+SET @iIdActionEntryView = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_videos', 'set thumb', NULL, '_bx_videos_acl_action_set_thumb', '', 1, 3);
+SET @iIdActionSetThumb = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_videos', 'edit any entry', NULL, '_bx_videos_acl_action_edit_any_entry', '', 1, 3);
+SET @iIdActionEntryEditAny = 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
+
+-- entry create
+(@iStandard, @iIdActionEntryCreate),
+(@iModerator, @iIdActionEntryCreate),
+(@iAdministrator, @iIdActionEntryCreate),
+(@iPremium, @iIdActionEntryCreate),
+
+-- entry delete
+(@iStandard, @iIdActionEntryDelete),
+(@iModerator, @iIdActionEntryDelete),
+(@iAdministrator, @iIdActionEntryDelete),
+(@iPremium, @iIdActionEntryDelete),
+
+-- entry view
+(@iUnauthenticated, @iIdActionEntryView),
+(@iAccount, @iIdActionEntryView),
+(@iStandard, @iIdActionEntryView),
+(@iUnconfirmed, @iIdActionEntryView),
+(@iPending, @iIdActionEntryView),
+(@iModerator, @iIdActionEntryView),
+(@iAdministrator, @iIdActionEntryView),
+(@iPremium, @iIdActionEntryView),
+
+-- set entry thumb
+(@iStandard, @iIdActionSetThumb),
+(@iModerator, @iIdActionSetThumb),
+(@iAdministrator, @iIdActionSetThumb),
+(@iPremium, @iIdActionSetThumb),
+
+-- edit any entry
+(@iModerator, @iIdActionEntryEditAny),
+(@iAdministrator, @iIdActionEntryEditAny);
+
+
+-- SEARCH
+SET @iSearchOrder = (SELECT IFNULL(MAX(`Order`), 0) FROM `sys_objects_search`);
+INSERT INTO `sys_objects_search` (`ObjectName`, `Title`, `Order`, `ClassName`, `ClassPath`) VALUES
+('bx_videos', '_bx_videos', @iSearchOrder + 1, 'BxVideosSearchResult', 'modules/boonex/videos/classes/BxVideosSearchResult.php'),
+('bx_videos_cmts', '_bx_videos_cmts', @iSearchOrder + 2, 'BxVideosCmtsSearchResult', 'modules/boonex/videos/classes/BxVideosCmtsSearchResult.php');
+
+
+-- METATAGS
+INSERT INTO `sys_objects_metatags` (`object`, `table_keywords`, `table_locations`, `table_mentions`, `override_class_name`, `override_class_file`) VALUES
+('bx_videos', 'bx_videos_meta_keywords', 'bx_videos_meta_locations', '', '', '');
+
+
+-- CATEGORY
+INSERT INTO `sys_objects_category` (`object`, `search_object`, `form_object`, `list_name`, `table`, `field`, `join`, `where`, `override_class_name`, `override_class_file`) VALUES
+('bx_videos_cats', 'bx_videos', 'bx_videos', 'bx_videos_cats', 'bx_videos_entries', 'cat', 'INNER JOIN `sys_profiles` ON (`sys_profiles`.`id` = `bx_videos_entries`.`author`)', 'AND `sys_profiles`.`status` = ''active''', '', '');
+
+
+-- STATS
+SET @iMaxOrderStats = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_statistics`);
+INSERT INTO `sys_statistics` (`module`, `name`, `title`, `link`, `icon`, `query`, `order`) VALUES 
+('bx_videos', 'bx_videos', '_bx_videos', 'page.php?i=videos-home', 'film col-gray', 'SELECT COUNT(*) FROM `bx_videos_entries` WHERE 1 AND `status` = ''active'' AND `status_admin` = ''active''', @iMaxOrderStats + 1);
+
+
+-- CHARTS
+SET @iMaxOrderCharts = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_objects_chart`);
+INSERT INTO `sys_objects_chart` (`object`, `title`, `table`, `field_date_ts`, `field_date_dt`, `field_status`, `query`, `active`, `order`, `class_name`, `class_file`) VALUES
+('bx_videos_growth', '_bx_videos_chart_growth', 'bx_videos_entries', 'added', '', 'status,status_admin', '', 1, @iMaxOrderCharts + 1, 'BxDolChartGrowth', ''),
+('bx_videos_growth_speed', '_bx_videos_chart_growth_speed', 'bx_videos_entries', 'added', '', 'status,status_admin', '', 1, @iMaxOrderCharts + 2, 'BxDolChartGrowthSpeed', '');
+
+
+-- 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_videos_administration', 'Sql', 'SELECT * FROM `bx_videos_entries` WHERE 1 ', 'bx_videos_entries', 'id', 'added', 'status_admin', '', 20, NULL, 'start', '', 'title,text', '', 'like', '', '', 192, 'BxVideosGridAdministration', 'modules/boonex/videos/classes/BxVideosGridAdministration.php'),
+('bx_videos_common', 'Sql', 'SELECT * FROM `bx_videos_entries` WHERE 1 ', 'bx_videos_entries', 'id', 'added', 'status', '', 20, NULL, 'start', '', 'title,text', '', 'like', '', '', 2147483647, 'BxVideosGridCommon', 'modules/boonex/videos/classes/BxVideosGridCommon.php');
+
+
+INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
+('bx_videos_administration', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
+('bx_videos_administration', 'switcher', '_bx_videos_grid_column_title_adm_active', '8%', 0, '', '', 2),
+('bx_videos_administration', 'title', '_bx_videos_grid_column_title_adm_title', '25%', 0, '25', '', 3),
+('bx_videos_administration', 'added', '_bx_videos_grid_column_title_adm_added', '20%', 1, '25', '', 4),
+('bx_videos_administration', 'author', '_bx_videos_grid_column_title_adm_author', '25%', 0, '25', '', 5),
+('bx_videos_administration', 'actions', '', '20%', 0, '', '', 6),
+('bx_videos_common', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
+('bx_videos_common', 'switcher', '_bx_videos_grid_column_title_adm_active', '8%', 0, '', '', 2),
+('bx_videos_common', 'title', '_bx_videos_grid_column_title_adm_title', '40%', 0, '35', '', 3),
+('bx_videos_common', 'added', '_bx_videos_grid_column_title_adm_added', '30%', 1, '25', '', 4),
+('bx_videos_common', 'actions', '', '20%', 0, '', '', 5);
+
+INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
+('bx_videos_administration', 'bulk', 'delete', '_bx_videos_grid_action_title_adm_delete', '', 0, 1, 1),
+('bx_videos_administration', 'single', 'edit', '_bx_videos_grid_action_title_adm_edit', 'pencil', 1, 0, 1),
+('bx_videos_administration', 'single', 'delete', '_bx_videos_grid_action_title_adm_delete', 'remove', 1, 1, 2),
+('bx_videos_administration', 'single', 'settings', '_bx_videos_grid_action_title_adm_more_actions', 'cog', 1, 0, 3),
+('bx_videos_common', 'bulk', 'delete', '_bx_videos_grid_action_title_adm_delete', '', 0, 1, 1),
+('bx_videos_common', 'single', 'edit', '_bx_videos_grid_action_title_adm_edit', 'pencil', 1, 0, 1),
+('bx_videos_common', 'single', 'delete', '_bx_videos_grid_action_title_adm_delete', 'remove', 1, 1, 2),
+('bx_videos_common', 'single', 'settings', '_bx_videos_grid_action_title_adm_more_actions', 'cog', 1, 0, 3);
+
+
+-- UPLOADERS
+INSERT INTO `sys_objects_uploader` (`object`, `active`, `override_class_name`, `override_class_file`) VALUES
+('bx_videos_simple', 1, 'BxVideosUploaderSimple', 'modules/boonex/videos/classes/BxVideosUploaderSimple.php'),
+('bx_videos_html5', 1, 'BxVideosUploaderHTML5', 'modules/boonex/videos/classes/BxVideosUploaderHTML5.php');
+
+
+-- ALERTS
+INSERT INTO `sys_alerts_handlers` (`name`, `class`, `file`, `service_call`) VALUES 
+('bx_videos', 'BxVideosAlertsResponse', 'modules/boonex/videos/classes/BxVideosAlertsResponse.php', '');
+SET @iHandler := LAST_INSERT_ID();
+
+INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
+('system', 'save_setting', @iHandler),
+('profile', 'delete', @iHandler);

+ 355 - 0
modules/boonex/videos/install/sql/install.sql

@@ -0,0 +1,355 @@
+SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
+
+
+-- TABLE: entries
+CREATE TABLE IF NOT EXISTS `bx_videos_entries` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+  `author` int(10) unsigned NOT NULL default '0',
+  `added` int(11) NOT NULL default '0',
+  `changed` int(11) NOT NULL default '0',
+  `thumb` int(11) NOT NULL default '0',
+  `video` int(11) NOT NULL default '0',
+  `title` varchar(255) NOT NULL,
+  `cat` int(11) NOT NULL,
+  `text` text NOT NULL,
+  `duration` int(11) NOT NULL,
+  `views` int(11) NOT NULL default '0',
+  `rate` float NOT NULL default '0',
+  `votes` int(11) NOT NULL default '0',
+  `favorites` int(11) NOT NULL default '0',
+  `comments` int(11) NOT NULL default '0',
+  `reports` int(11) NOT NULL default '0',
+  `featured` int(11) NOT NULL default '0',
+  `allow_view_to` int(11) NOT NULL DEFAULT '3',
+  `status` enum('active','hidden') NOT NULL DEFAULT 'active',
+  `status_admin` enum('active','hidden') NOT NULL DEFAULT 'active',
+  PRIMARY KEY (`id`),
+  FULLTEXT KEY `title_text` (`title`,`text`)
+);
+
+-- TABLE: storages & transcoders
+CREATE TABLE IF NOT EXISTS `bx_videos_photos` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` int(11) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_videos_videos` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` int(11) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_videos_media_resized` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` int(11) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+-- TABLE: comments
+CREATE TABLE IF NOT EXISTS `bx_videos_cmts` (
+  `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
+  `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_object_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_level` int(11) NOT NULL DEFAULT '0',
+  `cmt_text` text NOT NULL,
+  `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',
+  `cmt_rate` int(11) NOT NULL DEFAULT '0',
+  `cmt_rate_count` int(11) NOT NULL DEFAULT '0',
+  `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
+  `cmt_replies` int(11) NOT NULL DEFAULT '0',
+  PRIMARY KEY (`cmt_id`),
+  KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
+  FULLTEXT KEY `search_fields` (`cmt_text`)
+);
+
+-- TABLE: votes
+CREATE TABLE IF NOT EXISTS `bx_videos_votes` (
+  `object_id` int(11) NOT NULL default '0',
+  `count` int(11) NOT NULL default '0',
+  `sum` int(11) NOT NULL default '0',
+  UNIQUE KEY `object_id` (`object_id`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `bx_videos_votes_track` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `author_nip` int(11) unsigned NOT NULL default '0',
+  `value` tinyint(4) NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `vote` (`object_id`, `author_nip`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: views
+CREATE TABLE `bx_videos_views_track` (
+  `object_id` int(11) NOT NULL default '0',
+  `viewer_id` int(11) NOT NULL default '0',
+  `viewer_nip` int(11) unsigned NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  KEY `id` (`object_id`,`viewer_id`,`viewer_nip`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: metas
+CREATE TABLE `bx_videos_meta_keywords` (
+  `object_id` int(10) unsigned NOT NULL,
+  `keyword` varchar(255) NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `keyword` (`keyword`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE `bx_videos_meta_locations` (
+  `object_id` int(10) unsigned NOT NULL,
+  `lat` double NOT NULL,
+  `lng` double NOT NULL,
+  `country` varchar(2) NOT NULL,
+  `state` varchar(255) NOT NULL,
+  `city` varchar(255) NOT NULL,
+  `zip` varchar(255) NOT NULL,
+  `street` varchar(255) NOT NULL,
+  `street_number` varchar(255) NOT NULL,
+  PRIMARY KEY (`object_id`),
+  KEY `country_state_city` (`country`,`state`(8),`city`(8))
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: reports
+CREATE TABLE IF NOT EXISTS `bx_videos_reports` (
+  `object_id` int(11) NOT NULL default '0',
+  `count` int(11) NOT NULL default '0',
+  UNIQUE KEY `object_id` (`object_id`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `bx_videos_reports_track` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `author_nip` int(11) unsigned NOT NULL default '0',
+  `type` varchar(32) NOT NULL default '',
+  `text` text NOT NULL default '',
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `report` (`object_id`, `author_nip`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8;
+
+-- TABLE: favorites
+CREATE TABLE `bx_videos_favorites_track` (
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  KEY `id` (`object_id`,`author_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+
+-- STORAGES & TRANSCODERS
+INSERT INTO `sys_objects_storage` (`object`, `engine`, `params`, `token_life`, `cache_control`, `levels`, `table_files`, `ext_mode`, `ext_allow`, `ext_deny`, `quota_size`, `current_size`, `quota_number`, `current_number`, `max_file_size`, `ts`) VALUES
+('bx_videos_photos', @sStorageEngine, '', 360, 2592000, 3, 'bx_videos_photos', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
+('bx_videos_videos', @sStorageEngine, '', 360, 2592000, 3, 'bx_videos_videos', 'allow-deny', 'avi,flv,mpg,mpeg,wmv,mp4,m4v,mov,qt,divx,xvid,3gp,3g2,webm,mkv,ogv,ogg,rm,rmvb,asf,drc', '', 0, 0, 0, 0, 0, 0),
+('bx_videos_media_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_videos_media_resized', 'allow-deny', 'jpg,jpeg,jpe,gif,png,avi,flv,mpg,mpeg,wmv,mp4,m4v,mov,qt,divx,xvid,3gp,3g2,webm,mkv,ogv,ogg,rm,rmvb,asf,drc', '', 0, 0, 0, 0, 0, 0);
+
+INSERT INTO `sys_objects_transcoder` (`object`, `storage_object`, `source_type`, `source_params`, `private`, `atime_tracking`, `atime_pruning`, `ts`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_preview', 'bx_videos_media_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_videos_photos";}', 'no', 1, 2592000, 0, '', ''),
+('bx_videos_gallery', 'bx_videos_media_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_videos_photos";}', 'no', 1, 2592000, 0, '', ''),
+('bx_videos_cover', 'bx_videos_media_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_videos_photos";}', 'no', 1, 2592000, 0, '', ''),
+
+('bx_videos_video_poster_preview', 'bx_videos_media_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_videos_videos";}', 'no', 0, 0, 0, 'BxDolTranscoderVideo', ''),
+('bx_videos_video_poster_gallery', 'bx_videos_media_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_videos_videos";}', 'no', 0, 0, 0, 'BxDolTranscoderVideo', ''),
+('bx_videos_video_poster_cover', 'bx_videos_media_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_videos_videos";}', 'no', 0, 0, 0, 'BxDolTranscoderVideo', ''),
+('bx_videos_video_mp4', 'bx_videos_media_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_videos_videos";}', 'no', 0, 0, 0, 'BxDolTranscoderVideo', ''),
+('bx_videos_video_webm', 'bx_videos_media_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_videos_videos";}', 'no', 0, 0, 0, 'BxDolTranscoderVideo', '');
+
+INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES 
+('bx_videos_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:11:"crop_resize";s:1:"1";}', '0'),
+('bx_videos_gallery', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0'),
+('bx_videos_cover', 'Resize', 'a:1:{s:1:"w";s:4:"2000";}', '0'),
+
+('bx_videos_video_poster_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:13:"square_resize";s:1:"1";}', 10),
+('bx_videos_video_poster_preview', 'Poster', 'a:2:{s:1:"h";s:3:"480";s:10:"force_type";s:3:"jpg";}', 0),
+('bx_videos_video_poster_gallery', 'Poster', 'a:2:{s:1:"w";s:3:"500";s:10:"force_type";s:3:"jpg";}', 0),
+('bx_videos_video_poster_cover', 'Poster', 'a:2:{s:1:"h";s:3:"480";s:10:"force_type";s:3:"jpg";}', 0),
+('bx_videos_video_mp4', 'Mp4', 'a:2:{s:1:"h";s:3:"480";s:10:"force_type";s:3:"mp4";}', 0),
+('bx_videos_video_webm', 'Webm', 'a:2:{s:1:"h";s:3:"480";s:10:"force_type";s:4:"webm";}', 0);
+
+
+-- FORMS
+INSERT INTO `sys_objects_form`(`object`, `module`, `title`, `action`, `form_attrs`, `table`, `key`, `uri`, `uri_title`, `submit_name`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos', 'bx_videos', '_bx_videos_form_entry', '', 'a:1:{s:7:"enctype";s:19:"multipart/form-data";}', 'bx_videos_entries', 'id', '', '', 'do_submit', '', 0, 1, 'BxVideosFormEntry', 'modules/boonex/videos/classes/BxVideosFormEntry.php');
+
+INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`, `title`) VALUES 
+('bx_videos', 'bx_videos_entry_add', 'bx_videos', 0, '_bx_videos_form_entry_display_add'),
+('bx_videos', 'bx_videos_entry_delete', 'bx_videos', 0, '_bx_videos_form_entry_display_delete'),
+('bx_videos', 'bx_videos_entry_edit', 'bx_videos', 0, '_bx_videos_form_entry_display_edit'),
+('bx_videos', 'bx_videos_entry_view', 'bx_videos', 1, '_bx_videos_form_entry_display_view');
+
+INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES 
+('bx_videos', 'bx_videos', 'allow_view_to', '', '', 0, 'custom', '_bx_videos_form_entry_input_sys_allow_view_to', '_bx_videos_form_entry_input_allow_view_to', '', 1, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_videos', 'bx_videos', 'delete_confirm', 1, '', 0, 'checkbox', '_bx_videos_form_entry_input_sys_delete_confirm', '_bx_videos_form_entry_input_delete_confirm', '_bx_videos_form_entry_input_delete_confirm_info', 1, 0, 0, '', '', '', 'Avail', '', '_bx_videos_form_entry_input_delete_confirm_error', '', '', 1, 0),
+('bx_videos', 'bx_videos', 'do_publish', '_bx_videos_form_entry_input_do_publish', '', 0, 'submit', '_bx_videos_form_entry_input_sys_do_publish', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_videos', 'bx_videos', 'do_submit', '_bx_videos_form_entry_input_do_submit', '', 0, 'submit', '_bx_videos_form_entry_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_videos', 'bx_videos', 'location', '', '', 0, 'location', '_sys_form_input_sys_location', '_sys_form_input_location', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_videos', 'bx_videos', 'videos', 'a:1:{i:0;s:15:"bx_videos_html5";}', 'a:2:{s:16:"bx_videos_simple";s:26:"_sys_uploader_simple_title";s:15:"bx_videos_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_videos_form_entry_input_sys_videos', '_bx_videos_form_entry_input_videos', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_videos', 'bx_videos', 'pictures', 'a:1:{i:0;s:15:"bx_videos_html5";}', 'a:2:{s:16:"bx_videos_simple";s:26:"_sys_uploader_simple_title";s:15:"bx_videos_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_videos_form_entry_input_sys_pictures', '_bx_videos_form_entry_input_pictures', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_videos', 'bx_videos', 'text', '', '', 0, 'textarea', '_bx_videos_form_entry_input_sys_text', '_bx_videos_form_entry_input_text', '', 0, 0, 3, '', '', '', '', '', '', 'XssHtml', '', 1, 0),
+('bx_videos', 'bx_videos', 'title', '', '', 0, 'text', '_bx_videos_form_entry_input_sys_title', '_bx_videos_form_entry_input_title', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_videos_form_entry_input_title_err', 'Xss', '', 1, 0),
+('bx_videos', 'bx_videos', 'cat', '', '#!bx_videos_cats', 0, 'select', '_bx_videos_form_entry_input_sys_cat', '_bx_videos_form_entry_input_cat', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_videos_form_entry_input_cat_err', 'Xss', '', 1, 0),
+('bx_videos', 'bx_videos', 'duration', '', '', 0, 'text', '_bx_videos_form_entry_input_sys_duration', '_bx_videos_form_entry_input_duration', '', 1, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
+('bx_videos', 'bx_videos', 'added', '', '', 0, 'datetime', '_bx_videos_form_entry_input_sys_date_added', '_bx_videos_form_entry_input_date_added', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_videos', 'bx_videos', 'changed', '', '', 0, 'datetime', '_bx_videos_form_entry_input_sys_date_changed', '_bx_videos_form_entry_input_date_changed', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0);
+
+INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES 
+('bx_videos_entry_add', 'title', 2147483647, 1, 1),
+('bx_videos_entry_add', 'cat', 2147483647, 1, 2),
+('bx_videos_entry_add', 'text', 2147483647, 1, 3),
+('bx_videos_entry_add', 'videos', 2147483647, 1, 4),
+('bx_videos_entry_add', 'pictures', 2147483647, 1, 5),
+('bx_videos_entry_add', 'allow_view_to', 2147483647, 1, 6),
+('bx_videos_entry_add', 'location', 2147483647, 1, 7),
+('bx_videos_entry_add', 'do_publish', 2147483647, 1, 8),
+
+('bx_videos_entry_delete', 'delete_confirm', 2147483647, 1, 1),
+('bx_videos_entry_delete', 'do_submit', 2147483647, 1, 2),
+
+('bx_videos_entry_edit', 'title', 2147483647, 1, 1),
+('bx_videos_entry_edit', 'cat', 2147483647, 1, 2),
+('bx_videos_entry_edit', 'text', 2147483647, 1, 3),
+('bx_videos_entry_edit', 'videos', 2147483647, 1, 4),
+('bx_videos_entry_edit', 'pictures', 2147483647, 1, 5),
+('bx_videos_entry_edit', 'allow_view_to', 2147483647, 1, 6),
+('bx_videos_entry_edit', 'location', 2147483647, 1, 7),
+('bx_videos_entry_edit', 'do_submit', 2147483647, 1, 8),
+
+('bx_videos_entry_view', 'duration', 2147483647, 1, 1),
+('bx_videos_entry_view', 'cat', 2147483647, 1, 2),
+('bx_videos_entry_view', 'added', 2147483647, 1, 3),
+('bx_videos_entry_view', 'changed', 2147483647, 1, 4);
+
+
+-- PRE-VALUES
+INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES
+('bx_videos_cats', '_bx_videos_pre_lists_cats', 'bx_videos', '0');
+
+INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
+('bx_videos_cats', '', 0, '_sys_please_select', ''),
+('bx_videos_cats', '1', 1, '_bx_videos_cat_Animals_Pets', ''),
+('bx_videos_cats', '2', 2, '_bx_videos_cat_Architecture', ''),
+('bx_videos_cats', '3', 3, '_bx_videos_cat_Art', ''),
+('bx_videos_cats', '4', 4, '_bx_videos_cat_Cars_Motorcycles', ''),
+('bx_videos_cats', '5', 5, '_bx_videos_cat_Celebrities', ''),
+('bx_videos_cats', '6', 6, '_bx_videos_cat_Design', ''),
+('bx_videos_cats', '7', 7, '_bx_videos_cat_DIY_Crafts', ''),
+('bx_videos_cats', '8', 8, '_bx_videos_cat_Education', ''),
+('bx_videos_cats', '9', 9, '_bx_videos_cat_Film_Music_Books', ''),
+('bx_videos_cats', '10', 10, '_bx_videos_cat_Food_Drink', ''),
+('bx_videos_cats', '11', 11, '_bx_videos_cat_Gardening', ''),
+('bx_videos_cats', '12', 12, '_bx_videos_cat_Geek', ''),
+('bx_videos_cats', '13', 13, '_bx_videos_cat_Hair_Beauty', ''),
+('bx_videos_cats', '14', 14, '_bx_videos_cat_Health_Fitness', ''),
+('bx_videos_cats', '15', 15, '_bx_videos_cat_History', ''),
+('bx_videos_cats', '16', 16, '_bx_videos_cat_Holidays_Events', ''),
+('bx_videos_cats', '17', 17, '_bx_videos_cat_Home_Decor', ''),
+('bx_videos_cats', '18', 18, '_bx_videos_cat_Humor', ''),
+('bx_videos_cats', '19', 19, '_bx_videos_cat_Illustrations_Posters', ''),
+('bx_videos_cats', '20', 20, '_bx_videos_cat_Kids_Parenting', ''),
+('bx_videos_cats', '21', 21, '_bx_videos_cat_Mens_Fashion', ''),
+('bx_videos_cats', '22', 22, '_bx_videos_cat_Outdoors', ''),
+('bx_videos_cats', '23', 23, '_bx_videos_cat_Photography', ''),
+('bx_videos_cats', '24', 24, '_bx_videos_cat_Products', ''),
+('bx_videos_cats', '25', 25, '_bx_videos_cat_Quotes', ''),
+('bx_videos_cats', '26', 26, '_bx_videos_cat_Science_Nature', ''),
+('bx_videos_cats', '27', 27, '_bx_videos_cat_Sports', ''),
+('bx_videos_cats', '28', 28, '_bx_videos_cat_Tattoos', ''),
+('bx_videos_cats', '29', 29, '_bx_videos_cat_Technology', ''),
+('bx_videos_cats', '30', 30, '_bx_videos_cat_Travel', ''),
+('bx_videos_cats', '31', 31, '_bx_videos_cat_Weddings', ''),
+('bx_videos_cats', '32', 32, '_bx_videos_cat_Womens_Fashion', '');
+
+
+-- COMMENTS
+INSERT INTO `sys_objects_cmts` (`Name`, `Module`, `Table`, `CharsPostMin`, `CharsPostMax`, `CharsDisplayMax`, `Nl2br`, `PerView`, `PerViewReplies`, `BrowseType`, `IsBrowseSwitch`, `PostFormPosition`, `NumberOfLevels`, `IsDisplaySwitch`, `IsRatable`, `ViewingThreshold`, `IsOn`, `RootStylePrefix`, `BaseUrl`, `ObjectVote`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldTitle`, `TriggerFieldComments`, `ClassName`, `ClassFile`) VALUES
+('bx_videos', 'bx_videos', 'bx_videos_cmts', 1, 5000, 1000, 1, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-video&id={object_id}', '', 'bx_videos_entries', 'id', 'author', 'title', 'comments', '', '');
+
+
+-- VOTES
+INSERT INTO `sys_objects_vote` (`Name`, `TableMain`, `TableTrack`, `PostTimeout`, `MinValue`, `MaxValue`, `IsUndo`, `IsOn`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldRate`, `TriggerFieldRateCount`, `ClassName`, `ClassFile`) VALUES 
+('bx_videos', 'bx_videos_votes', 'bx_videos_votes_track', '604800', '1', '1', '0', '1', 'bx_videos_entries', 'id', 'author', 'rate', 'votes', '', '');
+
+
+-- REPORTS
+INSERT INTO `sys_objects_report` (`name`, `table_main`, `table_track`, `is_on`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_videos', 'bx_videos_reports', 'bx_videos_reports_track', '1', 'page.php?i=view-video&id={object_id}', 'bx_videos_entries', 'id', 'author', 'reports', '', '');
+
+
+-- VIEWS
+INSERT INTO `sys_objects_view` (`name`, `table_track`, `period`, `is_on`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_videos', 'bx_videos_views_track', '86400', '1', 'bx_videos_entries', 'id', 'author', 'views', '', '');
+
+
+-- FAFORITES
+INSERT INTO `sys_objects_favorite` (`name`, `table_track`, `is_on`, `is_undo`, `is_public`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_videos', 'bx_videos_favorites_track', '1', '1', '1', 'page.php?i=view-video&id={object_id}', 'bx_videos_entries', 'id', 'author', 'favorites', '', '');
+
+
+-- FEATURED
+INSERT INTO `sys_objects_feature` (`name`, `is_on`, `is_undo`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_flag`, `class_name`, `class_file`) VALUES 
+('bx_videos', '1', '1', 'page.php?i=view-video&id={object_id}', 'bx_videos_entries', 'id', 'author', 'featured', '', '');
+
+
+-- CONTENT INFO
+INSERT INTO `sys_objects_content_info` (`name`, `title`, `alert_unit`, `alert_action_add`, `alert_action_update`, `alert_action_delete`, `class_name`, `class_file`) VALUES
+('bx_videos', '_bx_videos', 'bx_videos', 'added', 'edited', 'deleted', '', ''),
+('bx_videos_cmts', '_bx_videos_cmts', 'bx_videos', 'commentPost', 'commentUpdated', 'commentRemoved', 'BxDolContentInfoCmts', '');
+
+INSERT INTO `sys_content_info_grids` (`object`, `grid_object`, `grid_field_id`, `condition`, `selection`) VALUES
+('bx_videos', 'bx_videos_administration', 'id', '', ''),
+('bx_videos', 'bx_videos_common', 'id', '', '');
+
+
+-- SEARCH EXTENDED
+INSERT INTO `sys_objects_search_extended` (`object`, `object_content_info`, `module`, `title`, `active`, `class_name`, `class_file`) VALUES
+('bx_videos', 'bx_videos', 'bx_videos', '_bx_videos_search_extended', 1, '', ''),
+('bx_videos_cmts', 'bx_videos_cmts', 'bx_videos', '_bx_videos_search_extended_cmts', 1, 'BxTemplSearchExtendedCmts', '');
+
+
+-- STUDIO: page & widget
+INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
+(3, 'bx_videos', '_bx_videos', '_bx_videos', 'bx_videos@modules/boonex/videos/|std-icon.svg');
+SET @iPageId = LAST_INSERT_ID();
+
+SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
+SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
+INSERT INTO `sys_std_widgets` (`page_id`, `module`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
+(@iPageId, 'bx_videos', '{url_studio}module.php?name=bx_videos', '', 'bx_videos@modules/boonex/videos/|std-icon.svg', '_bx_videos', '', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_actions";s:6:"params";a:0:{}s:5:"class";s:18:"TemplStudioModules";}');
+INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
+(@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));

+ 66 - 0
modules/boonex/videos/install/sql/uninstall.sql

@@ -0,0 +1,66 @@
+
+-- TABLES
+DROP TABLE IF EXISTS `bx_videos_entries`, `bx_videos_photos`, `bx_videos_videos`, `bx_videos_media_resized`, `bx_videos_cmts`, `bx_videos_votes`, `bx_videos_votes_track`, `bx_videos_views_track`, `bx_videos_meta_keywords`, `bx_videos_meta_locations`, `bx_videos_reports`, `bx_videos_reports_track`, `bx_videos_favorites_track`;
+
+
+-- STORAGES & TRANSCODERS
+DELETE FROM `sys_objects_storage` WHERE `object` IN ('bx_videos_photos', 'bx_videos_videos', 'bx_videos_media_resized');
+DELETE FROM `sys_storage_tokens` WHERE `object` IN ('bx_videos_photos', 'bx_videos_videos', 'bx_videos_media_resized');
+
+DELETE FROM `sys_objects_transcoder` WHERE `object` IN('bx_videos_preview', 'bx_videos_gallery', 'bx_videos_cover', 'bx_videos_video_poster_preview', 'bx_videos_video_poster_gallery', 'bx_videos_video_poster_cover', 'bx_videos_video_mp4', 'bx_videos_video_webm');
+DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` IN('bx_videos_preview', 'bx_videos_gallery', 'bx_videos_cover', 'bx_videos_video_poster_preview', 'bx_videos_video_poster_gallery', 'bx_videos_video_poster_cover', 'bx_videos_video_mp4', 'bx_videos_video_webm');
+DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` IN('bx_videos_preview', 'bx_videos_gallery', 'bx_videos_cover', 'bx_videos_video_poster_preview', 'bx_videos_video_poster_gallery', 'bx_videos_video_poster_cover');
+DELETE FROM `sys_transcoder_videos_files` WHERE `transcoder_object` IN('bx_videos_video_mp4', 'bx_videos_video_webm');
+
+
+-- FORMS
+DELETE FROM `sys_objects_form` WHERE `module` = 'bx_videos';
+DELETE FROM `sys_form_displays` WHERE `module` = 'bx_videos';
+DELETE FROM `sys_form_inputs` WHERE `module` = 'bx_videos';
+DELETE FROM `sys_form_display_inputs` WHERE `display_name` IN ('bx_videos_entry_add', 'bx_videos_entry_edit', 'bx_videos_entry_view', 'bx_videos_entry_delete');
+
+
+-- PRE-VALUES
+DELETE FROM `sys_form_pre_lists` WHERE `module` = 'bx_videos';
+
+DELETE FROM `sys_form_pre_values` WHERE `Key` IN('bx_videos_cats');
+
+
+-- COMMENTS
+DELETE FROM `sys_objects_cmts` WHERE `Name` = 'bx_videos';
+
+
+-- VOTES
+DELETE FROM `sys_objects_vote` WHERE `Name` = 'bx_videos';
+
+
+-- REPORTS
+DELETE FROM `sys_objects_report` WHERE `name` = 'bx_videos';
+
+
+-- VIEWS
+DELETE FROM `sys_objects_view` WHERE `name` = 'bx_videos';
+
+
+-- FAFORITES
+DELETE FROM `sys_objects_favorite` WHERE `name` = 'bx_videos';
+
+
+-- FEATURED
+DELETE FROM `sys_objects_feature` WHERE `name` = 'bx_videos';
+
+
+-- CONTENT INFO
+DELETE FROM `sys_objects_content_info` WHERE `name` IN ('bx_videos', 'bx_videos_cmts');
+
+DELETE FROM `sys_content_info_grids` WHERE `object` IN ('bx_videos');
+
+
+-- SEARCH EXTENDED
+DELETE FROM `sys_objects_search_extended` WHERE `module` = 'bx_videos';
+
+
+-- STUDIO: page & widget
+DELETE FROM `tp`, `tw`, `tpw`
+USING `sys_std_pages` AS `tp`, `sys_std_widgets` AS `tw`, `sys_std_pages_widgets` AS `tpw`
+WHERE `tp`.`id` = `tw`.`page_id` AND `tw`.`id` = `tpw`.`widget_id` AND `tp`.`name` = 'bx_videos';

+ 56 - 0
modules/boonex/videos/js/manage_tools.js

@@ -0,0 +1,56 @@
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+function BxVideosManageTools(oOptions) {
+	this._iSearchTimeoutId = false;
+	this._sActionsUrl = oOptions.sActionUrl;
+	this._sObjNameGrid = oOptions.sObjNameGrid;
+    this._sObjName = oOptions.sObjName == undefined ? 'oBxVideosManageTools' : oOptions.sObjName;
+
+    this._sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'fade' : oOptions.sAnimationEffect;
+    this._iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed;
+    this._sParamsDivider = oOptions.sParamsDivider == undefined ? '#-#' : oOptions.sParamsDivider;
+
+    this._aHtmlIds = oOptions.aHtmlIds == undefined ? {} : oOptions.aHtmlIds;
+    this._oRequestParams = oOptions.oRequestParams == undefined ? {} : oOptions.oRequestParams;
+}
+
+BxVideosManageTools.prototype.onChangeFilter = function(oFilter) {
+	var $this = this;
+	var oFilter1 = $('#bx-grid-filter1-' + this._sObjNameGrid);
+	var sValueFilter1 = oFilter1.length > 0 ? oFilter1.val() : '';
+
+	var oSearch = $('#bx-grid-search-' + this._sObjNameGrid);
+	var sValueSearch = oSearch.length > 0 ? oSearch.val() : '';
+	if(sValueSearch == _t('_sys_grid_search'))
+		sValueSearch = '';
+
+	clearTimeout($this._iSearchTimeoutId);
+    $this._iSearchTimeoutId = setTimeout(function () {
+        glGrids[$this._sObjNameGrid].setFilter(sValueFilter1 + $this._sParamsDivider + sValueSearch, true);
+    }, 500);
+};
+
+BxVideosManageTools.prototype.onClickSettings = function(sMenuObject, oButton) {
+	if($(oButton).hasClass('bx-btn-disabled'))
+		return false;
+
+	bx_menu_popup(sMenuObject, oButton, {}, {
+		content_id: $(oButton).attr('bx_grid_action_data')
+	});
+};
+
+BxVideosManageTools.prototype.onClickDelete = function(iContentId) {
+	$('.bx-popup-applied:visible').dolPopupHide();
+
+	glGrids[this._sObjNameGrid].actionWithId(iContentId, 'delete', {}, '', false, 1);
+};
+
+/** @} */

+ 18 - 0
modules/boonex/videos/request.php

@@ -0,0 +1,18 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+require_once(BX_DIRECTORY_PATH_INC . "design.inc.php");
+
+check_logged();
+
+BxBaseModTextRequest::processAsAction($GLOBALS['aModule'], $GLOBALS['aRequest']);
+
+/** @} */

+ 1 - 0
modules/boonex/videos/template/attachments.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/text/template/attachments.html />

+ 1 - 0
modules/boonex/videos/template/author.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/text/template/author.html />

+ 1 - 0
modules/boonex/videos/template/author_link.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/text/template/author_link.html />

+ 1 - 0
modules/boonex/videos/template/css/forms.css

@@ -0,0 +1 @@
+@import url(../../../../base/text/template/css/forms.css);

+ 53 - 0
modules/boonex/videos/template/css/main.css

@@ -0,0 +1,53 @@
+@import url(../../../../base/text/template/css/main.css);
+
+
+/*--- Cover Section ---*/
+.bx_videos_cover .bx-cover-title {
+    margin-top:9rem;
+}
+
+
+/*--- Video Block  ---*/
+.bx-videos-entity-video img,
+.bx-videos-entity-video video {
+    max-width:100%;
+}
+
+.pswp__caption .pswp__caption__center {
+    text-align: center;
+}
+
+.pswp__video {
+    position:absolute;
+    text-align: center;
+    top:0;
+    bottom:0;
+    left:0;
+    right:0;
+}
+
+.pswp__video:before {
+  content: "";
+  display: inline-block;
+  vertical-align: middle;
+  height: 100%;
+}
+
+.pswp__video video {
+    vertical-align: middle;    
+}
+
+
+/*--- Snippet ---*/
+.bx-base-text-unit-gallery .bx-base-text-unit-no-thumb,
+.bx-base-text-unit-gallery .bx-base-text-unit-thumb {
+	position: relative;
+}
+
+.bx-video-unit-duration {
+	position: absolute;
+	right: 10px;
+    bottom: 10px;
+
+	background-color: rgba(255, 255, 255, 0.9);
+}

+ 1 - 0
modules/boonex/videos/template/css/manage_tools.css

@@ -0,0 +1 @@
+@import url(../../../../base/general/template/css/manage_tools.css);

+ 1 - 0
modules/boonex/videos/template/entry-all-actions.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/text/template/entry-all-actions.html />

+ 1 - 0
modules/boonex/videos/template/entry-location.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/general/template/entry-location.html />

+ 1 - 0
modules/boonex/videos/template/entry-share.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/text/template/entry-share.html />

+ 1 - 0
modules/boonex/videos/template/entry-text.html

@@ -0,0 +1 @@
+<div class="bx-base-text-entity-content bx-def-constraint-list bx-def-constraint-pre bx-def-constraint-object bx-def-constraint-iframe bx-def-constraint-img">__entry_text__</div>

+ 1 - 0
modules/boonex/videos/template/entry-video.html

@@ -0,0 +1 @@
+<div class="bx-videos-entity-video  bx-def-font-align-center">__video__</div>

+ 1 - 0
modules/boonex/videos/template/form_ghost_template.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/text/template/form_ghost_template.html />

+ 18 - 0
modules/boonex/videos/template/form_ghost_template_video.html

@@ -0,0 +1,18 @@
+<div id="bx-uploader-file-{storage_object}-{file_id}" class="bx-uploader-ghost bx-def-margin-sec-top bx-clearfix">
+    <input type="hidden" name="__name__[]" value="{file_id}" />
+    <div class="bx-base-general-icon-wrapper bx-def-margin-sec-right">
+        <img src="{file_icon}" class="bx-def-round-corners bx-base-general-icon bx-base-general-icon-{file_id}" />
+    </div>
+    <span class="bx-base-general-uploader-ghost">
+        <b><bx_text:_sys_txt_form_entry_input_picture_pic_url /></b><br />
+        <input class="bx-def-font-inputs bx-form-input-text bx-def-margin-sec-bottom" type="text" value="{file_url}" readonly="1" /><br />
+        <input type="hidden" name="__name_thumb__" value="{file_id}" />
+        <a class="bx-btn bx-btn-small bx-def-margin-sec-right" href="javascript:void(0);" onclick="bx_base_general_delete_ghost('{file_id}', '{file_url}', '{file_icon}', [], {js_instance_name});"><bx_text:_sys_txt_form_entry_input_picture_delete /></a>
+    </span>
+</div>
+<script>
+    // disable images drag&drop, because resized images address can be reset after some time
+    $(".bx-base-general-icon-{file_id}").bind('dragstart', function() {
+        return false; 
+    });
+</script>

+ 52 - 0
modules/boonex/videos/template/images/icons/std-icon.svg

@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 20.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<svg version="1.1" id="Слой_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 viewBox="0 0 600 600" style="enable-background:new 0 0 600 600;" xml:space="preserve">
+<style type="text/css">
+	.st0{fill:#2BAF92;}
+	.st1{fill:url(#path-copy_1_);}
+	.st2{fill:#FFFFFF;}
+</style>
+<g id="Слой_1_1_">
+	<title>Group 2 Copy 4</title>
+	<desc>Created with Sketch.</desc>
+	<g id="Page-1">
+		<g id="Group-2-Copy-4">
+			<path id="path" class="st0" d="M552.3,552.3C600,504.5,600,431.5,600,300s0-204.5-47.7-252.3C504.5,0,431.5,0,300,0
+				S95.5,0,47.7,47.7C0,95.5,0,168.5,0,300s0,204.5,47.7,252.3C95.5,600,168.5,600,300,600S504.5,600,552.3,552.3L552.3,552.3z"/>
+			
+				<linearGradient id="path-copy_1_" gradientUnits="userSpaceOnUse" x1="471.7133" y1="-0.7867" x2="471.7133" y2="0.2133" gradientTransform="matrix(600 0 0 600 -282728 472)">
+				<stop  offset="0" style="stop-color:#FFFFFF;stop-opacity:0.2"/>
+				<stop  offset="1" style="stop-color:#000000;stop-opacity:0.1389"/>
+			</linearGradient>
+			<path id="path-copy" class="st1" d="M552.3,552.3C600,504.5,600,431.5,600,300s0-204.5-47.7-252.3C504.5,0,431.5,0,300,0
+				S95.5,0,47.7,47.7C0,95.5,0,168.5,0,300s0,204.5,47.7,252.3C95.5,600,168.5,600,300,600S504.5,600,552.3,552.3L552.3,552.3z"/>
+		</g>
+	</g>
+</g>
+<g id="Слой_2">
+	<g>
+		<path class="st2" d="M485.6,140.4c-6.4-6.4-14-9.5-23-9.5H137.4c-8.9,0-16.6,3.2-23,9.5c-6.4,6.4-9.5,14-9.5,23v273.1
+			c0,8.9,3.2,16.6,9.5,23c6.4,6.4,14,9.5,23,9.5h325.2c8.9,0,16.6-3.2,23-9.5c6.4-6.4,9.5-14,9.5-23V163.3
+			C495.1,154.4,492,146.8,485.6,140.4z M183,430c0,3.5-1.3,6.6-3.9,9.2c-2.6,2.6-5.7,3.9-9.2,3.9h-26c-3.5,0-6.6-1.3-9.2-3.9
+			c-2.6-2.6-3.9-5.7-3.9-9.2v-26c0-3.5,1.3-6.6,3.9-9.2c2.6-2.6,5.7-3.9,9.2-3.9h26c3.5,0,6.6,1.3,9.2,3.9c2.6,2.6,3.9,5.7,3.9,9.2
+			V430z M183,352c0,3.5-1.3,6.6-3.9,9.2c-2.6,2.6-5.7,3.9-9.2,3.9h-26c-3.5,0-6.6-1.3-9.2-3.9c-2.6-2.6-3.9-5.7-3.9-9.2v-26
+			c0-3.5,1.3-6.6,3.9-9.2s5.7-3.9,9.2-3.9h26c3.5,0,6.6,1.3,9.2,3.9c2.6,2.6,3.9,5.7,3.9,9.2V352z M183,274c0,3.5-1.3,6.6-3.9,9.2
+			c-2.6,2.6-5.7,3.9-9.2,3.9h-26c-3.5,0-6.6-1.3-9.2-3.9c-2.6-2.6-3.9-5.7-3.9-9.2v-26c0-3.5,1.3-6.6,3.9-9.2
+			c2.6-2.6,5.7-3.9,9.2-3.9h26c3.5,0,6.6,1.3,9.2,3.9c2.6,2.6,3.9,5.7,3.9,9.2V274z M183,195.9c0,3.5-1.3,6.6-3.9,9.2
+			c-2.6,2.6-5.7,3.9-9.2,3.9h-26c-3.5,0-6.6-1.3-9.2-3.9s-3.9-5.7-3.9-9.2v-26c0-3.5,1.3-6.6,3.9-9.2s5.7-3.9,9.2-3.9h26
+			c3.5,0,6.6,1.3,9.2,3.9c2.6,2.6,3.9,5.7,3.9,9.2V195.9z M391,430c0,3.5-1.3,6.6-3.9,9.2c-2.6,2.6-5.7,3.9-9.2,3.9H221.9
+			c-3.5,0-6.6-1.3-9.2-3.9c-2.6-2.6-3.9-5.7-3.9-9.2V326c0-3.5,1.3-6.6,3.9-9.2c2.6-2.6,5.7-3.9,9.2-3.9h156.2
+			c3.5,0,6.6,1.3,9.2,3.9c2.6,2.6,3.9,5.7,3.9,9.2L391,430L391,430z M391,274c0,3.5-1.3,6.6-3.9,9.2c-2.6,2.6-5.7,3.9-9.2,3.9H221.9
+			c-3.5,0-6.6-1.3-9.2-3.9c-2.6-2.6-3.9-5.7-3.9-9.2V169.9c0-3.5,1.3-6.6,3.9-9.2c2.6-2.6,5.7-3.9,9.2-3.9h156.2
+			c3.5,0,6.6,1.3,9.2,3.9c2.6,2.6,3.9,5.7,3.9,9.2L391,274L391,274z M469.1,430c0,3.5-1.3,6.6-3.9,9.2c-2.6,2.6-5.7,3.9-9.2,3.9h-26
+			c-3.5,0-6.6-1.3-9.2-3.9c-2.6-2.6-3.9-5.7-3.9-9.2v-26c0-3.5,1.3-6.6,3.9-9.2c2.6-2.6,5.7-3.9,9.2-3.9h26c3.5,0,6.6,1.3,9.2,3.9
+			c2.6,2.6,3.9,5.7,3.9,9.2V430L469.1,430z M469.1,352c0,3.5-1.3,6.6-3.9,9.2c-2.6,2.6-5.7,3.9-9.2,3.9h-26c-3.5,0-6.6-1.3-9.2-3.9
+			c-2.6-2.6-3.9-5.7-3.9-9.2v-26c0-3.5,1.3-6.6,3.9-9.2c2.6-2.6,5.7-3.9,9.2-3.9h26c3.5,0,6.6,1.3,9.2,3.9c2.6,2.6,3.9,5.7,3.9,9.2
+			V352L469.1,352z M469.1,274c0,3.5-1.3,6.6-3.9,9.2c-2.6,2.6-5.7,3.9-9.2,3.9h-26c-3.5,0-6.6-1.3-9.2-3.9c-2.6-2.6-3.9-5.7-3.9-9.2
+			v-26c0-3.5,1.3-6.6,3.9-9.2c2.6-2.6,5.7-3.9,9.2-3.9h26c3.5,0,6.6,1.3,9.2,3.9c2.6,2.6,3.9,5.7,3.9,9.2V274L469.1,274z
+			 M469.1,195.9c0,3.5-1.3,6.6-3.9,9.2c-2.6,2.6-5.7,3.9-9.2,3.9h-26c-3.5,0-6.6-1.3-9.2-3.9c-2.6-2.6-3.9-5.7-3.9-9.2v-26
+			c0-3.5,1.3-6.6,3.9-9.2c2.6-2.6,5.7-3.9,9.2-3.9h26c3.5,0,6.6,1.3,9.2,3.9c2.6,2.6,3.9,5.7,3.9,9.2V195.9L469.1,195.9z"/>
+	</g>
+</g>
+</svg>

+ 1 - 0
modules/boonex/videos/template/title_link.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/text/template/title_link.html />

+ 19 - 0
modules/boonex/videos/template/unit.html

@@ -0,0 +1,19 @@
+<div class="bx-base-text-unit bx-base-text-unit-ext bx-def-box bx-def-round-corners bx-def-color-bg-box bx-def-margin-bottom">
+    <bx_if:thumb>
+        <div class="bx-base-text-unit-cover">
+            <img class="bx-base-text-unit-cover bx-def-round-corners" alt="__title__" src="__thumb_url__" />
+            <div class="bx-video-unit-duration bx-def-padding-sec-leftright bx-def-padding-thd-topbottom bx-def-border bx-def-round-corners bx-def-font">__duration__</div>
+        </div>
+    </bx_if:thumb>
+    <div class="bx-base-text-unit-text bx-def-padding bx-def-box-sizing">
+        <h2 class="bx-base-text-unit-title"><a href="__content_url__">__title__</a></h2>
+        <div class="bx-base-text-unit-info bx-def-margin-sec-top bx-def-font-small">
+            <span class="bx-def-font-grayed">__entry_posting_date__</span>
+            <span class="bx-base-text-unit-info-div bx-def-font-grayed">&#183;</span>
+            <a class="bx-base-text-unit-author" href="__author_url__">__author__</a>
+        </div>
+        <div class="bx-base-text-unit-summary bx-def-margin-sec-top bx-clearfix">
+            __summary__
+        </div> 
+    </div>
+</div>

+ 17 - 0
modules/boonex/videos/template/unit_full.html

@@ -0,0 +1,17 @@
+<div class="bx-base-text-unit bx-base-text-unit-ext bx-def-margin-bottom">
+    <bx_if:thumb>
+        <div class="bx-base-text-unit-cover">
+            <img class="bx-base-text-unit-cover bx-def-round-corners" alt="__title__" src="__thumb_url__" />
+            <div class="bx-video-unit-duration bx-def-padding-sec-leftright bx-def-padding-thd-topbottom bx-def-border bx-def-round-corners bx-def-font">__duration__</div>
+        </div>
+    </bx_if:thumb>
+    <h1 class="bx-base-text-unit-title bx-def-padding-sec-top"><a href="__content_url__">__title__</a></h1>
+    <div class="bx-base-text-unit-info">
+        <span class="bx-def-font-grayed">__entry_posting_date__</span>
+        <span class="bx-base-text-unit-info-div bx-def-font-grayed">&#183;</span>
+        <a class="bx-base-text-unit-author" href="__author_url__">__author__</a>
+    </div>
+    <div class="bx-base-text-unit-summary bx-def-margin-sec-top bx-clearfix">
+        __text__
+    </div> 
+</div>

+ 1 - 0
modules/boonex/videos/template/unit_full_private.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/text/template/unit_full_private.html />

+ 28 - 0
modules/boonex/videos/template/unit_gallery.html

@@ -0,0 +1,28 @@
+<div class="bx-base-text-unit bx-base-text-unit-gallery bx-def-gal-unit-size bx-def-padding-sec bx-def-margin-sec-bottom">
+    <div class="bx-base-text-unit-cnt bx-def-box bx-def-round-corners bx-def-color-bg-box bx-def-box-sizing">
+        <div class="bx-base-text-unit-text bx-def-padding-leftright bx-def-padding-sec-topbottom bx-def-font-align-center bx-def-box-sizing">
+            <h2><a href="__content_url__">__title__</a></h2>
+            <div class="bx-base-text-unit-info">
+                <span class="bx-def-font-grayed">__entry_posting_date__</span>
+                <span class="bx-base-text-unit-info-div bx-def-font-grayed">&#183;</span>
+                <a class="bx-base-text-unit-author" href="__author_url__">__author__</a>
+            </div>
+        </div>
+        <bx_if:thumb>
+            <a href="__content_url__" title="__summary_attr__">
+                <div class="bx-base-text-unit-thumb bx-def-gal-div-size bx-def-round-corners bx-def-font-middle" style="background-image:url(__gallery_url__)">
+                    <div class="bx-base-text-unit-strecher">__strecher__</div>
+                    <div class="bx-video-unit-duration bx-def-padding-sec-leftright bx-def-padding-thd-topbottom bx-def-border bx-def-round-corners bx-def-font">__duration__</div>
+                </div>
+            </a>
+        </bx_if:thumb>
+        <bx_if:no_thumb>
+            <div class="bx-def-gal-img-column">
+                <div class="bx-base-text-unit-no-thumb bx-def-gal-div-size bx-def-font-middle bx-def-font-grayed bx-def-padding bx-def-box-sizing">
+                    __summary_plain__
+                    <div class="bx-base-text-unit-strecher">__strecher__</div>
+                </div>
+            </div>
+        </bx_if:no_thumb>
+    </div>
+</div>

+ 1 - 0
modules/boonex/videos/template/unit_gallery_private.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/text/template/unit_gallery_private.html />

+ 1 - 0
modules/boonex/videos/template/unit_live_search.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/text/template/unit_live_search.html />

+ 1 - 0
modules/boonex/videos/template/unit_private.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/text/template/unit_private.html />