install.sql 1.2 KB

123456789101112131415161718192021
  1. CREATE TABLE `bx_facebook_accounts` (
  2. `id_profile` int(10) unsigned NOT NULL,
  3. `fb_profile` bigint(20) NOT NULL,
  4. PRIMARY KEY (`id_profile`),
  5. KEY `fb_profile` (`fb_profile`)
  6. );
  7. -- Studio page and widget
  8. INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
  9. (3, 'bx_facebook', '_bx_facebook', '_bx_facebook', 'bx_facebook@modules/boonex/facebook_connect/|std-icon.svg');
  10. SET @iPageId = LAST_INSERT_ID();
  11. SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
  12. SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
  13. INSERT INTO `sys_std_widgets` (`page_id`, `module`, `type`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
  14. (@iPageId, 'bx_facebook', 'integrations', '{url_studio}module.php?name=bx_facebook', '', 'bx_facebook@modules/boonex/facebook_connect/|std-icon.svg', '_bx_facebook', '', '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";}');
  15. INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
  16. (@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));