install.sql 1.3 KB

123456789101112131415161718192021222324252627
  1. SET @sName = 'bx_mapshow';
  2. -- TABLE: data
  3. CREATE TABLE `bx_mapshow_accounts` (
  4. `id` int(11) NOT NULL AUTO_INCREMENT,
  5. `account_id` int(11) NOT NULL,
  6. `lng` float DEFAULT NULL,
  7. `lat` float DEFAULT NULL,
  8. PRIMARY KEY (`id`),
  9. INDEX `account_id` (`account_id`)
  10. );
  11. -- STUDIO: page & widget
  12. INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
  13. (3, @sName, '_bx_mapshow', '_bx_mapshow', 'bx_mapshow@modules/boonex/mapshow/|std-icon.svg');
  14. SET @iPageId = LAST_INSERT_ID();
  15. INSERT INTO `sys_std_widgets` (`page_id`, `module`, `type`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`, `bookmark`)
  16. VALUES(@iPageId, @sName, 'extensions', '{url_studio}module.php?name=bx_mapshow', '', 'bx_mapshow@modules/boonex/mapshow/|std-icon.svg', '_bx_mapshow', '', '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";}', 0);
  17. SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
  18. SET @iParentPageOrder = (SELECT IFNULL(MAX(`order`), 0) + 1 FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
  19. INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
  20. (@iParentPageId, LAST_INSERT_ID(), @iParentPageOrder);