Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-22220

two content types in forum library are assigned the same CSS class

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.8
    • Fix Version/s: 2.0
    • Component/s: Forum
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      the shortpost summary continuation link and the long post are both assigned the CSS class "posting" in /forum/lib.php:

      ----------

      if ($link and (strlen(strip_tags($post->message)) > $CFG->forum_longpost))

      { // 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 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;

      ----------

      The "Read the rest of this topic (### Words)..."
      and the actual post should be treated as different elements. The way it currently is, for themes, any style that an author wants to apply to the "read the rest..." text by modifying the "postings" class in a theme is also applied to the full post. The short text should have its own class and style.

        Attachments

          Activity

            People

            • Assignee:
              samhemelryk Sam Hemelryk
              Reporter:
              dwahl Daniel Wahl
              Tester:
              Nobody
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10