install.sql 1.3 KB

123456789101112131415161718192021222324
  1. -- TABLES
  2. CREATE TABLE `bx_anon_follow_subscriptions` (
  3. `id` int(11) NOT NULL AUTO_INCREMENT,
  4. `initiator` int(11) NOT NULL,
  5. `content` int(11) NOT NULL,
  6. `added` int(10) UNSIGNED NOT NULL,
  7. PRIMARY KEY (`id`),
  8. INDEX `content` (`content`),
  9. UNIQUE INDEX `initiator` (`initiator`, `content`)
  10. );
  11. -- STUDIO WIDGET
  12. INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
  13. (3, 'bx_anon_follow', '_bx_anon_follow', '_bx_anon_follow', 'bx_anon_follow@modules/boonex/anon_follow/|std-icon.svg');
  14. SET @iPageId = LAST_INSERT_ID();
  15. SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
  16. SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
  17. INSERT INTO `sys_std_widgets` (`page_id`, `module`, `type`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
  18. (@iPageId, 'bx_anon_follow', 'extensions', '{url_studio}module.php?name=bx_anon_follow', '', 'bx_anon_follow@modules/boonex/anon_follow/|std-icon.svg', '_bx_anon_follow', '', '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";}');
  19. INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
  20. (@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));