install.sql 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590
  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) NOT NULL default '0',
  6. `system` tinyint(4) NOT NULL default '1',
  7. `type` varchar(255) NOT NULL,
  8. `action` varchar(255) NOT NULL,
  9. `object_id` int(11) NOT NULL default '0',
  10. `object_owner_id` int(11) NOT NULL default '0',
  11. `object_privacy_view` varchar(16) NOT NULL default '3',
  12. `object_cf` int(11) NOT NULL default '1',
  13. `content` text NOT NULL,
  14. `title` varchar(255) NOT NULL,
  15. `description` text NOT NULL,
  16. `location` text NOT NULL,
  17. `views` int(11) unsigned NOT NULL default '0',
  18. `rate` float NOT NULL default '0',
  19. `votes` int(11) unsigned NOT NULL default '0',
  20. `rrate` float NOT NULL default '0',
  21. `rvotes` int(11) NOT NULL default '0',
  22. `score` int(11) NOT NULL default '0',
  23. `sc_up` int(11) NOT NULL default '0',
  24. `sc_down` int(11) NOT NULL default '0',
  25. `comments` int(11) unsigned NOT NULL default '0',
  26. `reports` int(11) unsigned NOT NULL default '0',
  27. `reposts` int(11) unsigned NOT NULL default '0',
  28. `date` int(11) NOT NULL default '0',
  29. `published` int(11) NOT NULL default '0',
  30. `status` enum ('active', 'awaiting', 'failed', 'hidden', 'deleted') NOT NULL DEFAULT 'active',
  31. `active` tinyint(4) NOT NULL default '1',
  32. `pinned` int(11) NOT NULL default '0',
  33. `sticked` int(11) NOT NULL default '0',
  34. `promoted` int(11) NOT NULL default '0',
  35. PRIMARY KEY (`id`),
  36. KEY `owner_id` (`owner_id`),
  37. KEY `object_id` (`object_id`),
  38. FULLTEXT KEY `search_fields` (`title`, `description`)
  39. );
  40. CREATE TABLE IF NOT EXISTS `bx_timeline_handlers` (
  41. `id` int(11) NOT NULL auto_increment,
  42. `group` varchar(64) NOT NULL default '',
  43. `type` enum('insert','update','delete') NOT NULL DEFAULT 'insert',
  44. `alert_unit` varchar(64) NOT NULL default '',
  45. `alert_action` varchar(64) NOT NULL default '',
  46. `content` text NOT NULL,
  47. `privacy` varchar(64) NOT NULL default '',
  48. PRIMARY KEY (`id`),
  49. UNIQUE `handler` (`group`, `type`),
  50. UNIQUE `alert` (`alert_unit`, `alert_action`)
  51. );
  52. INSERT INTO `bx_timeline_handlers`(`group`, `type`, `alert_unit`, `alert_action`, `content`) VALUES
  53. ('common_post', 'insert', 'timeline_common_post', '', ''),
  54. ('common_repost', 'insert', 'timeline_common_repost', '', ''),
  55. ('profile', 'delete', 'profile', 'delete', ''),
  56. ('comment', 'insert', 'comment', 'added', 'a:5:{s:11:"module_name";s:6:"system";s:13:"module_method";s:17:"get_timeline_post";s:12:"module_class";s:17:"TemplCmtsServices";s:9:"groupable";i:0;s:8:"group_by";s:0:"";}'),
  57. ('comment', 'update', 'comment', 'edited', ''),
  58. ('comment', 'delete', 'comment', 'deleted', '');
  59. -- TABLE: mute
  60. CREATE TABLE IF NOT EXISTS `bx_timeline_mute` (
  61. `id` int(11) NOT NULL AUTO_INCREMENT,
  62. `initiator` int(11) NOT NULL,
  63. `content` int(11) NOT NULL,
  64. `mutual` tinyint(4) NOT NULL,
  65. `added` int(10) unsigned NOT NULL,
  66. PRIMARY KEY (`id`),
  67. UNIQUE KEY `initiator` (`initiator`,`content`),
  68. KEY `content` (`content`)
  69. );
  70. -- TABLES: STORAGES, TRANSCODERS, UPLOADERS
  71. CREATE TABLE IF NOT EXISTS `bx_timeline_photos` (
  72. `id` int(11) NOT NULL AUTO_INCREMENT,
  73. `profile_id` int(10) unsigned NOT NULL,
  74. `remote_id` varchar(128) NOT NULL,
  75. `path` varchar(255) NOT NULL,
  76. `file_name` varchar(255) NOT NULL,
  77. `mime_type` varchar(128) NOT NULL,
  78. `ext` varchar(32) NOT NULL,
  79. `size` bigint(20) NOT NULL,
  80. `added` int(11) NOT NULL,
  81. `modified` int(11) NOT NULL,
  82. `private` int(11) NOT NULL,
  83. PRIMARY KEY (`id`),
  84. UNIQUE KEY `remote_id` (`remote_id`)
  85. );
  86. CREATE TABLE IF NOT EXISTS `bx_timeline_photos_processed` (
  87. `id` int(11) NOT NULL AUTO_INCREMENT,
  88. `profile_id` int(10) unsigned NOT NULL,
  89. `remote_id` varchar(128) NOT NULL,
  90. `path` varchar(255) NOT NULL,
  91. `file_name` varchar(255) NOT NULL,
  92. `mime_type` varchar(128) NOT NULL,
  93. `ext` varchar(32) NOT NULL,
  94. `size` bigint(20) NOT NULL,
  95. `added` int(11) NOT NULL,
  96. `modified` int(11) NOT NULL,
  97. `private` int(11) NOT NULL,
  98. PRIMARY KEY (`id`),
  99. UNIQUE KEY `remote_id` (`remote_id`)
  100. );
  101. CREATE TABLE IF NOT EXISTS `bx_timeline_photos2events` (
  102. `id` int(11) NOT NULL AUTO_INCREMENT,
  103. `event_id` int(11) NOT NULL DEFAULT '0',
  104. `media_id` int(11) NOT NULL DEFAULT '0',
  105. PRIMARY KEY (`id`),
  106. UNIQUE KEY `media` (`event_id`, `media_id`)
  107. );
  108. CREATE TABLE IF NOT EXISTS `bx_timeline_videos` (
  109. `id` int(11) NOT NULL AUTO_INCREMENT,
  110. `profile_id` int(10) unsigned NOT NULL,
  111. `remote_id` varchar(128) NOT NULL,
  112. `path` varchar(255) NOT NULL,
  113. `file_name` varchar(255) NOT NULL,
  114. `mime_type` varchar(128) NOT NULL,
  115. `ext` varchar(32) NOT NULL,
  116. `size` bigint(20) NOT NULL,
  117. `dimensions` varchar(12) NOT NULL,
  118. `added` int(11) NOT NULL,
  119. `modified` int(11) NOT NULL,
  120. `private` int(11) NOT NULL,
  121. PRIMARY KEY (`id`),
  122. UNIQUE KEY `remote_id` (`remote_id`)
  123. );
  124. CREATE TABLE IF NOT EXISTS `bx_timeline_videos_processed` (
  125. `id` int(11) NOT NULL AUTO_INCREMENT,
  126. `profile_id` int(10) unsigned NOT NULL,
  127. `remote_id` varchar(128) NOT NULL,
  128. `path` varchar(255) NOT NULL,
  129. `file_name` varchar(255) NOT NULL,
  130. `mime_type` varchar(128) NOT NULL,
  131. `ext` varchar(32) NOT NULL,
  132. `size` bigint(20) NOT NULL,
  133. `added` int(11) NOT NULL,
  134. `modified` int(11) NOT NULL,
  135. `private` int(11) NOT NULL,
  136. PRIMARY KEY (`id`),
  137. UNIQUE KEY `remote_id` (`remote_id`)
  138. );
  139. CREATE TABLE IF NOT EXISTS `bx_timeline_videos2events` (
  140. `id` int(11) NOT NULL AUTO_INCREMENT,
  141. `event_id` int(11) NOT NULL DEFAULT '0',
  142. `media_id` int(11) NOT NULL DEFAULT '0',
  143. PRIMARY KEY (`id`),
  144. UNIQUE KEY `media` (`event_id`, `media_id`)
  145. );
  146. CREATE TABLE IF NOT EXISTS `bx_timeline_files` (
  147. `id` int(11) NOT NULL AUTO_INCREMENT,
  148. `profile_id` int(10) unsigned NOT NULL,
  149. `remote_id` varchar(128) NOT NULL,
  150. `path` varchar(255) NOT NULL,
  151. `file_name` varchar(255) NOT NULL,
  152. `mime_type` varchar(128) NOT NULL,
  153. `ext` varchar(32) NOT NULL,
  154. `size` bigint(20) NOT NULL,
  155. `added` int(11) NOT NULL,
  156. `modified` int(11) NOT NULL,
  157. `private` int(11) NOT NULL,
  158. PRIMARY KEY (`id`),
  159. UNIQUE KEY `remote_id` (`remote_id`)
  160. );
  161. CREATE TABLE IF NOT EXISTS `bx_timeline_files2events` (
  162. `id` int(11) NOT NULL AUTO_INCREMENT,
  163. `event_id` int(11) NOT NULL DEFAULT '0',
  164. `media_id` int(11) NOT NULL DEFAULT '0',
  165. PRIMARY KEY (`id`),
  166. UNIQUE KEY `media` (`event_id`, `media_id`)
  167. );
  168. -- TABLES: LINKS
  169. CREATE TABLE IF NOT EXISTS `bx_timeline_links` (
  170. `id` int(11) NOT NULL AUTO_INCREMENT,
  171. `profile_id` int(10) unsigned NOT NULL,
  172. `media_id` int(11) NOT NULL DEFAULT '0',
  173. `url` varchar(255) NOT NULL,
  174. `title` varchar(255) NOT NULL,
  175. `text` text NOT NULL,
  176. `added` int(11) NOT NULL,
  177. PRIMARY KEY (`id`),
  178. KEY `profile_id` (`profile_id`)
  179. );
  180. CREATE TABLE IF NOT EXISTS `bx_timeline_links2events` (
  181. `id` int(11) NOT NULL AUTO_INCREMENT,
  182. `event_id` int(11) NOT NULL DEFAULT '0',
  183. `link_id` int(11) NOT NULL DEFAULT '0',
  184. PRIMARY KEY (`id`),
  185. UNIQUE KEY `link` (`link_id`, `event_id`)
  186. );
  187. -- TABLES: REPOSTS
  188. CREATE TABLE IF NOT EXISTS `bx_timeline_reposts_track` (
  189. `event_id` int(11) NOT NULL default '0',
  190. `author_id` int(11) NOT NULL default '0',
  191. `author_nip` int(11) unsigned NOT NULL default '0',
  192. `reposted_id` int(11) NOT NULL default '0',
  193. `date` int(11) NOT NULL default '0',
  194. UNIQUE KEY `event_id` (`event_id`),
  195. KEY `repost` (`reposted_id`, `author_nip`)
  196. );
  197. -- TABLES: COMMENTS
  198. CREATE TABLE IF NOT EXISTS `bx_timeline_comments` (
  199. `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
  200. `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
  201. `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
  202. `cmt_object_id` int(11) NOT NULL DEFAULT '0',
  203. `cmt_author_id` int(11) NOT NULL DEFAULT '0',
  204. `cmt_level` int(11) NOT NULL DEFAULT '0',
  205. `cmt_text` text NOT NULL,
  206. `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
  207. `cmt_replies` int(11) NOT NULL DEFAULT '0',
  208. `cmt_pinned` int(11) NOT NULL default '0',
  209. `cmt_cf` int(11) NOT NULL default '1',
  210. PRIMARY KEY (`cmt_id`),
  211. KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
  212. FULLTEXT KEY `search_fields` (`cmt_text`)
  213. );
  214. -- TABLE: views
  215. CREATE TABLE IF NOT EXISTS `bx_timeline_views_track` (
  216. `object_id` int(11) NOT NULL default '0',
  217. `viewer_id` int(11) NOT NULL default '0',
  218. `viewer_nip` int(11) unsigned NOT NULL default '0',
  219. `date` int(11) NOT NULL default '0',
  220. KEY `id` (`object_id`,`viewer_id`,`viewer_nip`)
  221. );
  222. -- TABLES: VOTES
  223. CREATE TABLE IF NOT EXISTS `bx_timeline_votes` (
  224. `object_id` int(11) NOT NULL default '0',
  225. `count` int(11) NOT NULL default '0',
  226. `sum` int(11) NOT NULL default '0',
  227. UNIQUE KEY `object_id` (`object_id`)
  228. );
  229. CREATE TABLE IF NOT EXISTS `bx_timeline_votes_track` (
  230. `id` int(11) NOT NULL AUTO_INCREMENT,
  231. `object_id` int(11) NOT NULL default '0',
  232. `author_id` int(11) NOT NULL default '0',
  233. `author_nip` int(11) unsigned NOT NULL default '0',
  234. `value` tinyint(4) NOT NULL default '0',
  235. `date` int(11) NOT NULL default '0',
  236. PRIMARY KEY (`id`),
  237. KEY `vote` (`object_id`, `author_nip`)
  238. );
  239. CREATE TABLE IF NOT EXISTS `bx_timeline_reactions` (
  240. `object_id` int(11) NOT NULL default '0',
  241. `reaction` varchar(32) NOT NULL default '',
  242. `count` int(11) NOT NULL default '0',
  243. `sum` int(11) NOT NULL default '0',
  244. UNIQUE KEY `reaction` (`object_id`, `reaction`)
  245. );
  246. CREATE TABLE IF NOT EXISTS `bx_timeline_reactions_track` (
  247. `id` int(11) NOT NULL AUTO_INCREMENT,
  248. `object_id` int(11) NOT NULL default '0',
  249. `author_id` int(11) NOT NULL default '0',
  250. `author_nip` int(11) unsigned NOT NULL default '0',
  251. `reaction` varchar(32) NOT NULL default '',
  252. `value` tinyint(4) NOT NULL default '0',
  253. `date` int(11) NOT NULL default '0',
  254. PRIMARY KEY (`id`),
  255. KEY `vote` (`object_id`, `author_nip`)
  256. );
  257. -- TABLE: metas
  258. CREATE TABLE IF NOT EXISTS `bx_timeline_meta_keywords` (
  259. `object_id` int(10) unsigned NOT NULL,
  260. `keyword` varchar(255) NOT NULL,
  261. KEY `object_id` (`object_id`),
  262. KEY `keyword` (`keyword`)
  263. );
  264. CREATE TABLE IF NOT EXISTS `bx_timeline_meta_locations` (
  265. `object_id` int(10) unsigned NOT NULL,
  266. `lat` double NOT NULL,
  267. `lng` double NOT NULL,
  268. `country` varchar(2) NOT NULL,
  269. `state` varchar(255) NOT NULL,
  270. `city` varchar(255) NOT NULL,
  271. `zip` varchar(255) NOT NULL,
  272. `street` varchar(255) NOT NULL,
  273. `street_number` varchar(255) NOT NULL,
  274. PRIMARY KEY (`object_id`),
  275. KEY `country_state_city` (`country`,`state`(8),`city`(8))
  276. );
  277. CREATE TABLE IF NOT EXISTS `bx_timeline_meta_mentions` (
  278. `object_id` int(10) unsigned NOT NULL,
  279. `profile_id` int(10) unsigned NOT NULL,
  280. KEY `object_id` (`object_id`),
  281. KEY `profile_id` (`profile_id`)
  282. );
  283. -- TABLE: reports
  284. CREATE TABLE IF NOT EXISTS `bx_timeline_reports` (
  285. `object_id` int(11) NOT NULL default '0',
  286. `count` int(11) NOT NULL default '0',
  287. UNIQUE KEY `object_id` (`object_id`)
  288. );
  289. CREATE TABLE IF NOT EXISTS `bx_timeline_reports_track` (
  290. `id` int(11) NOT NULL AUTO_INCREMENT,
  291. `object_id` int(11) NOT NULL default '0',
  292. `author_id` int(11) NOT NULL default '0',
  293. `author_nip` int(11) unsigned NOT NULL default '0',
  294. `type` varchar(32) NOT NULL default '',
  295. `text` text NOT NULL default '',
  296. `date` int(11) NOT NULL default '0',
  297. `checked_by` int(11) NOT NULL default '0',
  298. `status` tinyint(11) NOT NULL default '0',
  299. PRIMARY KEY (`id`),
  300. KEY `report` (`object_id`, `author_nip`)
  301. );
  302. -- TABLE: hot track
  303. CREATE TABLE IF NOT EXISTS `bx_timeline_hot_track` (
  304. `id` int(11) NOT NULL AUTO_INCREMENT,
  305. `event_id` int(11) NOT NULL default '0',
  306. `value` int(11) NOT NULL default '0',
  307. PRIMARY KEY (`id`),
  308. UNIQUE KEY `event_id` (`event_id`)
  309. );
  310. -- TABLE: scores
  311. CREATE TABLE IF NOT EXISTS `bx_timeline_scores` (
  312. `object_id` int(11) NOT NULL default '0',
  313. `count_up` int(11) NOT NULL default '0',
  314. `count_down` int(11) NOT NULL default '0',
  315. UNIQUE KEY `object_id` (`object_id`)
  316. );
  317. CREATE TABLE IF NOT EXISTS `bx_timeline_scores_track` (
  318. `id` int(11) NOT NULL AUTO_INCREMENT,
  319. `object_id` int(11) NOT NULL default '0',
  320. `author_id` int(11) NOT NULL default '0',
  321. `author_nip` int(11) unsigned NOT NULL default '0',
  322. `type` varchar(8) NOT NULL default '',
  323. `date` int(11) NOT NULL default '0',
  324. PRIMARY KEY (`id`),
  325. KEY `vote` (`object_id`, `author_nip`)
  326. );
  327. -- STORAGES, TRANSCODERS, UPLOADERS
  328. SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
  329. INSERT INTO `sys_objects_uploader` (`object`, `active`, `override_class_name`, `override_class_file`) VALUES
  330. ('bx_timeline_simple_photo', 1, 'BxTimelineUploaderSimpleAttach', 'modules/boonex/timeline/classes/BxTimelineUploaderSimpleAttach.php'),
  331. ('bx_timeline_simple_video', 1, 'BxTimelineUploaderSimpleAttach', 'modules/boonex/timeline/classes/BxTimelineUploaderSimpleAttach.php'),
  332. ('bx_timeline_html5_photo', 1, 'BxTimelineUploaderHTML5Attach', 'modules/boonex/timeline/classes/BxTimelineUploaderHTML5Attach.php'),
  333. ('bx_timeline_html5_video', 1, 'BxTimelineUploaderHTML5Attach', 'modules/boonex/timeline/classes/BxTimelineUploaderHTML5Attach.php'),
  334. ('bx_timeline_record_video', 1, 'BxTimelineUploaderRecordVideoAttach', 'modules/boonex/timeline/classes/BxTimelineUploaderRecordVideoAttach.php'),
  335. ('bx_timeline_simple_file', 1, 'BxTimelineUploaderSimpleAttach', 'modules/boonex/timeline/classes/BxTimelineUploaderSimpleAttach.php'),
  336. ('bx_timeline_html5_file', 1, 'BxTimelineUploaderHTML5Attach', 'modules/boonex/timeline/classes/BxTimelineUploaderHTML5Attach.php');
  337. 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
  338. ('bx_timeline_photos', @sStorageEngine, '', 360, 2592000, 3, 'bx_timeline_photos', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
  339. ('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),
  340. ('bx_timeline_videos', @sStorageEngine, 'a:1:{s:6:"fields";a:1:{s:10:"dimensions";s:17:"getFileDimensions";}}', 360, 2592000, 3, 'bx_timeline_videos', 'allow-deny', 'avi,flv,mpg,mpeg,wmv,mp4,m4v,mov,qt,divx,xvid,3gp,3g2,webm,mkv,ogv,ogg,rm,rmvb,asf,drc', '', 0, 0, 0, 0, 0, 0),
  341. ('bx_timeline_videos_processed', @sStorageEngine, '', 360, 2592000, 3, 'bx_timeline_videos_processed', 'allow-deny', 'jpg,jpeg,jpe,gif,png,avi,flv,mpg,mpeg,wmv,mp4,m4v,mov,qt,divx,xvid,3gp,3g2,webm,mkv,ogv,ogg,rm,rmvb,asf,drc', '', 0, 0, 0, 0, 0, 0),
  342. ('bx_timeline_files', @sStorageEngine, '', 360, 2592000, 3, 'bx_timeline_files', 'deny-allow', '', 'jpg,jpeg,jpe,gif,png,action,apk,app,bat,bin,cmd,com,command,cpl,csh,exe,gadget,inf,ins,inx,ipa,isu,job,jse,ksh,lnk,msc,msi,msp,mst,osx,out,paf,pif,prg,ps1,reg,rgs,run,sct,shb,shs,u3p,vb,vbe,vbs,vbscript,workflow,ws,wsf', 0, 0, 0, 0, 0, 0);
  343. 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
  344. ('bx_timeline_photos_preview', 'bx_timeline_photos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_photos";}', 'no', '1', '2592000', '0', '', ''),
  345. ('bx_timeline_photos_view', 'bx_timeline_photos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_photos";}', 'no', '1', '2592000', '0', '', ''),
  346. ('bx_timeline_photos_medium', 'bx_timeline_photos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_photos";}', 'no', '1', '2592000', '0', '', ''),
  347. ('bx_timeline_photos_big', 'bx_timeline_photos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_photos";}', 'no', '1', '2592000', '0', '', ''),
  348. ('bx_timeline_videos_poster', 'bx_timeline_videos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
  349. ('bx_timeline_videos_mp4', 'bx_timeline_videos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
  350. ('bx_timeline_videos_mp4_hd', 'bx_timeline_videos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', '');
  351. INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES
  352. ('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'),
  353. ('bx_timeline_photos_view', 'Resize', 'a:1:{s:1:"w";s:3:"300";}', '0'),
  354. ('bx_timeline_photos_medium', 'Resize', 'a:1:{s:1:"w";s:3:"600";}', '0'),
  355. ('bx_timeline_photos_big', 'Resize', 'a:2:{s:1:"w";s:4:"1200";s:1:"h";s:4:"1200";}', '0'),
  356. ('bx_timeline_videos_poster', 'Poster', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:3:"jpg";}', 0),
  357. ('bx_timeline_videos_mp4', 'Mp4', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:3:"mp4";}', 0),
  358. ('bx_timeline_videos_mp4_hd', 'Mp4', 'a:3:{s:1:"h";s:3:"720";s:13:"video_bitrate";s:4:"1536";s:10:"force_type";s:3:"mp4";}', 0);
  359. -- Forms -> Post
  360. 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
  361. ('bx_timeline_post', @sName, '_bx_timeline_form_post', '', '', 'tlb_do_submit', 'bx_timeline_events', 'id', '', '', '', 0, 1, 'BxTimelineFormPost', 'modules/boonex/timeline/classes/BxTimelineFormPost.php');
  362. INSERT INTO `sys_form_displays` (`display_name`, `module`, `object`, `title`, `view_mode`) VALUES
  363. ('bx_timeline_post_add', @sName, 'bx_timeline_post', '_bx_timeline_form_post_display_add', 0),
  364. ('bx_timeline_post_add_public', @sName, 'bx_timeline_post', '_bx_timeline_form_post_display_add_public', 0),
  365. ('bx_timeline_post_add_profile', @sName, 'bx_timeline_post', '_bx_timeline_form_post_display_add_profile', 0),
  366. ('bx_timeline_post_edit', @sName, 'bx_timeline_post', '_bx_timeline_form_post_display_edit', 0),
  367. ('bx_timeline_post_view', @sName, 'bx_timeline_post', '_bx_timeline_form_post_display_view', 1);
  368. 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
  369. ('bx_timeline_post', @sName, 'type', 'post', '', 0, 'hidden', '_bx_timeline_form_post_input_sys_type', '', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 0, 0),
  370. ('bx_timeline_post', @sName, 'action', '', '', 0, 'hidden', '_bx_timeline_form_post_input_sys_action', '', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 0, 0),
  371. ('bx_timeline_post', @sName, 'owner_id', '0', '', 0, 'hidden', '_bx_timeline_form_post_input_sys_owner_id', '', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
  372. ('bx_timeline_post', @sName, 'text', '', '', 0, 'textarea', '_bx_timeline_form_post_input_sys_text', '_bx_timeline_form_post_input_text', '', 0, 0, 3, 'a:1:{s:12:"autocomplete";s:3:"off";}', '', '', '', '', '', 'XssHtml', '', 1, 0),
  373. ('bx_timeline_post', @sName, 'anonymous', '', '', 0, 'switcher', '_sys_form_input_sys_anonymous', '_sys_form_input_anonymous', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  374. ('bx_timeline_post', @sName, 'date', '', '', 0, 'datetime', '_bx_timeline_form_post_input_sys_date', '_bx_timeline_form_post_input_date', '', 0, 0, 0, '', '', '', '', '', '', 'DateTimeUtc', '', 1, 0),
  375. ('bx_timeline_post', @sName, 'published', '', '', 0, 'datetime', '_bx_timeline_form_post_input_sys_date_published', '_bx_timeline_form_post_input_date_published', '_bx_timeline_form_post_input_date_published_info', 0, 0, 0, '', '', '', '', '', '', 'DateTimeUtc', '', 1, 0),
  376. ('bx_timeline_post', @sName, 'object_cf', '', '#!sys_content_filter', 0, 'select', '_sys_form_entry_input_sys_cf', '_sys_form_entry_input_cf', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
  377. ('bx_timeline_post', @sName, 'object_privacy_view', '', '', 0, 'custom', '_bx_timeline_form_post_input_sys_object_privacy_view', '_bx_timeline_form_post_input_object_privacy_view', '', 1, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  378. ('bx_timeline_post', @sName, 'location', '', '', 0, 'location', '_sys_form_input_sys_location', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  379. ('bx_timeline_post', @sName, 'link', '', '', 0, 'custom', '_bx_timeline_form_post_input_sys_link', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  380. ('bx_timeline_post', @sName, 'photo', 'a:1:{i:0;s:23:"bx_timeline_html5_photo";}', 'a:2:{s:24:"bx_timeline_simple_photo";s:26:"_sys_uploader_simple_title";s:23:"bx_timeline_html5_photo";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_timeline_form_post_input_sys_photo', '_bx_timeline_form_post_input_photo', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  381. ('bx_timeline_post', @sName, 'video', 'a:2:{i:0;s:23:"bx_timeline_html5_video";i:1;s:24:"bx_timeline_record_video";}', 'a:3:{s:24:"bx_timeline_simple_video";s:26:"_sys_uploader_simple_title";s:23:"bx_timeline_html5_video";s:25:"_sys_uploader_html5_title";s:24:"bx_timeline_record_video";s:32:"_sys_uploader_record_video_title";}', 0, 'files', '_bx_timeline_form_post_input_sys_video', '_bx_timeline_form_post_input_video', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  382. ('bx_timeline_post', @sName, 'file', 'a:1:{i:0;s:22:"bx_timeline_html5_file";}', 'a:2:{s:23:"bx_timeline_simple_file";s:26:"_sys_uploader_simple_title";s:22:"bx_timeline_html5_file";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_timeline_form_post_input_sys_files', '_bx_timeline_form_post_input_files', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  383. ('bx_timeline_post', @sName, 'attachments', '', '', 0, 'custom', '_bx_timeline_form_post_input_sys_attachments', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  384. ('bx_timeline_post', @sName, 'controls', '', 'tlb_do_submit,tlb_do_cancel', 0, 'input_set', '', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  385. ('bx_timeline_post', @sName, 'tlb_do_submit', '_bx_timeline_form_post_input_do_submit', '', 0, 'submit', '_bx_timeline_form_post_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  386. ('bx_timeline_post', @sName, 'tlb_do_cancel', '_bx_timeline_form_post_input_do_cancel', '', 0, 'button', '_bx_timeline_form_post_input_sys_do_cancel', '', '', 0, 0, 0, 'a:2:{s:7:"onclick";s:51:"{js_object_view}.editPostCancel(this, {content_id})";s:5:"class";s:22:"bx-def-margin-sec-left";}', '', '', '', '', '', '', '', 0, 0);
  387. INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
  388. ('bx_timeline_post_add', 'type', 2147483647, 1, 0),
  389. ('bx_timeline_post_add', 'action', 2147483647, 1, 1),
  390. ('bx_timeline_post_add', 'text', 2147483647, 1, 2),
  391. ('bx_timeline_post_add', 'attachments', 2147483647, 1, 3),
  392. ('bx_timeline_post_add', 'owner_id', 2147483647, 1, 4),
  393. ('bx_timeline_post_add', 'object_privacy_view', 2147483647, 1, 5),
  394. ('bx_timeline_post_add', 'object_cf', 2147483647, 1, 6),
  395. ('bx_timeline_post_add', 'published', 192, 1, 7),
  396. ('bx_timeline_post_add', 'location', 2147483647, 1, 8),
  397. ('bx_timeline_post_add', 'link', 2147483647, 1, 9),
  398. ('bx_timeline_post_add', 'photo', 2147483647, 1, 10),
  399. ('bx_timeline_post_add', 'video', 2147483647, 1, 11),
  400. ('bx_timeline_post_add', 'file', 2147483647, 1, 12),
  401. ('bx_timeline_post_add', 'tlb_do_submit', 2147483647, 1, 13),
  402. ('bx_timeline_post_add_public', 'type', 2147483647, 1, 0),
  403. ('bx_timeline_post_add_public', 'action', 2147483647, 1, 1),
  404. ('bx_timeline_post_add_public', 'owner_id', 2147483647, 1, 2),
  405. ('bx_timeline_post_add_public', 'text', 2147483647, 1, 3),
  406. ('bx_timeline_post_add_public', 'attachments', 2147483647, 1, 4),
  407. ('bx_timeline_post_add_public', 'object_privacy_view', 2147483647, 1, 5),
  408. ('bx_timeline_post_add_public', 'object_cf', 2147483647, 1, 6),
  409. ('bx_timeline_post_add_public', 'published', 192, 1, 7),
  410. ('bx_timeline_post_add_public', 'location', 2147483647, 1, 8),
  411. ('bx_timeline_post_add_public', 'link', 2147483647, 1, 9),
  412. ('bx_timeline_post_add_public', 'photo', 2147483647, 1, 10),
  413. ('bx_timeline_post_add_public', 'video', 2147483647, 1, 11),
  414. ('bx_timeline_post_add_public', 'file', 2147483647, 1, 12),
  415. ('bx_timeline_post_add_public', 'tlb_do_submit', 2147483647, 1, 13),
  416. ('bx_timeline_post_add_profile', 'type', 2147483647, 1, 0),
  417. ('bx_timeline_post_add_profile', 'action', 2147483647, 1, 1),
  418. ('bx_timeline_post_add_profile', 'owner_id', 2147483647, 1, 2),
  419. ('bx_timeline_post_add_profile', 'text', 2147483647, 1, 3),
  420. ('bx_timeline_post_add_profile', 'attachments', 2147483647, 1, 4),
  421. ('bx_timeline_post_add_profile', 'object_privacy_view', 2147483647, 1, 5),
  422. ('bx_timeline_post_add_profile', 'object_cf', 2147483647, 1, 6),
  423. ('bx_timeline_post_add_profile', 'published', 192, 1, 7),
  424. ('bx_timeline_post_add_profile', 'location', 2147483647, 1, 8),
  425. ('bx_timeline_post_add_profile', 'link', 2147483647, 1, 9),
  426. ('bx_timeline_post_add_profile', 'photo', 2147483647, 1, 10),
  427. ('bx_timeline_post_add_profile', 'video', 2147483647, 1, 11),
  428. ('bx_timeline_post_add_profile', 'file', 2147483647, 1, 12),
  429. ('bx_timeline_post_add_profile', 'tlb_do_submit', 2147483647, 1, 13),
  430. ('bx_timeline_post_edit', 'type', 2147483647, 1, 1),
  431. ('bx_timeline_post_edit', 'action', 2147483647, 1, 2),
  432. ('bx_timeline_post_edit', 'owner_id', 2147483647, 1, 3),
  433. ('bx_timeline_post_edit', 'text', 2147483647, 1, 4),
  434. ('bx_timeline_post_edit', 'attachments', 2147483647, 1, 5),
  435. ('bx_timeline_post_edit', 'published', 192, 1, 6),
  436. ('bx_timeline_post_edit', 'location', 2147483647, 1, 7),
  437. ('bx_timeline_post_edit', 'link', 2147483647, 1, 8),
  438. ('bx_timeline_post_edit', 'photo', 2147483647, 1, 9),
  439. ('bx_timeline_post_edit', 'video', 2147483647, 1, 10),
  440. ('bx_timeline_post_edit', 'file', 2147483647, 1, 11),
  441. ('bx_timeline_post_edit', 'object_cf', 2147483647, 1, 12),
  442. ('bx_timeline_post_edit', 'controls', 2147483647, 1, 13),
  443. ('bx_timeline_post_edit', 'tlb_do_submit', 2147483647, 1, 14),
  444. ('bx_timeline_post_edit', 'tlb_do_cancel', 2147483647, 1, 15);
  445. -- Forms -> Attach link
  446. 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
  447. ('bx_timeline_attach_link', @sName, '_bx_timeline_form_attach_link', '', '', 'do_submit', 'bx_timeline_links', 'id', '', '', '', 0, 1, '', '');
  448. INSERT INTO `sys_form_displays` (`display_name`, `module`, `object`, `title`, `view_mode`) VALUES
  449. ('bx_timeline_attach_link_add', @sName, 'bx_timeline_attach_link', '_bx_timeline_form_attach_link_display_add', 0);
  450. 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
  451. ('bx_timeline_attach_link', @sName, 'event_id', '0', '', 0, 'hidden', '_bx_timeline_form_attach_link_input_sys_event_id', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  452. ('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),
  453. ('bx_timeline_attach_link', @sName, 'controls', '', 'do_submit,do_cancel', 0, 'input_set', '', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  454. ('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),
  455. ('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);
  456. INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
  457. ('bx_timeline_attach_link_add', 'event_id', 2147483647, 1, 1),
  458. ('bx_timeline_attach_link_add', 'url', 2147483647, 1, 2),
  459. ('bx_timeline_attach_link_add', 'controls', 2147483647, 1, 3),
  460. ('bx_timeline_attach_link_add', 'do_submit', 2147483647, 1, 4),
  461. ('bx_timeline_attach_link_add', 'do_cancel', 2147483647, 1, 5);
  462. -- Forms -> Repost To
  463. 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
  464. ('bx_timeline_repost_to', @sName, '_bx_timeline_form_repost_to', '', '', 'do_submit', '', '', '', '', '', 0, 1, 'BxTimelineFormRepostTo', 'modules/boonex/timeline/classes/BxTimelineFormRepostTo.php');
  465. INSERT INTO `sys_form_displays` (`display_name`, `module`, `object`, `title`, `view_mode`) VALUES
  466. ('bx_timeline_repost_to_browse', @sName, 'bx_timeline_repost_to', '_bx_timeline_form_repost_to_display_browse', 0);
  467. 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
  468. ('bx_timeline_repost_to', @sName, 'reposter_id', '', '', 0, 'hidden', '_bx_timeline_form_repost_to_input_sys_reposter_id', '', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 0, 0),
  469. ('bx_timeline_repost_to', @sName, 'type', '', '', 0, 'hidden', '_bx_timeline_form_repost_to_input_sys_type', '', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 0, 0),
  470. ('bx_timeline_repost_to', @sName, 'action', '', '', 0, 'hidden', '_bx_timeline_form_repost_to_input_sys_action', '', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 0, 0),
  471. ('bx_timeline_repost_to', @sName, 'object_id', '', '', 0, 'hidden', '_bx_timeline_form_repost_to_input_sys_object_id', '', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 0, 0),
  472. ('bx_timeline_repost_to', @sName, 'search', '', '', 0, 'custom', '_bx_timeline_form_repost_to_input_sys_search', '_bx_timeline_form_repost_to_input_search', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  473. ('bx_timeline_repost_to', @sName, 'list', '', '', 0, 'custom', '_bx_timeline_form_repost_to_input_sys_list', '_bx_timeline_form_repost_to_input_list', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  474. ('bx_timeline_repost_to', @sName, 'controls', '', 'do_submit,do_cancel', 0, 'input_set', '', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  475. ('bx_timeline_repost_to', @sName, 'do_submit', '_bx_timeline_form_repost_to_input_do_submit', '', 0, 'submit', '_bx_timeline_form_repost_to_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  476. ('bx_timeline_repost_to', @sName, 'do_cancel', '_bx_timeline_form_repost_to_input_do_cancel', '', 0, 'button', '_bx_timeline_form_repost_to_input_sys_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);
  477. INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
  478. ('bx_timeline_repost_to_browse', 'reposter_id', 2147483647, 1, 1),
  479. ('bx_timeline_repost_to_browse', 'type', 2147483647, 1, 2),
  480. ('bx_timeline_repost_to_browse', 'action', 2147483647, 1, 3),
  481. ('bx_timeline_repost_to_browse', 'object_id', 2147483647, 1, 4),
  482. ('bx_timeline_repost_to_browse', 'search', 2147483647, 1, 5),
  483. ('bx_timeline_repost_to_browse', 'list', 2147483647, 1, 6),
  484. ('bx_timeline_repost_to_browse', 'controls', 2147483647, 1, 7),
  485. ('bx_timeline_repost_to_browse', 'do_submit', 2147483647, 1, 8),
  486. ('bx_timeline_repost_to_browse', 'do_cancel', 2147483647, 1, 9);
  487. -- COMMENTS
  488. 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
  489. ('bx_timeline', 'bx_timeline', 'bx_timeline_comments', 1, 5000, 1000, 3, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=item&id={object_id}', '', 'bx_timeline_events', 'id', 'object_id', 'title', 'comments', '', '');
  490. -- VIEWS
  491. INSERT INTO `sys_objects_view` (`name`, `table_track`, `period`, `is_on`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES
  492. ('bx_timeline', 'bx_timeline_views_track', '86400', '1', 'bx_timeline_events', 'id', 'object_id', 'views', '', '');
  493. -- VOTES
  494. INSERT INTO `sys_objects_vote`(`Name`, `TableMain`, `TableTrack`, `PostTimeout`, `MinValue`, `MaxValue`, `IsUndo`, `IsOn`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldRate`, `TriggerFieldRateCount`, `ClassName`, `ClassFile`) VALUES
  495. ('bx_timeline', 'bx_timeline_votes', 'bx_timeline_votes_track', '604800', '1', '1', '0', '1', 'bx_timeline_events', 'id', 'object_id', 'rate', 'votes', 'BxTimelineVoteLikes', 'modules/boonex/timeline/classes/BxTimelineVoteLikes.php'),
  496. ('bx_timeline_reactions', 'bx_timeline_reactions', 'bx_timeline_reactions_track', '604800', '1', '1', '1', '1', 'bx_timeline_events', 'id', 'object_id', 'rrate', 'rvotes', 'BxTemplVoteReactions', '');
  497. -- SCORES
  498. 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
  499. ('bx_timeline', 'bx_timeline', 'bx_timeline_scores', 'bx_timeline_scores_track', '604800', '0', 'bx_timeline_events', 'id', 'object_id', 'score', 'sc_up', 'sc_down', '', '');
  500. -- REPORTS
  501. INSERT INTO `sys_objects_report` (`name`, `module`, `table_main`, `table_track`, `is_on`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES
  502. ('bx_timeline', 'bx_timeline', 'bx_timeline_reports', 'bx_timeline_reports_track', '1', 'page.php?i=item&id={object_id}', 'bx_timeline_events', 'id', 'owner_id', 'reports', 'BxTimelineReport', 'modules/boonex/timeline/classes/BxTimelineReport.php');
  503. -- CONTENT INFO
  504. INSERT INTO `sys_objects_content_info` (`name`, `title`, `alert_unit`, `alert_action_add`, `alert_action_update`, `alert_action_delete`, `class_name`, `class_file`) VALUES
  505. ('bx_timeline', '_bx_timeline', 'bx_timeline', 'post_common', '', 'delete', '', ''),
  506. ('bx_timeline_cmts', '_bx_timeline_cmts', 'bx_timeline', 'commentPost', 'commentUpdated', 'commentRemoved', 'BxDolContentInfoCmts', '');
  507. -- STUDIO PAGE & WIDGET
  508. INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
  509. (3, 'bx_timeline', '_bx_timeline', '_bx_timeline', 'bx_timeline@modules/boonex/timeline/|std-icon.svg');
  510. SET @iPageId = LAST_INSERT_ID();
  511. SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
  512. SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
  513. INSERT INTO `sys_std_widgets` (`page_id`, `module`, `type`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
  514. (@iPageId, 'bx_timeline', 'extensions', '{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";}');
  515. INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
  516. (@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));