1
0

install.sql 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
  2. -- TABLE: PROFILES
  3. CREATE TABLE IF NOT EXISTS `bx_workspaces_data` (
  4. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  5. `author` int(10) unsigned NOT NULL,
  6. `added` int(11) NOT NULL,
  7. `changed` int(11) NOT NULL,
  8. `views` int(11) NOT NULL default '0',
  9. `rate` float NOT NULL default '0',
  10. `votes` int(11) NOT NULL default '0',
  11. `rrate` float NOT NULL default '0',
  12. `rvotes` int(11) NOT NULL default '0',
  13. `score` int(11) NOT NULL default '0',
  14. `sc_up` int(11) NOT NULL default '0',
  15. `sc_down` int(11) NOT NULL default '0',
  16. `favorites` int(11) NOT NULL default '0',
  17. `comments` int(11) NOT NULL default '0',
  18. `reports` int(11) NOT NULL default '0',
  19. `featured` int(11) NOT NULL default '0',
  20. `allow_view_to` varchar(16) NOT NULL DEFAULT '3',
  21. `allow_post_to` varchar(16) NOT NULL DEFAULT '5',
  22. `allow_contact_to` varchar(16) NOT NULL DEFAULT '3',
  23. `settings` text NOT NULL,
  24. PRIMARY KEY (`id`)
  25. );
  26. -- TABLE: comments
  27. CREATE TABLE IF NOT EXISTS `bx_workspaces_cmts` (
  28. `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
  29. `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
  30. `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
  31. `cmt_object_id` int(11) NOT NULL DEFAULT '0',
  32. `cmt_author_id` int(11) NOT NULL DEFAULT '0',
  33. `cmt_level` int(11) NOT NULL DEFAULT '0',
  34. `cmt_text` text NOT NULL,
  35. `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',
  36. `cmt_rate` int(11) NOT NULL DEFAULT '0',
  37. `cmt_rate_count` int(11) NOT NULL DEFAULT '0',
  38. `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
  39. `cmt_replies` int(11) NOT NULL DEFAULT '0',
  40. `cmt_pinned` int(11) NOT NULL default '0',
  41. `cmt_cf` int(11) NOT NULL default '1',
  42. PRIMARY KEY (`cmt_id`),
  43. KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
  44. FULLTEXT KEY `search_fields` (`cmt_text`)
  45. );
  46. CREATE TABLE IF NOT EXISTS `bx_workspaces_cmts_notes` (
  47. `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
  48. `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
  49. `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
  50. `cmt_object_id` int(11) NOT NULL DEFAULT '0',
  51. `cmt_author_id` int(11) NOT NULL DEFAULT '0',
  52. `cmt_level` int(11) NOT NULL DEFAULT '0',
  53. `cmt_text` text NOT NULL,
  54. `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',
  55. `cmt_rate` int(11) NOT NULL DEFAULT '0',
  56. `cmt_rate_count` int(11) NOT NULL DEFAULT '0',
  57. `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
  58. `cmt_replies` int(11) NOT NULL DEFAULT '0',
  59. `cmt_pinned` int(11) NOT NULL default '0',
  60. PRIMARY KEY (`cmt_id`),
  61. KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
  62. FULLTEXT KEY `search_fields` (`cmt_text`)
  63. );
  64. -- TABLE: VIEWS
  65. CREATE TABLE IF NOT EXISTS `bx_workspaces_views_track` (
  66. `id` int(11) NOT NULL AUTO_INCREMENT,
  67. `object_id` int(11) NOT NULL default '0',
  68. `viewer_id` int(11) NOT NULL default '0',
  69. `viewer_nip` int(11) unsigned NOT NULL default '0',
  70. `date` int(11) NOT NULL default '0',
  71. PRIMARY KEY (`id`),
  72. KEY `id` (`object_id`,`viewer_id`,`viewer_nip`)
  73. );
  74. -- TABLE: VOTES
  75. CREATE TABLE IF NOT EXISTS `bx_workspaces_votes` (
  76. `id` int(11) NOT NULL AUTO_INCREMENT,
  77. `object_id` int(11) NOT NULL default '0',
  78. `count` int(11) NOT NULL default '0',
  79. `sum` int(11) NOT NULL default '0',
  80. PRIMARY KEY (`id`),
  81. UNIQUE KEY `object_id` (`object_id`)
  82. );
  83. CREATE TABLE IF NOT EXISTS `bx_workspaces_votes_track` (
  84. `id` int(11) NOT NULL AUTO_INCREMENT,
  85. `object_id` int(11) NOT NULL default '0',
  86. `author_id` int(11) NOT NULL default '0',
  87. `author_nip` int(11) unsigned NOT NULL default '0',
  88. `value` tinyint(4) NOT NULL default '0',
  89. `date` int(11) NOT NULL default '0',
  90. PRIMARY KEY (`id`),
  91. KEY `vote` (`object_id`, `author_nip`)
  92. );
  93. CREATE TABLE IF NOT EXISTS `bx_workspaces_reactions` (
  94. `id` int(11) NOT NULL AUTO_INCREMENT,
  95. `object_id` int(11) NOT NULL default '0',
  96. `reaction` varchar(32) NOT NULL default '',
  97. `count` int(11) NOT NULL default '0',
  98. `sum` int(11) NOT NULL default '0',
  99. PRIMARY KEY (`id`),
  100. UNIQUE KEY `reaction` (`object_id`, `reaction`)
  101. );
  102. CREATE TABLE IF NOT EXISTS `bx_workspaces_reactions_track` (
  103. `id` int(11) NOT NULL AUTO_INCREMENT,
  104. `object_id` int(11) NOT NULL default '0',
  105. `author_id` int(11) NOT NULL default '0',
  106. `author_nip` int(11) unsigned NOT NULL default '0',
  107. `reaction` varchar(32) NOT NULL default '',
  108. `value` tinyint(4) NOT NULL default '0',
  109. `date` int(11) NOT NULL default '0',
  110. PRIMARY KEY (`id`),
  111. KEY `vote` (`object_id`, `author_nip`)
  112. );
  113. -- TABLE: favorites
  114. CREATE TABLE IF NOT EXISTS `bx_workspaces_favorites_track` (
  115. `id` int(11) NOT NULL AUTO_INCREMENT,
  116. `object_id` int(11) NOT NULL default '0',
  117. `author_id` int(11) NOT NULL default '0',
  118. `date` int(11) NOT NULL default '0',
  119. PRIMARY KEY (`id`),
  120. KEY `id` (`object_id`,`author_id`)
  121. );
  122. -- TABLE: reports
  123. CREATE TABLE IF NOT EXISTS `bx_workspaces_reports` (
  124. `id` int(11) NOT NULL AUTO_INCREMENT,
  125. `object_id` int(11) NOT NULL default '0',
  126. `count` int(11) NOT NULL default '0',
  127. PRIMARY KEY (`id`),
  128. UNIQUE KEY `object_id` (`object_id`)
  129. );
  130. CREATE TABLE IF NOT EXISTS `bx_workspaces_reports_track` (
  131. `id` int(11) NOT NULL AUTO_INCREMENT,
  132. `object_id` int(11) NOT NULL default '0',
  133. `author_id` int(11) NOT NULL default '0',
  134. `author_nip` int(11) unsigned NOT NULL default '0',
  135. `type` varchar(32) NOT NULL default '',
  136. `text` text NOT NULL default '',
  137. `date` int(11) NOT NULL default '0',
  138. `checked_by` int(11) NOT NULL default '0',
  139. `status` tinyint(11) NOT NULL default '0',
  140. PRIMARY KEY (`id`),
  141. KEY `report` (`object_id`, `author_nip`)
  142. );
  143. -- TABLE: scores
  144. CREATE TABLE IF NOT EXISTS `bx_workspaces_scores` (
  145. `id` int(11) NOT NULL AUTO_INCREMENT,
  146. `object_id` int(11) NOT NULL default '0',
  147. `count_up` int(11) NOT NULL default '0',
  148. `count_down` int(11) NOT NULL default '0',
  149. PRIMARY KEY (`id`),
  150. UNIQUE KEY `object_id` (`object_id`)
  151. );
  152. CREATE TABLE IF NOT EXISTS `bx_workspaces_scores_track` (
  153. `id` int(11) NOT NULL AUTO_INCREMENT,
  154. `object_id` int(11) NOT NULL default '0',
  155. `author_id` int(11) NOT NULL default '0',
  156. `author_nip` int(11) unsigned NOT NULL default '0',
  157. `type` varchar(8) NOT NULL default '',
  158. `date` int(11) NOT NULL default '0',
  159. PRIMARY KEY (`id`),
  160. KEY `vote` (`object_id`, `author_nip`)
  161. );
  162. -- FORMS
  163. 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`, `parent_form`) VALUES
  164. ('bx_workspace', 'bx_workspaces', '_bx_workspaces_form_profile', '', 'a:1:{s:7:\"enctype\";s:19:\"multipart/form-data\";}', 'bx_workspaces_data', 'id', '', '', 'do_submit', '', 0, 1, 'BxWorkspacesFormEntry', 'modules/boonex/workspaces/classes/BxWorkspacesFormEntry.php', '');
  165. INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`, `title`) VALUES
  166. ('bx_workspace', 'bx_workspace_add', 'bx_workspaces', 0, '_bx_workspaces_form_profile_display_add'),
  167. ('bx_workspace', 'bx_workspace_delete', 'bx_workspaces', 0, '_bx_workspaces_form_profile_display_delete'),
  168. ('bx_workspace', 'bx_workspace_edit', 'bx_workspaces', 0, '_bx_workspaces_form_profile_display_edit'),
  169. ('bx_workspace', 'bx_workspace_view', 'bx_workspaces', 1, '_bx_workspaces_form_profile_display_view'),
  170. ('bx_workspace', 'bx_workspace_view_full', 'bx_workspaces', 1, '_bx_workspaces_form_profile_display_view_full');
  171. 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`, `rateable`) VALUES
  172. ('bx_workspace', 'bx_workspaces', 'allow_view_to', 3, '', 0, 'custom', '_bx_workspaces_form_profile_input_sys_allow_view_to', '_bx_workspaces_form_profile_input_allow_view_to', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0, ''),
  173. ('bx_workspace', 'bx_workspaces', 'allow_post_to', 5, '', 0, 'custom', '_bx_workspaces_form_profile_input_sys_allow_post_to', '_bx_workspaces_form_profile_input_allow_post_to', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0, ''),
  174. ('bx_workspace', 'bx_workspaces', 'allow_contact_to', 3, '', 0, 'custom', '_bx_workspaces_form_profile_input_sys_allow_contact_to', '_bx_workspaces_form_profile_input_allow_contact_to', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0, ''),
  175. ('bx_workspace', 'bx_workspaces', 'delete_confirm', 1, '', 0, 'checkbox', '_bx_workspaces_form_profile_input_sys_delete_confirm', '_bx_workspaces_form_profile_input_delete_confirm', '_bx_workspaces_form_profile_input_delete_confirm_info', 1, 0, 0, '', '', '', 'Avail', '', '_bx_workspaces_form_profile_input_delete_confirm_error', '', '', 1, 0, ''),
  176. ('bx_workspace', 'bx_workspaces', 'do_submit', '_bx_workspaces_form_profile_input_submit', '', 0, 'submit', '_bx_workspaces_form_profile_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0, ''),
  177. ('bx_workspace', 'bx_workspaces', 'do_cancel', '_sys_form_input_cancel', '', 0, 'button', '_sys_form_input_sys_cancel', '', '', 0, 0, 0, 'a:2:{s:7:"onclick";s:41:"window.open(''{edit_cancel_url}'', ''_self'')";s:5:"class";s:22:"bx-def-margin-sec-left";}', '', '', '', '', '', '', '', 0, 0, ''),
  178. ('bx_workspace', 'bx_workspaces', 'controls', '', 'do_submit,do_cancel', 0, 'input_set', '_sys_form_input_sys_controls', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0, ''),
  179. ('bx_workspace', 'bx_workspaces', 'profile_email', '', '', 0, 'text', '_bx_workspaces_form_profile_input_sys_profile_email', '_bx_workspaces_form_profile_input_profile_email', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 0, 0, ''),
  180. ('bx_workspace', 'bx_workspaces', 'profile_status', '', '', 0, 'text', '_bx_workspaces_form_profile_input_sys_profile_status', '_bx_workspaces_form_profile_input_profile_status', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 0, 0, ''),
  181. ('bx_workspace', 'bx_workspaces', 'profile_ip', '', '', 0, 'text', '_bx_workspaces_form_profile_input_sys_profile_ip', '_bx_workspaces_form_profile_input_profile_ip', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 0, 0, ''),
  182. ('bx_workspace', 'bx_workspaces', 'profile_last_active', '', '', 0, 'text', '_bx_workspaces_form_profile_input_sys_profile_last_active', '_bx_workspaces_form_profile_input_profile_last_active', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 0, 0, ''),
  183. ('bx_workspace', 'bx_workspaces', 'added', '', '', 0, 'datetime', '_bx_workspaces_form_profile_input_sys_date_added', '_bx_workspaces_form_profile_input_date_added', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0, ''),
  184. ('bx_workspace', 'bx_workspaces', 'changed', '', '', 0, 'datetime', '_bx_workspaces_form_profile_input_sys_date_changed', '_bx_workspaces_form_profile_input_date_changed', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0, ''),
  185. ('bx_workspace', 'bx_workspaces', 'friends_count', '', '', 0, 'text', '_bx_workspaces_form_profile_input_sys_friends_count', '_bx_workspaces_form_profile_input_friends_count', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0, ''),
  186. ('bx_workspace', 'bx_workspaces', 'followers_count', '', '', 0, 'text', '_bx_workspaces_form_profile_input_sys_followers_count', '_bx_workspaces_form_profile_input_followers_count', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0, '');
  187. INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
  188. ('bx_workspace_add', 'allow_view_to', 2147483647, 1, 8),
  189. ('bx_workspace_add', 'allow_post_to', 2147483647, 1, 9),
  190. ('bx_workspace_add', 'allow_contact_to', 2147483647, 1, 10),
  191. ('bx_workspace_add', 'do_submit', 2147483647, 1, 11),
  192. ('bx_workspace_delete', 'delete_confirm', 2147483647, 1, 0),
  193. ('bx_workspace_delete', 'do_submit', 2147483647, 1, 1),
  194. ('bx_workspace_edit', 'allow_view_to', 2147483647, 1, 8),
  195. ('bx_workspace_edit', 'allow_post_to', 2147483647, 1, 9),
  196. ('bx_workspace_edit', 'allow_contact_to', 2147483647, 1, 10),
  197. ('bx_workspace_edit', 'controls', 2147483647, 1, 11),
  198. ('bx_workspace_edit', 'do_submit', 2147483647, 1, 12),
  199. ('bx_workspace_edit', 'do_cancel', 2147483647, 1, 13),
  200. ('bx_workspace_view', 'profile_email', 192, 1, 5),
  201. ('bx_workspace_view', 'profile_status', 192, 1, 6),
  202. ('bx_workspace_view', 'profile_ip', 192, 1, 7),
  203. ('bx_workspace_view', 'profile_last_active', 192, 1, 8),
  204. ('bx_workspace_view', 'added', 192, 1, 9),
  205. ('bx_workspace_view', 'changed', 192, 1, 10),
  206. ('bx_workspace_view', 'friends_count', 2147483647, 1, 11),
  207. ('bx_workspace_view', 'followers_count', 2147483647, 1, 12),
  208. ('bx_workspace_view_full', 'profile_email', 192, 1, 6),
  209. ('bx_workspace_view_full', 'profile_status', 192, 1, 7),
  210. ('bx_workspace_view_full', 'profile_last_active', 192, 1, 8);
  211. -- COMMENTS
  212. INSERT INTO `sys_objects_cmts` (`Name`, `Module`, `Table`, `CharsPostMin`, `CharsPostMax`, `CharsDisplayMax`, `Html`, `PerView`, `PerViewReplies`, `BrowseType`, `IsBrowseSwitch`, `PostFormPosition`, `NumberOfLevels`, `IsDisplaySwitch`, `IsRatable`, `ViewingThreshold`, `IsOn`, `RootStylePrefix`, `BaseUrl`, `ObjectVote`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldTitle`, `TriggerFieldComments`, `ClassName`, `ClassFile`) VALUES
  213. ('bx_workspaces', 'bx_workspaces', 'bx_workspaces_cmts', 1, 5000, 1000, 3, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-workspaces-profile&id={object_id}', '', 'bx_workspaces_data', 'id', 'author', 'fullname', 'comments', 'BxWorkspacesCmts', 'modules/boonex/workspaces/classes/BxWorkspacesCmts.php'),
  214. ('bx_workspaces_notes', 'bx_workspaces', 'bx_workspaces_cmts_notes', 1, 5000, 1000, 0, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-post&id={object_id}', '', 'bx_workspaces_data', 'id', 'author', 'fullname', '', 'BxTemplCmtsNotes', '');
  215. -- VIEWS
  216. INSERT INTO `sys_objects_view` (`name`, `module`, `table_track`, `period`, `is_on`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES
  217. ('bx_workspaces', 'bx_workspaces', 'bx_workspaces_views_track', '86400', '1', 'bx_workspaces_data', 'id', 'author', 'views', '', '');
  218. -- VOTES
  219. INSERT INTO `sys_objects_vote` (`Name`, `Module`, `TableMain`, `TableTrack`, `PostTimeout`, `MinValue`, `MaxValue`, `IsUndo`, `IsOn`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldRate`, `TriggerFieldRateCount`, `ClassName`, `ClassFile`) VALUES
  220. ('bx_workspaces', 'bx_workspaces', 'bx_workspaces_votes', 'bx_workspaces_votes_track', '604800', '1', '1', '0', '1', 'bx_workspaces_data', 'id', '', 'rate', 'votes', 'BxWorkspacesVote', 'modules/boonex/workspaces/classes/BxWorkspacesVote.php'),
  221. ('bx_workspaces_reactions', 'bx_workspaces', 'bx_workspaces_reactions', 'bx_workspaces_reactions_track', '604800', '1', '1', '1', '1', 'bx_workspaces_data', 'id', 'author', 'rrate', 'rvotes', 'BxTemplVoteReactions', '');
  222. -- SCORES
  223. INSERT INTO `sys_objects_score` (`name`, `module`, `table_main`, `table_track`, `post_timeout`, `is_on`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_score`, `trigger_field_cup`, `trigger_field_cdown`, `class_name`, `class_file`) VALUES
  224. ('bx_workspaces', 'bx_workspaces', 'bx_workspaces_scores', 'bx_workspaces_scores_track', '604800', '1', 'bx_workspaces_data', 'id', 'author', 'score', 'sc_up', 'sc_down', '', '');
  225. -- FAFORITES
  226. 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
  227. ('bx_workspaces', 'bx_workspaces_favorites_track', '1', '1', '0', 'page.php?i=view-workspaces-profile&id={object_id}', 'bx_workspaces_data', 'id', 'author', 'favorites', 'BxWorkspacesFavorite', 'modules/boonex/workspaces/classes/BxWorkspacesFavorite.php');
  228. -- FEATURED
  229. INSERT INTO `sys_objects_feature` (`name`, `module`, `is_on`, `is_undo`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_flag`, `class_name`, `class_file`) VALUES
  230. ('bx_workspaces', 'bx_workspaces', '1', '1', 'page.php?i=view-workspaces-profile&id={object_id}', 'bx_workspaces_data', 'id', 'author', 'featured', '', '');
  231. -- REPORTS
  232. INSERT INTO `sys_objects_report` (`name`, `module`, `table_main`, `table_track`, `is_on`, `base_url`, `object_comment`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES
  233. ('bx_workspaces', 'bx_workspaces', 'bx_workspaces_reports', 'bx_workspaces_reports_track', '1', 'page.php?i=view-workspaces-profile&id={object_id}', 'bx_workspaces_notes', 'bx_workspaces_data', 'id', 'author', 'reports', 'BxWorkspacesReport', 'modules/boonex/workspaces/classes/BxWorkspacesReport.php');
  234. -- CONTENT INFO
  235. INSERT INTO `sys_objects_content_info` (`name`, `title`, `alert_unit`, `alert_action_add`, `alert_action_update`, `alert_action_delete`, `class_name`, `class_file`) VALUES
  236. ('bx_workspaces', '_bx_workspaces', 'bx_workspaces', 'added', 'edited', 'deleted', '', ''),
  237. ('bx_workspaces_cmts', '_bx_workspaces_cmts', 'bx_workspaces', 'commentPost', 'commentUpdated', 'commentRemoved', 'BxDolContentInfoCmts', '');
  238. INSERT INTO `sys_content_info_grids` (`object`, `grid_object`, `grid_field_id`, `condition`, `selection`) VALUES
  239. ('bx_workspaces', 'bx_workspaces_administration', 'td`.`id', '', ''),
  240. ('bx_workspaces', 'bx_workspaces_common', 'td`.`id', '', '');
  241. -- STUDIO PAGE & WIDGET
  242. INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
  243. (3, 'bx_workspaces', '_bx_workspaces', '_bx_workspaces', 'bx_workspaces@modules/boonex/workspaces/|std-icon.svg');
  244. SET @iPageId = LAST_INSERT_ID();
  245. SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
  246. SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
  247. INSERT INTO `sys_std_widgets` (`page_id`, `module`, `type`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
  248. (@iPageId, 'bx_workspaces', 'users', '{url_studio}module.php?name=bx_workspaces', '', 'bx_workspaces@modules/boonex/workspaces/|std-icon.svg', '_bx_workspaces', '', '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";}');
  249. INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
  250. (@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));