install.sql 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638
  1. -- TABLE: entries
  2. CREATE TABLE IF NOT EXISTS `bx_classes_classes` (
  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. `module_id` int(10) unsigned NOT NULL,
  9. `order` int(11) NOT NULL,
  10. `start_date` int(11) NOT NULL,
  11. `end_date` int(11) NOT NULL,
  12. `thumb` int(11) NOT NULL,
  13. `title` varchar(255) NOT NULL,
  14. `avail` int(11) NOT NULL,
  15. `cmts` int(11) NOT NULL,
  16. `completed_when` int(11) NOT NULL,
  17. `text` mediumtext NOT NULL,
  18. `labels` text NOT NULL,
  19. `location` text NOT NULL,
  20. `views` int(11) NOT NULL default '0',
  21. `rate` float NOT NULL default '0',
  22. `votes` int(11) NOT NULL default '0',
  23. `rrate` float NOT NULL default '0',
  24. `rvotes` int(11) NOT NULL default '0',
  25. `score` int(11) NOT NULL default '0',
  26. `sc_up` int(11) NOT NULL default '0',
  27. `sc_down` int(11) NOT NULL default '0',
  28. `favorites` int(11) NOT NULL default '0',
  29. `comments` int(11) NOT NULL default '0',
  30. `reports` int(11) NOT NULL default '0',
  31. `featured` int(11) NOT NULL default '0',
  32. `allow_view_to` varchar(16) NOT NULL DEFAULT '3',
  33. `status` enum('active','awaiting','failed','hidden') NOT NULL DEFAULT 'active',
  34. `status_admin` enum('active','hidden') NOT NULL DEFAULT 'active',
  35. PRIMARY KEY (`id`),
  36. FULLTEXT KEY `title_text` (`title`,`text`)
  37. );
  38. -- TABLE: modules
  39. CREATE TABLE IF NOT EXISTS `bx_classes_modules` (
  40. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  41. `profile_id` int(10) unsigned NOT NULL,
  42. `module_title` varchar(255) NOT NULL,
  43. `author` int(11) NOT NULL,
  44. `added` int(11) NOT NULL,
  45. `changed` int(11) NOT NULL,
  46. `order` int(11) NOT NULL,
  47. PRIMARY KEY (`id`)
  48. );
  49. -- TABLE: status
  50. CREATE TABLE IF NOT EXISTS `bx_classes_statuses` (
  51. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  52. `class_id` int(10) unsigned NOT NULL,
  53. `student_profile_id` int(11) NOT NULL,
  54. `viewed` int(11) NOT NULL,
  55. `replied` int(11) NOT NULL,
  56. `completed` int(11) NOT NULL,
  57. PRIMARY KEY (`id`),
  58. UNIQUE `class_student` (`class_id`,`student_profile_id`)
  59. );
  60. -- TABLE: storages & transcoders
  61. CREATE TABLE IF NOT EXISTS `bx_classes_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_classes_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_classes_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_classes_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_classes_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. `added` int(11) NOT NULL,
  131. `modified` int(11) NOT NULL,
  132. `private` int(11) NOT NULL,
  133. PRIMARY KEY (`id`),
  134. UNIQUE KEY `remote_id` (`remote_id`)
  135. );
  136. CREATE TABLE IF NOT EXISTS `bx_classes_videos_resized` (
  137. `id` int(11) NOT NULL AUTO_INCREMENT,
  138. `profile_id` int(10) unsigned NOT NULL,
  139. `remote_id` varchar(128) NOT NULL,
  140. `path` varchar(255) NOT NULL,
  141. `file_name` varchar(255) NOT NULL,
  142. `mime_type` varchar(128) NOT NULL,
  143. `ext` varchar(32) NOT NULL,
  144. `size` bigint(20) NOT NULL,
  145. `added` int(11) NOT NULL,
  146. `modified` int(11) NOT NULL,
  147. `private` int(11) NOT NULL,
  148. PRIMARY KEY (`id`),
  149. UNIQUE KEY `remote_id` (`remote_id`)
  150. );
  151. CREATE TABLE IF NOT EXISTS `bx_classes_sounds` (
  152. `id` int(11) NOT NULL AUTO_INCREMENT,
  153. `profile_id` int(10) unsigned NOT NULL,
  154. `remote_id` varchar(128) NOT NULL,
  155. `path` varchar(255) NOT NULL,
  156. `file_name` varchar(255) NOT NULL,
  157. `mime_type` varchar(128) NOT NULL,
  158. `ext` varchar(32) NOT NULL,
  159. `size` bigint(20) NOT NULL,
  160. `added` int(11) NOT NULL,
  161. `modified` int(11) NOT NULL,
  162. `private` int(11) NOT NULL,
  163. PRIMARY KEY (`id`),
  164. UNIQUE KEY `remote_id` (`remote_id`)
  165. );
  166. CREATE TABLE IF NOT EXISTS `bx_classes_sounds_resized` (
  167. `id` int(11) NOT NULL AUTO_INCREMENT,
  168. `profile_id` int(10) unsigned NOT NULL,
  169. `remote_id` varchar(128) NOT NULL,
  170. `path` varchar(255) NOT NULL,
  171. `file_name` varchar(255) NOT NULL,
  172. `mime_type` varchar(128) NOT NULL,
  173. `ext` varchar(32) NOT NULL,
  174. `size` bigint(20) NOT NULL,
  175. `added` int(11) NOT NULL,
  176. `modified` int(11) NOT NULL,
  177. `private` int(11) NOT NULL,
  178. PRIMARY KEY (`id`),
  179. UNIQUE KEY `remote_id` (`remote_id`)
  180. );
  181. -- TABLE: comments
  182. CREATE TABLE IF NOT EXISTS `bx_classes_cmts` (
  183. `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
  184. `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
  185. `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
  186. `cmt_object_id` int(11) NOT NULL DEFAULT '0',
  187. `cmt_author_id` int(11) NOT NULL DEFAULT '0',
  188. `cmt_level` int(11) NOT NULL DEFAULT '0',
  189. `cmt_text` text NOT NULL,
  190. `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',
  191. `cmt_rate` int(11) NOT NULL DEFAULT '0',
  192. `cmt_rate_count` int(11) NOT NULL DEFAULT '0',
  193. `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
  194. `cmt_replies` int(11) NOT NULL DEFAULT '0',
  195. PRIMARY KEY (`cmt_id`),
  196. KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
  197. FULLTEXT KEY `search_fields` (`cmt_text`)
  198. );
  199. CREATE TABLE IF NOT EXISTS `bx_classes_cmts_notes` (
  200. `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
  201. `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
  202. `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
  203. `cmt_object_id` int(11) NOT NULL DEFAULT '0',
  204. `cmt_author_id` int(11) NOT NULL DEFAULT '0',
  205. `cmt_level` int(11) NOT NULL DEFAULT '0',
  206. `cmt_text` text NOT NULL,
  207. `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',
  208. `cmt_rate` int(11) NOT NULL DEFAULT '0',
  209. `cmt_rate_count` int(11) NOT NULL DEFAULT '0',
  210. `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
  211. `cmt_replies` int(11) NOT NULL DEFAULT '0',
  212. PRIMARY KEY (`cmt_id`),
  213. KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
  214. FULLTEXT KEY `search_fields` (`cmt_text`)
  215. );
  216. -- TABLE: votes
  217. CREATE TABLE IF NOT EXISTS `bx_classes_votes` (
  218. `object_id` int(11) NOT NULL default '0',
  219. `count` int(11) NOT NULL default '0',
  220. `sum` int(11) NOT NULL default '0',
  221. UNIQUE KEY `object_id` (`object_id`)
  222. );
  223. CREATE TABLE IF NOT EXISTS `bx_classes_votes_track` (
  224. `id` int(11) NOT NULL AUTO_INCREMENT,
  225. `object_id` int(11) NOT NULL default '0',
  226. `author_id` int(11) NOT NULL default '0',
  227. `author_nip` int(11) unsigned NOT NULL default '0',
  228. `value` tinyint(4) NOT NULL default '0',
  229. `date` int(11) NOT NULL default '0',
  230. PRIMARY KEY (`id`),
  231. KEY `vote` (`object_id`, `author_nip`)
  232. );
  233. CREATE TABLE IF NOT EXISTS `bx_classes_reactions` (
  234. `object_id` int(11) NOT NULL default '0',
  235. `reaction` varchar(32) NOT NULL default '',
  236. `count` int(11) NOT NULL default '0',
  237. `sum` int(11) NOT NULL default '0',
  238. UNIQUE KEY `reaction` (`object_id`, `reaction`)
  239. );
  240. CREATE TABLE IF NOT EXISTS `bx_classes_reactions_track` (
  241. `id` int(11) NOT NULL AUTO_INCREMENT,
  242. `object_id` int(11) NOT NULL default '0',
  243. `author_id` int(11) NOT NULL default '0',
  244. `author_nip` int(11) unsigned NOT NULL default '0',
  245. `reaction` varchar(32) NOT NULL default '',
  246. `value` tinyint(4) NOT NULL default '0',
  247. `date` int(11) NOT NULL default '0',
  248. PRIMARY KEY (`id`),
  249. KEY `vote` (`object_id`, `author_nip`)
  250. );
  251. -- TABLE: views
  252. CREATE TABLE `bx_classes_views_track` (
  253. `object_id` int(11) NOT NULL default '0',
  254. `viewer_id` int(11) NOT NULL default '0',
  255. `viewer_nip` int(11) unsigned NOT NULL default '0',
  256. `date` int(11) NOT NULL default '0',
  257. KEY `id` (`object_id`,`viewer_id`,`viewer_nip`)
  258. );
  259. -- TABLE: metas
  260. CREATE TABLE `bx_classes_meta_keywords` (
  261. `object_id` int(10) unsigned NOT NULL,
  262. `keyword` varchar(255) NOT NULL,
  263. KEY `object_id` (`object_id`),
  264. KEY `keyword` (`keyword`)
  265. );
  266. CREATE TABLE `bx_classes_meta_mentions` (
  267. `object_id` int(10) unsigned NOT NULL,
  268. `profile_id` int(10) unsigned NOT NULL,
  269. KEY `object_id` (`object_id`),
  270. KEY `profile_id` (`profile_id`)
  271. );
  272. CREATE TABLE `bx_classes_meta_locations` (
  273. `object_id` int(10) unsigned NOT NULL,
  274. `lat` double NOT NULL,
  275. `lng` double NOT NULL,
  276. `country` varchar(2) NOT NULL,
  277. `state` varchar(255) NOT NULL,
  278. `city` varchar(255) NOT NULL,
  279. `zip` varchar(255) NOT NULL,
  280. `street` varchar(255) NOT NULL,
  281. `street_number` varchar(255) NOT NULL,
  282. PRIMARY KEY (`object_id`),
  283. KEY `country_state_city` (`country`,`state`(8),`city`(8))
  284. );
  285. -- TABLE: reports
  286. CREATE TABLE IF NOT EXISTS `bx_classes_reports` (
  287. `object_id` int(11) NOT NULL default '0',
  288. `count` int(11) NOT NULL default '0',
  289. UNIQUE KEY `object_id` (`object_id`)
  290. );
  291. CREATE TABLE IF NOT EXISTS `bx_classes_reports_track` (
  292. `id` int(11) NOT NULL AUTO_INCREMENT,
  293. `object_id` int(11) NOT NULL default '0',
  294. `author_id` int(11) NOT NULL default '0',
  295. `author_nip` int(11) unsigned NOT NULL default '0',
  296. `type` varchar(32) NOT NULL default '',
  297. `text` text NOT NULL default '',
  298. `date` int(11) NOT NULL default '0',
  299. PRIMARY KEY (`id`),
  300. KEY `report` (`object_id`, `author_nip`)
  301. );
  302. -- TABLE: favorites
  303. CREATE TABLE `bx_classes_favorites_track` (
  304. `object_id` int(11) NOT NULL default '0',
  305. `author_id` int(11) NOT NULL default '0',
  306. `date` int(11) NOT NULL default '0',
  307. KEY `id` (`object_id`,`author_id`)
  308. );
  309. -- TABLE: scores
  310. CREATE TABLE IF NOT EXISTS `bx_classes_scores` (
  311. `object_id` int(11) NOT NULL default '0',
  312. `count_up` int(11) NOT NULL default '0',
  313. `count_down` int(11) NOT NULL default '0',
  314. UNIQUE KEY `object_id` (`object_id`)
  315. );
  316. CREATE TABLE IF NOT EXISTS `bx_classes_scores_track` (
  317. `id` int(11) NOT NULL AUTO_INCREMENT,
  318. `object_id` int(11) NOT NULL default '0',
  319. `author_id` int(11) NOT NULL default '0',
  320. `author_nip` int(11) unsigned NOT NULL default '0',
  321. `type` varchar(8) NOT NULL default '',
  322. `date` int(11) NOT NULL default '0',
  323. PRIMARY KEY (`id`),
  324. KEY `vote` (`object_id`, `author_nip`)
  325. );
  326. -- TABLE: polls
  327. CREATE TABLE IF NOT EXISTS `bx_classes_polls` (
  328. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  329. `author_id` int(11) NOT NULL default '0',
  330. `content_id` int(11) NOT NULL default '0',
  331. `text` text NOT NULL,
  332. PRIMARY KEY (`id`),
  333. KEY `content_id` (`content_id`),
  334. FULLTEXT KEY `search_fields` (`text`)
  335. );
  336. CREATE TABLE IF NOT EXISTS `bx_classes_polls_answers` (
  337. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  338. `poll_id` int(11) unsigned NOT NULL default '0',
  339. `title` varchar(255) NOT NULL,
  340. `rate` float NOT NULL default '0',
  341. `votes` int(11) NOT NULL default '0',
  342. `order` int(11) NOT NULL default '0',
  343. PRIMARY KEY (`id`),
  344. KEY `poll_id` (`poll_id`),
  345. FULLTEXT KEY `title` (`title`)
  346. );
  347. CREATE TABLE IF NOT EXISTS `bx_classes_polls_answers_votes` (
  348. `object_id` int(11) NOT NULL default '0',
  349. `count` int(11) NOT NULL default '0',
  350. `sum` int(11) NOT NULL default '0',
  351. UNIQUE KEY `object_id` (`object_id`)
  352. );
  353. CREATE TABLE IF NOT EXISTS `bx_classes_polls_answers_votes_track` (
  354. `id` int(11) NOT NULL AUTO_INCREMENT,
  355. `object_id` int(11) NOT NULL default '0',
  356. `author_id` int(11) NOT NULL default '0',
  357. `author_nip` int(11) unsigned NOT NULL default '0',
  358. `value` tinyint(4) NOT NULL default '0',
  359. `date` int(11) NOT NULL default '0',
  360. PRIMARY KEY (`id`),
  361. KEY `vote` (`object_id`, `author_nip`)
  362. );
  363. -- STORAGES & TRANSCODERS
  364. SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
  365. 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
  366. ('bx_classes_covers', @sStorageEngine, '', 360, 2592000, 3, 'bx_classes_covers', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
  367. ('bx_classes_photos', @sStorageEngine, '', 360, 2592000, 3, 'bx_classes_photos', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
  368. ('bx_classes_photos_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_classes_photos_resized', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
  369. ('bx_classes_videos', @sStorageEngine, '', 360, 2592000, 3, 'bx_classes_videos', 'allow-deny', 'avi,flv,mpg,mpeg,wmv,mp4,m4v,mov,qt,divx,xvid,3gp,3g2,webm,mkv,ogv,ogg,rm,rmvb,asf,drc', '', 0, 0, 0, 0, 0, 0),
  370. ('bx_classes_videos_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_classes_videos_resized', '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),
  371. ('bx_classes_sounds', @sStorageEngine, '', 360, 2592000, 3, 'bx_classes_sounds', 'allow-deny', 'mp3,m4a,m4b,wma,wav,3gp', '', 0, 0, 0, 0, 0, 0),
  372. ('bx_classes_sounds_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_classes_sounds_resized', 'allow-deny', 'mp3,m4a,m4b,wma,wav,3gp', '', 0, 0, 0, 0, 0, 0),
  373. ('bx_classes_files', @sStorageEngine, '', 360, 2592000, 3, 'bx_classes_files', 'deny-allow', '', '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);
  374. 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
  375. ('bx_classes_preview', 'bx_classes_photos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_classes_covers";}', 'no', '1', '2592000', '0', '', ''),
  376. ('bx_classes_gallery', 'bx_classes_photos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_classes_covers";}', 'no', '1', '2592000', '0', '', ''),
  377. ('bx_classes_cover', 'bx_classes_photos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_classes_covers";}', 'no', '1', '2592000', '0', '', ''),
  378. ('bx_classes_preview_photos', 'bx_classes_photos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_classes_photos";}', 'no', '1', '2592000', '0', '', ''),
  379. ('bx_classes_gallery_photos', 'bx_classes_photos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_classes_photos";}', 'no', '1', '2592000', '0', '', ''),
  380. ('bx_classes_videos_poster', 'bx_classes_videos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_classes_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
  381. ('bx_classes_videos_poster_preview', 'bx_classes_videos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_classes_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
  382. ('bx_classes_videos_mp4', 'bx_classes_videos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_classes_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
  383. ('bx_classes_videos_mp4_hd', 'bx_classes_videos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_classes_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
  384. ('bx_classes_sounds_mp3', 'bx_classes_sounds_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_classes_sounds";}', 'no', '0', '0', '0', 'BxDolTranscoderAudio', ''),
  385. ('bx_classes_preview_files', 'bx_classes_photos_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_classes_files";}', 'no', '1', '2592000', '0', '', ''),
  386. ('bx_classes_gallery_files', 'bx_classes_photos_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_classes_files";}', 'no', '1', '2592000', '0', '', '');
  387. INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES
  388. ('bx_classes_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:11:"crop_resize";s:1:"1";}', '0'),
  389. ('bx_classes_gallery', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0'),
  390. ('bx_classes_cover', 'Resize', 'a:1:{s:1:"w";s:4:"2000";}', '0'),
  391. ('bx_classes_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'),
  392. ('bx_classes_gallery_photos', 'Resize', 'a:1:{s:1:"w";s:4:"2000";}', '0'),
  393. ('bx_classes_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),
  394. ('bx_classes_videos_poster_preview', 'Poster', 'a:2:{s:1:"h";s:3:"480";s:10:"force_type";s:3:"jpg";}', 0),
  395. ('bx_classes_videos_poster', 'Poster', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:3:"jpg";}', 0),
  396. ('bx_classes_videos_mp4', 'Mp4', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:3:"mp4";}', 0),
  397. ('bx_classes_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),
  398. ('bx_classes_sounds_mp3', 'Mp3', 'a:0:{}', 0),
  399. ('bx_classes_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'),
  400. ('bx_classes_gallery_files', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0');
  401. -- FORMS: entry (post)
  402. 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
  403. ('bx_classes', 'bx_classes', '_bx_classes_form_entry', '', 'a:1:{s:7:"enctype";s:19:"multipart/form-data";}', 'bx_classes_classes', 'id', '', '', 'a:2:{i:0;s:9:"do_submit";i:1;s:10:"do_publish";}', '', 0, 1, 'BxClssFormEntry', 'modules/boonex/classes/classes/BxClssFormEntry.php');
  404. INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`, `title`) VALUES
  405. ('bx_classes', 'bx_classes_entry_add', 'bx_classes', 0, '_bx_classes_form_entry_display_add'),
  406. ('bx_classes', 'bx_classes_entry_delete', 'bx_classes', 0, '_bx_classes_form_entry_display_delete'),
  407. ('bx_classes', 'bx_classes_entry_edit', 'bx_classes', 0, '_bx_classes_form_entry_display_edit'),
  408. ('bx_classes', 'bx_classes_entry_view', 'bx_classes', 1, '_bx_classes_form_entry_display_view');
  409. 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
  410. ('bx_classes', 'bx_classes', 'allow_view_to', '', '', 0, 'custom', '_bx_classes_form_entry_input_sys_allow_view_to', '_bx_classes_form_entry_input_allow_view_to', '', 1, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  411. ('bx_classes', 'bx_classes', 'delete_confirm', 1, '', 0, 'checkbox', '_bx_classes_form_entry_input_sys_delete_confirm', '_bx_classes_form_entry_input_delete_confirm', '_bx_classes_form_entry_input_delete_confirm_info', 1, 0, 0, '', '', '', 'Avail', '', '_bx_classes_form_entry_input_delete_confirm_error', '', '', 1, 0),
  412. ('bx_classes', 'bx_classes', 'do_publish', '_bx_classes_form_entry_input_do_publish', '', 0, 'submit', '_bx_classes_form_entry_input_sys_do_publish', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  413. ('bx_classes', 'bx_classes', 'do_submit', '_bx_classes_form_entry_input_do_submit', '', 0, 'submit', '_bx_classes_form_entry_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  414. ('bx_classes', 'bx_classes', 'location', '', '', 0, 'location', '_sys_form_input_sys_location', '_sys_form_input_location', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  415. ('bx_classes', 'bx_classes', 'covers', 'a:1:{i:0;s:16:"bx_classes_html5";}', 'a:2:{s:17:"bx_classes_simple";s:26:"_sys_uploader_simple_title";s:16:"bx_classes_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_classes_form_entry_input_sys_covers', '_bx_classes_form_entry_input_covers', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  416. ('bx_classes', 'bx_classes', 'pictures', 'a:1:{i:0;s:23:"bx_classes_photos_html5";}', 'a:2:{s:24:"bx_classes_photos_simple";s:26:"_sys_uploader_simple_title";s:23:"bx_classes_photos_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_classes_form_entry_input_sys_pictures', '_bx_classes_form_entry_input_pictures', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  417. ('bx_classes', 'bx_classes', 'videos', 'a:1:{i:0;s:23:"bx_classes_videos_html5";}', 'a:2:{s:24:"bx_classes_videos_simple";s:26:"_sys_uploader_simple_title";s:23:"bx_classes_videos_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_classes_form_entry_input_sys_videos', '_bx_classes_form_entry_input_videos', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  418. ('bx_classes', 'bx_classes', 'sounds', 'a:1:{i:0;s:23:"bx_classes_sounds_html5";}', 'a:2:{s:24:"bx_classes_sounds_simple";s:26:"_sys_uploader_simple_title";s:23:"bx_classes_sounds_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_classes_form_entry_input_sys_sounds', '_bx_classes_form_entry_input_sounds', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  419. ('bx_classes', 'bx_classes', 'files', 'a:1:{i:0;s:22:"bx_classes_files_html5";}', 'a:2:{s:23:"bx_classes_files_simple";s:26:"_sys_uploader_simple_title";s:22:"bx_classes_files_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_classes_form_entry_input_sys_files', '_bx_classes_form_entry_input_files', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  420. ('bx_classes', 'bx_classes', 'polls', '', '', 0, 'custom', '_bx_classes_form_entry_input_sys_polls', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  421. ('bx_classes', 'bx_classes', 'text', '', '', 0, 'textarea', '_bx_classes_form_entry_input_sys_text', '_bx_classes_form_entry_input_text', '', 1, 0, 2, '', '', '', 'Avail', '', '_bx_classes_form_entry_input_text_err', 'XssHtml', '', 1, 0),
  422. ('bx_classes', 'bx_classes', 'title', '', '', 0, 'text', '_bx_classes_form_entry_input_sys_title', '_bx_classes_form_entry_input_title', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_classes_form_entry_input_title_err', 'Xss', '', 1, 0),
  423. ('bx_classes', 'bx_classes', 'avail', '', '#!bx_classes_avail', 0, 'select', '', '_bx_classes_form_entry_input_avail', '', 1, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
  424. ('bx_classes', 'bx_classes', 'cmts', '2', '#!bx_classes_cmts', 0, 'select', '', '_bx_classes_form_entry_input_cmts', '', 1, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
  425. ('bx_classes', 'bx_classes', 'completed_when', '', '#!bx_classes_completed_when', 0, 'select', '', '_bx_classes_form_entry_input_completed_when', '', 1, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
  426. ('bx_classes', 'bx_classes', 'module_id', '', '', 0, 'select', '', '_bx_classes_form_entry_input_module', '', 1, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
  427. ('bx_classes', 'bx_classes', 'added', '', '', 0, 'datetime', '_bx_classes_form_entry_input_sys_date_added', '_bx_classes_form_entry_input_date_added', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  428. ('bx_classes', 'bx_classes', 'changed', '', '', 0, 'datetime', '_bx_classes_form_entry_input_sys_date_changed', '_bx_classes_form_entry_input_date_changed', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  429. ('bx_classes', 'bx_classes', 'start_date', '', '', 0, 'datetime', '', '_bx_classes_form_entry_input_date_start_date', '', 0, 0, 0, '', '', '', '', '', '', 'DateTimeUtc', '', 1, 0),
  430. ('bx_classes', 'bx_classes', 'end_date', '', '', 0, 'datetime', '', '_bx_classes_form_entry_input_date_end_date', '', 0, 0, 0, '', '', '', '', '', '', 'DateTimeUtc', '', 1, 0),
  431. ('bx_classes', 'bx_classes', 'attachments', '', '', 0, 'custom', '_bx_classes_form_entry_input_sys_attachments', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  432. ('bx_classes', 'bx_classes', 'labels', '', '', 0, 'custom', '_sys_form_input_sys_labels', '_sys_form_input_labels', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  433. ('bx_classes', 'bx_classes', 'anonymous', '', '', 0, 'switcher', '_sys_form_input_sys_anonymous', '_sys_form_input_anonymous', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0);
  434. INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
  435. ('bx_classes_entry_add', 'covers', 2147483647, 1, 1),
  436. ('bx_classes_entry_add', 'module_id', 2147483647, 1, 2),
  437. ('bx_classes_entry_add', 'title', 2147483647, 1, 3),
  438. ('bx_classes_entry_add', 'text', 2147483647, 1, 4),
  439. ('bx_classes_entry_add', 'attachments', 2147483647, 1, 5),
  440. ('bx_classes_entry_add', 'pictures', 2147483647, 1, 6),
  441. ('bx_classes_entry_add', 'videos', 2147483647, 1, 7),
  442. ('bx_classes_entry_add', 'sounds', 2147483647, 1, 8),
  443. ('bx_classes_entry_add', 'files', 2147483647, 1, 9),
  444. ('bx_classes_entry_add', 'polls', 2147483647, 1, 10),
  445. ('bx_classes_entry_add', 'start_date', 2147483647, 1, 11),
  446. ('bx_classes_entry_add', 'end_date', 2147483647, 1, 12),
  447. ('bx_classes_entry_add', 'completed_when', 2147483647, 1, 13),
  448. ('bx_classes_entry_add', 'avail', 2147483647, 1, 14),
  449. ('bx_classes_entry_add', 'cmts', 2147483647, 1, 15),
  450. ('bx_classes_entry_add', 'allow_view_to', 2147483647, 1, 16),
  451. ('bx_classes_entry_add', 'do_publish', 2147483647, 1, 17),
  452. ('bx_classes_entry_delete', 'delete_confirm', 2147483647, 1, 1),
  453. ('bx_classes_entry_delete', 'do_submit', 2147483647, 1, 2),
  454. ('bx_classes_entry_edit', 'covers', 2147483647, 1, 1),
  455. ('bx_classes_entry_edit', 'module_id', 2147483647, 1, 2),
  456. ('bx_classes_entry_edit', 'title', 2147483647, 1, 3),
  457. ('bx_classes_entry_edit', 'text', 2147483647, 1, 4),
  458. ('bx_classes_entry_edit', 'attachments', 2147483647, 1, 5),
  459. ('bx_classes_entry_edit', 'pictures', 2147483647, 1, 6),
  460. ('bx_classes_entry_edit', 'videos', 2147483647, 1, 7),
  461. ('bx_classes_entry_edit', 'sounds', 2147483647, 1, 8),
  462. ('bx_classes_entry_edit', 'files', 2147483647, 1, 9),
  463. ('bx_classes_entry_edit', 'polls', 2147483647, 1, 10),
  464. ('bx_classes_entry_edit', 'start_date', 2147483647, 1, 11),
  465. ('bx_classes_entry_edit', 'end_date', 2147483647, 1, 12),
  466. ('bx_classes_entry_edit', 'completed_when', 2147483647, 1, 13),
  467. ('bx_classes_entry_edit', 'avail', 2147483647, 1, 14),
  468. ('bx_classes_entry_edit', 'cmts', 2147483647, 1, 15),
  469. ('bx_classes_entry_edit', 'allow_view_to', 2147483647, 1, 16),
  470. ('bx_classes_entry_edit', 'do_submit', 2147483647, 1, 17),
  471. ('bx_classes_entry_view', 'module_id', 2147483647, 1, 1),
  472. ('bx_classes_entry_view', 'completed_when', 2147483647, 1, 2),
  473. ('bx_classes_entry_view', 'added', 2147483647, 1, 3),
  474. ('bx_classes_entry_view', 'changed', 2147483647, 1, 4),
  475. ('bx_classes_entry_view', 'start_date', 2147483647, 1, 5),
  476. ('bx_classes_entry_view', 'end_date', 2147483647, 1, 6);
  477. -- FORMS: poll
  478. 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
  479. ('bx_classes_poll', 'bx_classes', '_bx_classes_form_poll', '', '', 'do_submit', 'bx_classes_polls', 'id', '', '', 'a:1:{s:14:"checker_helper";s:27:"BxClssFormPollCheckerHelper";}', 0, 1, 'BxClssFormPoll', 'modules/boonex/classes/classes/BxClssFormPoll.php');
  480. INSERT INTO `sys_form_displays` (`display_name`, `module`, `object`, `title`, `view_mode`) VALUES
  481. ('bx_classes_poll_add', 'bx_classes', 'bx_classes_poll', '_bx_classes_form_poll_display_add', 0);
  482. 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
  483. ('bx_classes_poll', 'bx_classes', 'text', '', '', 0, 'text', '_bx_classes_form_poll_input_sys_text', '_bx_classes_form_poll_input_text', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_classes_form_poll_input_text_err', 'Xss', '', 1, 0),
  484. ('bx_classes_poll', 'bx_classes', 'answers', '', '', 0, 'custom', '_bx_classes_form_poll_input_sys_answers', '_bx_classes_form_poll_input_answers', '', 1, 0, 0, '', '', '', 'AvailAnswers', '', '_bx_classes_form_poll_input_answers_err', '', '', 1, 0),
  485. ('bx_classes_poll', 'bx_classes', 'controls', '', 'do_submit,do_cancel', 0, 'input_set', '', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  486. ('bx_classes_poll', 'bx_classes', 'do_submit', '_bx_classes_form_poll_input_do_submit', '', 0, 'submit', '_bx_classes_form_poll_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  487. ('bx_classes_poll', 'bx_classes', 'do_cancel', '_bx_classes_form_poll_input_do_cancel', '', 0, 'button', '_bx_classes_form_poll_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);
  488. INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
  489. ('bx_classes_poll_add', 'text', 2147483647, 1, 1),
  490. ('bx_classes_poll_add', 'answers', 2147483647, 1, 2),
  491. ('bx_classes_poll_add', 'controls', 2147483647, 1, 3),
  492. ('bx_classes_poll_add', 'do_submit', 2147483647, 1, 4),
  493. ('bx_classes_poll_add', 'do_cancel', 2147483647, 1, 5);
  494. -- PRE-VALUES
  495. INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES
  496. ('bx_classes_avail', '_bx_classes_pre_lists_availability', 'bx_classes', '0');
  497. INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
  498. ('bx_classes_avail', '1', 1, '_bx_classes_avail_always', ''),
  499. ('bx_classes_avail', '2', 2, '_bx_classes_avail_prev_class_completed', ''),
  500. ('bx_classes_avail', '3', 3, '_bx_classes_avail_after_start_date', ''),
  501. ('bx_classes_avail', '4', 4, '_bx_classes_avail_after_start_date_prev_class_completed', ''),
  502. ('bx_classes_avail', '5', 5, '_bx_classes_avail_between_start_end_dates', ''),
  503. ('bx_classes_avail', '6', 6, '_bx_classes_avail_between_start_end_dates_prev_completed', '');
  504. INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES
  505. ('bx_classes_cmts', '_bx_classes_pre_lists_cmts', 'bx_classes', '0');
  506. INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
  507. ('bx_classes_cmts', '1', 1, '_bx_classes_cmts_disabled', ''),
  508. ('bx_classes_cmts', '2', 2, '_bx_classes_cmts_all_shown', '');
  509. INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES
  510. ('bx_classes_completed_when', '_bx_classes_pre_lists_completed_when', 'bx_classes', '0');
  511. INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
  512. ('bx_classes_completed_when', '1', 1, '_bx_classes_completed_when_viewed', ''),
  513. ('bx_classes_completed_when', '2', 2, '_bx_classes_completed_when_replied', '');
  514. -- COMMENTS
  515. 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
  516. ('bx_classes', 'bx_classes', 'bx_classes_cmts', 1, 5000, 1000, 3, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-class&id={object_id}', '', 'bx_classes_classes', 'id', 'author', 'title', 'comments', '', ''),
  517. ('bx_classes_notes', 'bx_classes', 'bx_classes_cmts_notes', 1, 5000, 1000, 3, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-class&id={object_id}', '', 'bx_classes_classes', 'id', 'author', 'title', 'comments', '', '');
  518. -- VOTES
  519. INSERT INTO `sys_objects_vote` (`Name`, `TableMain`, `TableTrack`, `PostTimeout`, `MinValue`, `MaxValue`, `IsUndo`, `IsOn`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldRate`, `TriggerFieldRateCount`, `ClassName`, `ClassFile`) VALUES
  520. ('bx_classes', 'bx_classes_votes', 'bx_classes_votes_track', '604800', '1', '1', '0', '1', 'bx_classes_classes', 'id', 'author', 'rate', 'votes', '', ''),
  521. ('bx_classes_reactions', 'bx_classes_reactions', 'bx_classes_reactions_track', '604800', '1', '1', '1', '1', 'bx_classes_classes', 'id', 'author', 'rrate', 'rvotes', 'BxTemplVoteReactions', ''),
  522. ('bx_classes_poll_answers', 'bx_classes_polls_answers_votes', 'bx_classes_polls_answers_votes_track', '604800', '1', '1', '0', '1', 'bx_classes_polls_answers', 'id', 'author_id', 'rate', 'votes', 'BxClssVotePollAnswers', 'modules/boonex/classes/classes/BxClssVotePollAnswers.php');
  523. -- SCORES
  524. 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
  525. ('bx_classes', 'bx_classes', 'bx_classes_scores', 'bx_classes_scores_track', '604800', '0', 'bx_classes_classes', 'id', 'author', 'score', 'sc_up', 'sc_down', '', '');
  526. -- REPORTS
  527. 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
  528. ('bx_classes', 'bx_classes', 'bx_classes_reports', 'bx_classes_reports_track', '1', 'page.php?i=view-class&id={object_id}', 'bx_classes_notes', 'bx_classes_classes', 'id', 'author', 'reports', '', '');
  529. -- VIEWS
  530. 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
  531. ('bx_classes', 'bx_classes_views_track', '86400', '1', 'bx_classes_classes', 'id', 'author', 'views', '', '');
  532. -- FAFORITES
  533. 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
  534. ('bx_classes', 'bx_classes_favorites_track', '1', '1', '1', 'page.php?i=view-class&id={object_id}', 'bx_classes_classes', 'id', 'author', 'favorites', '', '');
  535. -- FEATURED
  536. 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
  537. ('bx_classes', 'bx_classes', '1', '1', 'page.php?i=view-class&id={object_id}', 'bx_classes_classes', 'id', 'author', 'featured', '', '');
  538. -- CONTENT INFO
  539. INSERT INTO `sys_objects_content_info` (`name`, `title`, `alert_unit`, `alert_action_add`, `alert_action_update`, `alert_action_delete`, `class_name`, `class_file`) VALUES
  540. ('bx_classes', '_bx_classes', 'bx_classes', 'added', 'edited', 'deleted', '', ''),
  541. ('bx_classes_cmts', '_bx_classes_cmts', 'bx_classes', 'commentPost', 'commentUpdated', 'commentRemoved', 'BxDolContentInfoCmts', '');
  542. INSERT INTO `sys_content_info_grids` (`object`, `grid_object`, `grid_field_id`, `condition`, `selection`) VALUES
  543. ('bx_classes', 'bx_classes_administration', 'id', '', ''),
  544. ('bx_classes', 'bx_classes_common', 'id', '', '');
  545. -- SEARCH EXTENDED
  546. INSERT INTO `sys_objects_search_extended` (`object`, `object_content_info`, `module`, `title`, `active`, `class_name`, `class_file`) VALUES
  547. ('bx_classes', 'bx_classes', 'bx_classes', '_bx_classes_search_extended', 1, '', ''),
  548. ('bx_classes_cmts', 'bx_classes_cmts', 'bx_classes', '_bx_classes_search_extended_cmts', 1, 'BxTemplSearchExtendedCmts', '');
  549. -- STUDIO: page & widget
  550. INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
  551. (3, 'bx_classes', '_bx_classes', '_bx_classes', 'bx_classes@modules/boonex/classes/|std-icon.svg');
  552. SET @iPageId = LAST_INSERT_ID();
  553. SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
  554. SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
  555. INSERT INTO `sys_std_widgets` (`page_id`, `module`, `type`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
  556. (@iPageId, 'bx_classes', 'content', '{url_studio}module.php?name=bx_classes', '', 'bx_classes@modules/boonex/classes/|std-icon.svg', '_bx_classes', '', '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";}');
  557. INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
  558. (@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));