Forum.class.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <?php // $Id: Forum.class.php 3305 2005-02-03 12:44:01Z bmol $
  2. /*
  3. ==============================================================================
  4. Dokeos - elearning and course management software
  5. Copyright (c) 2004 Dokeos S.A.
  6. Copyright (c) 2003 Ghent University (UGent)
  7. Copyright (c) 2001 Universite catholique de Louvain (UCL)
  8. Copyright (c) Bart Mollet (bart.mollet@hogent.be)
  9. For a full list of contributors, see "credits.txt".
  10. The full license can be read in "license.txt".
  11. This program is free software; you can redistribute it and/or
  12. modify it under the terms of the GNU General Public License
  13. as published by the Free Software Foundation; either version 2
  14. of the License, or (at your option) any later version.
  15. See the GNU General Public License for more details.
  16. Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
  17. Mail: info@dokeos.com
  18. ==============================================================================
  19. */
  20. require_once 'Resource.class.php';
  21. /**
  22. * A forum
  23. * @author Bart Mollet <bart.mollet@hogent.be>
  24. */
  25. class Forum extends Resource
  26. {
  27. /**
  28. * The title
  29. */
  30. var $title;
  31. /**
  32. * The description
  33. */
  34. var $description;
  35. /**
  36. * Category-id
  37. */
  38. var $category_id;
  39. /**
  40. * Last post
  41. */
  42. var $last_post;
  43. /**
  44. * Number of threads
  45. */
  46. var $topics;
  47. /**
  48. * Number of posts
  49. */
  50. var $posts;
  51. /**
  52. * Allow anonimous
  53. */
  54. var $allow_anonymous;
  55. /**
  56. * Allow edit
  57. */
  58. var $allow_edit;
  59. /**
  60. * Approval direct post
  61. */
  62. var $approval_direct_post;
  63. /**
  64. * Allow attachments
  65. */
  66. var $allow_attachements;
  67. /**
  68. * Allow new threads
  69. */
  70. var $allow_new_topics;
  71. /**
  72. * Default view
  73. */
  74. var $default_view;
  75. /**
  76. * Group forum
  77. */
  78. var $of_group;
  79. /**
  80. * Public/private group forum
  81. */
  82. var $group_public_private;
  83. /**
  84. * Order
  85. */
  86. var $order;
  87. /**
  88. * Locked or not
  89. */
  90. var $locked;
  91. /**
  92. * Session id
  93. */
  94. var $session_id;
  95. /**
  96. * Image
  97. */
  98. var $image;
  99. /**
  100. * Create a new Forum
  101. */
  102. function Forum($id, $title, $description, $category_id, $last_post, $topics, $posts, $allow_anonymous, $allow_edit, $approval_direct_post, $allow_attachements, $allow_new_topics, $default_view, $of_group, $group_public_private, $order, $locked, $session_id, $image)
  103. {
  104. parent::Resource($id,RESOURCE_FORUM);
  105. $this->title = $title;
  106. $this->description = $description;
  107. $this->category_id = $category_id;
  108. $this->last_post = $last_post;
  109. $this->topics = $topics;
  110. $this->posts = $posts;
  111. $this->allow_anonymous = $allow_anonymous;
  112. $this->allow_edit = $allow_edit;
  113. $this->approval_direct_post = $approval_direct_post;
  114. $this->allow_attachements = $allow_attachements;
  115. $this->allow_new_topics = $allow_new_topics;
  116. $this->default_view = $default_view;
  117. $this->of_group = $of_group;
  118. $this->group_public_private = $group_public_private;
  119. $this->order = $order;
  120. $this->locked = $locked;
  121. $this->session_id = $session_id;
  122. $this->image = $image;
  123. }
  124. /**
  125. * Show this resource
  126. */
  127. function show()
  128. {
  129. parent::show();
  130. echo $this->title;
  131. }
  132. }