install.sql 18 KB

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