Issue Details (XML | Word | Printable)

Key: MDL-16749
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Martin Dougiamas
Reporter: Urs Hunkler
Votes: 0
Watchers: 1
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Add div around the posting. Can be better handled by CSS.

Created: 01/Oct/08 03:38 AM   Updated: 21/Jan/09 11:00 AM
Return to search
Component/s: Forum
Affects Version/s: 1.9.2
Fix Version/s: 1.9.4

Issue Links:
Dependency
 

Participants: Martin Dougiamas, Petr Skoda, Tim Hunt and Urs Hunkler
Security Level: None
QA Assignee: Tim Hunt
Resolved date: 16/Jan/09
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_19_STABLE


 Description  « Hide
The text in forum postings can't be styled good enough. Add a div (probably called "posting") around the text. This separates it from the "content" td and the commands and ratings. the last two are already wrapped in a div.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Urs Hunkler added a comment - 01/Oct/08 03:41 AM
Without the div padding around the text will also add padding around the commands and ratings which should not be.

Martin Dougiamas added a comment - 01/Oct/08 08:00 PM
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.


Urs Hunkler added a comment - 02/Oct/08 04:09 PM
Works great. Thanks Martin for your fast solution.

Petr Skoda added a comment - 16/Jan/09 05:36 AM
closing, thanks

Tim Hunt added a comment - 20/Jan/09 03:59 PM
Did this get committed to CVS? If not, should it. If yes, what no bug Id in the commit message.

Martin Dougiamas added a comment - 20/Jan/09 04:56 PM
I just committed it now, thanks for the reminder!

Tim Hunt added a comment - 21/Jan/09 11:00 AM
Great. Reviewed code. Closing.