Forum.class.php 2.7 KB

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