This more or less completes the PHP side of the 1.5 themes

Added $user->theme and $course->theme choices, controlled by admin
variables on the main config variables page.

By default this is all turned off, since multiple themes can be
a little disorienting.

A hidden feature is session themes ... you can change the theme
on any page by passing theme=xxxx as a parameter.  By default this
requires sesskey (so that people don't change theme on each other),
but this security can be switched off using a hidden variable
$CFG->allowthemechangeonurl = true;   Good for quick tests.
This commit is contained in:
moodler
2005-02-10 10:28:27 +00:00
parent 730967f2e7
commit 32e2b30209
9 changed files with 100 additions and 5 deletions
+1 -1
View File
@@ -305,7 +305,7 @@ global $THEME;
/// Load up theme variables (colours etc)
if (isset($_GET['theme'])) {
if (confirm_sesskey()) {
if ($CFG->allowthemechangeonurl || confirm_sesskey()) {
if (!detect_munged_arguments($_GET['theme'], 0) and file_exists($CFG->dirroot .'/theme/'. $_GET['theme'])) {
$SESSION->theme = $_GET['theme'];
}