Forum.class.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. require_once 'Resource.class.php';
  4. /**
  5. * Class forum
  6. * @author Bart Mollet <bart.mollet@hogent.be>
  7. * @package chamilo.backup
  8. */
  9. class Forum extends Resource
  10. {
  11. /**
  12. * The title
  13. */
  14. var $title;
  15. /**
  16. * The description
  17. */
  18. var $description;
  19. /**
  20. * Category-id
  21. */
  22. var $category_id;
  23. /**
  24. * Last post
  25. */
  26. var $last_post;
  27. /**
  28. * Number of threads
  29. */
  30. var $topics;
  31. /**
  32. * Number of posts
  33. */
  34. var $posts;
  35. /**
  36. * Allow anonimous
  37. */
  38. var $allow_anonymous;
  39. /**
  40. * Allow edit
  41. */
  42. var $allow_edit;
  43. /**
  44. * Approval direct post
  45. */
  46. var $approval_direct_post;
  47. /**
  48. * Allow attachments
  49. */
  50. var $allow_attachements;
  51. /**
  52. * Allow new threads
  53. */
  54. var $allow_new_topics;
  55. /**
  56. * Default view
  57. */
  58. var $default_view;
  59. /**
  60. * Group forum
  61. */
  62. var $of_group;
  63. /**
  64. * Public/private group forum
  65. */
  66. var $group_public_private;
  67. /**
  68. * Order
  69. */
  70. var $order;
  71. /**
  72. * Locked or not
  73. */
  74. var $locked;
  75. /**
  76. * Session id
  77. */
  78. var $session_id;
  79. /**
  80. * Image
  81. */
  82. var $image;
  83. /**
  84. * Create a new Forum
  85. */
  86. function __construct($obj)
  87. {
  88. parent::__construct($obj->forum_id, RESOURCE_FORUM);
  89. $this->obj = $obj;
  90. }
  91. /**
  92. * Show this resource
  93. */
  94. function show() {
  95. parent::show();
  96. echo $this->obj->forum_title;
  97. }
  98. }