install.sql 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667
  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. `reacted` int(11) NOT NULL default '0',
  31. `status` enum ('active', 'awaiting', 'failed', 'hidden', 'deleted') NOT NULL DEFAULT 'active',
  32. `status_admin` enum('active','hidden','pending') NOT NULL DEFAULT 'active',
  33. `active` tinyint(4) NOT NULL default '1',
  34. `pinned` int(11) NOT NULL default '0',
  35. `sticked` int(11) NOT NULL default '0',
  36. `promoted` int(11) NOT NULL default '0',
  37. PRIMARY KEY (`id`),
  38. KEY `owner_id` (`owner_id`),
  39. KEY `object_id` (`object_id`),
  40. FULLTEXT KEY `search_fields` (`title`, `description`)
  41. );
  42. CREATE TABLE IF NOT EXISTS `bx_timeline_events2users` (
  43. `id` int(11) NOT NULL auto_increment,
  44. `user_id` int(11) NOT NULL DEFAULT '0',
  45. `event_id` int(11) NOT NULL DEFAULT '0',
  46. PRIMARY KEY (`id`),
  47. UNIQUE `view` (`user_id`, `event_id`)
  48. );
  49. CREATE TABLE IF NOT EXISTS `bx_timeline_handlers` (
  50. `id` int(11) NOT NULL auto_increment,
  51. `group` varchar(64) NOT NULL default '',
  52. `type` enum('insert','update','delete') NOT NULL DEFAULT 'insert',
  53. `alert_unit` varchar(64) NOT NULL default '',
  54. `alert_action` varchar(64) NOT NULL default '',
  55. `content` text NOT NULL,
  56. `privacy` varchar(64) NOT NULL default '',
  57. PRIMARY KEY (`id`),
  58. UNIQUE `handler` (`group`, `type`),
  59. UNIQUE `alert` (`alert_unit`, `alert_action`)
  60. );
  61. INSERT INTO `bx_timeline_handlers`(`group`, `type`, `alert_unit`, `alert_action`, `content`) VALUES
  62. ('common_post', 'insert', 'timeline_common_post', '', ''),
  63. ('common_repost', 'insert', 'timeline_common_repost', '', ''),
  64. ('profile', 'delete', 'profile', 'delete', ''),
  65. ('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:"";}'),
  66. ('comment', 'update', 'comment', 'edited', ''),
  67. ('comment', 'delete', 'comment', 'deleted', '');
  68. -- TABLE: mute
  69. CREATE TABLE IF NOT EXISTS `bx_timeline_mute` (
  70. `id` int(11) NOT NULL AUTO_INCREMENT,
  71. `initiator` int(11) NOT NULL,
  72. `content` int(11) NOT NULL,
  73. `mutual` tinyint(4) NOT NULL,
  74. `added` int(10) unsigned NOT NULL,
  75. PRIMARY KEY (`id`),
  76. UNIQUE KEY `initiator` (`initiator`,`content`),
  77. KEY `content` (`content`)
  78. );
  79. -- TABLES: STORAGES, TRANSCODERS, UPLOADERS
  80. CREATE TABLE IF NOT EXISTS `bx_timeline_photos` (
  81. `id` int(11) NOT NULL AUTO_INCREMENT,
  82. `profile_id` int(10) unsigned NOT NULL,
  83. `remote_id` varchar(128) 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` bigint(20) 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_photos_processed` (
  96. `id` int(11) NOT NULL AUTO_INCREMENT,
  97. `profile_id` int(10) unsigned NOT NULL,
  98. `remote_id` varchar(128) 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` bigint(20) 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_photos2events` (
  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. );
  117. CREATE TABLE IF NOT EXISTS `bx_timeline_videos` (
  118. `id` int(11) NOT NULL AUTO_INCREMENT,
  119. `profile_id` int(10) unsigned NOT NULL,
  120. `remote_id` varchar(128) NOT NULL,
  121. `path` varchar(255) NOT NULL,
  122. `file_name` varchar(255) NOT NULL,
  123. `mime_type` varchar(128) NOT NULL,
  124. `ext` varchar(32) NOT NULL,
  125. `size` bigint(20) NOT NULL,
  126. `dimensions` varchar(12) NOT NULL,
  127. `added` int(11) NOT NULL,
  128. `modified` int(11) NOT NULL,
  129. `private` int(11) NOT NULL,
  130. PRIMARY KEY (`id`),
  131. UNIQUE KEY `remote_id` (`remote_id`)
  132. );
  133. CREATE TABLE IF NOT EXISTS `bx_timeline_videos_processed` (
  134. `id` int(11) NOT NULL AUTO_INCREMENT,
  135. `profile_id` int(10) unsigned NOT NULL,
  136. `remote_id` varchar(128) NOT NULL,
  137. `path` varchar(255) NOT NULL,
  138. `file_name` varchar(255) NOT NULL,
  139. `mime_type` varchar(128) NOT NULL,
  140. `ext` varchar(32) NOT NULL,
  141. `size` bigint(20) NOT NULL,
  142. `added` int(11) NOT NULL,
  143. `modified` int(11) NOT NULL,
  144. `private` int(11) NOT NULL,
  145. PRIMARY KEY (`id`),
  146. UNIQUE KEY `remote_id` (`remote_id`)
  147. );
  148. CREATE TABLE IF NOT EXISTS `bx_timeline_videos2events` (
  149. `id` int(11) NOT NULL AUTO_INCREMENT,
  150. `event_id` int(11) NOT NULL DEFAULT '0',
  151. `media_id` int(11) NOT NULL DEFAULT '0',
  152. PRIMARY KEY (`id`),
  153. UNIQUE KEY `media` (`event_id`, `media_id`)
  154. );
  155. CREATE TABLE IF NOT EXISTS `bx_timeline_files` (
  156. `id` int(11) NOT NULL AUTO_INCREMENT,
  157. `profile_id` int(10) unsigned NOT NULL,
  158. `remote_id` varchar(128) NOT NULL,
  159. `path` varchar(255) NOT NULL,
  160. `file_name` varchar(255) NOT NULL,
  161. `mime_type` varchar(128) NOT NULL,
  162. `ext` varchar(32) NOT NULL,
  163. `size` bigint(20) NOT NULL,
  164. `added` int(11) NOT NULL,
  165. `modified` int(11) NOT NULL,
  166. `private` int(11) NOT NULL,
  167. PRIMARY KEY (`id`),
  168. UNIQUE KEY `remote_id` (`remote_id`)
  169. );
  170. CREATE TABLE IF NOT EXISTS `bx_timeline_files2events` (
  171. `id` int(11) NOT NULL AUTO_INCREMENT,
  172. `event_id` int(11) NOT NULL DEFAULT '0',
  173. `media_id` int(11) NOT NULL DEFAULT '0',
  174. PRIMARY KEY (`id`),
  175. UNIQUE KEY `media` (`event_id`, `media_id`)
  176. );
  177. -- TABLES: LINKS
  178. CREATE TABLE IF NOT EXISTS `bx_timeline_links` (
  179. `id` int(11) NOT NULL AUTO_INCREMENT,
  180. `profile_id` int(10) unsigned NOT NULL,
  181. `media_id` int(11) NOT NULL DEFAULT '0',
  182. `url` varchar(255) NOT NULL,
  183. `title` varchar(255) NOT NULL,
  184. `text` text NOT NULL,
  185. `added` int(11) NOT NULL,
  186. PRIMARY KEY (`id`),
  187. KEY `profile_id` (`profile_id`)
  188. );
  189. CREATE TABLE IF NOT EXISTS `bx_timeline_links2events` (
  190. `id` int(11) NOT NULL AUTO_INCREMENT,
  191. `event_id` int(11) NOT NULL DEFAULT '0',
  192. `link_id` int(11) NOT NULL DEFAULT '0',
  193. PRIMARY KEY (`id`),
  194. UNIQUE KEY `link` (`link_id`, `event_id`)
  195. );
  196. -- TABLES: REPOSTS
  197. CREATE TABLE IF NOT EXISTS `bx_timeline_reposts_track` (
  198. `id` int(11) NOT NULL AUTO_INCREMENT,
  199. `event_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. `reposted_id` int(11) NOT NULL default '0',
  203. `date` int(11) NOT NULL default '0',
  204. `active` tinyint(4) NOT NULL default '1',
  205. PRIMARY KEY (`id`),
  206. UNIQUE KEY `event_id` (`event_id`),
  207. KEY `repost` (`reposted_id`, `author_nip`)
  208. );
  209. -- TABLES: COMMENTS
  210. CREATE TABLE IF NOT EXISTS `bx_timeline_comments` (
  211. `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
  212. `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
  213. `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
  214. `cmt_object_id` int(11) NOT NULL DEFAULT '0',
  215. `cmt_author_id` int(11) NOT NULL DEFAULT '0',
  216. `cmt_level` int(11) NOT NULL DEFAULT '0',
  217. `cmt_text` text NOT NULL,
  218. `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
  219. `cmt_replies` int(11) NOT NULL DEFAULT '0',
  220. `cmt_pinned` int(11) NOT NULL default '0',
  221. `cmt_cf` int(11) NOT NULL default '1',
  222. PRIMARY KEY (`cmt_id`),
  223. KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
  224. FULLTEXT KEY `search_fields` (`cmt_text`)
  225. );
  226. CREATE TABLE IF NOT EXISTS `bx_timeline_cmts_notes` (
  227. `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
  228. `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
  229. `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
  230. `cmt_object_id` int(11) NOT NULL DEFAULT '0',
  231. `cmt_author_id` int(11) NOT NULL DEFAULT '0',
  232. `cmt_level` int(11) NOT NULL DEFAULT '0',
  233. `cmt_text` text NOT NULL,
  234. `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',
  235. `cmt_rate` int(11) NOT NULL DEFAULT '0',
  236. `cmt_rate_count` int(11) NOT NULL DEFAULT '0',
  237. `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
  238. `cmt_replies` int(11) NOT NULL DEFAULT '0',
  239. `cmt_pinned` int(11) NOT NULL default '0',
  240. PRIMARY KEY (`cmt_id`),
  241. KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
  242. FULLTEXT KEY `search_fields` (`cmt_text`)
  243. );
  244. -- TABLE: views
  245. CREATE TABLE IF NOT EXISTS `bx_timeline_views_track` (
  246. `id` int(11) NOT NULL AUTO_INCREMENT,
  247. `object_id` int(11) NOT NULL default '0',
  248. `viewer_id` int(11) NOT NULL default '0',
  249. `viewer_nip` int(11) unsigned NOT NULL default '0',
  250. `date` int(11) NOT NULL default '0',
  251. PRIMARY KEY (`id`),
  252. KEY `id` (`object_id`,`viewer_id`,`viewer_nip`)
  253. );
  254. -- TABLES: VOTES
  255. CREATE TABLE IF NOT EXISTS `bx_timeline_votes` (
  256. `id` int(11) NOT NULL AUTO_INCREMENT,
  257. `object_id` int(11) NOT NULL default '0',
  258. `count` int(11) NOT NULL default '0',
  259. `sum` int(11) NOT NULL default '0',
  260. PRIMARY KEY (`id`),
  261. UNIQUE KEY `object_id` (`object_id`)
  262. );
  263. CREATE TABLE IF NOT EXISTS `bx_timeline_votes_track` (
  264. `id` int(11) NOT NULL AUTO_INCREMENT,
  265. `object_id` int(11) NOT NULL default '0',
  266. `author_id` int(11) NOT NULL default '0',
  267. `author_nip` int(11) unsigned NOT NULL default '0',
  268. `value` tinyint(4) NOT NULL default '0',
  269. `date` int(11) NOT NULL default '0',
  270. PRIMARY KEY (`id`),
  271. KEY `vote` (`object_id`, `author_nip`)
  272. );
  273. CREATE TABLE IF NOT EXISTS `bx_timeline_reactions` (
  274. `id` int(11) NOT NULL AUTO_INCREMENT,
  275. `object_id` int(11) NOT NULL default '0',
  276. `reaction` varchar(32) NOT NULL default '',
  277. `count` int(11) NOT NULL default '0',
  278. `sum` int(11) NOT NULL default '0',
  279. PRIMARY KEY (`id`),
  280. UNIQUE KEY `reaction` (`object_id`, `reaction`)
  281. );
  282. CREATE TABLE IF NOT EXISTS `bx_timeline_reactions_track` (
  283. `id` int(11) NOT NULL AUTO_INCREMENT,
  284. `object_id` int(11) NOT NULL default '0',
  285. `author_id` int(11) NOT NULL default '0',
  286. `author_nip` int(11) unsigned NOT NULL default '0',
  287. `reaction` varchar(32) NOT NULL default '',
  288. `value` tinyint(4) NOT NULL default '0',
  289. `date` int(11) NOT NULL default '0',
  290. PRIMARY KEY (`id`),
  291. KEY `vote` (`object_id`, `author_nip`)
  292. );
  293. -- TABLE: metas
  294. CREATE TABLE IF NOT EXISTS `bx_timeline_meta_keywords` (
  295. `id` int(11) NOT NULL AUTO_INCREMENT,
  296. `object_id` int(10) unsigned NOT NULL,
  297. `keyword` varchar(255) NOT NULL,
  298. PRIMARY KEY (`id`),
  299. KEY `object_id` (`object_id`),
  300. KEY `keyword` (`keyword`)
  301. );
  302. CREATE TABLE IF NOT EXISTS `bx_timeline_meta_locations` (
  303. `object_id` int(10) unsigned NOT NULL,
  304. `lat` double NOT NULL,
  305. `lng` double NOT NULL,
  306. `country` varchar(2) NOT NULL,
  307. `state` varchar(255) NOT NULL,
  308. `city` varchar(255) NOT NULL,
  309. `zip` varchar(255) NOT NULL,
  310. `street` varchar(255) NOT NULL,
  311. `street_number` varchar(255) NOT NULL,
  312. PRIMARY KEY (`object_id`),
  313. KEY `country_state_city` (`country`,`state`(8),`city`(8))
  314. );
  315. CREATE TABLE IF NOT EXISTS `bx_timeline_meta_mentions` (
  316. `id` int(11) NOT NULL AUTO_INCREMENT,
  317. `object_id` int(10) unsigned NOT NULL,
  318. `profile_id` int(10) unsigned NOT NULL,
  319. PRIMARY KEY (`id`),
  320. KEY `object_id` (`object_id`),
  321. KEY `profile_id` (`profile_id`)
  322. );
  323. -- TABLE: reports
  324. CREATE TABLE IF NOT EXISTS `bx_timeline_reports` (
  325. `id` int(11) NOT NULL AUTO_INCREMENT,
  326. `object_id` int(11) NOT NULL default '0',
  327. `count` int(11) NOT NULL default '0',
  328. PRIMARY KEY (`id`),
  329. UNIQUE KEY `object_id` (`object_id`)
  330. );
  331. CREATE TABLE IF NOT EXISTS `bx_timeline_reports_track` (
  332. `id` int(11) NOT NULL AUTO_INCREMENT,
  333. `object_id` int(11) NOT NULL default '0',
  334. `author_id` int(11) NOT NULL default '0',
  335. `author_nip` int(11) unsigned NOT NULL default '0',
  336. `type` varchar(32) NOT NULL default '',
  337. `text` text NOT NULL default '',
  338. `date` int(11) NOT NULL default '0',
  339. `checked_by` int(11) NOT NULL default '0',
  340. `status` tinyint(11) NOT NULL default '0',
  341. PRIMARY KEY (`id`),
  342. KEY `report` (`object_id`, `author_nip`)
  343. );
  344. -- TABLE: hot track
  345. CREATE TABLE IF NOT EXISTS `bx_timeline_hot_track` (
  346. `id` int(11) NOT NULL AUTO_INCREMENT,
  347. `event_id` int(11) NOT NULL default '0',
  348. `value` int(11) NOT NULL default '0',
  349. PRIMARY KEY (`id`),
  350. UNIQUE KEY `event_id` (`event_id`)
  351. );
  352. -- TABLE: scores
  353. CREATE TABLE IF NOT EXISTS `bx_timeline_scores` (
  354. `id` int(11) NOT NULL AUTO_INCREMENT,
  355. `object_id` int(11) NOT NULL default '0',
  356. `count_up` int(11) NOT NULL default '0',
  357. `count_down` int(11) NOT NULL default '0',
  358. PRIMARY KEY (`id`),
  359. UNIQUE KEY `object_id` (`object_id`)
  360. );
  361. CREATE TABLE IF NOT EXISTS `bx_timeline_scores_track` (
  362. `id` int(11) NOT NULL AUTO_INCREMENT,
  363. `object_id` int(11) NOT NULL default '0',
  364. `author_id` int(11) NOT NULL default '0',
  365. `author_nip` int(11) unsigned NOT NULL default '0',
  366. `type` varchar(8) NOT NULL default '',
  367. `date` int(11) NOT NULL default '0',
  368. PRIMARY KEY (`id`),
  369. KEY `vote` (`object_id`, `author_nip`)
  370. );
  371. -- STORAGES, TRANSCODERS, UPLOADERS
  372. SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
  373. INSERT INTO `sys_objects_uploader` (`object`, `active`, `override_class_name`, `override_class_file`) VALUES
  374. ('bx_timeline_simple_photo', 1, 'BxTimelineUploaderSimpleAttach', 'modules/boonex/timeline/classes/BxTimelineUploaderSimpleAttach.php'),
  375. ('bx_timeline_simple_video', 1, 'BxTimelineUploaderSimpleAttach', 'modules/boonex/timeline/classes/BxTimelineUploaderSimpleAttach.php'),
  376. ('bx_timeline_html5_photo', 1, 'BxTimelineUploaderHTML5Attach', 'modules/boonex/timeline/classes/BxTimelineUploaderHTML5Attach.php'),
  377. ('bx_timeline_html5_video', 1, 'BxTimelineUploaderHTML5Attach', 'modules/boonex/timeline/classes/BxTimelineUploaderHTML5Attach.php'),
  378. ('bx_timeline_record_video', 1, 'BxTimelineUploaderRecordVideoAttach', 'modules/boonex/timeline/classes/BxTimelineUploaderRecordVideoAttach.php'),
  379. ('bx_timeline_simple_file', 1, 'BxTimelineUploaderSimpleAttach', 'modules/boonex/timeline/classes/BxTimelineUploaderSimpleAttach.php'),
  380. ('bx_timeline_html5_file', 1, 'BxTimelineUploaderHTML5Attach', 'modules/boonex/timeline/classes/BxTimelineUploaderHTML5Attach.php');
  381. 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
  382. ('bx_timeline_photos', @sStorageEngine, '', 360, 2592000, 3, 'bx_timeline_photos', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
  383. ('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),
  384. ('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', '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),
  385. ('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),
  386. ('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);
  387. 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
  388. ('bx_timeline_photos_preview', 'bx_timeline_photos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_photos";}', 'no', '1', '2592000', '0', '', ''),
  389. ('bx_timeline_photos_view', 'bx_timeline_photos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_photos";}', 'no', '1', '2592000', '0', '', ''),
  390. ('bx_timeline_photos_medium', 'bx_timeline_photos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_photos";}', 'no', '1', '2592000', '0', '', ''),
  391. ('bx_timeline_photos_big', 'bx_timeline_photos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_photos";}', 'no', '1', '2592000', '0', '', ''),
  392. ('bx_timeline_videos_photo_preview', 'bx_timeline_videos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_videos";}', 'no', '1', '2592000', '0', '', ''),
  393. ('bx_timeline_videos_photo_view', 'bx_timeline_videos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_videos";}', 'no', '1', '2592000', '0', '', ''),
  394. ('bx_timeline_videos_photo_big', 'bx_timeline_videos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_videos";}', 'no', '1', '2592000', '0', '', ''),
  395. ('bx_timeline_videos_poster_preview', 'bx_timeline_videos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
  396. ('bx_timeline_videos_poster_view', 'bx_timeline_videos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
  397. ('bx_timeline_videos_poster_big', 'bx_timeline_videos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
  398. ('bx_timeline_videos_mp4', 'bx_timeline_videos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
  399. ('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', ''),
  400. ('bx_timeline_proxy_preview', 'bx_timeline_videos_processed', 'Proxy', 'a:4:{s:6:"object";s:18:"bx_timeline_videos";s:5:"image";s:32:"bx_timeline_videos_photo_preview";s:12:"video_poster";s:33:"bx_timeline_videos_poster_preview";s:5:"video";a:4:{i:0;s:22:"bx_timeline_videos_mp4";i:1;s:25:"bx_timeline_videos_mp4_hd";i:2;s:30:"bx_timeline_videos_poster_view";i:3;s:29:"bx_timeline_videos_poster_big";}}', 'no', 0, 0, 0, 'BxDolTranscoderProxy', ''),
  401. ('bx_timeline_proxy_view', 'bx_timeline_videos_processed', 'Proxy', 'a:4:{s:6:"object";s:18:"bx_timeline_videos";s:5:"image";s:29:"bx_timeline_videos_photo_view";s:12:"video_poster";s:30:"bx_timeline_videos_poster_view";s:5:"video";a:2:{i:0;s:22:"bx_timeline_videos_mp4";i:1;s:25:"bx_timeline_videos_mp4_hd";}}', 'no', 0, 0, 0, 'BxDolTranscoderProxy', ''),
  402. ('bx_timeline_proxy_big', 'bx_timeline_videos_processed', 'Proxy', 'a:4:{s:6:"object";s:18:"bx_timeline_videos";s:5:"image";s:28:"bx_timeline_videos_photo_big";s:12:"video_poster";s:29:"bx_timeline_videos_poster_big";s:5:"video";a:2:{i:0;s:22:"bx_timeline_videos_mp4";i:1;s:25:"bx_timeline_videos_mp4_hd";}}', 'no', 0, 0, 0, 'BxDolTranscoderProxy', '');
  403. INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES
  404. ('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'),
  405. ('bx_timeline_photos_view', 'Resize', 'a:1:{s:1:"w";s:3:"300";}', '0'),
  406. ('bx_timeline_photos_medium', 'Resize', 'a:1:{s:1:"w";s:3:"600";}', '0'),
  407. ('bx_timeline_photos_big', 'Resize', 'a:2:{s:1:"w";s:4:"1200";s:1:"h";s:4:"1200";}', '0'),
  408. ('bx_timeline_videos_photo_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"300";s:13:"square_resize";s:1:"1";}', '0'),
  409. ('bx_timeline_videos_photo_view', 'Resize', 'a:1:{s:1:"w";s:3:"480";}', '0'),
  410. ('bx_timeline_videos_photo_big', 'Resize', 'a:2:{s:1:"w";s:4:"1200";s:1:"h";s:4:"1200";}', '0'),
  411. ('bx_timeline_videos_poster_preview', 'Poster', 'a:2:{s:1:"h";s:3:"480";s:10:"force_type";s:3:"jpg";}', 0),
  412. ('bx_timeline_videos_poster_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"300";s:13:"square_resize";s:1:"1";}', 10),
  413. ('bx_timeline_videos_poster_view', 'Poster', 'a:2:{s:1:"h";s:3:"480";s:10:"force_type";s:3:"jpg";}', 0),
  414. ('bx_timeline_videos_poster_big', 'Poster', 'a:2:{s:1:"h";s:3:"480";s:10:"force_type";s:3:"jpg";}', 0),
  415. ('bx_timeline_videos_mp4', 'Mp4', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:3:"mp4";}', 0),
  416. ('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);
  417. -- Forms -> Post
  418. 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
  419. ('bx_timeline_post', @sName, '_bx_timeline_form_post', '', 'a:1:{s:8:"onsubmit";s:46:"return {js_object_post}.onFormPostSubmit(this)";}', 'tlb_do_submit', 'bx_timeline_events', 'id', '', '', '', 0, 1, 'BxTimelineFormPost', 'modules/boonex/timeline/classes/BxTimelineFormPost.php');
  420. INSERT INTO `sys_form_displays` (`display_name`, `module`, `object`, `title`, `view_mode`) VALUES
  421. ('bx_timeline_post_add', @sName, 'bx_timeline_post', '_bx_timeline_form_post_display_add', 0),
  422. ('bx_timeline_post_add_public', @sName, 'bx_timeline_post', '_bx_timeline_form_post_display_add_public', 0),
  423. ('bx_timeline_post_add_profile', @sName, 'bx_timeline_post', '_bx_timeline_form_post_display_add_profile', 0),
  424. ('bx_timeline_post_edit', @sName, 'bx_timeline_post', '_bx_timeline_form_post_display_edit', 0),
  425. ('bx_timeline_post_view', @sName, 'bx_timeline_post', '_bx_timeline_form_post_display_view', 1);
  426. 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
  427. ('bx_timeline_post', @sName, 'type', 'post', '', 0, 'hidden', '_bx_timeline_form_post_input_sys_type', '', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 0, 0),
  428. ('bx_timeline_post', @sName, 'action', '', '', 0, 'hidden', '_bx_timeline_form_post_input_sys_action', '', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 0, 0),
  429. ('bx_timeline_post', @sName, 'owner_id', '0', '', 0, 'hidden', '_bx_timeline_form_post_input_sys_owner_id', '', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
  430. ('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),
  431. ('bx_timeline_post', @sName, 'anonymous', '', '', 0, 'switcher', '_sys_form_input_sys_anonymous', '_sys_form_input_anonymous', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  432. ('bx_timeline_post', @sName, 'date', '', '', 0, 'datetime', '_bx_timeline_form_post_input_sys_date', '_bx_timeline_form_post_input_date', '', 0, 0, 0, '', '', '', '', '', '', 'DateTimeTs', '', 1, 0),
  433. ('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, '', '', '', '', '', '', 'DateTimeTs', '', 1, 0),
  434. ('bx_timeline_post', @sName, 'object_cf', '1', '#!sys_content_filter', 0, 'select', '_sys_form_entry_input_sys_cf', '_sys_form_entry_input_cf', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
  435. ('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),
  436. ('bx_timeline_post', @sName, 'location', '', '', 0, 'location', '_sys_form_input_sys_location', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  437. ('bx_timeline_post', @sName, 'link', '', '', 0, 'custom', '_bx_timeline_form_post_input_sys_link', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  438. ('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),
  439. ('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),
  440. ('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),
  441. ('bx_timeline_post', @sName, 'attachments', '', '', 0, 'custom', '_bx_timeline_form_post_input_sys_attachments', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  442. ('bx_timeline_post', @sName, 'controls', '', 'tlb_do_submit,tlb_do_cancel', 0, 'input_set', '', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  443. ('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),
  444. ('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);
  445. INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
  446. ('bx_timeline_post_add', 'type', 2147483647, 1, 0),
  447. ('bx_timeline_post_add', 'action', 2147483647, 1, 1),
  448. ('bx_timeline_post_add', 'text', 2147483647, 1, 2),
  449. ('bx_timeline_post_add', 'attachments', 2147483647, 1, 3),
  450. ('bx_timeline_post_add', 'owner_id', 2147483647, 1, 4),
  451. ('bx_timeline_post_add', 'object_privacy_view', 2147483647, 1, 5),
  452. ('bx_timeline_post_add', 'object_cf', 2147483647, 1, 6),
  453. ('bx_timeline_post_add', 'published', 192, 0, 7),
  454. ('bx_timeline_post_add', 'location', 2147483647, 1, 8),
  455. ('bx_timeline_post_add', 'link', 2147483647, 1, 9),
  456. ('bx_timeline_post_add', 'photo', 2147483647, 1, 10),
  457. ('bx_timeline_post_add', 'video', 2147483647, 1, 11),
  458. ('bx_timeline_post_add', 'file', 2147483647, 1, 12),
  459. ('bx_timeline_post_add', 'tlb_do_submit', 2147483647, 1, 13),
  460. ('bx_timeline_post_add_public', 'type', 2147483647, 1, 0),
  461. ('bx_timeline_post_add_public', 'action', 2147483647, 1, 1),
  462. ('bx_timeline_post_add_public', 'owner_id', 2147483647, 1, 2),
  463. ('bx_timeline_post_add_public', 'text', 2147483647, 1, 3),
  464. ('bx_timeline_post_add_public', 'attachments', 2147483647, 1, 4),
  465. ('bx_timeline_post_add_public', 'object_privacy_view', 2147483647, 1, 5),
  466. ('bx_timeline_post_add_public', 'object_cf', 2147483647, 1, 6),
  467. ('bx_timeline_post_add_public', 'published', 192, 0, 7),
  468. ('bx_timeline_post_add_public', 'location', 2147483647, 1, 8),
  469. ('bx_timeline_post_add_public', 'link', 2147483647, 1, 9),
  470. ('bx_timeline_post_add_public', 'photo', 2147483647, 1, 10),
  471. ('bx_timeline_post_add_public', 'video', 2147483647, 1, 11),
  472. ('bx_timeline_post_add_public', 'file', 2147483647, 1, 12),
  473. ('bx_timeline_post_add_public', 'tlb_do_submit', 2147483647, 1, 13),
  474. ('bx_timeline_post_add_profile', 'type', 2147483647, 1, 0),
  475. ('bx_timeline_post_add_profile', 'action', 2147483647, 1, 1),
  476. ('bx_timeline_post_add_profile', 'owner_id', 2147483647, 1, 2),
  477. ('bx_timeline_post_add_profile', 'text', 2147483647, 1, 3),
  478. ('bx_timeline_post_add_profile', 'attachments', 2147483647, 1, 4),
  479. ('bx_timeline_post_add_profile', 'object_privacy_view', 2147483647, 1, 5),
  480. ('bx_timeline_post_add_profile', 'object_cf', 2147483647, 1, 6),
  481. ('bx_timeline_post_add_profile', 'published', 192, 0, 7),
  482. ('bx_timeline_post_add_profile', 'location', 2147483647, 1, 8),
  483. ('bx_timeline_post_add_profile', 'link', 2147483647, 1, 9),
  484. ('bx_timeline_post_add_profile', 'photo', 2147483647, 1, 10),
  485. ('bx_timeline_post_add_profile', 'video', 2147483647, 1, 11),
  486. ('bx_timeline_post_add_profile', 'file', 2147483647, 1, 12),
  487. ('bx_timeline_post_add_profile', 'tlb_do_submit', 2147483647, 1, 13),
  488. ('bx_timeline_post_edit', 'type', 2147483647, 1, 1),
  489. ('bx_timeline_post_edit', 'action', 2147483647, 1, 2),
  490. ('bx_timeline_post_edit', 'owner_id', 2147483647, 1, 3),
  491. ('bx_timeline_post_edit', 'text', 2147483647, 1, 4),
  492. ('bx_timeline_post_edit', 'attachments', 2147483647, 1, 5),
  493. ('bx_timeline_post_edit', 'published', 192, 0, 6),
  494. ('bx_timeline_post_edit', 'location', 2147483647, 1, 7),
  495. ('bx_timeline_post_edit', 'link', 2147483647, 1, 8),
  496. ('bx_timeline_post_edit', 'photo', 2147483647, 1, 9),
  497. ('bx_timeline_post_edit', 'video', 2147483647, 1, 10),
  498. ('bx_timeline_post_edit', 'file', 2147483647, 1, 11),
  499. ('bx_timeline_post_edit', 'object_cf', 2147483647, 1, 12),
  500. ('bx_timeline_post_edit', 'controls', 2147483647, 1, 13),
  501. ('bx_timeline_post_edit', 'tlb_do_submit', 2147483647, 1, 14),
  502. ('bx_timeline_post_edit', 'tlb_do_cancel', 2147483647, 1, 15);
  503. -- Forms -> Attach link
  504. 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
  505. ('bx_timeline_attach_link', @sName, '_bx_timeline_form_attach_link', '', '', 'do_submit', 'bx_timeline_links', 'id', '', '', '', 0, 1, '', '');
  506. INSERT INTO `sys_form_displays` (`display_name`, `module`, `object`, `title`, `view_mode`) VALUES
  507. ('bx_timeline_attach_link_add', @sName, 'bx_timeline_attach_link', '_bx_timeline_form_attach_link_display_add', 0);
  508. 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
  509. ('bx_timeline_attach_link', @sName, 'event_id', '0', '', 0, 'hidden', '_bx_timeline_form_attach_link_input_sys_event_id', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  510. ('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),
  511. ('bx_timeline_attach_link', @sName, 'controls', '', 'do_submit,do_cancel', 0, 'input_set', '', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  512. ('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),
  513. ('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);
  514. INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
  515. ('bx_timeline_attach_link_add', 'event_id', 2147483647, 1, 1),
  516. ('bx_timeline_attach_link_add', 'url', 2147483647, 1, 2),
  517. ('bx_timeline_attach_link_add', 'controls', 2147483647, 1, 3),
  518. ('bx_timeline_attach_link_add', 'do_submit', 2147483647, 1, 4),
  519. ('bx_timeline_attach_link_add', 'do_cancel', 2147483647, 1, 5);
  520. -- Forms -> Repost To
  521. 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
  522. ('bx_timeline_repost', @sName, '_bx_timeline_form_repost', '', '', 'do_submit', '', '', '', '', '', 0, 1, 'BxTimelineFormRepost', 'modules/boonex/timeline/classes/BxTimelineFormRepost.php');
  523. INSERT INTO `sys_form_displays` (`display_name`, `module`, `object`, `title`, `view_mode`) VALUES
  524. ('bx_timeline_repost_with', @sName, 'bx_timeline_repost', '_bx_timeline_form_repost_display_with', 0),
  525. ('bx_timeline_repost_to', @sName, 'bx_timeline_repost', '_bx_timeline_form_repost_display_to', 0);
  526. 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
  527. ('bx_timeline_repost', @sName, 'reposter_id', '', '', 0, 'hidden', '_bx_timeline_form_repost_input_sys_reposter_id', '', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 0, 0),
  528. ('bx_timeline_repost', @sName, 'owner_id', '', '', 0, 'hidden', '_bx_timeline_form_repost_input_sys_owner_id', '', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 0, 0),
  529. ('bx_timeline_repost', @sName, 'type', '', '', 0, 'hidden', '_bx_timeline_form_repost_input_sys_type', '', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 0, 0),
  530. ('bx_timeline_repost', @sName, 'action', '', '', 0, 'hidden', '_bx_timeline_form_repost_input_sys_action', '', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 0, 0),
  531. ('bx_timeline_repost', @sName, 'object_id', '', '', 0, 'hidden', '_bx_timeline_form_repost_input_sys_object_id', '', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 0, 0),
  532. ('bx_timeline_repost', @sName, 'search', '', '', 0, 'custom', '_bx_timeline_form_repost_input_sys_search', '_bx_timeline_form_repost_input_search', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  533. ('bx_timeline_repost', @sName, 'list', '', '', 0, 'custom', '_bx_timeline_form_repost_input_sys_list', '_bx_timeline_form_repost_input_list', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  534. ('bx_timeline_repost', @sName, 'text', '', '', 0, 'textarea', '_bx_timeline_form_repost_input_sys_text', '_bx_timeline_form_repost_input_text', '', 0, 0, 0, 'a:1:{s:12:"autocomplete";s:3:"off";}', '', '', '', '', '', 'XssHtml', '', 1, 0),
  535. ('bx_timeline_repost', @sName, 'reposted', '', '', 0, 'custom', '_bx_timeline_form_repost_input_sys_reposted', '_bx_timeline_form_repost_input_reposted', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  536. ('bx_timeline_repost', @sName, 'controls', '', 'do_submit,do_cancel', 0, 'input_set', '', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  537. ('bx_timeline_repost', @sName, 'do_submit', '_bx_timeline_form_repost_input_do_submit', '', 0, 'submit', '_bx_timeline_form_repost_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  538. ('bx_timeline_repost', @sName, 'do_cancel', '_bx_timeline_form_repost_input_do_cancel', '', 0, 'button', '_bx_timeline_form_repost_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);
  539. INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
  540. ('bx_timeline_repost_with', 'reposter_id', 2147483647, 1, 1),
  541. ('bx_timeline_repost_with', 'owner_id', 2147483647, 1, 2),
  542. ('bx_timeline_repost_with', 'type', 2147483647, 1, 3),
  543. ('bx_timeline_repost_with', 'action', 2147483647, 1, 4),
  544. ('bx_timeline_repost_with', 'object_id', 2147483647, 1, 5),
  545. ('bx_timeline_repost_with', 'text', 2147483647, 1, 6),
  546. ('bx_timeline_repost_with', 'reposted', 2147483647, 1, 7),
  547. ('bx_timeline_repost_with', 'controls', 2147483647, 1, 8),
  548. ('bx_timeline_repost_with', 'do_submit', 2147483647, 1, 9),
  549. ('bx_timeline_repost_with', 'do_cancel', 2147483647, 1, 10),
  550. ('bx_timeline_repost_to', 'reposter_id', 2147483647, 1, 1),
  551. ('bx_timeline_repost_to', 'type', 2147483647, 1, 2),
  552. ('bx_timeline_repost_to', 'action', 2147483647, 1, 3),
  553. ('bx_timeline_repost_to', 'object_id', 2147483647, 1, 4),
  554. ('bx_timeline_repost_to', 'search', 2147483647, 1, 5),
  555. ('bx_timeline_repost_to', 'list', 2147483647, 1, 6),
  556. ('bx_timeline_repost_to', 'controls', 2147483647, 1, 7),
  557. ('bx_timeline_repost_to', 'do_submit', 2147483647, 1, 8),
  558. ('bx_timeline_repost_to', 'do_cancel', 2147483647, 1, 9);
  559. -- COMMENTS
  560. 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
  561. ('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', 'BxTimelineCmts', 'modules/boonex/timeline/classes/BxTimelineCmts.php'),
  562. ('bx_timeline_notes', 'bx_timeline', 'bx_timeline_cmts_notes', 1, 5000, 1000, 0, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-post&id={object_id}', '', 'bx_timeline_events', 'id', 'object_owner_id', 'title', '', 'BxTemplCmtsNotes', '');
  563. -- VIEWS
  564. 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
  565. ('bx_timeline', 'bx_timeline_views_track', '86400', '1', 'bx_timeline_events', 'id', 'object_id', 'views', '', '');
  566. -- VOTES
  567. INSERT INTO `sys_objects_vote`(`Name`, `TableMain`, `TableTrack`, `PostTimeout`, `MinValue`, `MaxValue`, `IsUndo`, `IsOn`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldRate`, `TriggerFieldRateCount`, `ClassName`, `ClassFile`) VALUES
  568. ('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'),
  569. ('bx_timeline_reactions', 'bx_timeline_reactions', 'bx_timeline_reactions_track', '604800', '1', '1', '1', '1', 'bx_timeline_events', 'id', 'object_id', 'rrate', 'rvotes', 'BxTemplVoteReactions', '');
  570. -- SCORES
  571. 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
  572. ('bx_timeline', 'bx_timeline', 'bx_timeline_scores', 'bx_timeline_scores_track', '604800', '0', 'bx_timeline_events', 'id', 'object_id', 'score', 'sc_up', 'sc_down', '', '');
  573. -- REPORTS
  574. INSERT INTO `sys_objects_report` (`name`, `module`, `table_main`, `table_track`, `is_on`, `base_url`, `object_comment`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES
  575. ('bx_timeline', 'bx_timeline', 'bx_timeline_reports', 'bx_timeline_reports_track', '1', 'page.php?i=item&id={object_id}', 'bx_timeline_notes', 'bx_timeline_events', 'id', 'owner_id', 'reports', 'BxTimelineReport', 'modules/boonex/timeline/classes/BxTimelineReport.php');
  576. -- CONTENT INFO
  577. INSERT INTO `sys_objects_content_info` (`name`, `title`, `alert_unit`, `alert_action_add`, `alert_action_update`, `alert_action_delete`, `class_name`, `class_file`) VALUES
  578. ('bx_timeline', '_bx_timeline', 'bx_timeline', 'post_common', '', 'delete', '', ''),
  579. ('bx_timeline_cmts', '_bx_timeline_cmts', 'bx_timeline', 'commentPost', 'commentUpdated', 'commentRemoved', 'BxDolContentInfoCmts', '');
  580. -- STUDIO PAGE & WIDGET
  581. INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
  582. (3, 'bx_timeline', '_bx_timeline', '_bx_timeline', 'bx_timeline@modules/boonex/timeline/|std-icon.svg');
  583. SET @iPageId = LAST_INSERT_ID();
  584. SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
  585. SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
  586. INSERT INTO `sys_std_widgets` (`page_id`, `module`, `type`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
  587. (@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";}');
  588. INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
  589. (@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));