BxPostsConfig.php 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. // page URIs
  33. 'URI_VIEW_ENTRY' => 'view-post',
  34. 'URI_AUTHOR_ENTRIES' => 'posts-author',
  35. 'URI_ADD_ENTRY' => 'create-post',
  36. 'URL_HOME' => 'page.php?i=posts-home',
  37. // some params
  38. 'PARAM_CHARS_SUMMARY' => 'bx_posts_summary_chars',
  39. 'PARAM_CHARS_SUMMARY_PLAIN' => 'bx_posts_plain_summary_chars',
  40. 'PARAM_NUM_RSS' => 'bx_posts_rss_num',
  41. // objects
  42. 'OBJECT_STORAGE' => 'bx_posts_files',
  43. 'OBJECT_IMAGES_TRANSCODER_PREVIEW' => 'bx_posts_preview',
  44. 'OBJECT_VIEWS' => 'bx_posts',
  45. 'OBJECT_VOTES' => 'bx_posts',
  46. 'OBJECT_METATAGS' => 'bx_posts',
  47. 'OBJECT_COMMENTS' => 'bx_posts',
  48. 'OBJECT_PRIVACY_VIEW' => 'bx_posts_allow_view_to',
  49. 'OBJECT_FORM_ENTRY' => 'bx_posts',
  50. 'OBJECT_FORM_ENTRY_DISPLAY_VIEW' => 'bx_posts_entry_view',
  51. 'OBJECT_FORM_ENTRY_DISPLAY_ADD' => 'bx_posts_entry_add',
  52. 'OBJECT_FORM_ENTRY_DISPLAY_EDIT' => 'bx_posts_entry_edit',
  53. 'OBJECT_FORM_ENTRY_DISPLAY_DELETE' => 'bx_posts_entry_delete',
  54. 'OBJECT_MENU_ACTIONS_VIEW_ENTRY' => 'bx_posts_view', // actions menu on view entry page
  55. 'OBJECT_MENU_ACTIONS_MY_ENTRIES' => 'bx_posts_my', // actions menu on my entries page
  56. 'OBJECT_MENU_SUBMENU' => 'bx_posts_submenu', // main module submenu
  57. 'OBJECT_MENU_SUBMENU_VIEW_ENTRY' => 'bx_posts_view_submenu', // view entry submenu
  58. 'OBJECT_MENU_SUBMENU_VIEW_ENTRY_MAIN_SELECTION' => 'posts-home', // first item in view entry submenu from main module submenu
  59. // menu items which visibility depends on custom visibility checking
  60. 'MENU_ITEM_TO_METHOD' => array (
  61. 'bx_posts_my' => array (
  62. 'create-post' => 'checkAllowedAdd',
  63. ),
  64. 'bx_posts_view' => array (
  65. 'edit-post' => 'checkAllowedEdit',
  66. 'delete-post' => 'checkAllowedDelete',
  67. ),
  68. ),
  69. // some language keys
  70. 'T' => array (
  71. 'txt_sample_single' => '_bx_posts_txt_sample_single',
  72. ),
  73. );
  74. }
  75. }
  76. /** @} */