install.sql 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663
  1. SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
  2. -- TABLE: entries
  3. CREATE TABLE IF NOT EXISTS `bx_market_products` (
  4. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  5. `author` int(11) unsigned NOT NULL default '0',
  6. `added` int(11) NOT NULL default '0',
  7. `changed` int(11) NOT NULL default '0',
  8. `thumb` int(11) NOT NULL default '0',
  9. `cover` int(11) NOT NULL default '0',
  10. `cover_data` varchar(64) NOT NULL default '',
  11. `cover_raw` longtext NOT NULL,
  12. `package` int(11) NOT NULL default '0',
  13. `name` varchar(255) NOT NULL,
  14. `title` varchar(255) NOT NULL,
  15. `text` text NOT NULL,
  16. `notes` text NOT NULL,
  17. `notes_purchased` text NOT NULL,
  18. `cat` int(11) NOT NULL,
  19. `price_single` float NOT NULL default '0',
  20. `price_recurring` float NOT NULL default '0',
  21. `duration_recurring` varchar(16) NOT NULL default 'month',
  22. `trial_recurring` int(11) NOT NULL default '0',
  23. `labels` text NOT NULL,
  24. `location` text NOT NULL,
  25. `views` int(11) NOT NULL default '0',
  26. `rate` float NOT NULL default '0',
  27. `votes` int(11) NOT NULL default '0',
  28. `rrate` float NOT NULL default '0',
  29. `rvotes` int(11) NOT NULL default '0',
  30. `score` int(11) NOT NULL default '0',
  31. `sc_up` int(11) NOT NULL default '0',
  32. `sc_down` int(11) NOT NULL default '0',
  33. `favorites` int(11) NOT NULL default '0',
  34. `comments` int(11) NOT NULL default '0',
  35. `reports` int(11) NOT NULL default '0',
  36. `featured` int(11) NOT NULL default '0',
  37. `cf` int(11) NOT NULL default '1',
  38. `allow_view_to` varchar(32) NOT NULL DEFAULT '3',
  39. `allow_purchase_to` varchar(32) NOT NULL DEFAULT '3',
  40. `allow_comment_to` varchar(32) NOT NULL DEFAULT 'c',
  41. `allow_vote_to` varchar(32) NOT NULL DEFAULT 'c',
  42. `status` enum('active','hidden') NOT NULL DEFAULT 'active',
  43. `status_admin` enum('active','hidden','pending') NOT NULL DEFAULT 'active',
  44. PRIMARY KEY (`id`),
  45. UNIQUE KEY `name` (`name`(191)),
  46. FULLTEXT KEY `title_text` (`title`,`text`)
  47. );
  48. -- TABLE: subentries
  49. CREATE TABLE IF NOT EXISTS `bx_market_subproducts` (
  50. `id` int(11) NOT NULL AUTO_INCREMENT,
  51. `initiator` int(11) NOT NULL,
  52. `content` int(11) NOT NULL,
  53. `added` int(10) unsigned NOT NULL,
  54. PRIMARY KEY (`id`),
  55. UNIQUE KEY `initiator` (`initiator`,`content`),
  56. KEY `content` (`content`)
  57. );
  58. -- TABLE: licenses
  59. CREATE TABLE IF NOT EXISTS `bx_market_licenses` (
  60. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  61. `profile_id` int(11) unsigned NOT NULL default '0',
  62. `product_id` int(11) unsigned NOT NULL default '0',
  63. `count` int(11) unsigned NOT NULL default '0',
  64. `order` varchar(32) NOT NULL default '',
  65. `license` varchar(32) NOT NULL default '',
  66. `type` varchar(16) NOT NULL default '',
  67. `domain` varchar(128) NOT NULL default '',
  68. `added` int(11) unsigned NOT NULL default '0',
  69. `expired` int(11) unsigned NOT NULL default '0',
  70. `expired_notif` int(11) unsigned NOT NULL default '0',
  71. `new` tinyint(1) NOT NULL default '1',
  72. PRIMARY KEY (`id`),
  73. KEY `product_id` (`product_id`, `profile_id`),
  74. KEY `license` (`license`)
  75. );
  76. CREATE TABLE IF NOT EXISTS `bx_market_licenses_deleted` (
  77. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  78. `profile_id` int(11) unsigned NOT NULL default '0',
  79. `product_id` int(11) unsigned NOT NULL default '0',
  80. `count` int(11) unsigned NOT NULL default '0',
  81. `order` varchar(32) NOT NULL default '',
  82. `license` varchar(32) NOT NULL default '',
  83. `type` varchar(16) NOT NULL default '',
  84. `domain` varchar(128) NOT NULL default '',
  85. `added` int(11) unsigned NOT NULL default '0',
  86. `expired` int(11) unsigned NOT NULL default '0',
  87. `expired_notif` int(11) unsigned NOT NULL default '0',
  88. `new` tinyint(1) NOT NULL default '1',
  89. `reason` varchar(16) NOT NULL default '',
  90. `deleted` int(11) unsigned NOT NULL default '0',
  91. PRIMARY KEY (`id`),
  92. KEY `product_id` (`product_id`,`profile_id`),
  93. KEY `license` (`license`)
  94. );
  95. -- TABLE: storages & transcoders
  96. CREATE TABLE IF NOT EXISTS `bx_market_files` (
  97. `id` int(11) NOT NULL AUTO_INCREMENT,
  98. `profile_id` int(10) unsigned NOT NULL,
  99. `remote_id` varchar(128) NOT NULL,
  100. `path` varchar(255) NOT NULL,
  101. `file_name` varchar(255) NOT NULL,
  102. `mime_type` varchar(128) NOT NULL,
  103. `ext` varchar(32) NOT NULL,
  104. `size` bigint(20) NOT NULL,
  105. `added` int(11) NOT NULL,
  106. `modified` int(11) NOT NULL,
  107. `private` int(11) NOT NULL,
  108. PRIMARY KEY (`id`),
  109. UNIQUE KEY `remote_id` (`remote_id`)
  110. );
  111. CREATE TABLE IF NOT EXISTS `bx_market_files2products` (
  112. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  113. `content_id` int(11) unsigned NOT NULL,
  114. `file_id` int(11) NOT NULL,
  115. `type` enum('version','update') NOT NULL DEFAULT 'version',
  116. `version` varchar(255) NOT NULL,
  117. `version_to` varchar(255) NOT NULL,
  118. `downloads` int(11) NOT NULL,
  119. `order` int(11) NOT NULL,
  120. PRIMARY KEY (`id`),
  121. UNIQUE KEY `file_content` (`file_id`,`content_id`),
  122. KEY `content_id` (`content_id`)
  123. );
  124. CREATE TABLE IF NOT EXISTS `bx_market_downloads_track` (
  125. `id` int(11) NOT NULL AUTO_INCREMENT,
  126. `file_id` int(11) NOT NULL default '0',
  127. `profile_id` int(11) NOT NULL default '0',
  128. `profile_nip` int(11) unsigned NOT NULL default '0',
  129. `date` int(11) NOT NULL default '0',
  130. PRIMARY KEY (`id`)
  131. );
  132. CREATE TABLE IF NOT EXISTS `bx_market_photos` (
  133. `id` int(11) NOT NULL AUTO_INCREMENT,
  134. `profile_id` int(10) unsigned NOT NULL,
  135. `remote_id` varchar(128) NOT NULL,
  136. `path` varchar(255) NOT NULL,
  137. `file_name` varchar(255) NOT NULL,
  138. `mime_type` varchar(128) NOT NULL,
  139. `ext` varchar(32) NOT NULL,
  140. `size` bigint(20) NOT NULL,
  141. `added` int(11) NOT NULL,
  142. `modified` int(11) NOT NULL,
  143. `private` int(11) NOT NULL,
  144. PRIMARY KEY (`id`),
  145. UNIQUE KEY `remote_id` (`remote_id`)
  146. );
  147. CREATE TABLE IF NOT EXISTS `bx_market_photos2products` (
  148. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  149. `content_id` int(11) unsigned NOT NULL,
  150. `file_id` int(11) NOT NULL,
  151. `title` varchar(255) NOT NULL,
  152. `order` int(11) NOT NULL,
  153. PRIMARY KEY (`id`),
  154. UNIQUE KEY `file_content` (`file_id`,`content_id`),
  155. KEY `content_id` (`content_id`)
  156. );
  157. CREATE TABLE IF NOT EXISTS `bx_market_photos_resized` (
  158. `id` int(11) NOT NULL AUTO_INCREMENT,
  159. `profile_id` int(10) unsigned NOT NULL,
  160. `remote_id` varchar(128) NOT NULL,
  161. `path` varchar(255) NOT NULL,
  162. `file_name` varchar(255) NOT NULL,
  163. `mime_type` varchar(128) NOT NULL,
  164. `ext` varchar(32) NOT NULL,
  165. `size` bigint(20) NOT NULL,
  166. `added` int(11) NOT NULL,
  167. `modified` int(11) NOT NULL,
  168. `private` int(11) NOT NULL,
  169. PRIMARY KEY (`id`),
  170. UNIQUE KEY `remote_id` (`remote_id`)
  171. );
  172. -- TABLE: comments
  173. CREATE TABLE IF NOT EXISTS `bx_market_cmts` (
  174. `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
  175. `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
  176. `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
  177. `cmt_object_id` int(11) NOT NULL DEFAULT '0',
  178. `cmt_author_id` int(11) NOT NULL DEFAULT '0',
  179. `cmt_level` int(11) NOT NULL DEFAULT '0',
  180. `cmt_text` text NOT NULL,
  181. `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',
  182. `cmt_rate` int(11) NOT NULL DEFAULT '0',
  183. `cmt_rate_count` int(11) NOT NULL DEFAULT '0',
  184. `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
  185. `cmt_replies` int(11) NOT NULL DEFAULT '0',
  186. `cmt_pinned` int(11) NOT NULL default '0',
  187. `cmt_cf` int(11) NOT NULL default '1',
  188. PRIMARY KEY (`cmt_id`),
  189. KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
  190. FULLTEXT KEY `search_fields` (`cmt_text`)
  191. );
  192. CREATE TABLE IF NOT EXISTS `bx_market_cmts_notes` (
  193. `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
  194. `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
  195. `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
  196. `cmt_object_id` int(11) NOT NULL DEFAULT '0',
  197. `cmt_author_id` int(11) NOT NULL DEFAULT '0',
  198. `cmt_level` int(11) NOT NULL DEFAULT '0',
  199. `cmt_text` text NOT NULL,
  200. `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',
  201. `cmt_rate` int(11) NOT NULL DEFAULT '0',
  202. `cmt_rate_count` int(11) NOT NULL DEFAULT '0',
  203. `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
  204. `cmt_replies` int(11) NOT NULL DEFAULT '0',
  205. `cmt_pinned` int(11) NOT NULL default '0',
  206. PRIMARY KEY (`cmt_id`),
  207. KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
  208. FULLTEXT KEY `search_fields` (`cmt_text`)
  209. );
  210. -- TABLE: votes
  211. CREATE TABLE IF NOT EXISTS `bx_market_votes` (
  212. `id` int(11) NOT NULL AUTO_INCREMENT,
  213. `object_id` int(11) NOT NULL default '0',
  214. `count` int(11) NOT NULL default '0',
  215. `sum` int(11) NOT NULL default '0',
  216. PRIMARY KEY (`id`),
  217. UNIQUE KEY `object_id` (`object_id`)
  218. );
  219. CREATE TABLE IF NOT EXISTS `bx_market_votes_track` (
  220. `id` int(11) NOT NULL AUTO_INCREMENT,
  221. `object_id` int(11) NOT NULL default '0',
  222. `author_id` int(11) NOT NULL default '0',
  223. `author_nip` int(11) unsigned NOT NULL default '0',
  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. CREATE TABLE IF NOT EXISTS `bx_market_reactions` (
  230. `id` int(11) NOT NULL AUTO_INCREMENT,
  231. `object_id` int(11) NOT NULL default '0',
  232. `reaction` varchar(32) NOT NULL default '',
  233. `count` int(11) NOT NULL default '0',
  234. `sum` int(11) NOT NULL default '0',
  235. PRIMARY KEY (`id`),
  236. UNIQUE KEY `reaction` (`object_id`, `reaction`)
  237. );
  238. CREATE TABLE IF NOT EXISTS `bx_market_reactions_track` (
  239. `id` int(11) NOT NULL AUTO_INCREMENT,
  240. `object_id` int(11) NOT NULL default '0',
  241. `author_id` int(11) NOT NULL default '0',
  242. `author_nip` int(11) unsigned NOT NULL default '0',
  243. `reaction` varchar(32) NOT NULL default '',
  244. `value` tinyint(4) NOT NULL default '0',
  245. `date` int(11) NOT NULL default '0',
  246. PRIMARY KEY (`id`),
  247. KEY `vote` (`object_id`, `author_nip`)
  248. );
  249. -- TABLE: views
  250. CREATE TABLE `bx_market_views_track` (
  251. `id` int(11) NOT NULL AUTO_INCREMENT,
  252. `object_id` int(11) NOT NULL default '0',
  253. `viewer_id` int(11) NOT NULL default '0',
  254. `viewer_nip` int(11) unsigned NOT NULL default '0',
  255. `date` int(11) NOT NULL default '0',
  256. PRIMARY KEY (`id`),
  257. KEY `id` (`object_id`,`viewer_id`,`viewer_nip`)
  258. );
  259. -- TABLE: metas
  260. CREATE TABLE `bx_market_meta_keywords` (
  261. `id` int(11) NOT NULL AUTO_INCREMENT,
  262. `object_id` int(10) unsigned NOT NULL,
  263. `keyword` varchar(255) NOT NULL,
  264. PRIMARY KEY (`id`),
  265. KEY `object_id` (`object_id`),
  266. KEY `keyword` (`keyword`)
  267. );
  268. CREATE TABLE `bx_market_meta_locations` (
  269. `object_id` int(10) unsigned NOT NULL,
  270. `lat` double NOT NULL,
  271. `lng` double NOT NULL,
  272. `country` varchar(2) NOT NULL,
  273. `state` varchar(255) NOT NULL,
  274. `city` varchar(255) NOT NULL,
  275. `zip` varchar(255) NOT NULL,
  276. `street` varchar(255) NOT NULL,
  277. `street_number` varchar(255) NOT NULL,
  278. PRIMARY KEY (`object_id`),
  279. KEY `country_state_city` (`country`,`state`(8),`city`(8))
  280. );
  281. CREATE TABLE `bx_market_meta_mentions` (
  282. `id` int(11) NOT NULL AUTO_INCREMENT,
  283. `object_id` int(10) unsigned NOT NULL,
  284. `profile_id` int(10) unsigned NOT NULL,
  285. PRIMARY KEY (`id`),
  286. KEY `object_id` (`object_id`),
  287. KEY `profile_id` (`profile_id`)
  288. );
  289. -- TABLE: reports
  290. CREATE TABLE IF NOT EXISTS `bx_market_reports` (
  291. `id` int(11) NOT NULL AUTO_INCREMENT,
  292. `object_id` int(11) NOT NULL default '0',
  293. `count` int(11) NOT NULL default '0',
  294. PRIMARY KEY (`id`),
  295. UNIQUE KEY `object_id` (`object_id`)
  296. );
  297. CREATE TABLE IF NOT EXISTS `bx_market_reports_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. `type` varchar(32) NOT NULL default '',
  303. `text` text NOT NULL default '',
  304. `date` int(11) NOT NULL default '0',
  305. `checked_by` int(11) NOT NULL default '0',
  306. `status` tinyint(11) NOT NULL default '0',
  307. PRIMARY KEY (`id`),
  308. KEY `report` (`object_id`, `author_nip`)
  309. );
  310. -- TABLE: favorites
  311. CREATE TABLE `bx_market_favorites_track` (
  312. `id` int(11) NOT NULL AUTO_INCREMENT,
  313. `object_id` int(11) NOT NULL default '0',
  314. `author_id` int(11) NOT NULL default '0',
  315. `list_id` int(11) NOT NULL default '0',
  316. `date` int(11) NOT NULL default '0',
  317. PRIMARY KEY (`id`),
  318. KEY `id` (`object_id`,`author_id`)
  319. );
  320. CREATE TABLE `bx_market_favorites_lists` (
  321. `id` int(11) NOT NULL AUTO_INCREMENT,
  322. `title` varchar(255) NOT NULL,
  323. `author_id` int(11) NOT NULL default '0',
  324. `date` int(11) NOT NULL default '0',
  325. `allow_view_favorite_list_to` varchar(16) NOT NULL DEFAULT '3',
  326. PRIMARY KEY (`id`)
  327. );
  328. -- TABLE: scores
  329. CREATE TABLE IF NOT EXISTS `bx_market_scores` (
  330. `id` int(11) NOT NULL AUTO_INCREMENT,
  331. `object_id` int(11) NOT NULL default '0',
  332. `count_up` int(11) NOT NULL default '0',
  333. `count_down` int(11) NOT NULL default '0',
  334. PRIMARY KEY (`id`),
  335. UNIQUE KEY `object_id` (`object_id`)
  336. );
  337. CREATE TABLE IF NOT EXISTS `bx_market_scores_track` (
  338. `id` int(11) NOT NULL AUTO_INCREMENT,
  339. `object_id` int(11) NOT NULL default '0',
  340. `author_id` int(11) NOT NULL default '0',
  341. `author_nip` int(11) unsigned NOT NULL default '0',
  342. `type` varchar(8) NOT NULL default '',
  343. `date` int(11) NOT NULL default '0',
  344. PRIMARY KEY (`id`),
  345. KEY `vote` (`object_id`, `author_nip`)
  346. );
  347. -- STORAGES & TRANSCODERS
  348. 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
  349. ('bx_market_files', @sStorageEngine, '', 360, 2592000, 3, 'bx_market_files', 'allow-deny', 'zip', '', 0, 0, 0, 0, 0, 0),
  350. ('bx_market_photos', @sStorageEngine, '', 360, 2592000, 3, 'bx_market_photos', 'allow-deny', '{image}', '', 0, 0, 0, 0, 0, 0),
  351. ('bx_market_photos_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_market_photos_resized', 'allow-deny', '{image}', '', 0, 0, 0, 0, 0, 0);
  352. INSERT INTO `sys_objects_transcoder` (`object`, `storage_object`, `source_type`, `source_params`, `private`, `atime_tracking`, `atime_pruning`, `ts`) VALUES
  353. ('bx_market_preview', 'bx_market_photos_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_market_photos";}', 'no', '1', '2592000', '0'),
  354. ('bx_market_icon', 'bx_market_photos_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_market_photos";}', 'no', '1', '2592000', '0'),
  355. ('bx_market_thumb', 'bx_market_photos_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_market_photos";}', 'no', '1', '2592000', '0'),
  356. ('bx_market_cover', 'bx_market_photos_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_market_photos";}', 'no', '1', '2592000', '0'),
  357. ('bx_market_screenshot', 'bx_market_photos_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_market_photos";}', 'no', '1', '2592000', '0'),
  358. ('bx_market_gallery', 'bx_market_photos_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_market_photos";}', 'no', '1', '2592000', '0');
  359. INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES
  360. ('bx_market_preview', '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_market_gallery', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0'),
  362. ('bx_market_icon', 'Resize', 'a:3:{s:1:"w";s:2:"50";s:1:"h";s:2:"50";s:13:"square_resize";s:1:"1";}', '0'),
  363. ('bx_market_thumb', 'Resize', 'a:3:{s:1:"w";s:3:"100";s:1:"h";s:3:"100";s:13:"square_resize";s:1:"1";}', '0'),
  364. ('bx_market_cover', 'Resize', 'a:1:{s:1:"w";s:4:"1200";}', '0'),
  365. ('bx_market_screenshot', 'Resize', 'a:3:{s:1:"w";s:3:"200";s:1:"h";s:3:"120";s:11:"crop_resize";s:1:"1";}', '0');
  366. -- FORMS
  367. 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
  368. ('bx_market', 'bx_market', '_bx_market_form_entry', '', 'a:1:{s:7:"enctype";s:19:"multipart/form-data";}', 'bx_market_products', 'id', '', '', 'a:2:{i:0;s:9:"do_submit";i:1;s:10:"do_publish";}', '', 0, 1, 'BxMarketFormEntry', 'modules/boonex/market/classes/BxMarketFormEntry.php');
  369. INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`, `title`) VALUES
  370. ('bx_market', 'bx_market_entry_add', 'bx_market', 0, '_bx_market_form_entry_display_add'),
  371. ('bx_market', 'bx_market_entry_delete', 'bx_market', 0, '_bx_market_form_entry_display_delete'),
  372. ('bx_market', 'bx_market_entry_edit', 'bx_market', 0, '_bx_market_form_entry_display_edit'),
  373. ('bx_market', 'bx_market_entry_view', 'bx_market', 1, '_bx_market_form_entry_display_view'),
  374. ('bx_market', 'bx_market_entry_view_full', 'bx_market', 1, '_bx_market_form_entry_display_view_full');
  375. 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
  376. ('bx_market', 'bx_market', 'cf', '1', '#!sys_content_filter', 0, 'select', '_sys_form_entry_input_sys_cf', '_sys_form_entry_input_cf', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
  377. ('bx_market', 'bx_market', 'allow_view_to', '', '', 0, 'custom', '_bx_market_form_entry_input_sys_allow_view_to', '_bx_market_form_entry_input_allow_view_to', '', 1, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  378. ('bx_market', 'bx_market', 'allow_purchase_to', '', '', 0, 'custom', '_bx_market_form_entry_input_sys_allow_purchase_to', '_bx_market_form_entry_input_allow_purchase_to', '', 1, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  379. ('bx_market', 'bx_market', 'allow_comment_to', '', '', 0, 'custom', '_bx_market_form_entry_input_sys_allow_comment_to', '_bx_market_form_entry_input_allow_comment_to', '', 1, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  380. ('bx_market', 'bx_market', 'allow_vote_to', '', '', 0, 'custom', '_bx_market_form_entry_input_sys_allow_vote_to', '_bx_market_form_entry_input_allow_vote_to', '', 1, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  381. ('bx_market', 'bx_market', 'delete_confirm', 1, '', 0, 'checkbox', '_bx_market_form_entry_input_sys_delete_confirm', '_bx_market_form_entry_input_delete_confirm', '_bx_market_form_entry_input_delete_confirm_info', 1, 0, 0, '', '', '', 'Avail', '', '_bx_market_form_entry_input_delete_confirm_error', '', '', 1, 0),
  382. ('bx_market', 'bx_market', 'do_publish', '_bx_market_form_entry_input_do_publish', '', 0, 'submit', '_bx_market_form_entry_input_sys_do_publish', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  383. ('bx_market', 'bx_market', 'do_submit', '_bx_market_form_entry_input_do_submit', '', 0, 'submit', '_bx_market_form_entry_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  384. ('bx_market', 'bx_market', 'location', '', '', 0, 'location', '_sys_form_input_sys_location', '_sys_form_input_location', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  385. ('bx_market', 'bx_market', 'cover_raw', '', '', 0, 'textarea', '_bx_market_form_entry_input_sys_cover_raw', '_bx_market_form_entry_input_cover_raw', '_bx_market_form_entry_input_cover_raw_inf', 0, 0, 0, '', '', '', '', '', '', 'XssHtml', '', 1, 0),
  386. ('bx_market', 'bx_market', 'pictures', 'a:1:{i:0;s:15:"bx_market_html5";}', 'a:1:{s:15:"bx_market_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_market_form_entry_input_sys_pictures', '_bx_market_form_entry_input_pictures', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  387. ('bx_market', 'bx_market', 'files', 'a:1:{i:0;s:15:"bx_market_html5";}', 'a:1:{s:15:"bx_market_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_market_form_entry_input_sys_files', '_bx_market_form_entry_input_files', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  388. ('bx_market', 'bx_market', 'text', '', '', 0, 'textarea', '_bx_market_form_entry_input_sys_text', '_bx_market_form_entry_input_text', '', 1, 0, 2, '', '', '', 'Avail', '', '_bx_market_form_entry_input_text_err', 'XssHtml', '', 1, 0),
  389. ('bx_market', 'bx_market', 'notes', '', '', 0, 'textarea', '_bx_market_form_entry_input_sys_notes', '_bx_market_form_entry_input_notes', '_bx_market_form_entry_input_notes_inf', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
  390. ('bx_market', 'bx_market', 'notes_purchased', '', '', 0, 'textarea', '_bx_market_form_entry_input_sys_notes_purchased', '_bx_market_form_entry_input_notes_purchased', '_bx_market_form_entry_input_notes_purchased_inf', 0, 0, 3, '', '', '', '', '', '', 'XssHtml', '', 1, 0),
  391. ('bx_market', 'bx_market', 'title', '', '', 0, 'text', '_bx_market_form_entry_input_sys_title', '_bx_market_form_entry_input_title', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_market_form_entry_input_title_err', 'Xss', '', 1, 0),
  392. ('bx_market', 'bx_market', 'name', '', '', 0, 'text', '_bx_market_form_entry_input_sys_name', '_bx_market_form_entry_input_name', '_bx_market_form_entry_input_name_inf', 1, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
  393. ('bx_market', 'bx_market', 'cat', '', '#!bx_market_cats', 0, 'select', '_bx_market_form_entry_input_sys_cat', '_bx_market_form_entry_input_cat', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_market_form_entry_input_cat_err', 'Xss', '', 1, 0),
  394. ('bx_market', 'bx_market', 'price_single', '', '', 0, 'price', '_bx_market_form_entry_input_sys_price_single', '_bx_market_form_entry_input_price_single', '_bx_market_form_entry_input_price_single_inf', 0, 0, 0, '', '', '', '', '', '', 'Float', '', 1, 0),
  395. ('bx_market', 'bx_market', 'price_recurring', '', '', 0, 'price', '_bx_market_form_entry_input_sys_price_recurring', '_bx_market_form_entry_input_price_recurring', '_bx_market_form_entry_input_price_recurring_inf', 0, 0, 0, '', '', '', '', '', '', 'Float', '', 1, 0),
  396. ('bx_market', 'bx_market', 'duration_recurring', 'month', '#!bx_market_durations', 0, 'select', '_bx_market_form_entry_input_sys_duration_recurring', '_bx_market_form_entry_input_duration_recurring', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
  397. ('bx_market', 'bx_market', 'trial_recurring', '', '', 0, 'text', '_bx_market_form_entry_input_sys_trial_recurring', '_bx_market_form_entry_input_trial_recurring', '_bx_market_form_entry_input_trial_recurring_inf', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
  398. ('bx_market', 'bx_market', 'added', '', '', 0, 'datetime', '_bx_market_form_entry_input_sys_added', '_bx_market_form_entry_input_added', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  399. ('bx_market', 'bx_market', 'changed', '', '', 0, 'datetime', '_bx_market_form_entry_input_sys_changed', '_bx_market_form_entry_input_changed', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  400. ('bx_market', 'bx_market', 'header_beg_single', '', '', 0, 'block_header', '_bx_market_form_entry_input_sys_header_beg_single', '_bx_market_form_entry_input_header_beg_single', '', 0, 1, 0, '', '', '', '', '', '', '', '', 1, 0),
  401. ('bx_market', 'bx_market', 'header_beg_recurring', '', '', 0, 'block_header', '_bx_market_form_entry_input_sys_header_beg_recurring', '_bx_market_form_entry_input_header_beg_recurring', '', 0, 1, 0, '', '', '', '', '', '', '', '', 1, 0),
  402. ('bx_market', 'bx_market', 'header_beg_privacy', '', '', 0, 'block_header', '_bx_market_form_entry_input_sys_header_beg_privacy', '_bx_market_form_entry_input_header_beg_privacy', '', 0, 1, 0, '', '', '', '', '', '', '', '', 1, 0),
  403. ('bx_market', 'bx_market', 'header_beg_notes', '', '', 0, 'block_header', '_bx_market_form_entry_input_sys_header_beg_notes', '_bx_market_form_entry_input_header_beg_notes', '', 0, 1, 0, '', '', '', '', '', '', '', '', 1, 0),
  404. ('bx_market', 'bx_market', 'header_beg_other', '', '', 0, 'block_header', '_bx_market_form_entry_input_sys_header_beg_other', '_bx_market_form_entry_input_header_beg_other', '', 0, 1, 0, '', '', '', '', '', '', '', '', 1, 0),
  405. ('bx_market', 'bx_market', 'header_end_single', '', '', 0, 'block_end', '_bx_market_form_entry_input_sys_header_end_single', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  406. ('bx_market', 'bx_market', 'header_end_recurring', '', '', 0, 'block_end', '_bx_market_form_entry_input_sys_header_end_recurring', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  407. ('bx_market', 'bx_market', 'header_end_privacy', '', '', 0, 'block_end', '_bx_market_form_entry_input_sys_header_end_privacy', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  408. ('bx_market', 'bx_market', 'header_end_notes', '', '', 0, 'block_end', '_bx_market_form_entry_input_sys_header_end_notes', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  409. ('bx_market', 'bx_market', 'header_end_other', '', '', 0, 'block_end', '_bx_market_form_entry_input_sys_header_end_other', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  410. ('bx_market', 'bx_market', 'warning_single', '_bx_market_err_not_accept_payments_single', '', 0, 'value', '_bx_market_form_entry_input_sys_warning_single', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  411. ('bx_market', 'bx_market', 'warning_recurring', '_bx_market_err_not_accept_payments_recurring', '', 0, 'value', '_bx_market_form_entry_input_sys_warning_recurring', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  412. ('bx_market', 'bx_market', 'subentries', '', '', 0, 'custom', '_bx_market_form_entry_input_sys_subentries', '_bx_market_form_entry_input_subentries', '_bx_market_form_entry_input_subentries_inf', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  413. ('bx_market', 'bx_market', 'labels', '', '', 0, 'custom', '_sys_form_input_sys_labels', '_sys_form_input_labels', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0);
  414. INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
  415. ('bx_market_entry_add', 'title', 2147483647, 1, 1),
  416. ('bx_market_entry_add', 'name', 2147483647, 1, 2),
  417. ('bx_market_entry_add', 'cat', 2147483647, 1, 3),
  418. ('bx_market_entry_add', 'text', 2147483647, 1, 4),
  419. ('bx_market_entry_add', 'cover_raw', 2147483647, 0, 5),
  420. ('bx_market_entry_add', 'pictures', 2147483647, 1, 6),
  421. ('bx_market_entry_add', 'files', 2147483647, 1, 7),
  422. ('bx_market_entry_add', 'header_beg_single', 2147483647, 1, 8),
  423. ('bx_market_entry_add', 'warning_single', 2147483647, 1, 9),
  424. ('bx_market_entry_add', 'price_single', 2147483647, 1, 10),
  425. ('bx_market_entry_add', 'header_end_single', 2147483647, 1, 11),
  426. ('bx_market_entry_add', 'header_beg_recurring', 2147483647, 1, 12),
  427. ('bx_market_entry_add', 'warning_recurring', 2147483647, 1, 13),
  428. ('bx_market_entry_add', 'duration_recurring', 2147483647, 1, 14),
  429. ('bx_market_entry_add', 'price_recurring', 2147483647, 1, 15),
  430. ('bx_market_entry_add', 'trial_recurring', 2147483647, 1, 16),
  431. ('bx_market_entry_add', 'header_end_recurring', 2147483647, 1, 17),
  432. ('bx_market_entry_add', 'header_beg_privacy', 2147483647, 1, 18),
  433. ('bx_market_entry_add', 'allow_view_to', 2147483647, 1, 19),
  434. ('bx_market_entry_add', 'allow_purchase_to', 2147483647, 1, 20),
  435. ('bx_market_entry_add', 'allow_comment_to', 2147483647, 1, 21),
  436. ('bx_market_entry_add', 'allow_vote_to', 2147483647, 1, 22),
  437. ('bx_market_entry_add', 'cf', 2147483647, 1, 23),
  438. ('bx_market_entry_add', 'header_end_privacy', 2147483647, 1, 24),
  439. ('bx_market_entry_add', 'header_beg_notes', 2147483647, 1, 25),
  440. ('bx_market_entry_add', 'notes', 2147483647, 1, 26),
  441. ('bx_market_entry_add', 'notes_purchased', 2147483647, 1, 27),
  442. ('bx_market_entry_add', 'header_end_notes', 2147483647, 1, 28),
  443. ('bx_market_entry_add', 'header_beg_other', 2147483647, 1, 29),
  444. ('bx_market_entry_add', 'location', 2147483647, 1, 30),
  445. ('bx_market_entry_add', 'subentries', 2147483647, 1, 31),
  446. ('bx_market_entry_add', 'header_end_other', 2147483647, 1, 32),
  447. ('bx_market_entry_add', 'do_publish', 2147483647, 1, 33),
  448. ('bx_market_entry_delete', 'delete_confirm', 2147483647, 1, 1),
  449. ('bx_market_entry_delete', 'do_submit', 2147483647, 1, 2),
  450. ('bx_market_entry_edit', 'title', 2147483647, 1, 1),
  451. ('bx_market_entry_edit', 'name', 2147483647, 1, 2),
  452. ('bx_market_entry_edit', 'cat', 2147483647, 1, 3),
  453. ('bx_market_entry_edit', 'text', 2147483647, 1, 4),
  454. ('bx_market_entry_edit', 'cover_raw', 2147483647, 0, 5),
  455. ('bx_market_entry_edit', 'pictures', 2147483647, 1, 6),
  456. ('bx_market_entry_edit', 'files', 2147483647, 1, 7),
  457. ('bx_market_entry_edit', 'header_beg_single', 2147483647, 1, 8),
  458. ('bx_market_entry_edit', 'warning_single', 2147483647, 1, 9),
  459. ('bx_market_entry_edit', 'price_single', 2147483647, 1, 10),
  460. ('bx_market_entry_edit', 'header_end_single', 2147483647, 1, 11),
  461. ('bx_market_entry_edit', 'header_beg_recurring', 2147483647, 1, 12),
  462. ('bx_market_entry_edit', 'warning_recurring', 2147483647, 1, 13),
  463. ('bx_market_entry_edit', 'duration_recurring', 2147483647, 1, 14),
  464. ('bx_market_entry_edit', 'price_recurring', 2147483647, 1, 15),
  465. ('bx_market_entry_edit', 'trial_recurring', 2147483647, 1, 16),
  466. ('bx_market_entry_edit', 'header_end_recurring', 2147483647, 1, 17),
  467. ('bx_market_entry_edit', 'header_beg_privacy', 2147483647, 1, 18),
  468. ('bx_market_entry_edit', 'allow_view_to', 2147483647, 1, 19),
  469. ('bx_market_entry_edit', 'allow_purchase_to', 2147483647, 1, 20),
  470. ('bx_market_entry_edit', 'allow_comment_to', 2147483647, 1, 21),
  471. ('bx_market_entry_edit', 'allow_vote_to', 2147483647, 1, 22),
  472. ('bx_market_entry_edit', 'cf', 2147483647, 1, 23),
  473. ('bx_market_entry_edit', 'header_end_privacy', 2147483647, 1, 24),
  474. ('bx_market_entry_edit', 'header_beg_notes', 2147483647, 1, 25),
  475. ('bx_market_entry_edit', 'notes', 2147483647, 1, 26),
  476. ('bx_market_entry_edit', 'notes_purchased', 2147483647, 1, 27),
  477. ('bx_market_entry_edit', 'header_end_notes', 2147483647, 1, 28),
  478. ('bx_market_entry_edit', 'header_beg_other', 2147483647, 1, 29),
  479. ('bx_market_entry_edit', 'location', 2147483647, 1, 30),
  480. ('bx_market_entry_edit', 'subentries', 2147483647, 1, 31),
  481. ('bx_market_entry_edit', 'header_end_other', 2147483647, 1, 32),
  482. ('bx_market_entry_edit', 'do_submit', 2147483647, 1, 33),
  483. ('bx_market_entry_view', 'cat', 2147483647, 1, 1),
  484. ('bx_market_entry_view', 'added', 2147483647, 1, 2),
  485. ('bx_market_entry_view', 'changed', 2147483647, 1, 3),
  486. ('bx_market_entry_view_full', 'cat', 2147483647, 1, 1),
  487. ('bx_market_entry_view_full', 'added', 2147483647, 1, 2),
  488. ('bx_market_entry_view_full', 'changed', 2147483647, 1, 3),
  489. ('bx_market_entry_view_full', 'notes', 2147483647, 1, 4);
  490. -- FORMS: License
  491. 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
  492. ('bx_market_license', 'bx_market', '_bx_market_form_license', '', 'a:1:{s:7:"enctype";s:19:"multipart/form-data";}', 'bx_market_licenses', 'id', '', '', 'do_submit', '', 0, 1, 'BxMarketFormLicense', 'modules/boonex/market/classes/BxMarketFormLicense.php');
  493. INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`, `title`) VALUES
  494. ('bx_market_license', 'bx_market_license_edit', 'bx_market', 0, '_bx_market_form_license_display_edit');
  495. 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
  496. ('bx_market_license', 'bx_market', 'order', '', '', 0, 'text', '_bx_market_form_license_input_sys_order', '_bx_market_form_license_input_order', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_market_form_license_input_order_err', 'Xss', '', 1, 0),
  497. ('bx_market_license', 'bx_market', 'license', '', '', 0, 'text', '_bx_market_form_license_input_sys_license', '_bx_market_form_license_input_license', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_market_form_license_input_license_err', 'Xss', '', 1, 0),
  498. ('bx_market_license', 'bx_market', 'domain', '', '', 0, 'text', '_bx_market_form_license_input_sys_domain', '_bx_market_form_license_input_domain', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
  499. ('bx_market_license', 'bx_market', 'added', '', '', 0, 'datetime', '_bx_market_form_license_input_sys_added', '_bx_market_form_license_input_added', '', 0, 0, 0, '', '', '', '', '', '', 'DateTimeUtc', '', 1, 0),
  500. ('bx_market_license', 'bx_market', 'expired', '', '', 0, 'datetime', '_bx_market_form_license_input_sys_expired', '_bx_market_form_license_input_expired', '', 0, 0, 0, '', '', '', '', '', '', 'DateTimeUtc', '', 1, 0),
  501. ('bx_market_license', 'bx_market', 'controls', '', 'do_submit,do_cancel', 0, 'input_set', '_bx_market_form_license_input_sys_controls', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
  502. ('bx_market_license', 'bx_market', 'do_submit', '_bx_market_form_license_input_do_submit', '', 0, 'submit', '_bx_market_form_license_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
  503. ('bx_market_license', 'bx_market', 'do_cancel', '_bx_market_form_license_input_do_cancel', '', 0, 'button', '_bx_market_form_license_input_sys_do_cancel', '', '', 0, 0, 0, 'a:2:{s:7:"onclick";s:45:"$(''.bx-popup-applied:visible'').dolPopupHide()";s:5:"class";s:22:"bx-def-margin-sec-left";}', '', '', '', '', '', '', '', 0, 0);
  504. INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
  505. ('bx_market_license_edit', 'order', 2147483647, 1, 1),
  506. ('bx_market_license_edit', 'license', 2147483647, 1, 2),
  507. ('bx_market_license_edit', 'domain', 2147483647, 1, 3),
  508. ('bx_market_license_edit', 'added', 2147483647, 1, 4),
  509. ('bx_market_license_edit', 'expired', 2147483647, 1, 5),
  510. ('bx_market_license_edit', 'controls', 2147483647, 1, 6),
  511. ('bx_market_license_edit', 'do_submit', 2147483647, 1, 7),
  512. ('bx_market_license_edit', 'do_cancel', 2147483647, 1, 8);
  513. -- PRE-VALUES
  514. INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES
  515. ('bx_market_cats', '_bx_market_pre_lists_cats', 'bx_market', '0'),
  516. ('bx_market_durations', '_bx_market_pre_lists_durations', 'bx_market', '0');
  517. INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
  518. ('bx_market_cats', '', 0, '_sys_please_select', ''),
  519. ('bx_market_cats', '1', 1, '_bx_market_cat_administration', ''),
  520. ('bx_market_cats', '2', 2, '_bx_market_cat_adult', ''),
  521. ('bx_market_cats', '3', 3, '_bx_market_cat_advertisement', ''),
  522. ('bx_market_cats', '4', 4, '_bx_market_cat_affiliates', ''),
  523. ('bx_market_cats', '5', 5, '_bx_market_cat_authentication', ''),
  524. ('bx_market_cats', '6', 6, '_bx_market_cat_calendars', ''),
  525. ('bx_market_cats', '7', 7, '_bx_market_cat_communication', ''),
  526. ('bx_market_cats', '8', 8, '_bx_market_cat_content', ''),
  527. ('bx_market_cats', '9', 9, '_bx_market_cat_conversion', ''),
  528. ('bx_market_cats', '10', 10, '_bx_market_cat_core_changes', ''),
  529. ('bx_market_cats', '11', 11, '_bx_market_cat_dating', ''),
  530. ('bx_market_cats', '12', 12, '_bx_market_cat_documentation', ''),
  531. ('bx_market_cats', '13', 13, '_bx_market_cat_ecommerce', ''),
  532. ('bx_market_cats', '14', 14, '_bx_market_cat_events', ''),
  533. ('bx_market_cats', '15', 15, '_bx_market_cat_feedback', ''),
  534. ('bx_market_cats', '16', 16, '_bx_market_cat_flash', ''),
  535. ('bx_market_cats', '17', 17, '_bx_market_cat_games', ''),
  536. ('bx_market_cats', '18', 18, '_bx_market_cat_graphics', ''),
  537. ('bx_market_cats', '19', 19, '_bx_market_cat_hosting', ''),
  538. ('bx_market_cats', '20', 20, '_bx_market_cat_integrations', ''),
  539. ('bx_market_cats', '21', 21, '_bx_market_cat_location', ''),
  540. ('bx_market_cats', '22', 22, '_bx_market_cat_management', ''),
  541. ('bx_market_cats', '23', 23, '_bx_market_cat_mobile', ''),
  542. ('bx_market_cats', '24', 24, '_bx_market_cat_multimedia', ''),
  543. ('bx_market_cats', '25', 25, '_bx_market_cat_music', ''),
  544. ('bx_market_cats', '26', 26, '_bx_market_cat_navigation', ''),
  545. ('bx_market_cats', '27', 27, '_bx_market_cat_other', ''),
  546. ('bx_market_cats', '28', 28, '_bx_market_cat_performance', ''),
  547. ('bx_market_cats', '29', 29, '_bx_market_cat_photos', ''),
  548. ('bx_market_cats', '30', 30, '_bx_market_cat_search', ''),
  549. ('bx_market_cats', '31', 31, '_bx_market_cat_security', ''),
  550. ('bx_market_cats', '32', 32, '_bx_market_cat_services', ''),
  551. ('bx_market_cats', '33', 33, '_bx_market_cat_social', ''),
  552. ('bx_market_cats', '34', 34, '_bx_market_cat_spam_prevention', ''),
  553. ('bx_market_cats', '35', 35, '_bx_market_cat_statistics', ''),
  554. ('bx_market_cats', '36', 36, '_bx_market_cat_templates', ''),
  555. ('bx_market_cats', '37', 37, '_bx_market_cat_tools', ''),
  556. ('bx_market_cats', '38', 38, '_bx_market_cat_translations', ''),
  557. ('bx_market_cats', '39', 39, '_bx_market_cat_video', ''),
  558. ('bx_market_durations', 'day', 1, '_bx_market_cat_duration_day', ''),
  559. ('bx_market_durations', 'week', 2, '_bx_market_cat_duration_week', ''),
  560. ('bx_market_durations', 'month', 3, '_bx_market_cat_duration_month', ''),
  561. ('bx_market_durations', 'year', 4, '_bx_market_cat_duration_year', '');
  562. -- COMMENTS
  563. 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
  564. ('bx_market', 'bx_market', 'bx_market_cmts', 1, 5000, 1000, 3, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-product&id={object_id}', '', 'bx_market_products', 'id', 'author', 'title', 'comments', 'BxMarketCmts', 'modules/boonex/market/classes/BxMarketCmts.php'),
  565. ('bx_market_notes', 'bx_market', 'bx_market_cmts_notes', 1, 5000, 1000, 0, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-post&id={object_id}', '', 'bx_market_products', 'id', 'author', 'title', '', 'BxTemplCmtsNotes', '');
  566. -- VOTES
  567. INSERT INTO `sys_objects_vote` (`Name`, `Module`, `TableMain`, `TableTrack`, `PostTimeout`, `MinValue`, `MaxValue`, `IsUndo`, `IsOn`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldRate`, `TriggerFieldRateCount`, `ClassName`, `ClassFile`) VALUES
  568. ('bx_market', 'bx_market', 'bx_market_votes', 'bx_market_votes_track', '604800', '1', '5', '0', '1', 'bx_market_products', 'id', 'author', 'rate', 'votes', 'BxMarketVoteStars', 'modules/boonex/market/classes/BxMarketVoteStars.php'),
  569. ('bx_market_reactions', 'bx_market', 'bx_market_reactions', 'bx_market_reactions_track', '604800', '1', '1', '1', '1', 'bx_market_products', 'id', 'author', 'rrate', 'rvotes', 'BxMarketVoteReactions', 'modules/boonex/market/classes/BxMarketVoteReactions.php');
  570. -- SCORES
  571. INSERT INTO `sys_objects_score` (`name`, `module`, `table_main`, `table_track`, `post_timeout`, `is_on`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_score`, `trigger_field_cup`, `trigger_field_cdown`, `class_name`, `class_file`) VALUES
  572. ('bx_market', 'bx_market', 'bx_market_scores', 'bx_market_scores_track', '604800', '0', 'bx_market_products', 'id', 'author', 'score', 'sc_up', 'sc_down', 'BxMarketScore', 'modules/boonex/market/classes/BxMarketScore.php');
  573. -- REPORTS
  574. INSERT INTO `sys_objects_report` (`name`, `module`, `table_main`, `table_track`, `is_on`, `base_url`, `object_comment`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES
  575. ('bx_market', 'bx_market', 'bx_market_reports', 'bx_market_reports_track', '1', 'page.php?i=view-product&id={object_id}', 'bx_market_notes', 'bx_market_products', 'id', 'author', 'reports', '', '');
  576. -- VIEWS
  577. 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
  578. ('bx_market', 'bx_market', 'bx_market_views_track', '86400', '1', 'bx_market_products', 'id', 'author', 'views', '', '');
  579. -- FAFORITES
  580. INSERT INTO `sys_objects_favorite` (`name`, `table_track`, `table_lists`, `is_on`, `is_undo`, `is_public`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES
  581. ('bx_market', 'bx_market_favorites_track', 'bx_market_favorites_lists', '1', '1', '1', 'page.php?i=view-product&id={object_id}', 'bx_market_products', 'id', 'author', 'favorites', '', '');
  582. -- FEATURED
  583. 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
  584. ('bx_market', 'bx_market', '1', '1', 'page.php?i=view-product&id={object_id}', 'bx_market_products', 'id', 'author', 'featured', '', '');
  585. -- CONTENT INFO
  586. INSERT INTO `sys_objects_content_info` (`name`, `title`, `alert_unit`, `alert_action_add`, `alert_action_update`, `alert_action_delete`, `class_name`, `class_file`) VALUES
  587. ('bx_market', '_bx_market', 'bx_market', 'added', 'edited', 'deleted', '', ''),
  588. ('bx_market_cmts', '_bx_market_cmts', 'bx_market', 'commentPost', 'commentUpdated', 'commentRemoved', 'BxDolContentInfoCmts', '');
  589. INSERT INTO `sys_content_info_grids` (`object`, `grid_object`, `grid_field_id`, `condition`, `selection`) VALUES
  590. ('bx_market', 'bx_market_administration', 'id', '', ''),
  591. ('bx_market', 'bx_market_common', 'id', '', '');
  592. -- SEARCH EXTENDED
  593. INSERT INTO `sys_objects_search_extended` (`object`, `object_content_info`, `module`, `title`, `active`, `class_name`, `class_file`) VALUES
  594. ('bx_market', 'bx_market', 'bx_market', '_bx_market_search_extended', 1, '', ''),
  595. ('bx_market_cmts', 'bx_market_cmts', 'bx_market', '_bx_market_search_extended_cmts', 1, 'BxTemplSearchExtendedCmts', '');
  596. -- STUDIO: page & widget
  597. INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
  598. (3, 'bx_market', '_bx_market', '_bx_market', 'bx_market@modules/boonex/market/|std-icon.svg');
  599. SET @iPageId = LAST_INSERT_ID();
  600. SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
  601. SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
  602. INSERT INTO `sys_std_widgets` (`page_id`, `module`, `type`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
  603. (@iPageId, 'bx_market', 'content', '{url_studio}module.php?name=bx_market', '', 'bx_market@modules/boonex/market/|std-icon.svg', '_bx_market', '', '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";}');
  604. INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
  605. (@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));