Thanks Urs.
I made these changes on moodle.org ...
-
-
- 2873,2888 ****
// Print shortened version
echo format_text(forum_shorten_post($post->message), $post->format, $options, $course->id);
$numwords = count_words(strip_tags($post->message));
! echo '<p><a href="'.$CFG->wwwroot.'/mod/forum/discuss.php?d='.$post->discussion.'">';
echo get_string('readtherest', 'forum');
! echo '</a> ('.get_string('numwords', '', $numwords).')...</p>';
} else Unknown macro: { // Print whole message if ($highlight) {
echo highlight($highlight, format_text($post->message, $post->format, $options, $course->id));
} else {
echo format_text($post->message, $post->format, $options, $course->id);
}
echo $attachedimages;
}
— 2876,2893 ----
// Print shortened version
echo format_text(forum_shorten_post($post->message), $post->format, $options, $course->id);
$numwords = count_words(strip_tags($post->message));
! echo '<div class="posting"><a href="'.$CFG->wwwroot.'/mod/forum/discuss.php?d='.$post->discussion.'">';
echo get_string('readtherest', 'forum');
! echo '</a> ('.get_string('numwords', '', $numwords).')...</div>';
} else {
// Print whole message
+ echo '<div class="posting">';
if ($highlight) { echo highlight($highlight, format_text($post->message, $post->format, $options, $course->id)); } }
else {
echo format_text($post->message, $post->format, $options, $course->id);
}
+ echo '</div>';
echo $attachedimages;
}
Please let me know if that's exactly what you needed and if it is then I'll check it into 1.9 and HEAD as well.
Without the div padding around the text will also add padding around the commands and ratings which should not be.