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

Help theme developers to have fancy blocks if they want

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.9
    • 1.8
    • Themes
    • None
    • Moodle , any OS

      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.

            urshunkler Urs Hunkler
            ppollet Patrick Pollet (Inactive)
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.