enable.sql 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. -- Email template
  2. INSERT INTO `sys_email_templates` (`Module`, `NameSystem`, `Name`, `Subject`, `Body`) VALUES
  3. ('bx_drupal', '_bx_drupal_et_password_generated', 'bx_drupal_password_generated', '_bx_drupal_et_password_generated_subject', '_bx_drupal_et_password_generated_body');
  4. -- Auth objects
  5. INSERT INTO `sys_objects_auths` (`Name`, `Title`, `Link`, `Icon`) VALUES
  6. ('bx_drupal', '_bx_drupal_auth_title', 'modules/?r=drupal/start', 'fab drupal');
  7. -- Alerts
  8. INSERT INTO `sys_alerts_handlers` SET `name` = 'bx_drupal', `class` = 'BxDrupalAlerts', `file` = 'modules/boonex/drupal_connect/classes/BxDrupalAlerts.php';
  9. SET @iHandlerId := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_drupal');
  10. INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
  11. ('account', 'logout', @iHandlerId),
  12. ('profile', 'delete', @iHandlerId),
  13. ('profile', 'add', @iHandlerId),
  14. ('profile', 'show_login_form', @iHandlerId);
  15. -- Options
  16. SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules');
  17. INSERT INTO `sys_options_types` (`group`, `name`, `caption`, `icon`, `order`) VALUES
  18. ('modules', 'bx_drupal', '_bx_drupal_adm_stg_cpt_type', 'bx_drupal@modules/boonex/drupal_connect/|std-icon.svg', IF(NOT ISNULL(@iTypeOrder), @iTypeOrder + 1, 1));
  19. SET @iTypeId = LAST_INSERT_ID();
  20. INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order` )
  21. VALUES (@iTypeId, 'bx_drupal_general', '_sys_connect_adm_stg_cpt_category_general', 1);
  22. SET @iCategId = LAST_INSERT_ID();
  23. INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `order`, `extra`) VALUES
  24. ('bx_drupal_login_url', '', @iCategId, '_bx_drupal_option_login_url', 'digit', '', '', 10, ''),
  25. ('bx_drupal_redirect_page', 'index', @iCategId, '_sys_connect_option_redirect', 'select', '', '', 40, 'join,settings,dashboard,index'),
  26. ('bx_drupal_module', 'bx_persons', @iCategId, '_sys_connect_option_module', 'select', '', '', 50, 'a:2:{s:6:"module";s:9:"bx_drupal";s:6:"method";s:20:"get_profiles_modules";}'),
  27. ('bx_drupal_privacy', '3', @iCategId, '_sys_connect_option_privacy', 'select', '', '', 54, 'a:2:{s:6:"module";s:9:"bx_drupal";s:6:"method";s:18:"get_privacy_groups";}'),
  28. ('bx_drupal_confirm_email', 'on', @iCategId, '_sys_connect_option_confirm_email', 'checkbox', '', '', 70, ''),
  29. ('bx_drupal_approve', 'on', @iCategId, '_sys_connect_option_approve', 'checkbox', '', '', 80, '');
  30. -- Pages
  31. INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES
  32. ('bx_drupal_error', 'drupal-error', '_bx_drupal_error', '_bx_drupal_error', 'bx_drupal', 5, 2147483647, 0, '', '', '', '', 0, 1, 0, 'BxDrupalPage', 'modules/boonex/drupal_connect/classes/BxDrupalPage.php');
  33. INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
  34. ('bx_drupal_error', 1, 'bx_drupal', '_bx_drupal_error', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_drupal\";s:6:\"method\";s:10:\"last_error\";}', 0, 0, 1, 1);
  35. -- SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = 'sys_login' AND `cell_id` = 1 ORDER BY `order` DESC LIMIT 1);
  36. -- INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
  37. -- ('sys_login', 1, 'bx_drupal', '_bx_drupal_block_system_title_login', '_bx_drupal_block_title_login', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_drupal";s:6:"method";s:10:"login_form";}', 0, 1, 1, @iBlockOrder + 1);