install.sql 18 KB

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