install.sql 1.4 KB

12345678910111213141516171819202122232425262728
  1. -- Tables
  2. CREATE TABLE IF NOT EXISTS `bx_mlc_keys` (
  3. `id` int(11) NOT NULL AUTO_INCREMENT,
  4. PRIMARY KEY (`id`)
  5. );
  6. CREATE TABLE IF NOT EXISTS `bx_mlc_strings` (
  7. `key_id` int(11) NOT NULL DEFAULT '0',
  8. `language_id` int(11) unsigned NOT NULL DEFAULT '0',
  9. `string` text NOT NULL DEFAULT '',
  10. `orig` tinyint(4) unsigned NOT NULL DEFAULT '0',
  11. PRIMARY KEY (`key_id`,`language_id`),
  12. FULLTEXT KEY `string` (`string`)
  13. );
  14. -- Studio page and widget
  15. INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
  16. (3, 'bx_mlc', '_bx_mlc', '_bx_mlc', 'bx_mlc@modules/boonex/mlc/|std-icon.svg');
  17. SET @iPageId = LAST_INSERT_ID();
  18. SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
  19. SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
  20. INSERT INTO `sys_std_widgets` (`page_id`, `module`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
  21. (@iPageId, 'bx_mlc', '{url_studio}module.php?name=bx_mlc&page=settings', '', 'bx_mlc@modules/boonex/mlc/|std-icon.svg', '_bx_mlc', '', '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";}');
  22. INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
  23. (@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));