Commit Graph

36 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
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
mits 0cc5017427 fixed based on standard theme. 2005-04-27 17:13:31 +00:00
mits 7b790417f2 fixed.
based on standard theme.
2005-03-25 21:53:49 +00:00
mits 54e03195d9 fixed. 2005-03-11 22:53:04 +00:00
mits 2ea70bbe69 upgraded for 1.5 2005-03-05 00:34:47 +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 562727705f Upgrade with more intelligent CSS rules.
Maybe needs some color changes, but I 'm not really much of an interior decorator... :)
2004-04-20 12:14:57 +00:00
moodler 5604f7798f New style for tabledivider, and some fixups 2004-01-26 10:14:22 +00:00
moodler cf2db3ab76 Fixed colours again 2003-10-26 16:07:02 +00:00
moodler f91847d0c3 New styles 2003-10-22 07:45:47 +00:00
moodler 266d6b75d2 Slight fix for category names (too big on IE) 2003-09-08 14:46:00 +00:00
moodler 091ebec973 Improvements in styles for category/course listings 2003-09-03 15:23:41 +00:00
moodler d5f26b070c Added some missing styles from the course listing, so that the
course and category names can be tweaked.
2003-08-29 01:31:41 +00:00
moodler 6535be8551 New, shorter intro to styles files that calls a function.
This function sets header information to improve caching (default 5 minutes)

Cookies are also prevented to improve cacheability.
2003-08-12 07:52:19 +00:00
mits 0c59a23c67 text-decoration: underline problem fixed.
copy theme->standard->styles.php to theme->oceanblue->styles.php and
changed a:link, a:visited, a:hover
2003-05-24 11:30:58 +00:00
moodler b5987b0f49 Added missing style - .forumpostheadertopic 2003-05-20 06:17:06 +00:00
moodler e48feed988 Many little clean-ups for themes.
- Got rid of obvious non-XHTML code in headers and footers.
  - Got rid of all the PHP short tags
  - Added new styles for the headers
2003-05-15 13:55:22 +00:00
moodler 4105fe9dd2 Added two styles: .noticebox and .noticeboxcontent 2003-05-05 12:17:34 +00:00
moodler ea23100a02 Style cleanups. Some consistency, converted all to Unix format, and
added manual setting of the MIME type.
2003-05-05 08:12:28 +00:00
moodler 81ed361792 Added new style for hidden topics as well as some docs about
all the changes in this version
2003-05-04 07:58:15 +00:00
stronk7 85093cf4f9 Added the dimmed_text css style to show normal text dimmed (gray #AAAAAA) 2003-04-26 18:54:37 +00:00
moodler 78e0146055 Argh! Excess quotes in CSS 2003-04-26 12:12:30 +00:00
moodler 6eb6cd8753 New style for teacher-only colour (eg when showing teacher posts in recent activity) 2003-04-26 12:07:14 +00:00
moodler b328523cc1 Style for "You are logged in as xxx" and the link to the course home page. 2003-04-25 09:23:08 +00:00
moodler 03aa0dfa10 Style improvements and upgrades 2003-04-18 06:39:40 +00:00
mits 499ab3711e Changed softly :-) 2002-12-13 08:03:35 +00:00
moodler 02d35f5503 New themes under construction 2002-12-13 03:12:11 +00:00