ForumPost.class.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php // $Id: ForumPost.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-post
  23. * @author Bart Mollet <bart.mollet@hogent.be>
  24. */
  25. class ForumPost extends Resource
  26. {
  27. /**
  28. * The title
  29. */
  30. var $title;
  31. /**
  32. * The text
  33. */
  34. var $text;
  35. /**
  36. * The time
  37. */
  38. var $post_time;
  39. /**
  40. * Poster id
  41. */
  42. var $poster_id;
  43. /**
  44. * Poster name
  45. */
  46. var $poster_name;
  47. /**
  48. * Topic notify
  49. */
  50. var $topic_notify;
  51. /**
  52. * Parent post
  53. */
  54. var $parent_post_id;
  55. /**
  56. * Topic id
  57. */
  58. var $topic_id;
  59. /**
  60. * Forum id
  61. */
  62. var $forum_id;
  63. /**
  64. * Visible flag
  65. */
  66. var $visible;
  67. /**
  68. * Create a new ForumPost
  69. */
  70. function ForumPost($id, $title, $text, $post_time, $poster_id, $poster_name, $topic_notify, $parent_post_id, $topic_id, $forum_id, $visible)
  71. {
  72. parent::Resource($id, RESOURCE_FORUMPOST);
  73. $this->title = $title;
  74. $this->text = $text;
  75. $this->post_time = $post_time;
  76. $this->poster_id = $poster_id;
  77. $this->poster_name = $poster_name;
  78. $this->topic_notify = $topic_notify;
  79. $this->parent_post_id = $parent_post_id;
  80. $this->topic_id = $topic_id;
  81. $this->forum_id = $forum_id;
  82. $this->visible = $visible;
  83. }
  84. /**
  85. * Show this resource
  86. */
  87. function show()
  88. {
  89. parent::show();
  90. echo $this->title.' ('.$this->poster_name.', '.$this->post_time.')';
  91. }
  92. }