enable.sql 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  1. -- SETTINGS
  2. SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules');
  3. INSERT INTO `sys_options_types`(`group`, `name`, `caption`, `icon`, `order`) VALUES
  4. ('modules', 'bx_stream', '_bx_stream', 'bx_stream@modules/boonex/stream/|std-icon.svg', IF(ISNULL(@iTypeOrder), 1, @iTypeOrder + 1));
  5. SET @iTypeId = LAST_INSERT_ID();
  6. INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
  7. VALUES (@iTypeId, 'bx_stream_streaming', '_bx_stream_options_cat_streaming', 1);
  8. SET @iCategId = LAST_INSERT_ID();
  9. INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `extra`, `order`) VALUES
  10. ('bx_stream_engine', 'OvenMediaEngine', @iCategId, '_bx_stream_option_engine', 'select', '', '', 'OvenMediaEngine,NGINX', 10),
  11. ('bx_stream_server_host', '', @iCategId, '_bx_stream_option_server_host', 'digit', '', '', '', 20),
  12. ('bx_stream_app', '', @iCategId, '_bx_stream_option_app', 'digit', '', '', '', 22),
  13. ('bx_stream_sources_pattern', '', @iCategId, '_bx_stream_option_sources_pattern', 'text', '', '', '', 24),
  14. ('bx_stream_dash_enabled', '', @iCategId, '_bx_stream_option_dash_enabled', 'checkbox', '', '', '', 26),
  15. ('bx_stream_hls_enabled', '', @iCategId, '_bx_stream_option_hls_enabled', 'checkbox', '', '', '', 28),
  16. ('bx_stream_recordings_url', '', @iCategId, '_bx_stream_option_recordings_url', 'digit', '', '', '', 30);
  17. INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
  18. VALUES (@iTypeId, 'bx_stream_engine_ome', '_bx_stream_options_cat_engine_ome', 2);
  19. SET @iCategId = LAST_INSERT_ID();
  20. INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `extra`, `order`) VALUES
  21. ('bx_stream_server_ome_api_key', '', @iCategId, '_bx_stream_option_ome_api_key', 'digit', '', '', '', 10),
  22. ('bx_stream_server_ome_api_protocol', 'http', @iCategId, '_bx_stream_option_ome_api_protocol', 'select', '', '', 'http,https', 12),
  23. ('bx_stream_server_ome_api_port', '8081', @iCategId, '_bx_stream_option_ome_api_port', 'digit', '', '', '', 14),
  24. ('bx_stream_server_ome_policy_secret', '', @iCategId, '_bx_stream_option_ome_policy_secret', 'digit', '', '', '', 20),
  25. ('bx_stream_server_ome_recordings_source', '', @iCategId, '_bx_stream_option_ome_recordings_source', 'digit', '', '', '', 30);
  26. INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
  27. VALUES (@iTypeId, 'bx_stream_engine_nginx', '_bx_stream_options_cat_engine_nginx', 3);
  28. SET @iCategId = LAST_INSERT_ID();
  29. INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `extra`, `order`) VALUES
  30. ('bx_stream_server_nginx_stats_url', 'https://{host}/stat', @iCategId, '_bx_stream_option_nginx_stats_url', 'digit', '', '', '', 10),
  31. ('bx_stream_server_nginx_auth', 'on', @iCategId, '_bx_stream_option_nginx_auth', 'checkbox', '', '', '', 12),
  32. ('bx_stream_server_nginx_recording_base_path', '', @iCategId, '_bx_stream_option_nginx_recording_base_path', 'digit', '', '', '', 20);
  33. INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
  34. VALUES (@iTypeId, 'bx_stream_general', '_bx_stream_options_cat_general', 4);
  35. SET @iCategId = LAST_INSERT_ID();
  36. INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `extra`, `order`) VALUES
  37. ('bx_stream_enable_auto_approve', 'on', @iCategId, '_bx_stream_option_enable_auto_approve', 'checkbox', '', '', '', 100),
  38. ('bx_stream_summary_chars', '700', @iCategId, '_bx_stream_option_summary_chars', 'digit', '', '', '', 110),
  39. ('bx_stream_plain_summary_chars', '240', @iCategId, '_bx_stream_option_plain_summary_chars', 'digit', '', '', '', 120),
  40. ('bx_stream_per_page_browse', '12', @iCategId, '_bx_stream_option_per_page_browse', 'digit', '', '', '', 130),
  41. ('bx_stream_per_page_profile', '6', @iCategId, '_bx_stream_option_per_page_profile', 'digit', '', '', '', 140),
  42. ('bx_stream_per_page_browse_showcase', '32', @iCategId, '_sys_option_per_page_browse_showcase', 'digit', '', '', '', 150),
  43. ('bx_stream_rss_num', '10', @iCategId, '_bx_stream_option_rss_num', 'digit', '', '', '', 20),
  44. ('bx_stream_auto_activation_for_categories', 'on', @iCategId, '_bx_stream_option_auto_activation_for_categories', 'checkbox', '', '', '', 160);
  45. -- PAGE: create entry
  46. 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
  47. ('bx_stream_create_entry', '_bx_stream_page_title_sys_create_entry', '_bx_stream_page_title_create_entry', 'bx_stream', 5, 2147483647, 1, 'create-stream', 'page.php?i=create-stream', '', '', '', 0, 1, 0, 'BxStrmPageBrowse', 'modules/boonex/stream/classes/BxStrmPageBrowse.php');
  48. INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
  49. ('bx_stream_create_entry', 1, 'bx_stream', '_bx_stream_page_block_title_create_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_stream";s:6:"method";s:13:"entity_create";}', 0, 1, 1);
  50. -- PAGE: edit entry
  51. 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
  52. ('bx_stream_edit_entry', '_bx_stream_page_title_sys_edit_entry', '_bx_stream_page_title_edit_entry', 'bx_stream', 5, 2147483647, 1, 'edit-stream', '', '', '', '', 0, 1, 0, 'BxStrmPageEntry', 'modules/boonex/stream/classes/BxStrmPageEntry.php');
  53. INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
  54. ('bx_stream_edit_entry', 1, 'bx_stream', '_bx_stream_page_block_title_edit_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_stream";s:6:"method";s:11:"entity_edit";}', 0, 0, 0);
  55. -- PAGE: delete entry
  56. 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
  57. ('bx_stream_delete_entry', '_bx_stream_page_title_sys_delete_entry', '_bx_stream_page_title_delete_entry', 'bx_stream', 5, 2147483647, 1, 'delete-stream', '', '', '', '', 0, 1, 0, 'BxStrmPageEntry', 'modules/boonex/stream/classes/BxStrmPageEntry.php');
  58. INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
  59. ('bx_stream_delete_entry', 1, 'bx_stream', '_bx_stream_page_block_title_delete_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_stream";s:6:"method";s:13:"entity_delete";}', 0, 0, 0);
  60. -- PAGE: view entry
  61. 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
  62. ('bx_stream_view_entry', '_bx_stream_page_title_sys_view_entry', '_bx_stream_page_title_view_entry', 'bx_stream', 12, 2147483647, 1, 'view-stream', '', '', '', '', 0, 1, 0, 'BxStrmPageEntry', 'modules/boonex/stream/classes/BxStrmPageEntry.php');
  63. INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
  64. ('bx_stream_view_entry', 1, 'bx_stream', '', '_bx_stream_page_block_title_viewers', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_stream\";s:6:\"method\";s:14:\"stream_viewers\";}', 0, 0, 1, 1),
  65. ('bx_stream_view_entry', 1, 'bx_stream', '', '_bx_stream_page_block_title_player', 3, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_stream\";s:6:\"method\";s:13:\"stream_player\";}', 0, 0, 1, 2),
  66. ('bx_stream_view_entry', 2, 'bx_stream', '', '_bx_stream_page_block_title_entry_text', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_stream\";s:6:\"method\";s:17:\"entity_text_block\";}', 0, 0, 1, 2),
  67. ('bx_stream_view_entry', 3, 'bx_stream', '_bx_stream_page_block_title_sys_entry_context', '_bx_stream_page_block_title_entry_context', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_stream\";s:6:\"method\";s:14:\"entity_context\";}', 0, 0, 1, 1),
  68. ('bx_stream_view_entry', 3, 'bx_stream', '', '_bx_stream_page_block_title_entry_info', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_stream\";s:6:\"method\";s:11:\"entity_info\";}', 0, 0, 1, 2),
  69. ('bx_stream_view_entry', 3, 'bx_stream', '', '_bx_stream_page_block_title_entry_author', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_stream\";s:6:\"method\";s:13:\"entity_author\";}', 0, 0, 1, 3),
  70. ('bx_stream_view_entry', 3, 'bx_stream', '', '_bx_stream_page_block_title_entry_rtmp_settings', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_stream\";s:6:\"method\";s:20:\"stream_rtmp_settings\";}', 0, 0, 1, 4),
  71. ('bx_stream_view_entry', 3, 'bx_stream', '', '_bx_stream_page_block_title_entry_recordings', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_stream\";s:6:\"method\";s:17:\"stream_recordings\";}', 0, 0, 1, 5),
  72. ('bx_stream_view_entry', 3, 'bx_stream', '', '_bx_stream_page_block_title_entry_location', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_stream\";s:6:\"method\";s:15:\"entity_location\";}', 0, 0, 0, 0),
  73. ('bx_stream_view_entry', 2, 'bx_stream', '', '_bx_stream_page_block_title_entry_all_actions', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_stream\";s:6:\"method\";s:18:\"entity_all_actions\";}', 0, 0, 1, 3),
  74. ('bx_stream_view_entry', 4, 'bx_stream', '', '_bx_stream_page_block_title_entry_actions', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_stream\";s:6:\"method\";s:14:\"entity_actions\";}', 0, 0, 0, 0),
  75. ('bx_stream_view_entry', 4, 'bx_stream', '', '_bx_stream_page_block_title_entry_social_sharing', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_stream\";s:6:\"method\";s:21:\"entity_social_sharing\";}', 0, 0, 0, 0),
  76. ('bx_stream_view_entry', 2, 'bx_stream', '', '_bx_stream_page_block_title_entry_comments', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_stream\";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 1, 6),
  77. ('bx_stream_view_entry', 3, 'bx_stream', '', '_bx_stream_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_stream\";i:1;s:4:\"{id}\";}s:5:\"class\";s:20:\"TemplServiceMetatags\";}', 0, 0, 1, 3),
  78. ('bx_stream_view_entry', 2, 'bx_stream', '', '_bx_stream_page_block_title_entry_reports', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_stream\";s:6:\"method\";s:14:\"entity_reports\";}', 0, 0, 1, 6);
  79. -- PAGE: broadcast
  80. 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
  81. ('bx_stream_broadcast', '', '_bx_stream_page_title_broadcast', 'bx_stream', 5, 2147483647, 1, 'broadcast-stream', '', '', '', '', 0, 1, 0, 'BxStrmPageEntry', 'modules/boonex/stream/classes/BxStrmPageEntry.php');
  82. INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
  83. ('bx_stream_broadcast', 1, 'bx_stream', '', '_bx_stream_page_block_title_viewers', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_stream\";s:6:\"method\";s:14:\"stream_viewers\";}', 0, 0, 1, 1),
  84. ('bx_stream_broadcast', 1, 'bx_stream', '', '_bx_stream_page_block_title_broadcast', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_stream\";s:6:\"method\";s:16:\"stream_broadcast\";}', 0, 0, 1, 2);
  85. -- PAGE: view entry comments
  86. 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
  87. ('bx_stream_view_entry_comments', '_bx_stream_page_title_sys_view_entry_comments', '_bx_stream_page_title_view_entry_comments', 'bx_stream', 5, 2147483647, 1, 'view-stream-comments', '', '', '', '', 0, 1, 0, 'BxStrmPageEntry', 'modules/boonex/stream/classes/BxStrmPageEntry.php');
  88. INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
  89. ('bx_stream_view_entry_comments', 1, 'bx_stream', '_bx_stream_page_block_title_entry_comments', '_bx_stream_page_block_title_entry_comments_link', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_stream\";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 1);
  90. -- PAGE: module manage own
  91. 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
  92. ('bx_stream_manage', '_bx_stream_page_title_sys_manage', '_bx_stream_page_title_manage', 'bx_stream', 5, 2147483647, 1, 'streams-manage', 'page.php?i=streams-manage', '', '', '', 0, 1, 0, 'BxStrmPageBrowse', 'modules/boonex/stream/classes/BxStrmPageBrowse.php');
  93. INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
  94. ('bx_stream_manage', 1, 'bx_stream', '_bx_stream_page_block_title_system_manage', '_bx_stream_page_block_title_manage', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_stream\";s:6:\"method\";s:12:\"manage_tools\";}}', 0, 1, 0);
  95. -- PAGE: module manage all
  96. 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
  97. ('bx_stream_administration', '_bx_stream_page_title_sys_manage_administration', '_bx_stream_page_title_manage', 'bx_stream', 5, 192, 1, 'streams-administration', 'page.php?i=streams-administration', '', '', '', 0, 1, 0, 'BxStrmPageBrowse', 'modules/boonex/stream/classes/BxStrmPageBrowse.php');
  98. INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
  99. ('bx_stream_administration', 1, 'bx_stream', '_bx_stream_page_block_title_system_manage_administration', '_bx_stream_page_block_title_manage', 11, 192, 'service', 'a:3:{s:6:\"module\";s:9:\"bx_stream\";s:6:\"method\";s:12:\"manage_tools\";s:6:\"params\";a:1:{i:0;s:14:\"administration\";}}', 0, 1, 0);
  100. -- PAGE: add block to homepage
  101. SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = 'sys_home' AND `cell_id` = 1 ORDER BY `order` DESC LIMIT 1);
  102. INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
  103. ('sys_home', 1, 'bx_stream', '_bx_stream_page_block_title_recent_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_stream";s:6:"method";s:13:"browse_public";s:6:"params";a:2:{i:0;b:0;i:1;b:0;}}', 1, 0, 0, IFNULL(@iBlockOrder, 0) + 1);
  104. -- PAGES: add page block to profiles modules (trigger* page objects are processed separately upon modules enable/disable)
  105. SET @iPBCellProfile = 3;
  106. SET @iPBCellGroup = 3;
  107. INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
  108. ('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_stream', '_bx_stream_page_block_title_sys_my_entries', '_bx_stream_page_block_title_my_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_stream";s:6:"method";s:13:"browse_author";s:6:"params";a:2:{i:0;s:12:"{profile_id}";i:1;a:2:{s:8:"per_page";s:26:"bx_stream_per_page_profile";s:13:"empty_message";b:0;}}}', 0, 0, 0, 0),
  109. ('trigger_page_group_view_entry', @iPBCellGroup, 'bx_stream', '_bx_stream_page_block_title_sys_entries_in_context', '_bx_stream_page_block_title_entries_in_context', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_stream";s:6:"method";s:14:"browse_context";s:6:"params";a:2:{s:10:"profile_id";s:12:"{profile_id}";i:0;a:1:{s:13:"empty_message";b:0;}}}', 0, 0, 0, 0);
  110. -- PAGE: service blocks
  111. SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = '' AND `cell_id` = 0 ORDER BY `order` DESC LIMIT 1);
  112. INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system` , `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
  113. ('', 0, 'bx_stream', '', '_bx_stream_page_block_title_recent_entries', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:9:\"bx_stream\";s:6:\"method\";s:13:\"browse_public\";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, IFNULL(@iBlockOrder, 0) + 1);
  114. -- MENU: add to "add content" menu
  115. SET @iAddMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_add_content_links' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
  116. 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
  117. ('sys_add_content_links', 'bx_stream', 'create-stream', '_bx_stream_menu_item_title_system_create_entry', '_bx_stream_menu_item_title_create_entry', 'page.php?i=create-stream', '', '', 'rss col-red3', '', 2147483647, 1, 1, IFNULL(@iAddMenuOrder, 0) + 1);
  118. -- MENU: actions menu for view entry
  119. INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
  120. ('bx_stream_view', '_bx_stream_menu_title_view_entry', 'bx_stream_view', 'bx_stream', 9, 0, 1, 'BxStrmMenuView', 'modules/boonex/stream/classes/BxStrmMenuView.php');
  121. INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
  122. ('bx_stream_view', 'bx_stream', '_bx_stream_menu_set_title_view_entry', 0);
  123. 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
  124. ('bx_stream_view', 'bx_stream', 'edit-stream', '_bx_stream_menu_item_title_system_edit_entry', '_bx_stream_menu_item_title_edit_entry', 'page.php?i=edit-stream&id={content_id}', '', '', 'pencil-alt', '', 2147483647, 1, 0, 1),
  125. ('bx_stream_view', 'bx_stream', 'delete-stream', '_bx_stream_menu_item_title_system_delete_entry', '_bx_stream_menu_item_title_delete_entry', 'page.php?i=delete-stream&id={content_id}', '', '', 'remove', '', 2147483647, 1, 0, 2),
  126. ('bx_stream_view', 'bx_stream', 'approve', '_sys_menu_item_title_system_va_approve', '_sys_menu_item_title_va_approve', 'javascript:void(0)', 'javascript:bx_approve(this, ''{module_uri}'', {content_id});', '', 'check', '', 2147483647, 1, 0, 3);
  127. -- MENU: all actions menu for view entry
  128. INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
  129. ('bx_stream_view_actions', '_sys_menu_title_view_actions', 'bx_stream_view_actions', 'bx_stream', 15, 0, 1, 'BxStrmMenuViewActions', 'modules/boonex/stream/classes/BxStrmMenuViewActions.php');
  130. INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
  131. ('bx_stream_view_actions', 'bx_stream', '_sys_menu_set_title_view_actions', 0);
  132. INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `submenu_popup`, `visible_for_levels`, `visibility_custom`, `active`, `copyable`, `order`) VALUES
  133. ('bx_stream_view_actions', 'bx_stream', 'edit-stream', '_bx_stream_menu_item_title_system_edit_entry', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 10),
  134. ('bx_stream_view_actions', 'bx_stream', 'delete-stream', '_bx_stream_menu_item_title_system_delete_entry', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 20),
  135. ('bx_stream_view_actions', 'bx_stream', 'approve', '_sys_menu_item_title_system_va_approve', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 30),
  136. ('bx_stream_view_actions', 'bx_stream', 'set-badges', '_sys_menu_item_title_system_set_badges', '_sys_menu_item_title_set_badges', 'javascript:void(0)', 'bx_menu_popup(''sys_set_badges'', window, {}, {module: ''bx_stream'', content_id: {content_id}});', '', 'check-circle', '', '', 0, 2147483647, 'a:2:{s:6:"module";s:9:"bx_stream";s:6:"method";s:19:"is_badges_avaliable";}', 1, 0, 40),
  137. ('bx_stream_view_actions', 'bx_stream', 'comment', '_sys_menu_item_title_system_va_comment', '', '', '', '', '', '', '', 0, 2147483647, '', 0, 0, 200),
  138. ('bx_stream_view_actions', 'bx_stream', 'view', '_sys_menu_item_title_system_va_view', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 210),
  139. ('bx_stream_view_actions', 'bx_stream', 'vote', '_sys_menu_item_title_system_va_vote', '', '', '', '', '', '', '', 0, 2147483647, '', 0, 0, 220),
  140. ('bx_stream_view_actions', 'bx_stream', 'reaction', '_sys_menu_item_title_system_va_reaction', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 225),
  141. ('bx_stream_view_actions', 'bx_stream', 'score', '_sys_menu_item_title_system_va_score', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 230),
  142. ('bx_stream_view_actions', 'bx_stream', 'feature', '_sys_menu_item_title_system_va_feature', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 250),
  143. ('bx_stream_view_actions', 'bx_stream', 'repost', '_sys_menu_item_title_system_va_repost', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 260),
  144. ('bx_stream_view_actions', 'bx_stream', 'report', '_sys_menu_item_title_system_va_report', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 270),
  145. ('bx_stream_view_actions', 'bx_stream', 'notes', '_sys_menu_item_title_system_va_notes', '_sys_menu_item_title_va_notes', 'javascript:void(0)', 'javascript:bx_get_notes(this, ''{module_uri}'', {content_id});', '', 'exclamation-triangle', '', '', 0, 2147483647, '', 1, 0, 280),
  146. ('bx_stream_view_actions', 'bx_stream', 'audit', '_sys_menu_item_title_system_va_audit', '_sys_menu_item_title_va_audit', 'page.php?i=dashboard-audit&module=bx_stream&content_id={content_id}', '', '', 'history', '', '', 0, 192, '', 1, 0, 290),
  147. ('bx_stream_view_actions', 'bx_stream', 'social-sharing', '_sys_menu_item_title_system_social_sharing', '_sys_menu_item_title_social_sharing', 'javascript:void(0)', 'oBxDolPage.share(this, \'{url_encoded}\')', '', 'share', '', '', 0, 2147483647, '', 1, 0, 300),
  148. ('bx_stream_view_actions', 'bx_stream', 'more-auto', '_sys_menu_item_title_system_va_more_auto', '_sys_menu_item_title_va_more_auto', 'javascript:void(0)', '', '', 'ellipsis-v', '', '', 0, 2147483647, '', 1, 0, 9999);
  149. -- MENU: custom menu for snippet meta info
  150. INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
  151. ('bx_stream_snippet_meta', '_sys_menu_title_snippet_meta', 'bx_stream_snippet_meta', 'bx_stream', 15, 0, 1, 'BxStrmMenuSnippetMeta', 'modules/boonex/stream/classes/BxStrmMenuSnippetMeta.php');
  152. INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
  153. ('bx_stream_snippet_meta', 'bx_stream', '_sys_menu_set_title_snippet_meta', 0);
  154. INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `editable`, `order`) VALUES
  155. ('bx_stream_snippet_meta', 'bx_stream', 'date', '_sys_menu_item_title_system_sm_date', '_sys_menu_item_title_sm_date', '', '', '', '', '', 2147483647, 1, 0, 1, 1),
  156. ('bx_stream_snippet_meta', 'bx_stream', 'author', '_sys_menu_item_title_system_sm_author', '_sys_menu_item_title_sm_author', '', '', '', '', '', 2147483647, 1, 0, 1, 2),
  157. ('bx_stream_snippet_meta', 'bx_stream', 'category', '_sys_menu_item_title_system_sm_category', '_sys_menu_item_title_sm_category', '', '', '', '', '', 2147483647, 0, 0, 1, 3),
  158. ('bx_stream_snippet_meta', 'bx_stream', 'tags', '_sys_menu_item_title_system_sm_tags', '_sys_menu_item_title_sm_tags', '', '', '', '', '', 2147483647, 0, 0, 1, 4),
  159. ('bx_stream_snippet_meta', 'bx_stream', 'views', '_sys_menu_item_title_system_sm_views', '_sys_menu_item_title_sm_views', '', '', '', '', '', 2147483647, 0, 0, 1, 5),
  160. ('bx_stream_snippet_meta', 'bx_stream', 'comments', '_sys_menu_item_title_system_sm_comments', '_sys_menu_item_title_sm_comments', '', '', '', '', '', 2147483647, 0, 0, 1, 6);
  161. -- MENU: profile stats
  162. SET @iNotifMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name` = 'sys_profile_stats' AND `active` = 1 LIMIT 1);
  163. 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
  164. ('sys_profile_stats', 'bx_stream', 'profile-stats-manage-streams', '_bx_stream_menu_item_title_system_manage_my_stream', '_bx_stream_menu_item_title_manage_my_stream', 'page.php?i=streams-manage', '', '_self', 'rss col-red3', 'a:2:{s:6:"module";s:9:"bx_stream";s:6:"method";s:41:"get_menu_addon_manage_tools_profile_stats";}', '', 2147483646, 1, 0, @iNotifMenuOrder + 1);
  165. -- MENU: manage tools submenu
  166. INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
  167. ('bx_stream_menu_manage_tools', '_bx_stream_menu_title_manage_tools', 'bx_stream_menu_manage_tools', 'bx_stream', 6, 0, 1, 'BxStrmMenuManageTools', 'modules/boonex/stream/classes/BxStrmMenuManageTools.php');
  168. INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
  169. ('bx_stream_menu_manage_tools', 'bx_stream', '_bx_stream_menu_set_title_manage_tools', 0);
  170. --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
  171. --('bx_stream_menu_manage_tools', 'bx_stream', 'delete-with-content', '_bx_stream_menu_item_title_system_delete_with_content', '_bx_stream_menu_item_title_delete_with_content', 'javascript:void(0)', 'javascript:{js_object}.onClickDeleteWithContent({content_id});', '_self', 'far trash-alt', '', 128, 1, 0, 0);
  172. -- MENU: dashboard manage tools
  173. SET @iManageMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name`='sys_account_dashboard_manage_tools' LIMIT 1);
  174. 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
  175. ('sys_account_dashboard_manage_tools', 'bx_stream', 'streams-administration', '_bx_stream_menu_item_title_system_admt_stream', '_bx_stream_menu_item_title_admt_stream', 'page.php?i=streams-administration', '', '_self', 'rss', 'a:2:{s:6:"module";s:8:"bx_stream";s:6:"method";s:27:"get_menu_addon_manage_tools";}', '', 192, 1, 0, @iManageMenuOrder + 1);
  176. -- PRIVACY
  177. 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
  178. ('bx_stream_allow_view_to', 'bx_stream', 'view', '_bx_stream_form_entry_input_allow_view_to', '3', 'bx_stream_streams', 'id', 'author', '', '');
  179. -- ACL
  180. INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
  181. ('bx_stream', 'create entry', NULL, '_bx_stream_acl_action_create_entry', '', 1, 3);
  182. SET @iIdActionEntryCreate = LAST_INSERT_ID();
  183. INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
  184. ('bx_stream', 'record', NULL, '_bx_stream_acl_action_record', '', 1, 3);
  185. SET @iIdActionRecord = LAST_INSERT_ID();
  186. INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
  187. ('bx_stream', 'delete entry', NULL, '_bx_stream_acl_action_delete_entry', '', 1, 3);
  188. SET @iIdActionEntryDelete = LAST_INSERT_ID();
  189. INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
  190. ('bx_stream', 'view entry', NULL, '_bx_stream_acl_action_view_entry', '', 1, 0);
  191. SET @iIdActionEntryView = LAST_INSERT_ID();
  192. INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
  193. ('bx_stream', 'edit any entry', NULL, '_bx_stream_acl_action_edit_any_entry', '', 1, 3);
  194. SET @iIdActionEntryEditAny = LAST_INSERT_ID();
  195. INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
  196. ('bx_stream', 'delete any entry', NULL, '_bx_stream_acl_action_delete_any_entry', '', 1, 3);
  197. SET @iIdActionEntryDeleteAny = LAST_INSERT_ID();
  198. SET @iUnauthenticated = 1;
  199. SET @iAccount = 2;
  200. SET @iStandard = 3;
  201. SET @iUnconfirmed = 4;
  202. SET @iPending = 5;
  203. SET @iSuspended = 6;
  204. SET @iModerator = 7;
  205. SET @iAdministrator = 8;
  206. SET @iPremium = 9;
  207. INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
  208. -- entry create
  209. (@iModerator, @iIdActionEntryCreate),
  210. (@iAdministrator, @iIdActionEntryCreate),
  211. (@iPremium, @iIdActionEntryCreate),
  212. -- entry delete
  213. (@iModerator, @iIdActionEntryDelete),
  214. (@iAdministrator, @iIdActionEntryDelete),
  215. (@iPremium, @iIdActionEntryDelete),
  216. -- entry view
  217. (@iUnauthenticated, @iIdActionEntryView),
  218. (@iAccount, @iIdActionEntryView),
  219. (@iStandard, @iIdActionEntryView),
  220. (@iUnconfirmed, @iIdActionEntryView),
  221. (@iPending, @iIdActionEntryView),
  222. (@iModerator, @iIdActionEntryView),
  223. (@iAdministrator, @iIdActionEntryView),
  224. (@iPremium, @iIdActionEntryView),
  225. -- edit any entry
  226. (@iModerator, @iIdActionEntryEditAny),
  227. (@iAdministrator, @iIdActionEntryEditAny),
  228. -- delete any entry
  229. (@iAdministrator, @iIdActionEntryDeleteAny);
  230. -- METATAGS
  231. INSERT INTO `sys_objects_metatags` (`object`, `module`, `table_keywords`, `table_locations`, `table_mentions`, `override_class_name`, `override_class_file`) VALUES
  232. ('bx_stream', 'bx_stream', 'bx_stream_meta_keywords', 'bx_stream_meta_locations', 'bx_stream_meta_mentions', '', '');
  233. -- CATEGORY
  234. INSERT INTO `sys_objects_category` (`object`, `module`, `search_object`, `form_object`, `list_name`, `table`, `field`, `join`, `where`, `override_class_name`, `override_class_file`) VALUES
  235. ('bx_stream_cats', 'bx_stream', '', 'bx_stream', 'bx_stream_cats', 'bx_stream_streams', 'cat', 'INNER JOIN `sys_profiles` ON (`sys_profiles`.`id` = ABS(`bx_stream_streams`.`author`))', 'AND `sys_profiles`.`status` = ''active''', '', '');
  236. -- STATS
  237. SET @iMaxOrderStats = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_statistics`);
  238. INSERT INTO `sys_statistics` (`module`, `name`, `title`, `link`, `icon`, `query`, `order`) VALUES
  239. ('bx_stream', 'bx_stream', '_bx_stream', 'page.php?i=streams-home', 'rss col-red3', 'SELECT COUNT(*) FROM `bx_stream_streams` WHERE 1 AND `status` = ''active'' AND `status_admin` = ''active''', @iMaxOrderStats + 1);
  240. -- CHARTS
  241. SET @iMaxOrderCharts = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_objects_chart`);
  242. INSERT INTO `sys_objects_chart` (`object`, `title`, `table`, `field_date_ts`, `field_date_dt`, `field_status`, `query`, `active`, `order`, `class_name`, `class_file`) VALUES
  243. ('bx_stream_growth', '_bx_stream_chart_growth', 'bx_stream_streams', 'added', '', 'status,status_admin', '', 1, @iMaxOrderCharts + 1, 'BxDolChartGrowth', ''),
  244. ('bx_stream_growth_speed', '_bx_stream_chart_growth_speed', 'bx_stream_streams', 'added', '', 'status,status_admin', '', 1, @iMaxOrderCharts + 2, 'BxDolChartGrowthSpeed', '');
  245. -- GRIDS: moderation tools
  246. 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
  247. ('bx_stream_administration', 'Sql', 'SELECT * FROM `bx_stream_streams` WHERE 1 ', 'bx_stream_streams', 'id', 'added', 'status_admin', '', 20, NULL, 'start', '', 'title,text', '', 'like', 'reports', '', 192, 'BxStrmGridAdministration', 'modules/boonex/stream/classes/BxStrmGridAdministration.php'),
  248. ('bx_stream_common', 'Sql', 'SELECT * FROM `bx_stream_streams` WHERE 1 ', 'bx_stream_streams', 'id', 'added', 'status', '', 20, NULL, 'start', '', 'title,text', '', 'like', '', '', 2147483647, 'BxStrmGridCommon', 'modules/boonex/stream/classes/BxStrmGridCommon.php');
  249. INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
  250. ('bx_stream_administration', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
  251. ('bx_stream_administration', 'switcher', '_bx_stream_grid_column_title_adm_active', '8%', 0, '', '', 2),
  252. ('bx_stream_administration', 'reports', '_sys_txt_reports_title', '5%', 0, '', '', 3),
  253. ('bx_stream_administration', 'title', '_bx_stream_grid_column_title_adm_title', '25%', 0, '25', '', 4),
  254. ('bx_stream_administration', 'added', '_bx_stream_grid_column_title_adm_added', '20%', 1, '25', '', 5),
  255. ('bx_stream_administration', 'author', '_bx_stream_grid_column_title_adm_author', '20%', 0, '25', '', 6),
  256. ('bx_stream_administration', 'actions', '', '20%', 0, '', '', 7),
  257. ('bx_stream_common', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
  258. ('bx_stream_common', 'switcher', '_bx_stream_grid_column_title_adm_active', '8%', 0, '', '', 2),
  259. ('bx_stream_common', 'title', '_bx_stream_grid_column_title_adm_title', '40%', 0, '35', '', 3),
  260. ('bx_stream_common', 'added', '_bx_stream_grid_column_title_adm_added', '15%', 1, '25', '', 4),
  261. ('bx_stream_common', 'status_admin', '_bx_stream_grid_column_title_adm_status_admin', '15%', 0, '16', '', 5),
  262. ('bx_stream_common', 'actions', '', '20%', 0, '', '', 6);
  263. INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
  264. ('bx_stream_administration', 'bulk', 'delete', '_bx_stream_grid_action_title_adm_delete', '', 0, 1, 1),
  265. ('bx_stream_administration', 'bulk', 'clear_reports', '_bx_stream_grid_action_title_adm_clear_reports', '', 0, 1, 1),
  266. ('bx_stream_administration', 'single', 'edit', '_bx_stream_grid_action_title_adm_edit', 'pencil-alt', 1, 0, 1),
  267. ('bx_stream_administration', 'single', 'delete', '_bx_stream_grid_action_title_adm_delete', 'remove', 1, 1, 2),
  268. ('bx_stream_administration', 'single', 'settings', '_bx_stream_grid_action_title_adm_more_actions', 'cog', 1, 0, 3),
  269. ('bx_stream_administration', 'single', 'audit_content', '_bx_stream_grid_action_title_adm_audit_content', 'search', 1, 0, 4),
  270. ('bx_stream_administration', 'single', 'clear_reports', '_bx_stream_grid_action_title_adm_clear_reports', 'eraser', 1, 0, 5),
  271. ('bx_stream_common', 'bulk', 'delete', '_bx_stream_grid_action_title_adm_delete', '', 0, 1, 1),
  272. ('bx_stream_common', 'single', 'edit', '_bx_stream_grid_action_title_adm_edit', 'pencil-alt', 1, 0, 1),
  273. ('bx_stream_common', 'single', 'delete', '_bx_stream_grid_action_title_adm_delete', 'remove', 1, 1, 2),
  274. ('bx_stream_common', 'single', 'settings', '_bx_stream_grid_action_title_adm_more_actions', 'cog', 1, 0, 3);
  275. -- GRIDS: recordings
  276. 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`, `show_total_count`, `override_class_name`, `override_class_file`) VALUES
  277. ('bx_stream_recordings', 'Sql', 'SELECT `bx_stream_recordings`.* FROM `bx_stream_recordings` INNER JOIN `sys_storage_ghosts` USING (`id`) WHERE `sys_storage_ghosts`.`object` = "bx_stream_recordings"', 'bx_stream_recordings', 'id', 'added', '', '', 16, NULL, 'start', '', '', '', 'auto', 'size,added', '', 2147483647, 0, 'BxStrmGridRecordings', 'modules/boonex/stream/classes/BxStrmGridRecordings.php');
  278. INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
  279. ('bx_stream_recordings', 'size', '_bx_stream_field_size', '20%', 0, 0, '', 1),
  280. ('bx_stream_recordings', 'added', '_bx_stream_field_added', '20%', 0, 0, '', 2),
  281. ('bx_stream_recordings', 'actions', '_sys_actions', '60%', 0, 0, '', 3);
  282. INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `confirm`, `order`) VALUES
  283. ('bx_stream_recordings', 'single', 'download', '', 'download', 0, 1),
  284. ('bx_stream_recordings', 'single', 'publish', '', 'upload', 1, 2),
  285. ('bx_stream_recordings', 'single', 'delete', '', 'remove', 1, 3);
  286. -- UPLOADERS
  287. INSERT INTO `sys_objects_uploader` (`object`, `active`, `override_class_name`, `override_class_file`) VALUES
  288. ('bx_stream_simple', 1, 'BxStrmUploaderSimple', 'modules/boonex/stream/classes/BxStrmUploaderSimple.php'),
  289. ('bx_stream_html5', 1, 'BxStrmUploaderHTML5', 'modules/boonex/stream/classes/BxStrmUploaderHTML5.php');
  290. -- ALERTS
  291. INSERT INTO `sys_alerts_handlers` (`name`, `class`, `file`, `service_call`) VALUES
  292. ('bx_stream', 'BxStrmAlertsResponse', 'modules/boonex/stream/classes/BxStrmAlertsResponse.php', '');
  293. SET @iHandler := LAST_INSERT_ID();
  294. INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
  295. ('system', 'save_setting', @iHandler),
  296. ('profile', 'delete', @iHandler);
  297. -- CRON
  298. INSERT INTO `sys_cron_jobs` (`name`, `time`, `class`, `file`, `service_call`) VALUES
  299. ('bx_stream_publishing', '* * * * *', 'BxStrmCronPublishing', 'modules/boonex/stream/classes/BxStrmCronPublishing.php', '');