install.sql 17 KB

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