Commit Graph

15 Commits

Author SHA1 Message Date
tjhunt b70094743a themes: MDL-19077 change how the theme is initialised and CSS is served.
This is part of http://docs.moodle.org/en/Development:Theme_engines_for_Moodle%3F

$THEME is now initialised at the same time as $OUTPUT. Old functions like
theme_setup are deprecated in favour of methods on $PAGE. There is a new
theme_config class in outputlib.php that deals with loading the theme config.php file.

CSS used to be served by themes styles.php files calling a function in weblib.php.
Now it works by each theme's styles.php file doing
$themename = basename(dirname(__FILE__));
require_once(dirname(__FILE__) . '/../../theme/styles.php');
which is less code to be copied into each theme. (Old-style styles.php files still
work thanks to some code in deprecatedlib.php.)

Admin UI for choosing a theme cleaned up.

A couple of theme-specific hard-coded hacks like $THEME->cssconstants and
$THEME->CSSEdit have been replaced by a more generic $THEME->customcssoutputfunction
hook. See examples at the end of outputlib.php

Also:
* Fix setting the theme in the URL, which seems to have been broken since 1.9.
* Fix up errors on a few pages caused by the new initialisation order.
* MDL-19097 moodle_page::set_course should not set $COURSE unless it is $PAGE.
* httpsrequired() from moodlelib.php moved to $PAGE->https_required().
* Move has_started() method to the renderer base class.
* Further fixes to display of early errors.
* Remove print_header/footer_old from weblib. I did not mean to commit them before.
2009-07-01 05:54:26 +00:00
skodak a78bee285d MDL-16433 themes and javascript files are not blocked by running upgrade anymore 2008-09-14 08:40:23 +00:00
Francois Marier 6800d78e06 Drift between CVS and git
- large deletions
- lucene updates
- error() => print_error()
- NO_MOODLE_COOKIES define
- various other things
2008-06-25 17:31:23 +00:00
gustav_delius a159b825a3 Fixed empty lines 2006-04-29 19:46:41 +00:00
moodler 08777eaf25 Set the last modified time of the style sheet to the current time 2006-04-07 15:07:52 +00:00
moodler 6bf277d7c5 Fixing a typo: http://moodle.org/mod/forum/discuss.php?d=41814#199162 2006-04-07 15:03:51 +00:00
moodler 8f6579f472 New cornflower from Jeffery Watkins! 2005-04-26 01:56:11 +00:00
moodler d65a650133 Fixes for Theme preview 2005-01-31 05:58:03 +00:00
moodler 18fc7e7c67 Moving style information from XHTML code to stylesheets 2004-09-30 06:52:49 +00:00
moodler dca5ac23eb Added styles for site topic on front page 2004-07-14 06:51:13 +00:00
defacer 87722d4f2c A couple of new CSS rules to make the course summary block display the same as before. 2004-05-28 10:48:59 +00:00
moodler b1049b0bdd Added styles for full event display 2004-05-23 10:29:46 +00:00
moodler 2367e13d6c LOTS of theme fixes for calendars etc 2004-05-22 07:53:40 +00:00
defacer 65660de888 Upgrade with more intelligent CSS rules.
Maybe needs some color changes, but I 'm not really much of an interior decorator... :)

Coincidentally fixed a typo in the theme: "0" was "o".
2004-04-20 11:41:18 +00:00
moodler 077641504f Cornflower, by Tom Murdock.
A blue theme with some nice things about it.
2004-02-16 16:52:39 +00:00