Skip to content

Commit

Permalink
Fixes for Theme preview
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Jan 31, 2005
1 parent 61e1af7 commit d65a650
Show file tree
Hide file tree
Showing 28 changed files with 110 additions and 1,266 deletions.
10 changes: 8 additions & 2 deletions theme/brightretro/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 10 additions & 0 deletions theme/cordoroyblue/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);


Expand Down
8 changes: 8 additions & 0 deletions theme/cornflower/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 6 additions & 2 deletions theme/formal_white/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 8 additions & 0 deletions theme/garden/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions theme/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
"<a href=\"$CFG->wwwroot/$CFG->admin/index.php\">$stradministration</a> -> ".
"<a href=\"$CFG->wwwroot/$CFG->admin/configure.php\">$strconfiguration</a> -> $strthemes");
Expand Down
8 changes: 6 additions & 2 deletions theme/metal/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 8 additions & 0 deletions theme/oceanblue/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 5 additions & 0 deletions theme/orangewhite/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
$nomoodlecookie = true;
require_once("../../config.php");

if (isset($localconfig)) {
unset($THEME);
include('config.php');
}

$lastmodified = 0;
$lifetime = 600;

Expand Down
7 changes: 3 additions & 4 deletions theme/preview.php
Original file line number Diff line number Diff line change
Expand Up @@ -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&amp;themename='.$CFG->theme);

print_header();
$stradministration = get_string("administration");
$strconfiguration = get_string("configuration");
$strthemes = get_string("themes");
Expand Down
5 changes: 5 additions & 0 deletions theme/standard/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
$nomoodlecookie = true;
require_once("../../config.php");

if (isset($localconfig)) {
unset($THEME);
include('config.php');
}

$lastmodified = 0;
$lifetime = 600;

Expand Down
10 changes: 8 additions & 2 deletions theme/standardblue/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 8 additions & 2 deletions theme/standardgreen/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 9 additions & 3 deletions theme/standardlogo/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -681,7 +687,7 @@
.cal_popup_close {
font-size: 75%;
font-weight: bold;
font-family: sans-serif;
font-family: Tahoma, Helvetica, sans-serif;
margin-right: 5px;
}

Expand Down
10 changes: 8 additions & 2 deletions theme/standardred/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 8 additions & 2 deletions theme/standardwhite/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
17 changes: 0 additions & 17 deletions theme/standardxhtml/config.php

This file was deleted.

Loading

0 comments on commit d65a650

Please sign in to comment.