BxPostsConfig.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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 Posts Posts
  7. * @ingroup DolphinModules
  8. *
  9. * @{
  10. */
  11. bx_import('BxBaseModTextConfig');
  12. class BxPostsConfig extends BxBaseModTextConfig
  13. {
  14. function __construct($aModule)
  15. {
  16. parent::__construct($aModule);
  17. $this->CNF = array (
  18. // database tables
  19. 'TABLE_ENTRIES' => $aModule['db_prefix'] . 'posts',
  20. // database fields
  21. 'FIELD_ID' => 'id',
  22. 'FIELD_AUTHOR' => 'author',
  23. 'FIELD_ADDED' => 'added',
  24. 'FIELD_CHANGED' => 'changed',
  25. 'FIELD_TITLE' => 'title',
  26. 'FIELD_TEXT' => 'text',
  27. 'FIELD_TEXT_ID' => 'post-text',
  28. 'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
  29. 'FIELD_PHOTO' => 'pictures',
  30. 'FIELD_THUMB' => 'thumb',
  31. 'FIELD_COMMENTS' => 'comments',
  32. 'FIELD_LOCATION_PREFIX' => 'location',
  33. // page URIs
  34. 'URI_VIEW_ENTRY' => 'view-post',
  35. 'URI_AUTHOR_ENTRIES' => 'posts-author',
  36. 'URI_ADD_ENTRY' => 'create-post',
  37. 'URL_HOME' => 'page.php?i=posts-home',
  38. // some params
  39. 'PARAM_CHARS_SUMMARY' => 'bx_posts_summary_chars',
  40. 'PARAM_CHARS_SUMMARY_PLAIN' => 'bx_posts_plain_summary_chars',
  41. 'PARAM_NUM_RSS' => 'bx_posts_rss_num',
  42. // objects
  43. 'OBJECT_STORAGE' => 'bx_posts_files',
  44. 'OBJECT_IMAGES_TRANSCODER_PREVIEW' => 'bx_posts_preview',
  45. 'OBJECT_VIEWS' => 'bx_posts',
  46. 'OBJECT_VOTES' => 'bx_posts',
  47. 'OBJECT_METATAGS' => 'bx_posts',
  48. 'OBJECT_COMMENTS' => 'bx_posts',
  49. 'OBJECT_PRIVACY_VIEW' => 'bx_posts_allow_view_to',
  50. 'OBJECT_FORM_ENTRY' => 'bx_posts',
  51. 'OBJECT_FORM_ENTRY_DISPLAY_VIEW' => 'bx_posts_entry_view',
  52. 'OBJECT_FORM_ENTRY_DISPLAY_ADD' => 'bx_posts_entry_add',
  53. 'OBJECT_FORM_ENTRY_DISPLAY_EDIT' => 'bx_posts_entry_edit',
  54. 'OBJECT_FORM_ENTRY_DISPLAY_DELETE' => 'bx_posts_entry_delete',
  55. 'OBJECT_MENU_ACTIONS_VIEW_ENTRY' => 'bx_posts_view', // actions menu on view entry page
  56. 'OBJECT_MENU_ACTIONS_MY_ENTRIES' => 'bx_posts_my', // actions menu on my entries page
  57. 'OBJECT_MENU_SUBMENU' => 'bx_posts_submenu', // main module submenu
  58. 'OBJECT_MENU_SUBMENU_VIEW_ENTRY' => 'bx_posts_view_submenu', // view entry submenu
  59. 'OBJECT_MENU_SUBMENU_VIEW_ENTRY_MAIN_SELECTION' => 'posts-home', // first item in view entry submenu from main module submenu
  60. 'OBJECT_MENU_MANAGE_TOOLS' => 'bx_posts_menu_manage_tools', //manage menu in content administration tools
  61. 'OBJECT_GRID_ADMINISTRATION' => 'bx_posts_administration',
  62. 'OBJECT_GRID_MODERATION' => 'bx_posts_moderation',
  63. // menu items which visibility depends on custom visibility checking
  64. 'MENU_ITEM_TO_METHOD' => array (
  65. 'bx_posts_my' => array (
  66. 'create-post' => 'checkAllowedAdd',
  67. ),
  68. 'bx_posts_view' => array (
  69. 'edit-post' => 'checkAllowedEdit',
  70. 'delete-post' => 'checkAllowedDelete',
  71. ),
  72. ),
  73. // some language keys
  74. 'T' => array (
  75. 'txt_sample_single' => '_bx_posts_txt_sample_single',
  76. 'txt_sample_comment_single' => '_bx_posts_txt_sample_comment_single',
  77. ),
  78. );
  79. $this->_aPrefixes = array(
  80. 'lang' => '_bx_posts'
  81. );
  82. $this->_aJsClass = array(
  83. 'manage_tools' => 'BxPostsManageTools'
  84. );
  85. $this->_aJsObjects = array(
  86. 'manage_tools' => 'oBxPostsManageTools'
  87. );
  88. $this->_aGridObjects = array(
  89. 'moderation' => $this->CNF['OBJECT_GRID_MODERATION'],
  90. 'administration' => $this->CNF['OBJECT_GRID_ADMINISTRATION'],
  91. );
  92. }
  93. }
  94. /** @} */