diff --git a/renderer.php b/renderer.php index e96e0d75..fdf179b8 100644 --- a/renderer.php +++ b/renderer.php @@ -276,7 +276,7 @@ public function discussions($cm, array $discussions, array $options) { $output = '
'; foreach ($discussions as $discussionpost) { list($discussion, $post) = $discussionpost; - $output .= $this->discussion($cm, $discussion, $post, false); + $output .= $this->discussion($cm, $discussion, $post, false, array(), null, true); } @@ -320,9 +320,10 @@ public function discussion_thread($cm, $discussion, $post, array $posts, $canrep * @param \stdClass $post The discussion's post to render * @param \stdClass[] $posts The discussion posts (optional) * @param null|boolean $canreply If the user can reply or not (optional) + * @param null|boolean $hidethreadcontent for main view(optional) * @return string */ - public function discussion($cm, $discussion, $post, $fullthread, array $posts = array(), $canreply = null) { + public function discussion($cm, $discussion, $post, $fullthread, array $posts = array(), $canreply = null, $hidethreadcontent = null) { global $DB, $PAGE, $USER; $forum = hsuforum_get_cm_forum($cm); @@ -437,7 +438,7 @@ public function discussion($cm, $discussion, $post, $fullthread, array $posts = $data->timed = ''; } - return $this->discussion_template($data, $forum->type); + return $this->discussion_template($data, $forum->type, $hidethreadcontent); } public function article_assets($cm) { @@ -551,7 +552,7 @@ public function post($cm, $discussion, $post, $canreply = false, $parent = null, return $this->post_template($data); } - public function discussion_template($d, $forumtype) { + public function discussion_template($d, $forumtype, $hidethreadcontent = null) { global $PAGE; $replies = ''; @@ -624,6 +625,11 @@ public function discussion_template($d, $forumtype) { $revealed = ''.$nonanonymous.''; } + $threadcontent = ''; + if (!$hidethreadcontent) { + $threadcontent = '
' . $d->message . '
'; + } + $threadheader = << @@ -649,10 +655,7 @@ public function discussion_template($d, $forumtype) { $threadheader - -
- $d->message -
+ $threadcontent $tools diff --git a/styles.css b/styles.css index 9025c8c7..8a7b1043 100644 --- a/styles.css +++ b/styles.css @@ -40,7 +40,6 @@ /* Hide things in the main view */ .hsuforum-thread .hsuforum-footer-reply, .hsuforum-thread .hsuforum-thread-body, -.hsuforum-thread .hsuforum-thread-content, .hsuforum-thread .hsuforum-replycount-link, .hsuforum-reply-wrapper + header { display: none;