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

Help theme developers to have fancy blocks if they want

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.9
    • Component/s: Themes
    • Labels:
      None
    • Environment:
      Moodle , any OS

      Description

      Hello,

      In our place, Moodle and other contents servers (plone, mediawiki,esup ...)are integrated under a commun portal and we
      give "illusion of unicity" by using CAS/SSO and a common theme with "rounded corners blocks, with side shade" and common colors and fonts.

      At every new version of Moodle since 1.4, I have to modify lib/weblib.php to add four <div> at every corner of Moodle's blocks with a class defined in our common CSS style sheets.

      Could it be done in the official Moodle code, thus allowing theme developers to customize, if they want it, the aspect of Moodle side's blocks by defining background images, colors, shades ...for classes named topLeft, topRight, botLeft, botRight and header in a CSS file ?

      This requires minor modifications to lib/weblib.php in functions print_side_block_start and print_side_block_end.

      near the end of print_side_block_start

      if ($heading)

      { // echo '<div class="header">'.$heading.'</div>'; current code // proposed code echo '<div class="topLeft"> </div>'; echo '<div class="header">'; echo $heading; echo '</div>'; echo '<div class="topRight"> </div>'; // end of proposed code }

      and two new lines at the beginning of print_side_block_end

      function print_side_block_end($attributes = array()) {
      global $CFG;
      echo '<div class="botLeft"> </div>'; // proposed addition
      echo '<div class="botRight"> </div>'; // proposed addition
      ...

      Thanks.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              urshunkler Urs Hunkler
              Reporter:
              ppollet Patrick Pollet
              Tester:
              Nobody
              Participants:
              Component watchers:
              Bas Brands
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                3/Mar/08