install.sql 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574
  1. -- TABLE: entries
  2. CREATE TABLE IF NOT EXISTS `bx_reviews_reviews` (
  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. `cat` int(11) NOT NULL,
  11. `multicat` text NOT NULL,
  12. `text` mediumtext NOT NULL,
  13. `labels` text NOT NULL,
  14. `location` text NOT NULL,
  15. `views` int(11) NOT NULL default '0',
  16. `rate` float NOT NULL default '0',
  17. `votes` int(11) NOT NULL default '0',
  18. `rrate` float NOT NULL default '0',
  19. `rvotes` int(11) NOT NULL default '0',
  20. `score` int(11) NOT NULL default '0',
  21. `sc_up` int(11) NOT NULL default '0',
  22. `sc_down` int(11) NOT NULL default '0',
  23. `favorites` int(11) NOT NULL default '0',
  24. `comments` int(11) NOT NULL default '0',
  25. `reports` int(11) NOT NULL default '0',
  26. `featured` int(11) NOT NULL default '0',
  27. `allow_view_to` varchar(16) NOT NULL DEFAULT '3',
  28. `disable_comments` tinyint(4) NOT NULL DEFAULT '0',
  29. `status` enum('active','awaiting','failed','hidden') NOT NULL DEFAULT 'active',
  30. `status_admin` enum('active','hidden') NOT NULL DEFAULT 'active',
  31. PRIMARY KEY (`id`),
  32. FULLTEXT KEY `title_text` (`title`,`text`)
  33. );
  34. -- TABLE: storages & transcoders
  35. CREATE TABLE IF NOT EXISTS `bx_reviews_covers` (
  36. `id` int(11) NOT NULL AUTO_INCREMENT,
  37. `profile_id` int(10) unsigned NOT NULL,
  38. `remote_id` varchar(128) NOT NULL,
  39. `path` varchar(255) NOT NULL,
  40. `file_name` varchar(255) NOT NULL,
  41. `mime_type` varchar(128) NOT NULL,
  42. `ext` varchar(32) NOT NULL,
  43. `size` bigint(20) NOT NULL,
  44. `added` int(11) NOT NULL,
  45. `modified` int(11) NOT NULL,
  46. `private` int(11) NOT NULL,
  47. PRIMARY KEY (`id`),
  48. UNIQUE KEY `remote_id` (`remote_id`)
  49. );
  50. CREATE TABLE IF NOT EXISTS `bx_reviews_files` (
  51. `id` int(11) NOT NULL AUTO_INCREMENT,
  52. `profile_id` int(10) unsigned NOT NULL,
  53. `remote_id` varchar(128) NOT NULL,
  54. `path` varchar(255) NOT NULL,
  55. `file_name` varchar(255) NOT NULL,
  56. `mime_type` varchar(128) NOT NULL,
  57. `ext` varchar(32) NOT NULL,
  58. `size` bigint(20) NOT NULL,
  59. `added` int(11) NOT NULL,
  60. `modified` int(11) NOT NULL,
  61. `private` int(11) NOT NULL,
  62. PRIMARY KEY (`id`),
  63. UNIQUE KEY `remote_id` (`remote_id`)
  64. );
  65. CREATE TABLE IF NOT EXISTS `bx_reviews_photos` (
  66. `id` int(11) NOT NULL AUTO_INCREMENT,
  67. `profile_id` int(10) unsigned NOT NULL,
  68. `remote_id` varchar(128) NOT NULL,
  69. `path` varchar(255) NOT NULL,
  70. `file_name` varchar(255) NOT NULL,
  71. `mime_type` varchar(128) NOT NULL,
  72. `ext` varchar(32) NOT NULL,
  73. `size` bigint(20) NOT NULL,
  74. `added` int(11) NOT NULL,
  75. `modified` int(11) NOT NULL,
  76. `private` int(11) NOT NULL,
  77. PRIMARY KEY (`id`),
  78. UNIQUE KEY `remote_id` (`remote_id`)
  79. );
  80. CREATE TABLE IF NOT EXISTS `bx_reviews_photos_resized` (
  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_reviews_videos` (
  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_reviews_videos_resized` (
  111. `id` int(11) NOT NULL AUTO_INCREMENT,
  112. `profile_id` int(10) unsigned NOT NULL,
  113. `remote_id` varchar(128) NOT NULL,
  114. `path` varchar(255) NOT NULL,
  115. `file_name` varchar(255) NOT NULL,
  116. `mime_type` varchar(128) NOT NULL,
  117. `ext` varchar(32) NOT NULL,
  118. `size` bigint(20) NOT NULL,
  119. `added` int(11) NOT NULL,
  120. `modified` int(11) NOT NULL,
  121. `private` int(11) NOT NULL,
  122. PRIMARY KEY (`id`),
  123. UNIQUE KEY `remote_id` (`remote_id`)
  124. );
  125. -- TABLE: comments
  126. CREATE TABLE IF NOT EXISTS `bx_reviews_cmts` (
  127. `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
  128. `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
  129. `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
  130. `cmt_object_id` int(11) NOT NULL DEFAULT '0',
  131. `cmt_author_id` int(11) NOT NULL DEFAULT '0',
  132. `cmt_level` int(11) NOT NULL DEFAULT '0',
  133. `cmt_text` text NOT NULL,
  134. `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',
  135. `cmt_rate` int(11) NOT NULL DEFAULT '0',
  136. `cmt_rate_count` int(11) NOT NULL DEFAULT '0',
  137. `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
  138. `cmt_replies` int(11) NOT NULL DEFAULT '0',
  139. PRIMARY KEY (`cmt_id`),
  140. KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
  141. FULLTEXT KEY `search_fields` (`cmt_text`)
  142. );
  143. CREATE TABLE IF NOT EXISTS `bx_reviews_cmts_notes` (
  144. `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
  145. `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
  146. `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
  147. `cmt_object_id` int(11) NOT NULL DEFAULT '0',
  148. `cmt_author_id` int(11) NOT NULL DEFAULT '0',
  149. `cmt_level` int(11) NOT NULL DEFAULT '0',
  150. `cmt_text` text NOT NULL,
  151. `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',
  152. `cmt_rate` int(11) NOT NULL DEFAULT '0',
  153. `cmt_rate_count` int(11) NOT NULL DEFAULT '0',
  154. `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
  155. `cmt_replies` int(11) NOT NULL DEFAULT '0',
  156. PRIMARY KEY (`cmt_id`),
  157. KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
  158. FULLTEXT KEY `search_fields` (`cmt_text`)
  159. );
  160. -- TABLE: votes
  161. CREATE TABLE IF NOT EXISTS `bx_reviews_votes` (
  162. `object_id` int(11) NOT NULL default '0',
  163. `count` int(11) NOT NULL default '0',
  164. `sum` int(11) NOT NULL default '0',
  165. UNIQUE KEY `object_id` (`object_id`)
  166. );
  167. CREATE TABLE IF NOT EXISTS `bx_reviews_votes_track` (
  168. `id` int(11) NOT NULL AUTO_INCREMENT,
  169. `object_id` int(11) NOT NULL default '0',
  170. `author_id` int(11) NOT NULL default '0',
  171. `author_nip` int(11) unsigned NOT NULL default '0',
  172. `value` tinyint(4) NOT NULL default '0',
  173. `date` int(11) NOT NULL default '0',
  174. PRIMARY KEY (`id`),
  175. KEY `vote` (`object_id`, `author_nip`)
  176. );
  177. CREATE TABLE IF NOT EXISTS `bx_reviews_reactions` (
  178. `object_id` int(11) NOT NULL default '0',
  179. `reaction` varchar(32) NOT NULL default '',
  180. `count` int(11) NOT NULL default '0',
  181. `sum` int(11) NOT NULL default '0',
  182. UNIQUE KEY `reaction` (`object_id`, `reaction`)
  183. );
  184. CREATE TABLE IF NOT EXISTS `bx_reviews_reactions_track` (
  185. `id` int(11) NOT NULL AUTO_INCREMENT,
  186. `object_id` int(11) NOT NULL default '0',
  187. `author_id` int(11) NOT NULL default '0',
  188. `author_nip` int(11) unsigned NOT NULL default '0',
  189. `reaction` varchar(32) NOT NULL default '',
  190. `value` tinyint(4) NOT NULL default '0',
  191. `date` int(11) NOT NULL default '0',
  192. PRIMARY KEY (`id`),
  193. KEY `vote` (`object_id`, `author_nip`)
  194. );
  195. -- TABLE: views
  196. CREATE TABLE `bx_reviews_views_track` (
  197. `object_id` int(11) NOT NULL default '0',
  198. `viewer_id` int(11) NOT NULL default '0',
  199. `viewer_nip` int(11) unsigned NOT NULL default '0',
  200. `date` int(11) NOT NULL default '0',
  201. KEY `id` (`object_id`,`viewer_id`,`viewer_nip`)
  202. );
  203. -- TABLE: metas
  204. CREATE TABLE `bx_reviews_meta_keywords` (
  205. `object_id` int(10) unsigned NOT NULL,
  206. `keyword` varchar(255) NOT NULL,
  207. KEY `object_id` (`object_id`),
  208. KEY `keyword` (`keyword`)
  209. );
  210. CREATE TABLE `bx_reviews_meta_mentions` (
  211. `object_id` int(10) unsigned NOT NULL,
  212. `profile_id` int(10) unsigned NOT NULL,
  213. KEY `object_id` (`object_id`),
  214. KEY `profile_id` (`profile_id`)
  215. );
  216. CREATE TABLE `bx_reviews_meta_locations` (
  217. `object_id` int(10) unsigned NOT NULL,
  218. `lat` double NOT NULL,
  219. `lng` double NOT NULL,
  220. `country` varchar(2) NOT NULL,
  221. `state` varchar(255) NOT NULL,
  222. `city` varchar(255) NOT NULL,
  223. `zip` varchar(255) NOT NULL,
  224. `street` varchar(255) NOT NULL,
  225. `street_number` varchar(255) NOT NULL,
  226. PRIMARY KEY (`object_id`),
  227. KEY `country_state_city` (`country`,`state`(8),`city`(8))
  228. );
  229. -- TABLE: reports
  230. CREATE TABLE IF NOT EXISTS `bx_reviews_reports` (
  231. `object_id` int(11) NOT NULL default '0',
  232. `count` int(11) NOT NULL default '0',
  233. UNIQUE KEY `object_id` (`object_id`)
  234. );
  235. CREATE TABLE IF NOT EXISTS `bx_reviews_reports_track` (
  236. `id` int(11) NOT NULL AUTO_INCREMENT,
  237. `object_id` int(11) NOT NULL default '0',
  238. `author_id` int(11) NOT NULL default '0',
  239. `author_nip` int(11) unsigned NOT NULL default '0',
  240. `type` varchar(32) NOT NULL default '',
  241. `text` text NOT NULL default '',
  242. `date` int(11) NOT NULL default '0',
  243. PRIMARY KEY (`id`),
  244. KEY `report` (`object_id`, `author_nip`)
  245. );
  246. -- TABLE: favorites
  247. CREATE TABLE `bx_reviews_favorites_track` (
  248. `object_id` int(11) NOT NULL default '0',
  249. `author_id` int(11) NOT NULL default '0',
  250. `date` int(11) NOT NULL default '0',
  251. KEY `id` (`object_id`,`author_id`)
  252. );
  253. -- TABLE: scores
  254. CREATE TABLE IF NOT EXISTS `bx_reviews_scores` (
  255. `object_id` int(11) NOT NULL default '0',
  256. `count_up` int(11) NOT NULL default '0',
  257. `count_down` int(11) NOT NULL default '0',
  258. UNIQUE KEY `object_id` (`object_id`)
  259. );
  260. CREATE TABLE IF NOT EXISTS `bx_reviews_scores_track` (
  261. `id` int(11) NOT NULL AUTO_INCREMENT,
  262. `object_id` int(11) NOT NULL default '0',
  263. `author_id` int(11) NOT NULL default '0',
  264. `author_nip` int(11) unsigned NOT NULL default '0',
  265. `type` varchar(8) NOT NULL default '',
  266. `date` int(11) NOT NULL default '0',
  267. PRIMARY KEY (`id`),
  268. KEY `vote` (`object_id`, `author_nip`)
  269. );
  270. -- TABLE: polls
  271. CREATE TABLE IF NOT EXISTS `bx_reviews_polls` (
  272. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  273. `author_id` int(11) NOT NULL default '0',
  274. `content_id` int(11) NOT NULL default '0',
  275. `text` text NOT NULL,
  276. PRIMARY KEY (`id`),
  277. KEY `content_id` (`content_id`),
  278. FULLTEXT KEY `search_fields` (`text`)
  279. );
  280. CREATE TABLE IF NOT EXISTS `bx_reviews_polls_answers` (
  281. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  282. `poll_id` int(11) unsigned NOT NULL default '0',
  283. `title` varchar(255) NOT NULL,
  284. `rate` float NOT NULL default '0',
  285. `votes` int(11) NOT NULL default '0',
  286. `order` int(11) NOT NULL default '0',
  287. PRIMARY KEY (`id`),
  288. KEY `poll_id` (`poll_id`),
  289. FULLTEXT KEY `title` (`title`)
  290. );
  291. CREATE TABLE IF NOT EXISTS `bx_reviews_polls_answers_votes` (
  292. `object_id` int(11) NOT NULL default '0',
  293. `count` int(11) NOT NULL default '0',
  294. `sum` int(11) NOT NULL default '0',
  295. UNIQUE KEY `object_id` (`object_id`)
  296. );
  297. CREATE TABLE IF NOT EXISTS `bx_reviews_polls_answers_votes_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. `author_nip` int(11) unsigned NOT NULL default '0',
  302. `value` tinyint(4) NOT NULL default '0',
  303. `date` int(11) NOT NULL default '0',
  304. PRIMARY KEY (`id`),
  305. KEY `vote` (`object_id`, `author_nip`)
  306. );
  307. -- STORAGES & TRANSCODERS
  308. SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
  309. 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
  310. ('bx_reviews_covers', @sStorageEngine, '', 360, 2592000, 3, 'bx_reviews_covers', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
  311. ('bx_reviews_photos', @sStorageEngine, '', 360, 2592000, 3, 'bx_reviews_photos', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
  312. ('bx_reviews_photos_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_reviews_photos_resized', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
  313. ('bx_reviews_videos', @sStorageEngine, '', 360, 2592000, 3, 'bx_reviews_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),
  314. ('bx_reviews_videos_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_reviews_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),
  315. ('bx_reviews_files', @sStorageEngine, '', 360, 2592000, 3, 'bx_reviews_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);
  316. 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
  317. ('bx_reviews_preview', 'bx_reviews_photos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_reviews_covers";}', 'no', '1', '2592000', '0', '', ''),
  318. ('bx_reviews_gallery', 'bx_reviews_photos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_reviews_covers";}', 'no', '1', '2592000', '0', '', ''),
  319. ('bx_reviews_cover', 'bx_reviews_photos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_reviews_covers";}', 'no', '1', '2592000', '0', '', ''),
  320. ('bx_reviews_preview_photos', 'bx_reviews_photos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_reviews_photos";}', 'no', '1', '2592000', '0', '', ''),
  321. ('bx_reviews_gallery_photos', 'bx_reviews_photos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_reviews_photos";}', 'no', '1', '2592000', '0', '', ''),
  322. ('bx_reviews_videos_poster', 'bx_reviews_videos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_reviews_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
  323. ('bx_reviews_videos_poster_preview', 'bx_reviews_videos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_reviews_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
  324. ('bx_reviews_videos_mp4', 'bx_reviews_videos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_reviews_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
  325. ('bx_reviews_videos_mp4_hd', 'bx_reviews_videos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_reviews_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
  326. ('bx_reviews_preview_files', 'bx_reviews_photos_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_reviews_files";}', 'no', '1', '2592000', '0', '', ''),
  327. ('bx_reviews_gallery_files', 'bx_reviews_photos_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_reviews_files";}', 'no', '1', '2592000', '0', '', '');
  328. INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES
  329. ('bx_reviews_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:11:"crop_resize";s:1:"1";}', '0'),
  330. ('bx_reviews_gallery', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0'),
  331. ('bx_reviews_cover', 'Resize', 'a:1:{s:1:"w";s:4:"2000";}', '0'),
  332. ('bx_reviews_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'),
  333. ('bx_reviews_gallery_photos', 'Resize', 'a:1:{s:1:"w";s:4:"2000";}', '0'),
  334. ('bx_reviews_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),
  335. ('bx_reviews_videos_poster_preview', 'Poster', 'a:2:{s:1:"h";s:3:"480";s:10:"force_type";s:3:"jpg";}', 0),
  336. ('bx_reviews_videos_poster', 'Poster', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:3:"jpg";}', 0),
  337. ('bx_reviews_videos_mp4', 'Mp4', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:3:"mp4";}', 0),
  338. ('bx_reviews_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),
  339. ('bx_reviews_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'),
  340. ('bx_reviews_gallery_files', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0');
  341. -- FORMS: entry (review)
  342. 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
  343. ('bx_reviews', 'bx_reviews', '_bx_reviews_form_entry', '', 'a:1:{s:7:"enctype";s:19:"multipart/form-data";}', 'bx_reviews_reviews', 'id', '', '', 'a:2:{i:0;s:9:"do_submit";i:1;s:10:"do_publish";}', '', 0, 1, 'BxReviewsFormEntry', 'modules/boonex/reviews/classes/BxReviewsFormEntry.php');
  344. INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`, `title`) VALUES
  345. ('bx_reviews', 'bx_reviews_entry_add', 'bx_reviews', 0, '_bx_reviews_form_entry_display_add'),
  346. ('bx_reviews', 'bx_reviews_entry_delete', 'bx_reviews', 0, '_bx_reviews_form_entry_display_delete'),
  347. ('bx_reviews', 'bx_reviews_entry_edit', 'bx_reviews', 0, '_bx_reviews_form_entry_display_edit'),
  348. ('bx_reviews', 'bx_reviews_entry_view', 'bx_reviews', 1, '_bx_reviews_form_entry_display_view');
  349. 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
  350. ('bx_reviews', 'bx_reviews', 'allow_view_to', '', '', 0, 'custom', '_bx_reviews_form_entry_input_sys_allow_view_to', '_bx_reviews_form_entry_input_allow_view_to', '', 1, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  351. ('bx_reviews', 'bx_reviews', 'delete_confirm', 1, '', 0, 'checkbox', '_bx_reviews_form_entry_input_sys_delete_confirm', '_bx_reviews_form_entry_input_delete_confirm', '_bx_reviews_form_entry_input_delete_confirm_info', 1, 0, 0, '', '', '', 'Avail', '', '_bx_reviews_form_entry_input_delete_confirm_error', '', '', 1, 0),
  352. ('bx_reviews', 'bx_reviews', 'do_publish', '_bx_reviews_form_entry_input_do_publish', '', 0, 'submit', '_bx_reviews_form_entry_input_sys_do_publish', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  353. ('bx_reviews', 'bx_reviews', 'do_submit', '_bx_reviews_form_entry_input_do_submit', '', 0, 'submit', '_bx_reviews_form_entry_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  354. ('bx_reviews', 'bx_reviews', 'location', '', '', 0, 'location', '_sys_form_input_sys_location', '_sys_form_input_location', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  355. ('bx_reviews', 'bx_reviews', 'covers', 'a:1:{i:0;s:16:"bx_reviews_html5";}', 'a:2:{s:17:"bx_reviews_simple";s:26:"_sys_uploader_simple_title";s:16:"bx_reviews_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_reviews_form_entry_input_sys_covers', '_bx_reviews_form_entry_input_covers', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  356. ('bx_reviews', 'bx_reviews', 'pictures', 'a:1:{i:0;s:23:"bx_reviews_photos_html5";}', 'a:2:{s:24:"bx_reviews_photos_simple";s:26:"_sys_uploader_simple_title";s:23:"bx_reviews_photos_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_reviews_form_entry_input_sys_pictures', '_bx_reviews_form_entry_input_pictures', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  357. ('bx_reviews', 'bx_reviews', 'videos', 'a:1:{i:0;s:23:"bx_reviews_videos_html5";}', 'a:2:{s:24:"bx_reviews_videos_simple";s:26:"_sys_uploader_simple_title";s:23:"bx_reviews_videos_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_reviews_form_entry_input_sys_videos', '_bx_reviews_form_entry_input_videos', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  358. ('bx_reviews', 'bx_reviews', 'files', 'a:1:{i:0;s:22:"bx_reviews_files_html5";}', 'a:2:{s:23:"bx_reviews_files_simple";s:26:"_sys_uploader_simple_title";s:22:"bx_reviews_files_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_reviews_form_entry_input_sys_files', '_bx_reviews_form_entry_input_files', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  359. ('bx_reviews', 'bx_reviews', 'polls', '', '', 0, 'custom', '_bx_reviews_form_entry_input_sys_polls', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  360. ('bx_reviews', 'bx_reviews', 'text', '', '', 0, 'textarea', '_bx_reviews_form_entry_input_sys_text', '_bx_reviews_form_entry_input_text', '', 1, 0, 2, '', '', '', 'Avail', '', '_bx_reviews_form_entry_input_text_err', 'XssHtml', '', 1, 0),
  361. ('bx_reviews', 'bx_reviews', 'title', '', '', 0, 'text', '_bx_reviews_form_entry_input_sys_title', '_bx_reviews_form_entry_input_title', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_reviews_form_entry_input_title_err', 'Xss', '', 1, 0),
  362. ('bx_reviews', 'bx_reviews', 'cat', '', '#!bx_reviews_cats', 0, 'select', '_bx_reviews_form_entry_input_sys_cat', '_bx_reviews_form_entry_input_cat', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_reviews_form_entry_input_cat_err', 'Xss', '', 1, 0),
  363. ('bx_reviews', 'bx_reviews', 'multicat', '', '', 0, 'custom', '_bx_reviews_form_entry_input_sys_multicat', '_bx_reviews_form_entry_input_multicat', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_reviews_form_entry_input_multicat_err', 'Xss', '', 1, 0),
  364. ('bx_reviews', 'bx_reviews', 'added', '', '', 0, 'datetime', '_bx_reviews_form_entry_input_sys_date_added', '_bx_reviews_form_entry_input_date_added', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  365. ('bx_reviews', 'bx_reviews', 'changed', '', '', 0, 'datetime', '_bx_reviews_form_entry_input_sys_date_changed', '_bx_reviews_form_entry_input_date_changed', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  366. ('bx_reviews', 'bx_reviews', 'published', '', '', 0, 'datetime', '_bx_reviews_form_entry_input_sys_date_published', '_bx_reviews_form_entry_input_date_published', '_bx_reviews_form_entry_input_date_published_info', 0, 0, 0, '', '', '', '', '', '', 'DateTimeTs', '', 1, 0),
  367. ('bx_reviews', 'bx_reviews', 'attachments', '', '', 0, 'custom', '_bx_reviews_form_entry_input_sys_attachments', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  368. ('bx_reviews', 'bx_reviews', 'labels', '', '', 0, 'custom', '_sys_form_input_sys_labels', '_sys_form_input_labels', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  369. ('bx_reviews', 'bx_reviews', 'anonymous', '', '', 0, 'switcher', '_sys_form_input_sys_anonymous', '_sys_form_input_anonymous', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  370. ('bx_reviews', 'bx_reviews', 'disable_comments', '1', '', 0, 'switcher', '_bx_reviews_form_entry_input_sys_disable_comments', '_bx_reviews_form_entry_input_disable_comments', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0);
  371. INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
  372. ('bx_reviews_entry_add', 'delete_confirm', 2147483647, 0, 1),
  373. ('bx_reviews_entry_add', 'title', 2147483647, 1, 2),
  374. ('bx_reviews_entry_add', 'cat', 2147483647, 1, 3),
  375. ('bx_reviews_entry_add', 'text', 2147483647, 1, 4),
  376. ('bx_reviews_entry_add', 'attachments', 2147483647, 1, 5),
  377. ('bx_reviews_entry_add', 'pictures', 2147483647, 1, 6),
  378. ('bx_reviews_entry_add', 'videos', 2147483647, 1, 7),
  379. ('bx_reviews_entry_add', 'files', 2147483647, 1, 8),
  380. ('bx_reviews_entry_add', 'polls', 2147483647, 1, 9),
  381. ('bx_reviews_entry_add', 'covers', 2147483647, 1, 10),
  382. ('bx_reviews_entry_add', 'allow_view_to', 2147483647, 1, 11),
  383. ('bx_reviews_entry_add', 'location', 2147483647, 1, 12),
  384. ('bx_reviews_entry_add', 'published', 192, 1, 13),
  385. ('bx_reviews_entry_add', 'disable_comments', 192, 1, 14),
  386. ('bx_reviews_entry_add', 'do_publish', 2147483647, 1, 15),
  387. ('bx_reviews_entry_delete', 'delete_confirm', 2147483647, 1, 1),
  388. ('bx_reviews_entry_delete', 'do_submit', 2147483647, 1, 2),
  389. ('bx_reviews_entry_edit', 'do_publish', 2147483647, 0, 1),
  390. ('bx_reviews_entry_edit', 'delete_confirm', 2147483647, 0, 2),
  391. ('bx_reviews_entry_edit', 'title', 2147483647, 1, 3),
  392. ('bx_reviews_entry_edit', 'cat', 2147483647, 1, 4),
  393. ('bx_reviews_entry_edit', 'text', 2147483647, 1, 5),
  394. ('bx_reviews_entry_edit', 'attachments', 2147483647, 1, 6),
  395. ('bx_reviews_entry_edit', 'pictures', 2147483647, 1, 7),
  396. ('bx_reviews_entry_edit', 'videos', 2147483647, 1, 8),
  397. ('bx_reviews_entry_edit', 'files', 2147483647, 1, 9),
  398. ('bx_reviews_entry_edit', 'polls', 2147483647, 1, 10),
  399. ('bx_reviews_entry_edit', 'covers', 2147483647, 1, 11),
  400. ('bx_reviews_entry_edit', 'allow_view_to', 2147483647, 1, 12),
  401. ('bx_reviews_entry_edit', 'location', 2147483647, 1, 13),
  402. ('bx_reviews_entry_edit', 'disable_comments', 192, 1, 14),
  403. ('bx_reviews_entry_edit', 'published', 192, 1, 15),
  404. ('bx_reviews_entry_edit', 'do_submit', 2147483647, 1, 16),
  405. ('bx_reviews_entry_view', 'cat', 2147483647, 1, 1),
  406. ('bx_reviews_entry_view', 'added', 2147483647, 1, 2),
  407. ('bx_reviews_entry_view', 'changed', 2147483647, 1, 3),
  408. ('bx_reviews_entry_view', 'published', 192, 1, 4);
  409. -- FORMS: poll
  410. 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
  411. ('bx_reviews_poll', 'bx_reviews', '_bx_reviews_form_poll', '', '', 'do_submit', 'bx_reviews_polls', 'id', '', '', 'a:1:{s:14:"checker_helper";s:30:"BxReviewsFormPollCheckerHelper";}', 0, 1, 'BxReviewsFormPoll', 'modules/boonex/reviews/classes/BxReviewsFormPoll.php');
  412. INSERT INTO `sys_form_displays` (`display_name`, `module`, `object`, `title`, `view_mode`) VALUES
  413. ('bx_reviews_poll_add', 'bx_reviews', 'bx_reviews_poll', '_bx_reviews_form_poll_display_add', 0);
  414. 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
  415. ('bx_reviews_poll', 'bx_reviews', 'text', '', '', 0, 'text', '_bx_reviews_form_poll_input_sys_text', '_bx_reviews_form_poll_input_text', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_reviews_form_poll_input_text_err', 'Xss', '', 1, 0),
  416. ('bx_reviews_poll', 'bx_reviews', 'answers', '', '', 0, 'custom', '_bx_reviews_form_poll_input_sys_answers', '_bx_reviews_form_poll_input_answers', '', 1, 0, 0, '', '', '', 'AvailAnswers', '', '_bx_reviews_form_poll_input_answers_err', '', '', 1, 0),
  417. ('bx_reviews_poll', 'bx_reviews', 'controls', '', 'do_submit,do_cancel', 0, 'input_set', '', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  418. ('bx_reviews_poll', 'bx_reviews', 'do_submit', '_bx_reviews_form_poll_input_do_submit', '', 0, 'submit', '_bx_reviews_form_poll_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  419. ('bx_reviews_poll', 'bx_reviews', 'do_cancel', '_bx_reviews_form_poll_input_do_cancel', '', 0, 'button', '_bx_reviews_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);
  420. INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
  421. ('bx_reviews_poll_add', 'text', 2147483647, 1, 1),
  422. ('bx_reviews_poll_add', 'answers', 2147483647, 1, 2),
  423. ('bx_reviews_poll_add', 'controls', 2147483647, 1, 3),
  424. ('bx_reviews_poll_add', 'do_submit', 2147483647, 1, 4),
  425. ('bx_reviews_poll_add', 'do_cancel', 2147483647, 1, 5);
  426. -- PRE-VALUES
  427. INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES
  428. ('bx_reviews_cats', '_bx_reviews_pre_lists_cats', 'bx_reviews', '0');
  429. INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`, `Data`) VALUES
  430. ('bx_reviews_cats', '', 0, '_sys_please_select', '', ''),
  431. ('bx_reviews_cats', '1', 1, '_bx_reviews_cat_Animals_Pets', '', ''),
  432. ('bx_reviews_cats', '2', 2, '_bx_reviews_cat_Architecture', '', ''),
  433. ('bx_reviews_cats', '3', 3, '_bx_reviews_cat_Art', '', ''),
  434. ('bx_reviews_cats', '4', 4, '_bx_reviews_cat_Cars_Motorcycles', '', ''),
  435. ('bx_reviews_cats', '5', 5, '_bx_reviews_cat_Celebrities', '', ''),
  436. ('bx_reviews_cats', '6', 6, '_bx_reviews_cat_Design', '', ''),
  437. ('bx_reviews_cats', '7', 7, '_bx_reviews_cat_DIY_Crafts', '', ''),
  438. ('bx_reviews_cats', '8', 8, '_bx_reviews_cat_Education', '', ''),
  439. ('bx_reviews_cats', '9', 9, '_bx_reviews_cat_Film_Music_Books', '', ''),
  440. ('bx_reviews_cats', '10', 10, '_bx_reviews_cat_Food_Drink', '', ''),
  441. ('bx_reviews_cats', '11', 11, '_bx_reviews_cat_Gardening', '', ''),
  442. ('bx_reviews_cats', '12', 12, '_bx_reviews_cat_Geek', '', ''),
  443. ('bx_reviews_cats', '13', 13, '_bx_reviews_cat_Hair_Beauty', '', ''),
  444. ('bx_reviews_cats', '14', 14, '_bx_reviews_cat_Health_Fitness', '', ''),
  445. ('bx_reviews_cats', '15', 15, '_bx_reviews_cat_History', '', ''),
  446. ('bx_reviews_cats', '16', 16, '_bx_reviews_cat_Holidays_Events', '', ''),
  447. ('bx_reviews_cats', '17', 17, '_bx_reviews_cat_Home_Decor', '', ''),
  448. ('bx_reviews_cats', '18', 18, '_bx_reviews_cat_Humor', '', ''),
  449. ('bx_reviews_cats', '19', 19, '_bx_reviews_cat_Illustrations_Posters', '', ''),
  450. ('bx_reviews_cats', '20', 20, '_bx_reviews_cat_Kids_Parenting', '', ''),
  451. ('bx_reviews_cats', '21', 21, '_bx_reviews_cat_Mens_Fashion', '', ''),
  452. ('bx_reviews_cats', '22', 22, '_bx_reviews_cat_Outdoors', '', ''),
  453. ('bx_reviews_cats', '23', 23, '_bx_reviews_cat_Photography', '', ''),
  454. ('bx_reviews_cats', '24', 24, '_bx_reviews_cat_Products', '', ''),
  455. ('bx_reviews_cats', '25', 25, '_bx_reviews_cat_Quotes', '', ''),
  456. ('bx_reviews_cats', '26', 26, '_bx_reviews_cat_Science_Nature', '', ''),
  457. ('bx_reviews_cats', '27', 27, '_bx_reviews_cat_Sports', '', ''),
  458. ('bx_reviews_cats', '28', 28, '_bx_reviews_cat_Tattoos', '', ''),
  459. ('bx_reviews_cats', '29', 29, '_bx_reviews_cat_Technology', '', ''),
  460. ('bx_reviews_cats', '30', 30, '_bx_reviews_cat_Travel', '', ''),
  461. ('bx_reviews_cats', '31', 31, '_bx_reviews_cat_Weddings', '', ''),
  462. ('bx_reviews_cats', '32', 32, '_bx_reviews_cat_Womens_Fashion', '', '');
  463. -- COMMENTS
  464. 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
  465. ('bx_reviews', 'bx_reviews', 'bx_reviews_cmts', 1, 5000, 1000, 3, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-review&id={object_id}', '', 'bx_reviews_reviews', 'id', 'author', 'title', 'comments', '', ''),
  466. ('bx_reviews_notes', 'bx_reviews', 'bx_reviews_cmts_notes', 1, 5000, 1000, 3, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-review&id={object_id}', '', 'bx_reviews_reviews', 'id', 'author', 'title', 'comments', '', '');
  467. -- VOTES
  468. INSERT INTO `sys_objects_vote` (`Name`, `TableMain`, `TableTrack`, `PostTimeout`, `MinValue`, `MaxValue`, `IsUndo`, `IsOn`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldRate`, `TriggerFieldRateCount`, `ClassName`, `ClassFile`) VALUES
  469. ('bx_reviews', 'bx_reviews_votes', 'bx_reviews_votes_track', '604800', '1', '1', '0', '1', 'bx_reviews_reviews', 'id', 'author', 'rate', 'votes', '', ''),
  470. ('bx_reviews_reactions', 'bx_reviews_reactions', 'bx_reviews_reactions_track', '604800', '1', '1', '1', '1', 'bx_reviews_reviews', 'id', 'author', 'rrate', 'rvotes', 'BxTemplVoteReactions', ''),
  471. ('bx_reviews_poll_answers', 'bx_reviews_polls_answers_votes', 'bx_reviews_polls_answers_votes_track', '604800', '1', '1', '0', '1', 'bx_reviews_polls_answers', 'id', 'author_id', 'rate', 'votes', 'BxReviewsVotePollAnswers', 'modules/boonex/reviews/classes/BxReviewsVotePollAnswers.php');
  472. -- SCORES
  473. 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
  474. ('bx_reviews', 'bx_reviews', 'bx_reviews_scores', 'bx_reviews_scores_track', '604800', '0', 'bx_reviews_reviews', 'id', 'author', 'score', 'sc_up', 'sc_down', '', '');
  475. -- REPORTS
  476. INSERT INTO `sys_objects_report` (`name`, `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
  477. ('bx_reviews', 'bx_reviews_reports', 'bx_reviews_reports_track', '1', 'page.php?i=view-review&id={object_id}', 'bx_reviews_notes', 'bx_reviews_reviews', 'id', 'author', 'reports', '', '');
  478. -- VIEWS
  479. 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
  480. ('bx_reviews', 'bx_reviews_views_track', '86400', '1', 'bx_reviews_reviews', 'id', 'author', 'views', '', '');
  481. -- FAFORITES
  482. 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
  483. ('bx_reviews', 'bx_reviews_favorites_track', '1', '1', '1', 'page.php?i=view-review&id={object_id}', 'bx_reviews_reviews', 'id', 'author', 'favorites', '', '');
  484. -- FEATURED
  485. INSERT INTO `sys_objects_feature` (`name`, `is_on`, `is_undo`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_flag`, `class_name`, `class_file`) VALUES
  486. ('bx_reviews', '1', '1', 'page.php?i=view-review&id={object_id}', 'bx_reviews_reviews', 'id', 'author', 'featured', '', '');
  487. -- CONTENT INFO
  488. INSERT INTO `sys_objects_content_info` (`name`, `title`, `alert_unit`, `alert_action_add`, `alert_action_update`, `alert_action_delete`, `class_name`, `class_file`) VALUES
  489. ('bx_reviews', '_bx_reviews', 'bx_reviews', 'added', 'edited', 'deleted', '', ''),
  490. ('bx_reviews_cmts', '_bx_reviews_cmts', 'bx_reviews', 'commentPost', 'commentUpdated', 'commentRemoved', 'BxDolContentInfoCmts', '');
  491. INSERT INTO `sys_content_info_grids` (`object`, `grid_object`, `grid_field_id`, `condition`, `selection`) VALUES
  492. ('bx_reviews', 'bx_reviews_administration', 'id', '', ''),
  493. ('bx_reviews', 'bx_reviews_common', 'id', '', '');
  494. -- SEARCH EXTENDED
  495. INSERT INTO `sys_objects_search_extended` (`object`, `object_content_info`, `module`, `title`, `active`, `class_name`, `class_file`) VALUES
  496. ('bx_reviews', 'bx_reviews', 'bx_reviews', '_bx_reviews_search_extended', 1, '', ''),
  497. ('bx_reviews_cmts', 'bx_reviews_cmts', 'bx_reviews', '_bx_reviews_search_extended_cmts', 1, 'BxTemplSearchExtendedCmts', '');
  498. -- STUDIO: page & widget
  499. INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
  500. (3, 'bx_reviews', '_bx_reviews', '_bx_reviews', 'bx_reviews@modules/boonex/reviews/|std-icon.svg');
  501. SET @iPageId = LAST_INSERT_ID();
  502. SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
  503. SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
  504. INSERT INTO `sys_std_widgets` (`page_id`, `module`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
  505. (@iPageId, 'bx_reviews', '{url_studio}module.php?name=bx_reviews', '', 'bx_reviews@modules/boonex/reviews/|std-icon.svg', '_bx_reviews', '', '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";}');
  506. INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
  507. (@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));