enable.sql 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. -- PAGES & BLOCKS
  2. INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES
  3. ('bx_timeline_view', '_bx_timeline_page_title_sys_view', '_bx_timeline_page_title_view', 'bx_timeline', 5, 2147483647, 1, 'view', 'page.php?i=view', '', '', '', 0, 1, 0, '', '');
  4. INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
  5. ('bx_timeline_view', 1, 'bx_timeline', '_bx_timeline_page_block_title_post', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:14:"get_block_post";}', 0, 0, 1),
  6. ('bx_timeline_view', 1, 'bx_timeline', '_bx_timeline_page_block_title_view', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:14:"get_block_view";}', 0, 1, 1);
  7. SET @iPBCellProfile = 1;
  8. SET @iPBOrderProfile = (SELECT MAX(`order`) FROM `sys_pages_blocks` WHERE `object`='bx_persons_view_profile' AND `cell_id` = @iPBCellProfile LIMIT 1);
  9. INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
  10. ('bx_persons_view_profile', @iPBCellProfile, 'bx_timeline', '_bx_timeline_page_block_title_post_profile', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_post_profile";}', 0, 0, @iPBOrderProfile + 1),
  11. ('bx_persons_view_profile', @iPBCellProfile, 'bx_timeline', '_bx_timeline_page_block_title_view_profile', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_view_profile";}', 0, 1, @iPBOrderProfile + 2);
  12. -- SETTINGS
  13. SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules');
  14. INSERT INTO `sys_options_types`(`group`, `name`, `caption`, `icon`, `order`) VALUES
  15. ('modules', 'bx_timeline', '_bx_timeline', 'bx_timeline@modules/boonex/timeline/|std-mi.png', IF(ISNULL(@iTypeOrder), 1, @iTypeOrder + 1));
  16. SET @iTypeId = LAST_INSERT_ID();
  17. INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
  18. VALUES (@iTypeId, 'bx_timeline', '_bx_timeline', 1);
  19. SET @iCategId = LAST_INSERT_ID();
  20. INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `extra`, `order`) VALUES
  21. ('bx_timeline_enable_guest_comments', '', @iCategId, 'Allow non-members to post in Timeline', 'checkbox', '', '', '', 1),
  22. ('bx_timeline_enable_delete', 'on', @iCategId, 'Allow Timeline owner to remove events', 'checkbox', '', '', '', 2),
  23. ('bx_timeline_events_per_page_profile', '10', @iCategId, 'Number of events are displayed on Profile page', 'digit', '', '', '', 3),
  24. ('bx_timeline_events_per_page_account', '20', @iCategId, 'Number of events are displayed on Account page', 'digit', '', '', '', 4),
  25. ('bx_timeline_rss_length', '5', @iCategId, 'The length of RSS feed', 'digit', '', '', '', 5),
  26. ('bx_timeline_events_hide', '', @iCategId, 'Hide events from Timeline', 'list', '', '', 'PHP:return BxDolService::call(\'bx_timeline\', \'get_actions_checklist\');', 6),
  27. ('bx_timeline_chars_display_max', '300', @iCategId, 'Max number of displayed character in text post', 'digit', '', '', '', 7);
  28. -- ACL
  29. INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
  30. ('bx_timeline', 'post', NULL, '_bx_timeline_acl_action_post', '', 1, 1);
  31. SET @iIdActionPost = LAST_INSERT_ID();
  32. INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
  33. ('bx_timeline', 'delete', NULL, '_bx_timeline_acl_action_delete', '', 1, 1);
  34. SET @iIdActionDelete = LAST_INSERT_ID();
  35. INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
  36. ('bx_timeline', 'comment', NULL, '_bx_timeline_acl_action_comment', '', 1, 1);
  37. SET @iIdActionComment = LAST_INSERT_ID();
  38. SET @iUnauthenticated = 1;
  39. SET @iStandard = 2;
  40. SET @iUnconfirmed = 3;
  41. SET @iPending = 4;
  42. SET @iSuspended = 5;
  43. SET @iModerator = 6;
  44. SET @iAdministrator = 7;
  45. SET @iPremium = 8;
  46. INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
  47. -- post
  48. (@iStandard, @iIdActionPost),
  49. (@iModerator, @iIdActionPost),
  50. (@iAdministrator, @iIdActionPost),
  51. (@iPremium, @iIdActionPost),
  52. -- delete
  53. (@iModerator, @iIdActionDelete),
  54. (@iAdministrator, @iIdActionDelete),
  55. -- comment
  56. (@iStandard, @iIdActionComment),
  57. (@iModerator, @iIdActionComment),
  58. (@iAdministrator, @iIdActionComment),
  59. (@iPremium, @iIdActionComment);
  60. -- ALERTS
  61. INSERT INTO `sys_alerts_handlers`(`name`, `class`, `file`, `eval`) VALUES
  62. ('bx_timeline', '', '', 'BxDolService::call(\'bx_timeline\', \'response\', array($this));');
  63. -- COMMENTS
  64. INSERT INTO `sys_objects_cmts` (`Name`, `TableCmts`, `TableTrack`, `CharsPostMin`, `CharsPostMax`, `CharsDisplayMax`, `Nl2br`, `PerView`, `PerViewReplies`, `BrowseType`, `IsBrowseSwitch`, `PostFormPosition`, `NumberOfLevels`, `IsDisplaySwitch`, `IsRatable`, `ViewingThreshold`, `IsOn`, `RootStylePrefix`, `BaseUrl`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldTitle`, `TriggerFieldComments`, `ClassName`, `ClassFile`) VALUES
  65. ('bx_timeline', 'bx_timeline_comments', 'bx_timeline_comments_track', 1, 5000, 1000, 1, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', '', 'bx_timeline_events', 'id', 'title', 'comments', 'BxTimelineCmts', 'modules/boonex/timeline/classes/BxTimelineCmts.php');