install.sql 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679
  1. -- TABLE: entries
  2. CREATE TABLE IF NOT EXISTS `bx_tasks_tasks` (
  3. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  4. `author` int(11) NOT NULL,
  5. `added` int(11) NOT NULL,
  6. `changed` int(11) NOT NULL,
  7. `published` int(11) NOT NULL,
  8. `thumb` int(11) NOT NULL,
  9. `title` varchar(255) NOT NULL,
  10. `type` int(11) NOT NULL default '0',
  11. `priority` int(11) NOT NULL default '0',
  12. `estimate` int(11) NOT NULL default '0',
  13. `state` int(11) NOT NULL default '0',
  14. `cat` int(11) NOT NULL,
  15. `multicat` text NOT NULL,
  16. `text` mediumtext NOT NULL,
  17. `labels` text NOT NULL,
  18. `time` int(11) NOT NULL default '0',
  19. `views` int(11) NOT NULL default '0',
  20. `rate` float NOT NULL default '0',
  21. `votes` int(11) NOT NULL default '0',
  22. `rrate` float NOT NULL default '0',
  23. `rvotes` int(11) NOT NULL default '0',
  24. `score` int(11) NOT NULL default '0',
  25. `sc_up` int(11) NOT NULL default '0',
  26. `sc_down` int(11) NOT NULL default '0',
  27. `favorites` int(11) NOT NULL default '0',
  28. `comments` int(11) NOT NULL default '0',
  29. `reports` int(11) NOT NULL default '0',
  30. `featured` int(11) NOT NULL default '0',
  31. `due_date` int(11) NOT NULL,
  32. `tasks_list` int(11) NOT NULL,
  33. `completed` tinyint(4) NOT NULL DEFAULT '0',
  34. `expired` tinyint(4) NOT NULL DEFAULT '0',
  35. `cf` int(11) NOT NULL default '1',
  36. `allow_view_to` varchar(16) NOT NULL DEFAULT '3',
  37. `allow_comments` tinyint(4) NOT NULL DEFAULT '1',
  38. `status` enum('active','awaiting','failed','hidden') NOT NULL DEFAULT 'active',
  39. `status_admin` enum('active','hidden','pending') NOT NULL DEFAULT 'active',
  40. PRIMARY KEY (`id`),
  41. FULLTEXT KEY `title_text` (`title`,`text`)
  42. );
  43. -- TABLE: task-lists
  44. CREATE TABLE IF NOT EXISTS `bx_tasks_lists` (
  45. `id` int(11) NOT NULL AUTO_INCREMENT,
  46. `context_id` int(11) NOT NULL,
  47. `title` varchar(255) NOT NULL,
  48. PRIMARY KEY (`id`)
  49. );
  50. -- TABLE: assignment
  51. CREATE TABLE IF NOT EXISTS `bx_tasks_assignments` (
  52. `id` int(11) NOT NULL AUTO_INCREMENT,
  53. `initiator` int(11) NOT NULL,
  54. `content` int(11) NOT NULL,
  55. `added` int(10) unsigned NOT NULL,
  56. PRIMARY KEY (`id`),
  57. UNIQUE KEY `initiator` (`initiator`,`content`),
  58. KEY `content` (`content`)
  59. );
  60. -- TABLE: storages & transcoders
  61. CREATE TABLE IF NOT EXISTS `bx_tasks_covers` (
  62. `id` int(11) NOT NULL AUTO_INCREMENT,
  63. `profile_id` int(10) unsigned NOT NULL,
  64. `remote_id` varchar(128) NOT NULL,
  65. `path` varchar(255) NOT NULL,
  66. `file_name` varchar(255) NOT NULL,
  67. `mime_type` varchar(128) NOT NULL,
  68. `ext` varchar(32) NOT NULL,
  69. `size` bigint(20) NOT NULL,
  70. `added` int(11) NOT NULL,
  71. `modified` int(11) NOT NULL,
  72. `private` int(11) NOT NULL,
  73. PRIMARY KEY (`id`),
  74. UNIQUE KEY `remote_id` (`remote_id`)
  75. );
  76. CREATE TABLE IF NOT EXISTS `bx_tasks_files` (
  77. `id` int(11) NOT NULL AUTO_INCREMENT,
  78. `profile_id` int(10) unsigned NOT NULL,
  79. `remote_id` varchar(128) NOT NULL,
  80. `path` varchar(255) NOT NULL,
  81. `file_name` varchar(255) NOT NULL,
  82. `mime_type` varchar(128) NOT NULL,
  83. `ext` varchar(32) NOT NULL,
  84. `size` bigint(20) NOT NULL,
  85. `added` int(11) NOT NULL,
  86. `modified` int(11) NOT NULL,
  87. `private` int(11) NOT NULL,
  88. PRIMARY KEY (`id`),
  89. UNIQUE KEY `remote_id` (`remote_id`)
  90. );
  91. CREATE TABLE IF NOT EXISTS `bx_tasks_photos` (
  92. `id` int(11) NOT NULL AUTO_INCREMENT,
  93. `profile_id` int(10) unsigned NOT NULL,
  94. `remote_id` varchar(128) NOT NULL,
  95. `path` varchar(255) NOT NULL,
  96. `file_name` varchar(255) NOT NULL,
  97. `mime_type` varchar(128) NOT NULL,
  98. `ext` varchar(32) NOT NULL,
  99. `size` bigint(20) NOT NULL,
  100. `added` int(11) NOT NULL,
  101. `modified` int(11) NOT NULL,
  102. `private` int(11) NOT NULL,
  103. PRIMARY KEY (`id`),
  104. UNIQUE KEY `remote_id` (`remote_id`)
  105. );
  106. CREATE TABLE IF NOT EXISTS `bx_tasks_photos_resized` (
  107. `id` int(11) NOT NULL AUTO_INCREMENT,
  108. `profile_id` int(10) unsigned NOT NULL,
  109. `remote_id` varchar(128) NOT NULL,
  110. `path` varchar(255) NOT NULL,
  111. `file_name` varchar(255) NOT NULL,
  112. `mime_type` varchar(128) NOT NULL,
  113. `ext` varchar(32) NOT NULL,
  114. `size` bigint(20) NOT NULL,
  115. `added` int(11) NOT NULL,
  116. `modified` int(11) NOT NULL,
  117. `private` int(11) NOT NULL,
  118. PRIMARY KEY (`id`),
  119. UNIQUE KEY `remote_id` (`remote_id`)
  120. );
  121. CREATE TABLE IF NOT EXISTS `bx_tasks_videos` (
  122. `id` int(11) NOT NULL AUTO_INCREMENT,
  123. `profile_id` int(10) unsigned NOT NULL,
  124. `remote_id` varchar(128) NOT NULL,
  125. `path` varchar(255) NOT NULL,
  126. `file_name` varchar(255) NOT NULL,
  127. `mime_type` varchar(128) NOT NULL,
  128. `ext` varchar(32) NOT NULL,
  129. `size` bigint(20) NOT NULL,
  130. `dimensions` varchar(12) NOT NULL,
  131. `added` int(11) NOT NULL,
  132. `modified` int(11) NOT NULL,
  133. `private` int(11) NOT NULL,
  134. PRIMARY KEY (`id`),
  135. UNIQUE KEY `remote_id` (`remote_id`)
  136. );
  137. CREATE TABLE IF NOT EXISTS `bx_tasks_videos_resized` (
  138. `id` int(11) NOT NULL AUTO_INCREMENT,
  139. `profile_id` int(10) unsigned NOT NULL,
  140. `remote_id` varchar(128) NOT NULL,
  141. `path` varchar(255) NOT NULL,
  142. `file_name` varchar(255) NOT NULL,
  143. `mime_type` varchar(128) NOT NULL,
  144. `ext` varchar(32) NOT NULL,
  145. `size` bigint(20) NOT NULL,
  146. `added` int(11) NOT NULL,
  147. `modified` int(11) NOT NULL,
  148. `private` int(11) NOT NULL,
  149. PRIMARY KEY (`id`),
  150. UNIQUE KEY `remote_id` (`remote_id`)
  151. );
  152. -- TABLE: comments
  153. CREATE TABLE IF NOT EXISTS `bx_tasks_cmts` (
  154. `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
  155. `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
  156. `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
  157. `cmt_object_id` int(11) NOT NULL DEFAULT '0',
  158. `cmt_author_id` int(11) NOT NULL DEFAULT '0',
  159. `cmt_level` int(11) NOT NULL DEFAULT '0',
  160. `cmt_text` text NOT NULL,
  161. `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',
  162. `cmt_rate` int(11) NOT NULL DEFAULT '0',
  163. `cmt_rate_count` int(11) NOT NULL DEFAULT '0',
  164. `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
  165. `cmt_replies` int(11) NOT NULL DEFAULT '0',
  166. `cmt_pinned` int(11) NOT NULL default '0',
  167. `cmt_cf` int(11) NOT NULL default '1',
  168. PRIMARY KEY (`cmt_id`),
  169. KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
  170. FULLTEXT KEY `search_fields` (`cmt_text`)
  171. );
  172. CREATE TABLE IF NOT EXISTS `bx_tasks_cmts_notes` (
  173. `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
  174. `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
  175. `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
  176. `cmt_object_id` int(11) NOT NULL DEFAULT '0',
  177. `cmt_author_id` int(11) NOT NULL DEFAULT '0',
  178. `cmt_level` int(11) NOT NULL DEFAULT '0',
  179. `cmt_text` text NOT NULL,
  180. `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',
  181. `cmt_rate` int(11) NOT NULL DEFAULT '0',
  182. `cmt_rate_count` int(11) NOT NULL DEFAULT '0',
  183. `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
  184. `cmt_replies` int(11) NOT NULL DEFAULT '0',
  185. `cmt_pinned` int(11) NOT NULL default '0',
  186. PRIMARY KEY (`cmt_id`),
  187. KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
  188. FULLTEXT KEY `search_fields` (`cmt_text`)
  189. );
  190. -- TABLE: votes
  191. CREATE TABLE IF NOT EXISTS `bx_tasks_votes` (
  192. `id` int(11) NOT NULL AUTO_INCREMENT,
  193. `object_id` int(11) NOT NULL default '0',
  194. `count` int(11) NOT NULL default '0',
  195. `sum` int(11) NOT NULL default '0',
  196. PRIMARY KEY (`id`),
  197. UNIQUE KEY `object_id` (`object_id`)
  198. );
  199. CREATE TABLE IF NOT EXISTS `bx_tasks_votes_track` (
  200. `id` int(11) NOT NULL AUTO_INCREMENT,
  201. `object_id` int(11) NOT NULL default '0',
  202. `author_id` int(11) NOT NULL default '0',
  203. `author_nip` int(11) unsigned NOT NULL default '0',
  204. `value` tinyint(4) NOT NULL default '0',
  205. `date` int(11) NOT NULL default '0',
  206. PRIMARY KEY (`id`),
  207. KEY `vote` (`object_id`, `author_nip`)
  208. );
  209. CREATE TABLE IF NOT EXISTS `bx_tasks_reactions` (
  210. `id` int(11) NOT NULL AUTO_INCREMENT,
  211. `object_id` int(11) NOT NULL default '0',
  212. `reaction` varchar(32) NOT NULL default '',
  213. `count` int(11) NOT NULL default '0',
  214. `sum` int(11) NOT NULL default '0',
  215. PRIMARY KEY (`id`),
  216. UNIQUE KEY `reaction` (`object_id`, `reaction`)
  217. );
  218. CREATE TABLE IF NOT EXISTS `bx_tasks_reactions_track` (
  219. `id` int(11) NOT NULL AUTO_INCREMENT,
  220. `object_id` int(11) NOT NULL default '0',
  221. `author_id` int(11) NOT NULL default '0',
  222. `author_nip` int(11) unsigned NOT NULL default '0',
  223. `reaction` varchar(32) NOT NULL default '',
  224. `value` tinyint(4) NOT NULL default '0',
  225. `date` int(11) NOT NULL default '0',
  226. PRIMARY KEY (`id`),
  227. KEY `vote` (`object_id`, `author_nip`)
  228. );
  229. -- TABLE: views
  230. CREATE TABLE `bx_tasks_views_track` (
  231. `id` int(11) NOT NULL AUTO_INCREMENT,
  232. `object_id` int(11) NOT NULL default '0',
  233. `viewer_id` int(11) NOT NULL default '0',
  234. `viewer_nip` int(11) unsigned NOT NULL default '0',
  235. `date` int(11) NOT NULL default '0',
  236. PRIMARY KEY (`id`),
  237. KEY `id` (`object_id`,`viewer_id`,`viewer_nip`)
  238. );
  239. -- TABLE: metas
  240. CREATE TABLE `bx_tasks_meta_keywords` (
  241. `id` int(11) NOT NULL AUTO_INCREMENT,
  242. `object_id` int(10) unsigned NOT NULL,
  243. `keyword` varchar(255) NOT NULL,
  244. PRIMARY KEY (`id`),
  245. KEY `object_id` (`object_id`),
  246. KEY `keyword` (`keyword`)
  247. );
  248. CREATE TABLE `bx_tasks_meta_mentions` (
  249. `id` int(11) NOT NULL AUTO_INCREMENT,
  250. `object_id` int(10) unsigned NOT NULL,
  251. `profile_id` int(10) unsigned NOT NULL,
  252. PRIMARY KEY (`id`),
  253. KEY `object_id` (`object_id`),
  254. KEY `profile_id` (`profile_id`)
  255. );
  256. -- TABLE: reports
  257. CREATE TABLE IF NOT EXISTS `bx_tasks_reports` (
  258. `id` int(11) NOT NULL AUTO_INCREMENT,
  259. `object_id` int(11) NOT NULL default '0',
  260. `count` int(11) NOT NULL default '0',
  261. PRIMARY KEY (`id`),
  262. UNIQUE KEY `object_id` (`object_id`)
  263. );
  264. CREATE TABLE IF NOT EXISTS `bx_tasks_reports_track` (
  265. `id` int(11) NOT NULL AUTO_INCREMENT,
  266. `object_id` int(11) NOT NULL default '0',
  267. `author_id` int(11) NOT NULL default '0',
  268. `author_nip` int(11) unsigned NOT NULL default '0',
  269. `type` varchar(32) NOT NULL default '',
  270. `text` text NOT NULL default '',
  271. `date` int(11) NOT NULL default '0',
  272. `checked_by` int(11) NOT NULL default '0',
  273. `status` tinyint(11) NOT NULL default '0',
  274. PRIMARY KEY (`id`),
  275. KEY `report` (`object_id`, `author_nip`)
  276. );
  277. -- TABLE: time
  278. CREATE TABLE IF NOT EXISTS `bx_tasks_time` (
  279. `id` int(11) NOT NULL AUTO_INCREMENT,
  280. `object_id` int(11) NOT NULL default '0',
  281. `count` int(11) NOT NULL default '0',
  282. `sum` int(11) NOT NULL default '0',
  283. PRIMARY KEY (`id`),
  284. UNIQUE KEY `object_id` (`object_id`)
  285. );
  286. CREATE TABLE IF NOT EXISTS `bx_tasks_time_track` (
  287. `id` int(11) NOT NULL AUTO_INCREMENT,
  288. `object_id` int(11) NOT NULL default '0',
  289. `author_id` int(11) NOT NULL default '0',
  290. `author_nip` int(11) unsigned NOT NULL default '0',
  291. `value` int(11) NOT NULL default '0',
  292. `text` text NOT NULL default '',
  293. `date` int(11) NOT NULL default '0',
  294. PRIMARY KEY (`id`)
  295. );
  296. -- TABLE: favorites
  297. CREATE TABLE `bx_tasks_favorites_track` (
  298. `id` int(11) NOT NULL AUTO_INCREMENT,
  299. `object_id` int(11) NOT NULL default '0',
  300. `author_id` int(11) NOT NULL default '0',
  301. `date` int(11) NOT NULL default '0',
  302. PRIMARY KEY (`id`),
  303. KEY `id` (`object_id`,`author_id`)
  304. );
  305. -- TABLE: scores
  306. CREATE TABLE IF NOT EXISTS `bx_tasks_scores` (
  307. `id` int(11) NOT NULL AUTO_INCREMENT,
  308. `object_id` int(11) NOT NULL default '0',
  309. `count_up` int(11) NOT NULL default '0',
  310. `count_down` int(11) NOT NULL default '0',
  311. PRIMARY KEY (`id`),
  312. UNIQUE KEY `object_id` (`object_id`)
  313. );
  314. CREATE TABLE IF NOT EXISTS `bx_tasks_scores_track` (
  315. `id` int(11) NOT NULL AUTO_INCREMENT,
  316. `object_id` int(11) NOT NULL default '0',
  317. `author_id` int(11) NOT NULL default '0',
  318. `author_nip` int(11) unsigned NOT NULL default '0',
  319. `type` varchar(8) NOT NULL default '',
  320. `date` int(11) NOT NULL default '0',
  321. PRIMARY KEY (`id`),
  322. KEY `vote` (`object_id`, `author_nip`)
  323. );
  324. -- TABLE: hours
  325. CREATE TABLE IF NOT EXISTS `bx_tasks_votes_track` (
  326. `id` int(11) NOT NULL AUTO_INCREMENT,
  327. `object_id` int(11) NOT NULL default '0',
  328. `author_id` int(11) NOT NULL default '0',
  329. `author_nip` int(11) unsigned NOT NULL default '0',
  330. `value` tinyint(4) NOT NULL default '0',
  331. `date` int(11) NOT NULL default '0',
  332. PRIMARY KEY (`id`),
  333. KEY `vote` (`object_id`, `author_nip`)
  334. );
  335. -- STORAGES & TRANSCODERS
  336. SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
  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_tasks_covers', @sStorageEngine, '', 360, 2592000, 3, 'bx_tasks_covers', 'allow-deny', '{image}', '', 0, 0, 0, 0, 0, 0),
  339. ('bx_tasks_photos', @sStorageEngine, '', 360, 2592000, 3, 'bx_tasks_photos', 'allow-deny', '{image}', '', 0, 0, 0, 0, 0, 0),
  340. ('bx_tasks_photos_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_tasks_photos_resized', 'allow-deny', '{image}', '', 0, 0, 0, 0, 0, 0),
  341. ('bx_tasks_videos', @sStorageEngine, '', 360, 2592000, 3, 'bx_tasks_videos', 'allow-deny', '{video}', '', 0, 0, 0, 0, 0, 0),
  342. ('bx_tasks_videos_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_tasks_videos_resized', 'allow-deny', '{imagevideo}', '', 0, 0, 0, 0, 0, 0),
  343. ('bx_tasks_files', @sStorageEngine, '', 360, 2592000, 3, 'bx_tasks_files', 'deny-allow', '', '{dangerous}', 0, 0, 0, 0, 0, 0);
  344. 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
  345. ('bx_tasks_preview', 'bx_tasks_photos_resized', 'Storage', 'a:1:{s:6:"object";s:15:"bx_tasks_covers";}', 'no', '1', '2592000', '0', '', ''),
  346. ('bx_tasks_gallery', 'bx_tasks_photos_resized', 'Storage', 'a:1:{s:6:"object";s:15:"bx_tasks_covers";}', 'no', '1', '2592000', '0', '', ''),
  347. ('bx_tasks_cover', 'bx_tasks_photos_resized', 'Storage', 'a:1:{s:6:"object";s:15:"bx_tasks_covers";}', 'no', '1', '2592000', '0', '', ''),
  348. ('bx_tasks_preview_photos', 'bx_tasks_photos_resized', 'Storage', 'a:1:{s:6:"object";s:15:"bx_tasks_photos";}', 'no', '1', '2592000', '0', '', ''),
  349. ('bx_tasks_gallery_photos', 'bx_tasks_photos_resized', 'Storage', 'a:1:{s:6:"object";s:15:"bx_tasks_photos";}', 'no', '1', '2592000', '0', '', ''),
  350. ('bx_tasks_videos_poster', 'bx_tasks_videos_resized', 'Storage', 'a:1:{s:6:"object";s:15:"bx_tasks_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
  351. ('bx_tasks_videos_poster_preview', 'bx_tasks_videos_resized', 'Storage', 'a:1:{s:6:"object";s:15:"bx_tasks_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
  352. ('bx_tasks_videos_mp4', 'bx_tasks_videos_resized', 'Storage', 'a:1:{s:6:"object";s:15:"bx_tasks_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
  353. ('bx_tasks_videos_mp4_hd', 'bx_tasks_videos_resized', 'Storage', 'a:1:{s:6:"object";s:15:"bx_tasks_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
  354. ('bx_tasks_preview_files', 'bx_tasks_photos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_tasks_files";}', 'no', '1', '2592000', '0', '', ''),
  355. ('bx_tasks_gallery_files', 'bx_tasks_photos_resized', 'Storage', 'a:1:{s:6:"object";s:14:"bx_tasks_files";}', 'no', '1', '2592000', '0', '', '');
  356. INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES
  357. ('bx_tasks_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:11:"crop_resize";s:1:"1";}', '0'),
  358. ('bx_tasks_gallery', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0'),
  359. ('bx_tasks_cover', 'Resize', 'a:1:{s:1:"w";s:4:"1200";}', '0'),
  360. ('bx_tasks_preview_photos', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:11:"crop_resize";s:1:"1";}', '0'),
  361. ('bx_tasks_gallery_photos', 'Resize', 'a:1:{s:1:"w";s:4:"1200";}', '0'),
  362. ('bx_tasks_videos_poster_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:13:"square_resize";s:1:"1";}', 10),
  363. ('bx_tasks_videos_poster_preview', 'Poster', 'a:2:{s:1:"h";s:3:"480";s:10:"force_type";s:3:"jpg";}', 0),
  364. ('bx_tasks_videos_poster', 'Poster', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:3:"jpg";}', 0),
  365. ('bx_tasks_videos_mp4', 'Mp4', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:3:"mp4";}', 0),
  366. ('bx_tasks_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),
  367. ('bx_tasks_preview_files', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:11:"crop_resize";s:1:"1";}', '0'),
  368. ('bx_tasks_gallery_files', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0');
  369. -- FORMS: entry (task)
  370. INSERT INTO `sys_objects_form`(`object`, `module`, `title`, `action`, `form_attrs`, `table`, `key`, `uri`, `uri_title`, `submit_name`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
  371. ('bx_tasks', 'bx_tasks', '_bx_tasks_form_entry', '', 'a:1:{s:7:"enctype";s:19:"multipart/form-data";}', 'bx_tasks_tasks', 'id', '', '', 'a:2:{i:0;s:9:"do_submit";i:1;s:10:"do_publish";}', '', 0, 1, 'BxTasksFormEntry', 'modules/boonex/tasks/classes/BxTasksFormEntry.php');
  372. INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`, `title`) VALUES
  373. ('bx_tasks', 'bx_tasks_entry_add', 'bx_tasks', 0, '_bx_tasks_form_entry_display_add'),
  374. ('bx_tasks', 'bx_tasks_entry_delete', 'bx_tasks', 0, '_bx_tasks_form_entry_display_delete'),
  375. ('bx_tasks', 'bx_tasks_entry_edit', 'bx_tasks', 0, '_bx_tasks_form_entry_display_edit'),
  376. ('bx_tasks', 'bx_tasks_entry_edit_state', 'bx_tasks', 0, '_bx_tasks_form_entry_display_edit_state'),
  377. ('bx_tasks', 'bx_tasks_entry_view', 'bx_tasks', 1, '_bx_tasks_form_entry_display_view');
  378. 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
  379. ('bx_tasks', 'bx_tasks', 'cf', '1', '#!sys_content_filter', 0, 'select', '_sys_form_entry_input_sys_cf', '_sys_form_entry_input_cf', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
  380. ('bx_tasks', 'bx_tasks', 'allow_view_to', '', '', 0, 'custom', '_bx_tasks_form_entry_input_sys_allow_view_to', '_bx_tasks_form_entry_input_allow_view_to', '', 1, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  381. ('bx_tasks', 'bx_tasks', 'delete_confirm', 1, '', 0, 'checkbox', '_bx_tasks_form_entry_input_sys_delete_confirm', '_bx_tasks_form_entry_input_delete_confirm', '_bx_tasks_form_entry_input_delete_confirm_info', 1, 0, 0, '', '', '', 'Avail', '', '_bx_tasks_form_entry_input_delete_confirm_error', '', '', 1, 0),
  382. ('bx_tasks', 'bx_tasks', 'do_publish', '_bx_tasks_form_entry_input_do_publish', '', 0, 'submit', '_bx_tasks_form_entry_input_sys_do_publish', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  383. ('bx_tasks', 'bx_tasks', 'do_submit', '_bx_tasks_form_entry_input_do_submit', '', 0, 'submit', '_bx_tasks_form_entry_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  384. ('bx_tasks', 'bx_tasks', 'do_cancel', '_bx_tasks_form_entry_input_do_cancel', '', 0, 'button', '_bx_tasks_form_entry_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";}', '', '', '', '', '', '', '', 1, 0),
  385. ('bx_tasks', 'bx_tasks', 'do_cancel_edit', '_bx_tasks_form_entry_input_do_cancel_edit', '', 0, 'button', '_bx_tasks_form_entry_input_sys_do_cancel_edit', '', '', 0, 0, 0, 'a:2:{s:7:"onclick";s:41:"window.open(''{edit_cancel_url}'', ''_self'')";s:5:"class";s:22:"bx-def-margin-sec-left";}', '', '', '', '', '', '', '', 0, 0),
  386. ('bx_tasks', 'bx_tasks', 'controls', '', 'do_publish,do_cancel', 0, 'input_set', '_bx_tasks_form_entry_input_sys_controls', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  387. ('bx_tasks', 'bx_tasks', 'controls_edit', '', 'do_submit,do_cancel_edit', 0, 'input_set', '_bx_tasks_form_entry_input_sys_controls_edit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  388. ('bx_tasks', 'bx_tasks', 'controls_edit_popup', '', 'do_submit,do_cancel', 0, 'input_set', '_bx_tasks_form_entry_input_sys_controls_edit_popup', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  389. ('bx_tasks', 'bx_tasks', 'covers', 'a:1:{i:0;s:14:"bx_tasks_html5";}', 'a:1:{s:14:"bx_tasks_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_tasks_form_entry_input_sys_covers', '_bx_tasks_form_entry_input_covers', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  390. ('bx_tasks', 'bx_tasks', 'pictures', 'a:1:{i:0;s:21:"bx_tasks_photos_html5";}', 'a:1:{s:21:"bx_tasks_photos_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_tasks_form_entry_input_sys_pictures', '_bx_tasks_form_entry_input_pictures', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  391. ('bx_tasks', 'bx_tasks', 'videos', 'a:2:{i:0;s:21:"bx_tasks_videos_html5";i:1;s:28:"bx_tasks_videos_record_video";}', 'a:2:{s:21:"bx_tasks_videos_html5";s:25:"_sys_uploader_html5_title";s:28:"bx_tasks_videos_record_video";s:32:"_sys_uploader_record_video_title";}', 0, 'files', '_bx_tasks_form_entry_input_sys_videos', '_bx_tasks_form_entry_input_videos', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  392. ('bx_tasks', 'bx_tasks', 'files', 'a:1:{i:0;s:20:"bx_tasks_files_html5";}', 'a:1:{s:20:"bx_tasks_files_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_tasks_form_entry_input_sys_files', '_bx_tasks_form_entry_input_files', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  393. ('bx_tasks', 'bx_tasks', 'text', '', '', 0, 'textarea', '_bx_tasks_form_entry_input_sys_text', '_bx_tasks_form_entry_input_text', '', 0, 0, 2, '', '', '', '', '', '', 'XssHtml', '', 1, 0),
  394. ('bx_tasks', 'bx_tasks', 'title', '', '', 0, 'text', '_bx_tasks_form_entry_input_sys_title', '_bx_tasks_form_entry_input_title', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_tasks_form_entry_input_title_err', 'Xss', '', 1, 0),
  395. ('bx_tasks', 'bx_tasks', 'type', '', '#!bx_tasks_types', 0, 'select', '_bx_tasks_form_entry_input_sys_type', '_bx_tasks_form_entry_input_type', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
  396. ('bx_tasks', 'bx_tasks', 'priority', '', '#!bx_tasks_priorities', 0, 'select', '_bx_tasks_form_entry_input_sys_priority', '_bx_tasks_form_entry_input_priority', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
  397. ('bx_tasks', 'bx_tasks', 'state', '', '#!bx_tasks_states', 0, 'select', '_bx_tasks_form_entry_input_sys_state', '_bx_tasks_form_entry_input_state', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
  398. ('bx_tasks', 'bx_tasks', 'cat', '', '#!bx_tasks_cats', 0, 'select', '_bx_tasks_form_entry_input_sys_cat', '_bx_tasks_form_entry_input_cat', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_tasks_form_entry_input_cat_err', 'Xss', '', 1, 0),
  399. ('bx_tasks', 'bx_tasks', 'multicat', '', '', 0, 'custom', '_bx_tasks_form_entry_input_sys_multicat', '_bx_tasks_form_entry_input_multicat', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_tasks_form_entry_input_multicat_err', 'Xss', '', 1, 0),
  400. ('bx_tasks', 'bx_tasks', 'added', '', '', 0, 'datetime', '_bx_tasks_form_entry_input_sys_date_added', '_bx_tasks_form_entry_input_date_added', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  401. ('bx_tasks', 'bx_tasks', 'changed', '', '', 0, 'datetime', '_bx_tasks_form_entry_input_sys_date_changed', '_bx_tasks_form_entry_input_date_changed', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  402. ('bx_tasks', 'bx_tasks', 'published', '', '', 0, 'datetime', '_bx_tasks_form_entry_input_sys_date_published', '_bx_tasks_form_entry_input_date_published', '_bx_tasks_form_entry_input_date_published_info', 0, 0, 0, '', '', '', '', '', '', 'DateTimeTs', '', 1, 0),
  403. ('bx_tasks', 'bx_tasks', 'initial_members', '', '', 0, 'custom', '_bx_tasks_form_entry_input_sys_initial_members', '_bx_tasks_form_entry_input_initial_members', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 1),
  404. ('bx_tasks', 'bx_tasks', 'estimate', '', '', 0, 'text', '_bx_tasks_form_entry_input_sys_estimate', '_bx_tasks_form_entry_input_estimate', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
  405. ('bx_tasks', 'bx_tasks', 'due_date', '', '', 0, 'datetime', '_bx_tasks_form_entry_input_sys_date_due_date', '_bx_tasks_form_entry_input_date_due_date', '', 0, 0, 0, '', '', '', '', '', '', 'DateTimeTs', '', 1, 0),
  406. ('bx_tasks', 'bx_tasks', 'attachments', '', '', 0, 'custom', '_bx_tasks_form_entry_input_sys_attachments', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  407. ('bx_tasks', 'bx_tasks', 'labels', '', '', 0, 'custom', '_sys_form_input_sys_labels', '_sys_form_input_labels', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  408. ('bx_tasks', 'bx_tasks', 'anonymous', '', '', 0, 'switcher', '_sys_form_input_sys_anonymous', '_sys_form_input_anonymous', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  409. ('bx_tasks', 'bx_tasks', 'allow_comments', '1', '', 1, 'switcher', '_bx_tasks_form_entry_input_sys_allow_comments', '_bx_tasks_form_entry_input_allow_comments', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0);
  410. INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
  411. ('bx_tasks_entry_add', 'title', 2147483647, 1, 1),
  412. ('bx_tasks_entry_add', 'text', 2147483647, 1, 2),
  413. ('bx_tasks_entry_add', 'initial_members', 192, 1, 3),
  414. ('bx_tasks_entry_add', 'due_date', 192, 1, 4),
  415. ('bx_tasks_entry_add', 'type', 2147483647, 1, 5),
  416. ('bx_tasks_entry_add', 'priority', 2147483647, 1, 6),
  417. ('bx_tasks_entry_add', 'estimate', 2147483647, 1, 7),
  418. ('bx_tasks_entry_add', 'controls', 2147483647, 1, 8),
  419. ('bx_tasks_entry_add', 'do_publish', 2147483647, 1, 9),
  420. ('bx_tasks_entry_add', 'do_cancel', 2147483647, 1, 10),
  421. ('bx_tasks_entry_delete', 'delete_confirm', 2147483647, 1, 1),
  422. ('bx_tasks_entry_delete', 'do_submit', 2147483647, 1, 2),
  423. ('bx_tasks_entry_edit', 'title', 2147483647, 1, 1),
  424. ('bx_tasks_entry_edit', 'text', 2147483647, 1, 2),
  425. ('bx_tasks_entry_edit', 'attachments', 2147483647, 1, 3),
  426. ('bx_tasks_entry_edit', 'pictures', 2147483647, 1, 4),
  427. ('bx_tasks_entry_edit', 'videos', 2147483647, 1, 5),
  428. ('bx_tasks_entry_edit', 'files', 2147483647, 1, 6),
  429. ('bx_tasks_entry_edit', 'allow_view_to', 2147483647, 1, 7),
  430. ('bx_tasks_entry_edit', 'cf', 2147483647, 1, 8),
  431. ('bx_tasks_entry_edit', 'initial_members', 192, 1, 9),
  432. ('bx_tasks_entry_edit', 'due_date', 192, 1, 10),
  433. ('bx_tasks_entry_edit', 'type', 2147483647, 1, 11),
  434. ('bx_tasks_entry_edit', 'priority', 2147483647, 1, 12),
  435. ('bx_tasks_entry_edit', 'estimate', 2147483647, 1, 13),
  436. ('bx_tasks_entry_edit', 'controls_edit', 2147483647, 1, 14),
  437. ('bx_tasks_entry_edit', 'do_submit', 2147483647, 1, 15),
  438. ('bx_tasks_entry_edit', 'do_cancel_edit', 2147483647, 1, 16),
  439. ('bx_tasks_entry_edit_state', 'state', 2147483647, 1, 1),
  440. ('bx_tasks_entry_edit_state', 'controls_edit_popup', 2147483647, 1, 2),
  441. ('bx_tasks_entry_edit_state', 'do_submit', 2147483647, 1, 3),
  442. ('bx_tasks_entry_edit_state', 'do_cancel', 2147483647, 1, 4),
  443. ('bx_tasks_entry_view', 'type', 2147483647, 1, 1),
  444. ('bx_tasks_entry_view', 'priority', 2147483647, 1, 2),
  445. ('bx_tasks_entry_view', 'estimate', 2147483647, 1, 3),
  446. ('bx_tasks_entry_view', 'cat', 2147483647, 1, 4),
  447. ('bx_tasks_entry_view', 'added', 2147483647, 1, 5),
  448. ('bx_tasks_entry_view', 'changed', 2147483647, 1, 6),
  449. ('bx_tasks_entry_view', 'due_date', 192, 1, 7),
  450. ('bx_tasks_entry_view', 'state', 2147483647, 1, 8);
  451. -- FORMS: entry (tasklist)
  452. INSERT INTO `sys_objects_form`(`object`, `module`, `title`, `action`, `form_attrs`, `table`, `key`, `uri`, `uri_title`, `submit_name`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
  453. ('bx_tasks_list', 'bx_tasks', '_bx_tasks_form_list_entry', '', 'a:1:{s:7:"enctype";s:19:"multipart/form-data";}', 'bx_tasks_lists', 'id', '', '', 'do_submit', '', 0, 1, 'BxTasksFormListEntry', 'modules/boonex/tasks/classes/BxTasksFormListEntry.php');
  454. INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`, `title`) VALUES
  455. ('bx_tasks_list', 'bx_tasks_list_entry_add', 'bx_tasks', 0, '_bx_tasks_form_list_entry_display_add'),
  456. ('bx_tasks_list', 'bx_tasks_list_entry_edit', 'bx_tasks', 0, '_bx_tasks_form_list_entry_display_edit');
  457. 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
  458. ('bx_tasks_list', 'bx_tasks', 'do_submit', '_bx_tasks_form_list_entry_input_do_submit', '', 0, 'submit', '_bx_tasks_form_list_entry_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  459. ('bx_tasks_list', 'bx_tasks', 'title', '', '', 0, 'text', '_bx_tasks_form_list_entry_input_sys_title', '_bx_tasks_form_list_entry_input_title', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_tasks_form_list_entry_input_title_err', 'Xss', '', 1, 0),
  460. ('bx_tasks_list', 'bx_tasks', 'do_cancel', '_bx_tasks_form_entry_input_do_cancel', '', 0, 'button', '_bx_tasks_form_entry_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";}', '', '', '', '', '', '', '', 1, 0),
  461. ('bx_tasks_list', 'bx_tasks', 'controls', '', 'do_submit,do_cancel', 0, 'input_set', '', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0);
  462. INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
  463. ('bx_tasks_list_entry_add', 'title', 2147483647, 1, 1),
  464. ('bx_tasks_list_entry_add', 'controls', 2147483647, 1, 2),
  465. ('bx_tasks_list_entry_add', 'do_submit', 2147483647, 1, 3),
  466. ('bx_tasks_list_entry_add', 'do_cancel', 2147483647, 1, 4),
  467. ('bx_tasks_list_entry_edit', 'title', 2147483647, 1, 1),
  468. ('bx_tasks_list_entry_edit', 'controls', 2147483647, 1, 2),
  469. ('bx_tasks_list_entry_edit', 'do_submit', 2147483647, 1, 3),
  470. ('bx_tasks_list_entry_edit', 'do_cancel', 2147483647, 1, 4);
  471. -- FORMS: time
  472. 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
  473. ('bx_tasks_time', 'bx_tasks', '_bx_tasks_form_time', 'report.php', 'a:3:{s:2:"id";s:0:"";s:4:"name";s:0:"";s:5:"class";s:17:"bx-report-do-form";}', 'submit', '', 'id', '', '', '', 0, 1, '', '');
  474. INSERT INTO `sys_form_displays` (`display_name`, `module`, `object`, `title`, `view_mode`) VALUES
  475. ('bx_tasks_time_add', 'bx_tasks', 'bx_tasks_time', '_bx_tasks_form_display_time_add', 0),
  476. ('bx_tasks_time_edit', 'bx_tasks', 'bx_tasks_time', '_bx_tasks_form_display_time_edit', 0);
  477. 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
  478. ('bx_tasks_time', 'bx_tasks', 'sys', '', '', 0, 'hidden', '_bx_tasks_form_time_input_sys_sys', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  479. ('bx_tasks_time', 'bx_tasks', 'object_id', '', '', 0, 'hidden', '_bx_tasks_form_time_input_sys_object_id', '_bx_tasks_form_time_input_object_id', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 0, 0),
  480. ('bx_tasks_time', 'bx_tasks', 'action', '', '', 0, 'hidden', '_bx_tasks_form_time_input_sys_action', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  481. ('bx_tasks_time', 'bx_tasks', 'value', '', '', 0, 'time', '_bx_tasks_form_time_input_sys_value', '_bx_tasks_form_time_input_value', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
  482. ('bx_tasks_time', 'bx_tasks', 'text', '', '', 0, 'textarea', '_bx_tasks_form_time_input_sys_text', '_bx_tasks_form_time_input_text', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
  483. ('bx_tasks_time', 'bx_tasks', 'submit', '_bx_tasks_form_time_input_submit', '', 0, 'submit', '_bx_tasks_form_time_input_sys_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0);
  484. INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
  485. ('bx_tasks_time_add', 'sys', 2147483647, 1, 1),
  486. ('bx_tasks_time_add', 'object_id', 2147483647, 1, 2),
  487. ('bx_tasks_time_add', 'action', 2147483647, 1, 3),
  488. ('bx_tasks_time_add', 'value', 2147483647, 1, 4),
  489. ('bx_tasks_time_add', 'text', 2147483647, 1, 5),
  490. ('bx_tasks_time_add', 'submit', 2147483647, 1, 6),
  491. ('bx_tasks_time_edit', 'value', 2147483647, 1, 1),
  492. ('bx_tasks_time_edit', 'text', 2147483647, 1, 2),
  493. ('bx_tasks_time_edit', 'submit', 2147483647, 1, 3);
  494. -- PRE-VALUES
  495. INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES
  496. ('bx_tasks_types', '_bx_tasks_pre_lists_types', 'bx_tasks', '0');
  497. INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
  498. ('bx_tasks_types', '', 0, '_sys_please_select', ''),
  499. ('bx_tasks_types', '1', 1, '_bx_tasks_type_1', ''),
  500. ('bx_tasks_types', '2', 2, '_bx_tasks_type_2', ''),
  501. ('bx_tasks_types', '3', 3, '_bx_tasks_type_3', '');
  502. INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES
  503. ('bx_tasks_priorities', '_bx_tasks_pre_lists_priorities', 'bx_tasks', '0');
  504. INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
  505. ('bx_tasks_priorities', '', 0, '_sys_please_select', ''),
  506. ('bx_tasks_priorities', '1', 1, '_bx_tasks_priority_1', ''),
  507. ('bx_tasks_priorities', '2', 2, '_bx_tasks_priority_2', ''),
  508. ('bx_tasks_priorities', '3', 3, '_bx_tasks_priority_3', ''),
  509. ('bx_tasks_priorities', '4', 4, '_bx_tasks_priority_4', ''),
  510. ('bx_tasks_priorities', '5', 5, '_bx_tasks_priority_5', '');
  511. INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES
  512. ('bx_tasks_states', '_bx_tasks_pre_lists_states', 'bx_tasks', '0');
  513. INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
  514. ('bx_tasks_states', '', 0, '_sys_please_select', ''),
  515. ('bx_tasks_states', '1', 1, '_bx_tasks_state_1', ''),
  516. ('bx_tasks_states', '2', 2, '_bx_tasks_state_2', ''),
  517. ('bx_tasks_states', '3', 3, '_bx_tasks_state_3', ''),
  518. ('bx_tasks_states', '4', 4, '_bx_tasks_state_4', ''),
  519. ('bx_tasks_states', '5', 5, '_bx_tasks_state_5', ''),
  520. ('bx_tasks_states', '6', 6, '_bx_tasks_state_6', ''),
  521. ('bx_tasks_states', '7', 7, '_bx_tasks_state_7', '');
  522. INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES
  523. ('bx_tasks_cats', '_bx_tasks_pre_lists_cats', 'bx_tasks', '0');
  524. INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
  525. ('bx_tasks_cats', '', 0, '_sys_please_select', ''),
  526. ('bx_tasks_cats', '1', 1, '_bx_tasks_cat_Animals_Pets', ''),
  527. ('bx_tasks_cats', '2', 2, '_bx_tasks_cat_Architecture', ''),
  528. ('bx_tasks_cats', '3', 3, '_bx_tasks_cat_Art', ''),
  529. ('bx_tasks_cats', '4', 4, '_bx_tasks_cat_Cars_Motorcycles', ''),
  530. ('bx_tasks_cats', '5', 5, '_bx_tasks_cat_Celebrities', ''),
  531. ('bx_tasks_cats', '6', 6, '_bx_tasks_cat_Design', ''),
  532. ('bx_tasks_cats', '7', 7, '_bx_tasks_cat_DIY_Crafts', ''),
  533. ('bx_tasks_cats', '8', 8, '_bx_tasks_cat_Education', ''),
  534. ('bx_tasks_cats', '9', 9, '_bx_tasks_cat_Film_Music_Books', ''),
  535. ('bx_tasks_cats', '10', 10, '_bx_tasks_cat_Food_Drink', ''),
  536. ('bx_tasks_cats', '11', 11, '_bx_tasks_cat_Gardening', ''),
  537. ('bx_tasks_cats', '12', 12, '_bx_tasks_cat_Geek', ''),
  538. ('bx_tasks_cats', '13', 13, '_bx_tasks_cat_Hair_Beauty', ''),
  539. ('bx_tasks_cats', '14', 14, '_bx_tasks_cat_Health_Fitness', ''),
  540. ('bx_tasks_cats', '15', 15, '_bx_tasks_cat_History', ''),
  541. ('bx_tasks_cats', '16', 16, '_bx_tasks_cat_Holidays_Events', ''),
  542. ('bx_tasks_cats', '17', 17, '_bx_tasks_cat_Home_Decor', ''),
  543. ('bx_tasks_cats', '18', 18, '_bx_tasks_cat_Humor', ''),
  544. ('bx_tasks_cats', '19', 19, '_bx_tasks_cat_Illustrations_Posters', ''),
  545. ('bx_tasks_cats', '20', 20, '_bx_tasks_cat_Kids_Parenting', ''),
  546. ('bx_tasks_cats', '21', 21, '_bx_tasks_cat_Mens_Fashion', ''),
  547. ('bx_tasks_cats', '22', 22, '_bx_tasks_cat_Outdoors', ''),
  548. ('bx_tasks_cats', '23', 23, '_bx_tasks_cat_Photography', ''),
  549. ('bx_tasks_cats', '24', 24, '_bx_tasks_cat_Products', ''),
  550. ('bx_tasks_cats', '25', 25, '_bx_tasks_cat_Quotes', ''),
  551. ('bx_tasks_cats', '26', 26, '_bx_tasks_cat_Science_Nature', ''),
  552. ('bx_tasks_cats', '27', 27, '_bx_tasks_cat_Sports', ''),
  553. ('bx_tasks_cats', '28', 28, '_bx_tasks_cat_Tattoos', ''),
  554. ('bx_tasks_cats', '29', 29, '_bx_tasks_cat_Technology', ''),
  555. ('bx_tasks_cats', '30', 30, '_bx_tasks_cat_Travel', ''),
  556. ('bx_tasks_cats', '31', 31, '_bx_tasks_cat_Weddings', ''),
  557. ('bx_tasks_cats', '32', 32, '_bx_tasks_cat_Womens_Fashion', '');
  558. -- COMMENTS
  559. 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
  560. ('bx_tasks', 'bx_tasks', 'bx_tasks_cmts', 1, 5000, 1000, 3, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-task&id={object_id}', '', 'bx_tasks_tasks', 'id', 'author', 'title', 'comments', '', ''),
  561. ('bx_tasks_notes', 'bx_tasks', 'bx_tasks_cmts_notes', 1, 5000, 1000, 0, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-task&id={object_id}', '', 'bx_tasks_tasks', 'id', 'author', 'title', '', 'BxTemplCmtsNotes', '');
  562. -- VOTES
  563. INSERT INTO `sys_objects_vote` (`Name`, `Module`, `TableMain`, `TableTrack`, `PostTimeout`, `MinValue`, `MaxValue`, `IsUndo`, `IsOn`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldRate`, `TriggerFieldRateCount`, `ClassName`, `ClassFile`) VALUES
  564. ('bx_tasks', 'bx_tasks', 'bx_tasks_votes', 'bx_tasks_votes_track', '604800', '1', '1', '0', '1', 'bx_tasks_tasks', 'id', 'author', 'rate', 'votes', '', ''),
  565. ('bx_tasks_reactions', 'bx_tasks', 'bx_tasks_reactions', 'bx_tasks_reactions_track', '604800', '1', '1', '1', '1', 'bx_tasks_tasks', 'id', 'author', 'rrate', 'rvotes', 'BxTemplVoteReactions', '');
  566. -- SCORES
  567. 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
  568. ('bx_tasks', 'bx_tasks', 'bx_tasks_scores', 'bx_tasks_scores_track', '604800', '0', 'bx_tasks_tasks', 'id', 'author', 'score', 'sc_up', 'sc_down', '', '');
  569. -- REPORTS
  570. INSERT INTO `sys_objects_report` (`name`, `module`, `table_main`, `table_track`, `pruning`, `is_on`, `base_url`, `object_comment`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES
  571. ('bx_tasks', 'bx_tasks', 'bx_tasks_reports', 'bx_tasks_reports_track', '31536000', '1', 'page.php?i=view-task&id={object_id}', 'bx_tasks_notes', 'bx_tasks_tasks', 'id', 'author', 'reports', '', ''),
  572. ('bx_tasks_time', 'bx_tasks', 'bx_tasks_time', 'bx_tasks_time_track', '0', '1', 'page.php?i=view-task&id={object_id}', '', 'bx_tasks_tasks', 'id', 'author', 'time', 'BxTasksTime', 'modules/boonex/tasks/classes/BxTasksTime.php');
  573. -- VIEWS
  574. INSERT INTO `sys_objects_view` (`name`, `module`, `table_track`, `period`, `is_on`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES
  575. ('bx_tasks', 'bx_tasks', 'bx_tasks_views_track', '86400', '1', 'bx_tasks_tasks', 'id', 'author', 'views', '', '');
  576. -- FAFORITES
  577. INSERT INTO `sys_objects_favorite` (`name`, `table_track`, `is_on`, `is_undo`, `is_public`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES
  578. ('bx_tasks', 'bx_tasks_favorites_track', '1', '1', '1', 'page.php?i=view-task&id={object_id}', 'bx_tasks_tasks', 'id', 'author', 'favorites', '', '');
  579. -- FEATURED
  580. INSERT INTO `sys_objects_feature` (`name`, `module`, `is_on`, `is_undo`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_flag`, `class_name`, `class_file`) VALUES
  581. ('bx_tasks', 'bx_tasks', '1', '1', 'page.php?i=view-task&id={object_id}', 'bx_tasks_tasks', 'id', 'author', 'featured', '', '');
  582. -- CONTENT INFO
  583. INSERT INTO `sys_objects_content_info` (`name`, `title`, `alert_unit`, `alert_action_add`, `alert_action_update`, `alert_action_delete`, `class_name`, `class_file`) VALUES
  584. ('bx_tasks', '_bx_tasks', 'bx_tasks', 'added', 'edited', 'deleted', '', ''),
  585. ('bx_tasks_cmts', '_bx_tasks_cmts', 'bx_tasks', 'commentPost', 'commentUpdated', 'commentRemoved', 'BxDolContentInfoCmts', '');
  586. -- SEARCH EXTENDED
  587. INSERT INTO `sys_objects_search_extended` (`object`, `object_content_info`, `module`, `title`, `active`, `class_name`, `class_file`) VALUES
  588. ('bx_tasks', 'bx_tasks', 'bx_tasks', '_bx_tasks_search_extended', 1, '', ''),
  589. ('bx_tasks_cmts', 'bx_tasks_cmts', 'bx_tasks', '_bx_tasks_search_extended_cmts', 1, 'BxTemplSearchExtendedCmts', '');
  590. -- STUDIO: page & widget
  591. INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
  592. (3, 'bx_tasks', '_bx_tasks', '_bx_tasks', 'bx_tasks@modules/boonex/tasks/|std-icon.svg');
  593. SET @iPageId = LAST_INSERT_ID();
  594. SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
  595. SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
  596. INSERT INTO `sys_std_widgets` (`page_id`, `module`, `type`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
  597. (@iPageId, 'bx_tasks', 'content', '{url_studio}module.php?name=bx_tasks', '', 'bx_tasks@modules/boonex/tasks/|std-icon.svg', '_bx_tasks', '', '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";}');
  598. INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
  599. (@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));