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

Implement the theme engines proposal

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Themes
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Gliffy Diagrams

        Attachments

          Issue Links

            Activity

            Hide
            nakohdo Frank Ralf added a comment -

            Hi Tim,

            I have just stumbled over this website http://realworldstyle.com that provides CSS layouts with 2 or 3 columns, header and footer, which even work with NN4 (I'd call that robust...).

            hth
            Frank

            Show
            nakohdo Frank Ralf added a comment - Hi Tim, I have just stumbled over this website http://realworldstyle.com that provides CSS layouts with 2 or 3 columns, header and footer, which even work with NN4 (I'd call that robust...). hth Frank
            Hide
            aquisse Thomas Hanley added a comment -

            Hi Tim,

            Maxdesign are pretty reliable with regard to web standards and accessibility.

            http://maxdesign.com.au/presentation/page_layouts/

            The CSS-discuss list also has alot of info on this, presented in a table showing solutions that are both fixed and fluid. It also shows browser support:

            http://css-discuss.incutio.com/?page=ThreeColumnLayouts

            ~thomas

            Show
            aquisse Thomas Hanley added a comment - Hi Tim, Maxdesign are pretty reliable with regard to web standards and accessibility. http://maxdesign.com.au/presentation/page_layouts/ The CSS-discuss list also has alot of info on this, presented in a table showing solutions that are both fixed and fluid. It also shows browser support: http://css-discuss.incutio.com/?page=ThreeColumnLayouts ~thomas
            Hide
            timhunt Tim Hunt added a comment -

            The attached patch (theme_engine_infrastructure.patch) implements most of http://docs.moodle.org/en/Development:Theme_engines_for_Moodle%3F

            It does not yet implement any actual rendering methods to replace the ones in weblib. However it does implement all the renderer_engine infrastructure, and a working template renderer.

            There are unit tests, and PHP doc comments, which hopefully show how it works.

            (Note, while the template renderer does work, it probably does not have very good performance. Consider it an interesting proof-of-concept until it has had extensive testing.)

            Code reviews and comments welcome. I would like to commit this tomorrow, and then move on to re-implementing all the weblib print_... functions as moodle_core_renderer methods.

            Show
            timhunt Tim Hunt added a comment - The attached patch (theme_engine_infrastructure.patch) implements most of http://docs.moodle.org/en/Development:Theme_engines_for_Moodle%3F It does not yet implement any actual rendering methods to replace the ones in weblib. However it does implement all the renderer_engine infrastructure, and a working template renderer. There are unit tests, and PHP doc comments, which hopefully show how it works. (Note, while the template renderer does work, it probably does not have very good performance. Consider it an interesting proof-of-concept until it has had extensive testing.) Code reviews and comments welcome. I would like to commit this tomorrow, and then move on to re-implementing all the weblib print_... functions as moodle_core_renderer methods.
            Hide
            poltawski Dan Poltawski added a comment -

            Wow, i've reviewed the code and i've learnt bits of php magic I didn't know existed! The only thing I can add is to point out two comment typos:

            taking the frist one
            Render the template for a gives method

            Show
            poltawski Dan Poltawski added a comment - Wow, i've reviewed the code and i've learnt bits of php magic I didn't know existed! The only thing I can add is to point out two comment typos: taking the frist one Render the template for a gives method
            Hide
            timhunt Tim Hunt added a comment -

            Attach my current work in progress as a backup.

            Show
            timhunt Tim Hunt added a comment - Attach my current work in progress as a backup.
            Hide
            timhunt Tim Hunt added a comment -

            OK, another big chunk checked in.

            Show
            timhunt Tim Hunt added a comment - OK, another big chunk checked in.
            Hide
            timhunt Tim Hunt added a comment - - edited

            Another work-in-progress patch (themes_cleanup.patch).

            This one cleans up how themes are initialised, and how the theme CSS is processed.

            The bit I would really like someone to review before tomorrow morning is the change I have made to themes styles.php files. Is this a good idea. (Make sure you also look at the code in deprecated lib to keep old themes working.)

            I plan to test this a bit more tomorrow, then commit it.

            Show
            timhunt Tim Hunt added a comment - - edited Another work-in-progress patch (themes_cleanup.patch). This one cleans up how themes are initialised, and how the theme CSS is processed. The bit I would really like someone to review before tomorrow morning is the change I have made to themes styles.php files. Is this a good idea. (Make sure you also look at the code in deprecated lib to keep old themes working.) I plan to test this a bit more tomorrow, then commit it.
            Hide
            timhunt Tim Hunt added a comment -

            The work in themes_cleanup.patch is now committed.

            Show
            timhunt Tim Hunt added a comment - The work in themes_cleanup.patch is now committed.
            Hide
            timhunt Tim Hunt added a comment -

            Another big work-in-progress patch. (blocks_output.patch)

            This moves blocks output into the theme layout.php file, and deletes it from everywhere else.

            Not quite complete. quiz, lesson and resource module need a bit more work. custom_corners_core_rendererer::block also needs to be updated.

            At the moment, the diffstat is about -500 lines of code.

            Show
            timhunt Tim Hunt added a comment - Another big work-in-progress patch. (blocks_output.patch) This moves blocks output into the theme layout.php file, and deletes it from everywhere else. Not quite complete. quiz, lesson and resource module need a bit more work. custom_corners_core_rendererer::block also needs to be updated. At the moment, the diffstat is about -500 lines of code.
            Hide
            timhunt Tim Hunt added a comment -

            OK, that huge patch committed. By the end it was -900 lines.

            I know blocks editing is broken, and there is a bit to clean up in lesson, quiz and resource.

            Show
            timhunt Tim Hunt added a comment - OK, that huge patch committed. By the end it was -900 lines. I know blocks editing is broken, and there is a bit to clean up in lesson, quiz and resource.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Note: I've changed:

            public function heading($text, $level, $classes = 'main', $id = '')

            to:

            public function heading($text, $level = 2, $classes = 'main', $id = '')

            so, level is now optional and defaults to 2.

            Commented in HQ chat.

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Note: I've changed: public function heading($text, $level, $classes = 'main', $id = '') to: public function heading($text, $level = 2, $classes = 'main', $id = '') so, level is now optional and defaults to 2. Commented in HQ chat.
            Hide
            timhunt Tim Hunt added a comment -

            All subtasks done. Closing.

            Show
            timhunt Tim Hunt added a comment - All subtasks done. Closing.

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

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