BxPersonsConfig.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
  4. * CC-BY License - http://creativecommons.org/licenses/by/3.0/
  5. *
  6. * @defgroup Persons Persons
  7. * @ingroup DolphinModules
  8. *
  9. * @{
  10. */
  11. bx_import('BxBaseModProfileConfig');
  12. class BxPersonsConfig extends BxBaseModProfileConfig
  13. {
  14. function __construct($aModule)
  15. {
  16. parent::__construct($aModule);
  17. $aMenuItems2Methods = array (
  18. 'view-persons-profile' => 'checkAllowedView',
  19. 'edit-persons-profile' => 'checkAllowedEdit',
  20. 'delete-persons-profile' => 'checkAllowedDelete',
  21. 'profile-friend-add' => 'checkAllowedFriendAdd',
  22. 'profile-friend-remove' => 'checkAllowedFriendRemove',
  23. 'profile-subscribe-add' => 'checkAllowedSubscribeAdd',
  24. 'profile-subscribe-remove' => 'checkAllowedSubscribeRemove',
  25. 'profile-actions-more' => 'checkAllowedViewMoreMenu',
  26. );
  27. $this->CNF = array (
  28. // database tables
  29. 'TABLE_ENTRIES' => $aModule['db_prefix'] . 'data',
  30. // database fields
  31. 'FIELD_ID' => 'id',
  32. 'FIELD_AUTHOR' => 'author',
  33. 'FIELD_ADDED' => 'added',
  34. 'FIELD_CHANGED' => 'changed',
  35. 'FIELD_NAME' => 'fullname',
  36. 'FIELD_PICTURE' => 'picture',
  37. 'FIELD_PICTURE_PREVIEW' => 'picture_preview',
  38. 'FIELD_COVER' => 'cover',
  39. 'FIELD_COVER_PREVIEW' => 'cover_preview',
  40. 'FIELDS_QUICK_SEARCH' => array('fullname'),
  41. // page URIs
  42. 'URI_VIEW_ENTRY' => 'view-persons-profile',
  43. 'URI_EDIT_ENTRY' => 'edit-persons-profile',
  44. 'URI_EDIT_COVER' => 'edit-persons-cover',
  45. 'URL_HOME' => 'page.php?i=persons-home',
  46. // some params
  47. 'PARAM_AUTOAPPROVAL' => 'bx_persons_autoapproval',
  48. 'PARAM_DEFAULT_ACL_LEVEL' => 'bx_persons_default_acl_level',
  49. 'PARAM_NUM_RSS' => '', // TODO:
  50. // objects
  51. 'OBJECT_STORAGE' => 'bx_persons_pictures',
  52. 'OBJECT_STORAGE_COVER' => 'bx_persons_pictures',
  53. 'OBJECT_IMAGES_TRANSCODER_THUMB' => 'bx_persons_thumb',
  54. 'OBJECT_IMAGES_TRANSCODER_ICON' => 'bx_persons_icon',
  55. 'OBJECT_IMAGES_TRANSCODER_AVATAR' => 'bx_persons_avatar',
  56. 'OBJECT_IMAGES_TRANSCODER_PICTURE' => 'bx_persons_picture',
  57. 'OBJECT_IMAGES_TRANSCODER_COVER' => 'bx_persons_cover',
  58. 'OBJECT_IMAGES_TRANSCODER_COVER_THUMB' => 'bx_persons_cover_thumb',
  59. 'OBJECT_VIEWS' => 'bx_persons',
  60. 'OBJECT_FORM_ENTRY' => 'bx_person',
  61. 'OBJECT_FORM_ENTRY_DISPLAY_VIEW' => 'bx_person_view',
  62. 'OBJECT_FORM_ENTRY_DISPLAY_ADD' => 'bx_person_add',
  63. 'OBJECT_FORM_ENTRY_DISPLAY_EDIT' => 'bx_person_edit',
  64. 'OBJECT_FORM_ENTRY_DISPLAY_EDIT_COVER' => 'bx_person_edit_cover',
  65. 'OBJECT_FORM_ENTRY_DISPLAY_DELETE' => 'bx_person_delete',
  66. 'OBJECT_MENU_ACTIONS_VIEW_ENTRY' => 'bx_persons_view_actions', // actions menu on view entry page
  67. 'OBJECT_MENU_ACTIONS_VIEW_ENTRY_MORE' => 'bx_persons_view_actions_more', // actions menu on view entry page for "more" popup
  68. 'OBJECT_MENU_SUBMENU' => 'bx_persons_submenu', // main module submenu
  69. 'OBJECT_MENU_SUBMENU_VIEW_ENTRY' => 'bx_persons_view_submenu', // view entry submenu
  70. 'OBJECT_MENU_SUBMENU_VIEW_ENTRY_MAIN_SELECTION' => 'persons-home', // first item in view entry submenu from main module submenu
  71. // menu items which visibility depends on custom visibility checking
  72. 'MENU_ITEM_TO_METHOD' => array (
  73. 'bx_persons_view_actions' => $aMenuItems2Methods,
  74. 'bx_persons_view_actions_more' => $aMenuItems2Methods,
  75. ),
  76. // informer messages
  77. 'INFORMERS' => array (
  78. 'status' => array (
  79. 'name' => 'bx-persons-status-not-active',
  80. 'map' => array (
  81. BX_PROFILE_STATUS_PENDING => '_bx_persons_txt_account_pending',
  82. BX_PROFILE_STATUS_SUSPENDED => '_bx_persons_txt_account_suspended',
  83. ),
  84. ),
  85. ),
  86. // some language keys
  87. 'T' => array (
  88. 'txt_sample_single' => '_bx_persons_txt_sample_single',
  89. 'menu_item_title_befriend_sent' => '_bx_persons_menu_item_title_befriend_sent',
  90. 'menu_item_title_unfriend_cancel_request' => '_bx_persons_menu_item_title_unfriend_cancel_request',
  91. 'menu_item_title_befriend_confirm' => '_bx_persons_menu_item_title_befriend_confirm',
  92. 'menu_item_title_unfriend_reject_request' => '_bx_persons_menu_item_title_unfriend_reject_request',
  93. 'menu_item_title_befriend' => '_bx_persons_menu_item_title_befriend',
  94. 'menu_item_title_unfriend' => '_bx_persons_menu_item_title_unfriend',
  95. ),
  96. );
  97. }
  98. }
  99. /** @} */