diff --git a/theme/brightretro/styles.php b/theme/brightretro/styles.php index ab56b328f4f..c75f327769b 100644 --- a/theme/brightretro/styles.php +++ b/theme/brightretro/styles.php @@ -2,12 +2,18 @@ /// We use PHP so we can do value substitutions into the styles + $nomoodlecookie = true; + require_once("../../config.php"); + if (!isset($themename)) { $themename = NULL; } - $nomoodlecookie = true; - require_once("../../config.php"); + if (isset($localconfig)) { + unset($THEME); + include('config.php'); + } + $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename); /// From here on it's nearly a normal stylesheet. diff --git a/theme/cordoroyblue/styles.php b/theme/cordoroyblue/styles.php index 7e7d57481f3..37abc5688c1 100644 --- a/theme/cordoroyblue/styles.php +++ b/theme/cordoroyblue/styles.php @@ -4,6 +4,16 @@ $nomoodlecookie = true; require_once("../../config.php"); + + if (!isset($themename)) { + $themename = NULL; + } + + if (isset($localconfig)) { + unset($THEME); + include('config.php'); + } + $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename); diff --git a/theme/cornflower/styles.php b/theme/cornflower/styles.php index ef6e77c5568..e9b84d18443 100644 --- a/theme/cornflower/styles.php +++ b/theme/cornflower/styles.php @@ -4,6 +4,14 @@ $nomoodlecookie = true; require_once("../../config.php"); + if (!isset($themename)) { + $themename = NULL; + } + + if (isset($localconfig)) { + unset($THEME); + include('config.php'); + } $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename); /// From here on it's nearly a normal stylesheet. diff --git a/theme/formal_white/styles.php b/theme/formal_white/styles.php index 5a9e3845d75..651b22f91d0 100644 --- a/theme/formal_white/styles.php +++ b/theme/formal_white/styles.php @@ -2,12 +2,16 @@ /// We use PHP so we can do value substitutions into the styles + $nomoodlecookie = true; + require_once("../../config.php"); if (!isset($themename)) { $themename = NULL; } - $nomoodlecookie = true; - require_once("../../config.php"); + if (isset($localconfig)) { + unset($THEME); + include('config.php'); + } $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename); /// From here on it's nearly a normal stylesheet. diff --git a/theme/garden/styles.php b/theme/garden/styles.php index c167b8c747b..f8de1c0f246 100755 --- a/theme/garden/styles.php +++ b/theme/garden/styles.php @@ -4,6 +4,14 @@ $nomoodlecookie = true; require_once("../../config.php"); + if (!isset($themename)) { + $themename = NULL; + } + + if (isset($localconfig)) { + unset($THEME); + include('config.php'); + } $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename); /// From here on it's nearly a normal stylesheet. diff --git a/theme/index.php b/theme/index.php index c1b3102ff62..feb1571722b 100644 --- a/theme/index.php +++ b/theme/index.php @@ -31,6 +31,8 @@ error("This theme is not installed!"); } if (set_config("theme", $choose)) { + theme_setup($choose); + print_header("$site->shortname: $strthemes", $site->fullname, "wwwroot/$CFG->admin/index.php\">$stradministration -> ". "wwwroot/$CFG->admin/configure.php\">$strconfiguration -> $strthemes"); diff --git a/theme/metal/styles.php b/theme/metal/styles.php index f5843c0c6f2..aa903b6e0f7 100644 --- a/theme/metal/styles.php +++ b/theme/metal/styles.php @@ -2,12 +2,16 @@ /// We use PHP so we can do value substitutions into the styles + $nomoodlecookie = true; + require_once("../../config.php"); if (!isset($themename)) { $themename = NULL; } - $nomoodlecookie = true; - require_once("../../config.php"); + if (isset($localconfig)) { + unset($THEME); + include('config.php'); + } $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename); /// From here on it's nearly a normal stylesheet. diff --git a/theme/oceanblue/styles.php b/theme/oceanblue/styles.php index bb72ee5d9ef..42accbf5407 100644 --- a/theme/oceanblue/styles.php +++ b/theme/oceanblue/styles.php @@ -4,6 +4,14 @@ $nomoodlecookie = true; require_once("../../config.php"); + if (!isset($themename)) { + $themename = NULL; + } + + if (isset($localconfig)) { + unset($THEME); + include('config.php'); + } $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename); /// From here on it's nearly a normal stylesheet. diff --git a/theme/orangewhite/styles.php b/theme/orangewhite/styles.php index fc007906b1e..edc045f6054 100644 --- a/theme/orangewhite/styles.php +++ b/theme/orangewhite/styles.php @@ -9,6 +9,11 @@ $nomoodlecookie = true; require_once("../../config.php"); + if (isset($localconfig)) { + unset($THEME); + include('config.php'); + } + $lastmodified = 0; $lifetime = 600; diff --git a/theme/preview.php b/theme/preview.php index 08b7bd1a62a..41e230da47b 100644 --- a/theme/preview.php +++ b/theme/preview.php @@ -18,11 +18,10 @@ error("You must be an administrator to change themes."); } - $CFG->theme = $preview; - $CFG->header = "$CFG->dirroot/theme/$CFG->theme/header.html"; - $CFG->footer = "$CFG->dirroot/theme/$CFG->theme/footer.html"; + $CFG->theme = $preview; + + theme_setup($CFG->theme, 'localconfig=true&themename='.$CFG->theme); - print_header(); $stradministration = get_string("administration"); $strconfiguration = get_string("configuration"); $strthemes = get_string("themes"); diff --git a/theme/standard/styles.php b/theme/standard/styles.php index a7295c8dc62..ab7d9da2592 100644 --- a/theme/standard/styles.php +++ b/theme/standard/styles.php @@ -9,6 +9,11 @@ $nomoodlecookie = true; require_once("../../config.php"); + if (isset($localconfig)) { + unset($THEME); + include('config.php'); + } + $lastmodified = 0; $lifetime = 600; diff --git a/theme/standardblue/styles.php b/theme/standardblue/styles.php index ab56b328f4f..c75f327769b 100644 --- a/theme/standardblue/styles.php +++ b/theme/standardblue/styles.php @@ -2,12 +2,18 @@ /// We use PHP so we can do value substitutions into the styles + $nomoodlecookie = true; + require_once("../../config.php"); + if (!isset($themename)) { $themename = NULL; } - $nomoodlecookie = true; - require_once("../../config.php"); + if (isset($localconfig)) { + unset($THEME); + include('config.php'); + } + $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename); /// From here on it's nearly a normal stylesheet. diff --git a/theme/standardgreen/styles.php b/theme/standardgreen/styles.php index ab56b328f4f..c75f327769b 100644 --- a/theme/standardgreen/styles.php +++ b/theme/standardgreen/styles.php @@ -2,12 +2,18 @@ /// We use PHP so we can do value substitutions into the styles + $nomoodlecookie = true; + require_once("../../config.php"); + if (!isset($themename)) { $themename = NULL; } - $nomoodlecookie = true; - require_once("../../config.php"); + if (isset($localconfig)) { + unset($THEME); + include('config.php'); + } + $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename); /// From here on it's nearly a normal stylesheet. diff --git a/theme/standardlogo/styles.php b/theme/standardlogo/styles.php index f87db189705..c75f327769b 100644 --- a/theme/standardlogo/styles.php +++ b/theme/standardlogo/styles.php @@ -2,12 +2,18 @@ /// We use PHP so we can do value substitutions into the styles + $nomoodlecookie = true; + require_once("../../config.php"); + if (!isset($themename)) { $themename = NULL; } - $nomoodlecookie = true; - require_once("../../config.php"); + if (isset($localconfig)) { + unset($THEME); + include('config.php'); + } + $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename); /// From here on it's nearly a normal stylesheet. @@ -681,7 +687,7 @@ TD.cal_event_description { .cal_popup_close { font-size: 75%; font-weight: bold; - font-family: sans-serif; + font-family: Tahoma, Helvetica, sans-serif; margin-right: 5px; } diff --git a/theme/standardred/styles.php b/theme/standardred/styles.php index ab56b328f4f..c75f327769b 100644 --- a/theme/standardred/styles.php +++ b/theme/standardred/styles.php @@ -2,12 +2,18 @@ /// We use PHP so we can do value substitutions into the styles + $nomoodlecookie = true; + require_once("../../config.php"); + if (!isset($themename)) { $themename = NULL; } - $nomoodlecookie = true; - require_once("../../config.php"); + if (isset($localconfig)) { + unset($THEME); + include('config.php'); + } + $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename); /// From here on it's nearly a normal stylesheet. diff --git a/theme/standardwhite/styles.php b/theme/standardwhite/styles.php index ab56b328f4f..c75f327769b 100644 --- a/theme/standardwhite/styles.php +++ b/theme/standardwhite/styles.php @@ -2,12 +2,18 @@ /// We use PHP so we can do value substitutions into the styles + $nomoodlecookie = true; + require_once("../../config.php"); + if (!isset($themename)) { $themename = NULL; } - $nomoodlecookie = true; - require_once("../../config.php"); + if (isset($localconfig)) { + unset($THEME); + include('config.php'); + } + $themeurl = style_sheet_setup(filemtime("styles.php"), 300, $themename); /// From here on it's nearly a normal stylesheet. diff --git a/theme/standardxhtml/config.php b/theme/standardxhtml/config.php deleted file mode 100644 index 33fd176b8ea..00000000000 --- a/theme/standardxhtml/config.php +++ /dev/null @@ -1,17 +0,0 @@ -body = "#FFEECE"; // Main page color -$THEME->cellheading = "#FFD991"; // Standard headings of big tables -$THEME->cellheading2 = "#FFC85F"; // Highlight headings of tables -$THEME->cellcontent = "#FFFFFF"; // For areas with text -$THEME->cellcontent2 = "#FEE6B9"; // Alternate colour -$THEME->borders = "#FFC85F"; // Table borders -$THEME->highlight = "#AAFFAA"; // Highlighted text (eg after a search) -$THEME->hidden = "#AAAAAA"; // To color things that are hidden -$THEME->autolink = "#DDDDDD"; // To color auto-generated links (eg glossary) - -$THEME->custompix = false; // If true, then this theme must have a "pix" - // subdirectory that contains copies of all - // files from the moodle/pix directory - // See "cordoroyblue" for an up-to-date example. -?> diff --git a/theme/standardxhtml/docstyles.php b/theme/standardxhtml/docstyles.php deleted file mode 100644 index ff753dbae43..00000000000 --- a/theme/standardxhtml/docstyles.php +++ /dev/null @@ -1,102 +0,0 @@ - -body { - background-color:#FFFFFF; -} -p, a { - font-size:small; -} - -h1, h2, h3 { - padding-left:0px; - background-color:transparent; - color:#000000; -} - -h1 { - font-size:1.7em; - margin:0.5em 0 0; -} - -h2 { - font-size:1.4em; - margin:0.5em 0 0; -} - -h3 { - font-size:1.2em; - margin:0.5em 0 0; -} - - -li { - margin-bottom: 10px; -} - -ul { - margin-top: 10px; -} - -.question { - font-size: medium; - font-weight: bold; - border: 1px dotted; - padding: 10px; - background-color: #EEEEEE; -} - -.answer { - font-size: medium; - border: none; - padding-left: 40px; -} - -.normaltext { - font-size: medium; - border: none; - margin-left: 30px; -} - -.answercode { - font-family: "Courier New", Courier, mono; - font-size: small; - border: none; - padding-left: 60px; -} - -.questionlink { - font-size: medium; - border: none; - padding-left: 40px; -} - -.examplecode { - font-family: "Courier New", Courier, mono; - font-size: small; - border: thin dashed #999999; - background-color: #FBFBFB; - margin: auto; - margin-top: 0.5em; - padding: 30px; - height: auto; - width: auto; -} - -.spaced { - margin-bottom: 30px; -} diff --git a/theme/standardxhtml/favicon.ico b/theme/standardxhtml/favicon.ico deleted file mode 100644 index 5a7a36a68e6..00000000000 Binary files a/theme/standardxhtml/favicon.ico and /dev/null differ diff --git a/theme/standardxhtml/footer.html b/theme/standardxhtml/footer.html deleted file mode 100644 index 1dee2becf60..00000000000 --- a/theme/standardxhtml/footer.html +++ /dev/null @@ -1,18 +0,0 @@ - - - -
- -