install.sql 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. SET @sName = 'bx_timeline';
  2. -- TABLES
  3. CREATE TABLE IF NOT EXISTS `bx_timeline_events` (
  4. `id` int(11) NOT NULL auto_increment,
  5. `owner_id` int(11) unsigned NOT NULL default '0',
  6. `type` varchar(255) collate utf8_unicode_ci NOT NULL,
  7. `action` varchar(255) collate utf8_unicode_ci NOT NULL,
  8. `object_id` text collate utf8_unicode_ci NOT NULL,
  9. `object_privacy_view` int(11) NOT NULL default '3',
  10. `content` text collate utf8_unicode_ci NOT NULL,
  11. `title` varchar(255) collate utf8_unicode_ci NOT NULL,
  12. `description` text collate utf8_unicode_ci NOT NULL,
  13. `rate` float NOT NULL default '0',
  14. `votes` int(11) unsigned NOT NULL default '0',
  15. `comments` int(11) unsigned NOT NULL default '0',
  16. `reports` int(11) unsigned NOT NULL default '0',
  17. `shares` int(11) unsigned NOT NULL default '0',
  18. `date` int(11) NOT NULL default '0',
  19. `active` tinyint(4) NOT NULL default '1',
  20. `hidden` tinyint(4) NOT NULL default '0',
  21. `pinned` int(11) NOT NULL default '0',
  22. PRIMARY KEY (`id`),
  23. KEY `owner_id` (`owner_id`)
  24. );
  25. CREATE TABLE IF NOT EXISTS `bx_timeline_handlers` (
  26. `id` int(11) NOT NULL auto_increment,
  27. `group` varchar(64) NOT NULL default '',
  28. `type` enum('insert','update','delete') NOT NULL DEFAULT 'insert',
  29. `alert_unit` varchar(64) NOT NULL default '',
  30. `alert_action` varchar(64) NOT NULL default '',
  31. `content` text collate utf8_unicode_ci NOT NULL,
  32. `privacy` varchar(64) NOT NULL default '',
  33. PRIMARY KEY (`id`),
  34. UNIQUE `handler` (`group`, `type`),
  35. UNIQUE `alert` (`alert_unit`, `alert_action`)
  36. );
  37. INSERT INTO `bx_timeline_handlers`(`group`, `type`, `alert_unit`, `alert_action`, `content`) VALUES
  38. ('common_post', 'insert', 'timeline_common_post', '', ''),
  39. ('common_share', 'insert', 'timeline_common_share', '', ''),
  40. ('profile', 'delete', 'profile', 'delete', '');
  41. -- TABLES: STORAGES, TRANSCODERS, UPLOADERS
  42. CREATE TABLE IF NOT EXISTS `bx_timeline_photos` (
  43. `id` int(11) NOT NULL AUTO_INCREMENT,
  44. `profile_id` int(10) unsigned NOT NULL,
  45. `remote_id` varchar(255) NOT NULL,
  46. `path` varchar(255) NOT NULL,
  47. `file_name` varchar(255) NOT NULL,
  48. `mime_type` varchar(128) NOT NULL,
  49. `ext` varchar(32) NOT NULL,
  50. `size` int(11) NOT NULL,
  51. `added` int(11) NOT NULL,
  52. `modified` int(11) NOT NULL,
  53. `private` int(11) NOT NULL,
  54. PRIMARY KEY (`id`),
  55. UNIQUE KEY `remote_id` (`remote_id`)
  56. );
  57. CREATE TABLE IF NOT EXISTS `bx_timeline_photos_processed` (
  58. `id` int(11) NOT NULL AUTO_INCREMENT,
  59. `profile_id` int(10) unsigned NOT NULL,
  60. `remote_id` varchar(255) NOT NULL,
  61. `path` varchar(255) NOT NULL,
  62. `file_name` varchar(255) NOT NULL,
  63. `mime_type` varchar(128) NOT NULL,
  64. `ext` varchar(32) NOT NULL,
  65. `size` int(11) NOT NULL,
  66. `added` int(11) NOT NULL,
  67. `modified` int(11) NOT NULL,
  68. `private` int(11) NOT NULL,
  69. PRIMARY KEY (`id`),
  70. UNIQUE KEY `remote_id` (`remote_id`)
  71. );
  72. CREATE TABLE IF NOT EXISTS `bx_timeline_photos2events` (
  73. `id` int(11) NOT NULL AUTO_INCREMENT,
  74. `event_id` int(11) NOT NULL DEFAULT '0',
  75. `media_id` int(11) NOT NULL DEFAULT '0',
  76. PRIMARY KEY (`id`),
  77. UNIQUE KEY `media` (`event_id`, `media_id`)
  78. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  79. CREATE TABLE IF NOT EXISTS `bx_timeline_videos` (
  80. `id` int(11) NOT NULL AUTO_INCREMENT,
  81. `profile_id` int(10) unsigned NOT NULL,
  82. `remote_id` varchar(255) NOT NULL,
  83. `path` varchar(255) NOT NULL,
  84. `file_name` varchar(255) NOT NULL,
  85. `mime_type` varchar(128) NOT NULL,
  86. `ext` varchar(32) NOT NULL,
  87. `size` int(11) NOT NULL,
  88. `added` int(11) NOT NULL,
  89. `modified` int(11) NOT NULL,
  90. `private` int(11) NOT NULL,
  91. PRIMARY KEY (`id`),
  92. UNIQUE KEY `remote_id` (`remote_id`)
  93. );
  94. CREATE TABLE IF NOT EXISTS `bx_timeline_videos_processed` (
  95. `id` int(11) NOT NULL AUTO_INCREMENT,
  96. `profile_id` int(10) unsigned NOT NULL,
  97. `remote_id` varchar(255) NOT NULL,
  98. `path` varchar(255) NOT NULL,
  99. `file_name` varchar(255) NOT NULL,
  100. `mime_type` varchar(128) NOT NULL,
  101. `ext` varchar(32) NOT NULL,
  102. `size` int(11) NOT NULL,
  103. `added` int(11) NOT NULL,
  104. `modified` int(11) NOT NULL,
  105. `private` int(11) NOT NULL,
  106. PRIMARY KEY (`id`),
  107. UNIQUE KEY `remote_id` (`remote_id`)
  108. );
  109. CREATE TABLE IF NOT EXISTS `bx_timeline_videos2events` (
  110. `id` int(11) NOT NULL AUTO_INCREMENT,
  111. `event_id` int(11) NOT NULL DEFAULT '0',
  112. `media_id` int(11) NOT NULL DEFAULT '0',
  113. PRIMARY KEY (`id`),
  114. UNIQUE KEY `media` (`event_id`, `media_id`)
  115. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  116. -- TABLES: LINKS
  117. CREATE TABLE IF NOT EXISTS `bx_timeline_links` (
  118. `id` int(11) NOT NULL AUTO_INCREMENT,
  119. `profile_id` int(10) unsigned NOT NULL,
  120. `media_id` int(11) NOT NULL DEFAULT '0',
  121. `url` varchar(255) NOT NULL,
  122. `title` varchar(255) collate utf8_unicode_ci NOT NULL,
  123. `text` text collate utf8_unicode_ci NOT NULL,
  124. `added` int(11) NOT NULL,
  125. PRIMARY KEY (`id`)
  126. );
  127. CREATE TABLE IF NOT EXISTS `bx_timeline_links2events` (
  128. `id` int(11) NOT NULL AUTO_INCREMENT,
  129. `event_id` int(11) NOT NULL DEFAULT '0',
  130. `link_id` int(11) NOT NULL DEFAULT '0',
  131. PRIMARY KEY (`id`),
  132. UNIQUE KEY `link` (`event_id`, `link_id`)
  133. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  134. -- TABLES: SHARES
  135. CREATE TABLE IF NOT EXISTS `bx_timeline_shares_track` (
  136. `event_id` int(11) NOT NULL default '0',
  137. `author_id` int(11) NOT NULL default '0',
  138. `author_nip` int(11) unsigned NOT NULL default '0',
  139. `shared_id` int(11) NOT NULL default '0',
  140. `date` int(11) NOT NULL default '0',
  141. UNIQUE KEY `event_id` (`event_id`),
  142. KEY `share` (`shared_id`, `author_nip`)
  143. ) ENGINE=MYISAM DEFAULT CHARSET=utf8;
  144. -- TABLES: COMMENTS
  145. CREATE TABLE IF NOT EXISTS `bx_timeline_comments` (
  146. `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
  147. `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
  148. `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
  149. `cmt_object_id` int(11) NOT NULL DEFAULT '0',
  150. `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
  151. `cmt_level` int(11) NOT NULL DEFAULT '0',
  152. `cmt_text` text NOT NULL,
  153. `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
  154. `cmt_replies` int(11) NOT NULL DEFAULT '0',
  155. PRIMARY KEY (`cmt_id`),
  156. KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`)
  157. );
  158. -- TABLES: VOTES
  159. CREATE TABLE IF NOT EXISTS `bx_timeline_votes` (
  160. `object_id` int(11) NOT NULL default '0',
  161. `count` int(11) NOT NULL default '0',
  162. `sum` int(11) NOT NULL default '0',
  163. UNIQUE KEY `object_id` (`object_id`)
  164. ) ENGINE=MYISAM DEFAULT CHARSET=utf8;
  165. CREATE TABLE IF NOT EXISTS `bx_timeline_votes_track` (
  166. `id` int(11) NOT NULL AUTO_INCREMENT,
  167. `object_id` int(11) NOT NULL default '0',
  168. `author_id` int(11) NOT NULL default '0',
  169. `author_nip` int(11) unsigned NOT NULL default '0',
  170. `value` tinyint(4) NOT NULL default '0',
  171. `date` int(11) NOT NULL default '0',
  172. PRIMARY KEY (`id`),
  173. KEY `vote` (`object_id`, `author_nip`)
  174. ) ENGINE=MYISAM DEFAULT CHARSET=utf8;
  175. -- TABLE: metas
  176. CREATE TABLE IF NOT EXISTS `bx_timeline_meta_keywords` (
  177. `object_id` int(10) unsigned NOT NULL,
  178. `keyword` varchar(255) NOT NULL,
  179. KEY `object_id` (`object_id`),
  180. KEY `keyword` (`keyword`)
  181. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  182. CREATE TABLE IF NOT EXISTS `bx_timeline_meta_locations` (
  183. `object_id` int(10) unsigned NOT NULL,
  184. `lat` double NOT NULL,
  185. `lng` double NOT NULL,
  186. `country` varchar(2) NOT NULL,
  187. `state` varchar(255) NOT NULL,
  188. `city` varchar(255) NOT NULL,
  189. `zip` varchar(255) NOT NULL,
  190. PRIMARY KEY (`object_id`),
  191. KEY `country_state_city` (`country`,`state`(8),`city`(8))
  192. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  193. -- TABLE: reports
  194. CREATE TABLE IF NOT EXISTS `bx_timeline_reports` (
  195. `object_id` int(11) NOT NULL default '0',
  196. `count` int(11) NOT NULL default '0',
  197. UNIQUE KEY `object_id` (`object_id`)
  198. ) ENGINE=MYISAM DEFAULT CHARSET=utf8;
  199. CREATE TABLE IF NOT EXISTS `bx_timeline_reports_track` (
  200. `id` int(11) NOT NULL AUTO_INCREMENT,
  201. `object_id` int(11) NOT NULL default '0',
  202. `author_id` int(11) NOT NULL default '0',
  203. `author_nip` int(11) unsigned NOT NULL default '0',
  204. `type` varchar(32) NOT NULL default '',
  205. `text` text NOT NULL default '',
  206. `date` int(11) NOT NULL default '0',
  207. PRIMARY KEY (`id`),
  208. KEY `report` (`object_id`, `author_nip`)
  209. ) ENGINE=MYISAM DEFAULT CHARSET=utf8;
  210. -- STORAGES, TRANSCODERS, UPLOADERS
  211. INSERT INTO `sys_objects_uploader` (`object`, `active`, `override_class_name`, `override_class_file`) VALUES
  212. ('bx_timeline_simple_photo', 1, 'BxTimelineUploaderSimplePhoto', 'modules/boonex/timeline/classes/BxTimelineUploaderSimplePhoto.php'),
  213. ('bx_timeline_simple_video', 1, 'BxTimelineUploaderSimpleVideo', 'modules/boonex/timeline/classes/BxTimelineUploaderSimpleVideo.php');
  214. 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
  215. ('bx_timeline_photos', 'Local', '', 360, 2592000, 3, 'bx_timeline_photos', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
  216. ('bx_timeline_photos_processed', 'Local', '', 360, 2592000, 3, 'bx_timeline_photos_processed', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
  217. ('bx_timeline_videos', 'Local', '', 360, 2592000, 3, 'bx_timeline_videos', 'allow-deny', 'avi,flv,mpg,mpeg,wmv,mp4,m4v,mov,divx,xvid,3gp,webm,jpg', '', 0, 0, 0, 0, 0, 0),
  218. ('bx_timeline_videos_processed', 'Local', '', 360, 2592000, 3, 'bx_timeline_videos_processed', 'allow-deny', 'avi,flv,mpg,mpeg,wmv,mp4,m4v,mov,divx,xvid,3gp,webm,jpg', '', 0, 0, 0, 0, 0, 0);
  219. 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
  220. ('bx_timeline_photos_preview', 'bx_timeline_photos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_photos";}', 'no', '1', '2592000', '0', '', ''),
  221. ('bx_timeline_photos_view', 'bx_timeline_photos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_photos";}', 'no', '1', '2592000', '0', '', ''),
  222. ('bx_timeline_videos_poster', 'bx_timeline_videos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
  223. ('bx_timeline_videos_mp4', 'bx_timeline_videos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
  224. ('bx_timeline_videos_webm', 'bx_timeline_videos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', '');
  225. INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES
  226. ('bx_timeline_photos_preview', 'Resize', 'a:3:{s:1:"w";s:3:"100";s:1:"h";s:3:"100";s:13:"square_resize";s:1:"1";}', '0'),
  227. ('bx_timeline_photos_view', 'Resize', 'a:3:{s:1:"w";s:3:"318";s:1:"h";s:3:"318";s:13:"square_resize";s:1:"1";}', '0'),
  228. ('bx_timeline_videos_poster', 'Poster', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:3:"jpg";}', 0),
  229. ('bx_timeline_videos_mp4', 'Mp4', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:3:"mp4";}', 0),
  230. ('bx_timeline_videos_webm', 'Webm', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:4:"webm";}', 0);
  231. -- Forms -> Post
  232. INSERT INTO `sys_objects_form` (`object`, `module`, `title`, `action`, `form_attrs`, `submit_name`, `table`, `key`, `uri`, `uri_title`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
  233. ('bx_timeline_post', @sName, '_bx_timeline_form_post', '', '', 'do_submit', 'bx_timeline_events', 'id', '', '', '', 0, 1, 'BxTimelineFormPost', 'modules/boonex/timeline/classes/BxTimelineFormPost.php');
  234. INSERT INTO `sys_form_displays` (`display_name`, `module`, `object`, `title`, `view_mode`) VALUES
  235. ('bx_timeline_post_add', @sName, 'bx_timeline_post', '_bx_timeline_form_post_display_add', 0);
  236. 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
  237. ('bx_timeline_post', @sName, 'type', 'post', '', 0, 'hidden', '_bx_timeline_form_post_input_sys_type', '', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 0, 0),
  238. ('bx_timeline_post', @sName, 'action', '', '', 0, 'hidden', '_bx_timeline_form_post_input_sys_action', '', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 0, 0),
  239. ('bx_timeline_post', @sName, 'owner_id', '0', '', 0, 'hidden', '_bx_timeline_form_post_input_sys_owner_id', '', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 0, 0),
  240. ('bx_timeline_post', @sName, 'text', '', '', 0, 'textarea', '_bx_timeline_form_post_input_sys_text', '_bx_timeline_form_post_input_text', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 0, 0),
  241. ('bx_timeline_post', @sName, 'location', '', '', 0, 'custom', '_sys_form_input_sys_location', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  242. ('bx_timeline_post', @sName, 'link', '', '', 0, 'custom', '_bx_timeline_form_post_input_sys_link', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  243. ('bx_timeline_post', @sName, 'photo', '', '', 0, 'files', '_bx_timeline_form_post_input_sys_photo', '_bx_timeline_form_post_input_photo', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  244. ('bx_timeline_post', @sName, 'video', '', '', 0, 'files', '_bx_timeline_form_post_input_sys_video', '_bx_timeline_form_post_input_video', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  245. ('bx_timeline_post', @sName, 'attachments', '', '', 0, 'custom', '_bx_timeline_form_post_input_sys_attachments', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  246. ('bx_timeline_post', @sName, 'do_submit', '_bx_timeline_form_post_input_do_submit', '', 0, 'submit', '_bx_timeline_form_post_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0);
  247. INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
  248. ('bx_timeline_post_add', 'type', 2147483647, 1, 1),
  249. ('bx_timeline_post_add', 'action', 2147483647, 1, 2),
  250. ('bx_timeline_post_add', 'owner_id', 2147483647, 1, 3),
  251. ('bx_timeline_post_add', 'text', 2147483647, 1, 4),
  252. ('bx_timeline_post_add', 'location', 2147483647, 1, 5),
  253. ('bx_timeline_post_add', 'link', 2147483647, 1, 6),
  254. ('bx_timeline_post_add', 'photo', 2147483647, 1, 7),
  255. ('bx_timeline_post_add', 'video', 2147483647, 1, 8),
  256. ('bx_timeline_post_add', 'attachments', 2147483647, 1, 9),
  257. ('bx_timeline_post_add', 'do_submit', 2147483647, 1, 10);
  258. -- Forms -> Attach link
  259. INSERT INTO `sys_objects_form` (`object`, `module`, `title`, `action`, `form_attrs`, `submit_name`, `table`, `key`, `uri`, `uri_title`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
  260. ('bx_timeline_attach_link', @sName, '_bx_timeline_form_attach_link', '', '', 'do_submit', 'bx_timeline_links', 'id', '', '', '', 0, 1, '', '');
  261. INSERT INTO `sys_form_displays` (`display_name`, `module`, `object`, `title`, `view_mode`) VALUES
  262. ('bx_timeline_attach_link_add', @sName, 'bx_timeline_attach_link', '_bx_timeline_form_attach_link_display_add', 0);
  263. 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
  264. ('bx_timeline_attach_link', @sName, 'url', '', '', 0, 'text', '_bx_timeline_form_attach_link_input_sys_url', '_bx_timeline_form_attach_link_input_url', '', 0, 0, 0, '', '', '', 'Preg', 'a:1:{s:4:"preg";s:0:"";}', '_bx_timeline_form_attach_link_input_url_err', '', '', 0, 0),
  265. ('bx_timeline_attach_link', @sName, 'controls', '', 'do_submit,do_cancel', 0, 'input_set', '', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  266. ('bx_timeline_attach_link', @sName, 'do_submit', '_bx_timeline_form_attach_link_input_do_submit', '', 0, 'submit', '_bx_timeline_form_attach_link_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  267. ('bx_timeline_attach_link', @sName, 'do_cancel', '_bx_timeline_form_attach_link_input_do_cancel', '', 0, 'button', '_bx_timeline_form_attach_link_input_do_cancel', '', '', 0, 0, 0, 'a:2:{s:7:"onclick";s:45:"$(''.bx-popup-applied:visible'').dolPopupHide()";s:5:"class";s:22:"bx-def-margin-sec-left";}', '', '', '', '', '', '', '', 0, 0);
  268. INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
  269. ('bx_timeline_attach_link_add', 'url', 2147483647, 1, 1),
  270. ('bx_timeline_attach_link_add', 'controls', 2147483647, 1, 2),
  271. ('bx_timeline_attach_link_add', 'do_submit', 2147483647, 1, 3),
  272. ('bx_timeline_attach_link_add', 'do_cancel', 2147483647, 1, 4);
  273. -- STUDIO PAGE & WIDGET
  274. INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
  275. (3, 'bx_timeline', '_bx_timeline', '_bx_timeline', 'bx_timeline@modules/boonex/timeline/|std-pi.png');
  276. SET @iPageId = LAST_INSERT_ID();
  277. SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
  278. SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
  279. INSERT INTO `sys_std_widgets` (`page_id`, `module`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
  280. (@iPageId, 'bx_timeline', '{url_studio}module.php?name=bx_timeline', '', 'bx_timeline@modules/boonex/timeline/|std-wi.png', '_bx_timeline', '', '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";}');
  281. INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
  282. (@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));