Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix settings pages for Brick, Fusion, Magazine, Overlay, Sky_high, an…

…d Splash, MDL-22874
  • Loading branch information...
commit e381664467846c9c6a00648dc405a3e67d1c9062 1 parent 9d624d6
epsd epsd authored
21 theme/brick/settings.php
View
@@ -1,7 +1,8 @@
<?php
-// Create our admin page
-$temp = new admin_settingpage('theme_brick', get_string('configtitle','theme_brick'));
+defined('MOODLE_INTERNAL') || die;
+
+if ($ADMIN->fulltree) {
// Background image setting
// logo image setting
@@ -9,7 +10,7 @@
$title = get_string('logo','theme_brick');
$description = get_string('logodesc', 'theme_brick');
$setting = new admin_setting_configtext($name, $title, $description, '', PARAM_URL);
-$temp->add($setting);
+$settings->add($setting);
// link color setting
$name = 'theme_brick/linkcolor';
@@ -18,7 +19,7 @@
$default = '#06365b';
$previewconfig = NULL;
$setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
-$temp->add($setting);
+$settings->add($setting);
// link hover color setting
$name = 'theme_brick/linkhover';
@@ -27,7 +28,7 @@
$default = '#5487ad';
$previewconfig = NULL;
$setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
-$temp->add($setting);
+$settings->add($setting);
// main color setting
$name = 'theme_brick/maincolor';
@@ -36,7 +37,7 @@
$default = '#8e2800';
$previewconfig = NULL;
$setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
-$temp->add($setting);
+$settings->add($setting);
// main color accent setting
$name = 'theme_brick/maincolorlink';
@@ -45,7 +46,7 @@
$default = '#fff0a5';
$previewconfig = NULL;
$setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
-$temp->add($setting);
+$settings->add($setting);
// heading color setting
$name = 'theme_brick/headingcolor';
@@ -54,8 +55,6 @@
$default = '#5c3500';
$previewconfig = NULL;
$setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
-$temp->add($setting);
-
+$settings->add($setting);
-// Add our page to the structure of the admin tree
-$ADMIN->add('themes', $temp);
+}
16 theme/fusion/settings.php
View
@@ -1,7 +1,8 @@
<?php
-// Create our admin page
-$temp = new admin_settingpage('theme_fusion', get_string('configtitle','theme_fusion'));
+defined('MOODLE_INTERNAL') || die;
+
+if ($ADMIN->fulltree) {
// link color setting
$name = 'theme_fusion/linkcolor';
@@ -10,7 +11,7 @@
$default = '#2d83d5';
$previewconfig = NULL;
$setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
-$temp->add($setting);
+$settings->add($setting);
// Tag line setting
@@ -18,21 +19,20 @@
$title = get_string('tagline','theme_fusion');
$description = get_string('taglinedesc', 'theme_fusion');
$setting = new admin_setting_configtextarea($name, $title, $description, '');
-$temp->add($setting);
+$settings->add($setting);
// Foot note setting
$name = 'theme_fusion/footertext';
$title = get_string('footertext','theme_fusion');
$description = get_string('footertextdesc', 'theme_fusion');
$setting = new admin_setting_confightmleditor($name, $title, $description, '');
-$temp->add($setting);
+$settings->add($setting);
// Custom CSS file
$name = 'theme_fusion/customcss';
$title = get_string('customcss','theme_fusion');
$description = get_string('customcssdesc', 'theme_fusion');
$setting = new admin_setting_configtextarea($name, $title, $description, '');
-$temp->add($setting);
+$settings->add($setting);
-// Add our page to the structure of the admin tree
-$ADMIN->add('themes', $temp);
+}
26 theme/magazine/settings.php
View
@@ -1,21 +1,22 @@
<?php
-// Create our admin page
-$temp = new admin_settingpage('theme_magazine', get_string('configtitle','theme_magazine'));
+defined('MOODLE_INTERNAL') || die;
+
+if ($ADMIN->fulltree) {
// Background image setting
$name = 'theme_magazine/background';
$title = get_string('background','theme_magazine');
$description = get_string('backgrounddesc', 'theme_magazine');
$setting = new admin_setting_configtext($name, $title, $description, '', PARAM_URL);
- $temp->add($setting);
+ $settings->add($setting);
// logo image setting
$name = 'theme_magazine/logo';
$title = get_string('logo','theme_magazine');
$description = get_string('logodesc', 'theme_magazine');
$setting = new admin_setting_configtext($name, $title, $description, '', PARAM_URL);
- $temp->add($setting);
+ $settings->add($setting);
// link color setting
$name = 'theme_magazine/linkcolor';
@@ -24,7 +25,7 @@
$default = '#32529a';
$previewconfig = NULL;
$setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
- $temp->add($setting);
+ $settings->add($setting);
// link hover color setting
$name = 'theme_magazine/linkhover';
@@ -33,7 +34,7 @@
$default = '#4e2300';
$previewconfig = NULL;
$setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
- $temp->add($setting);
+ $settings->add($setting);
// main color setting
$name = 'theme_magazine/maincolor';
@@ -42,7 +43,7 @@
$default = '#002f2f';
$previewconfig = NULL;
$setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
- $temp->add($setting);
+ $settings->add($setting);
// main color accent setting
$name = 'theme_magazine/maincoloraccent';
@@ -51,7 +52,7 @@
$default = '#092323';
$previewconfig = NULL;
$setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
- $temp->add($setting);
+ $settings->add($setting);
// heading color setting
$name = 'theme_magazine/headingcolor';
@@ -60,7 +61,7 @@
$default = '#4e0000';
$previewconfig = NULL;
$setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
- $temp->add($setting);
+ $settings->add($setting);
// block heading color setting
$name = 'theme_magazine/blockcolor';
@@ -69,7 +70,7 @@
$default = '#002f2f';
$previewconfig = NULL;
$setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
- $temp->add($setting);
+ $settings->add($setting);
// forum subject background color setting
$name = 'theme_magazine/forumback';
@@ -78,7 +79,6 @@
$default = '#e6e2af';
$previewconfig = NULL;
$setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
- $temp->add($setting);
+ $settings->add($setting);
-// Add our page to the structure of the admin tree
-$ADMIN->add('themes', $temp);
+}
17 theme/overlay/settings.php
View
@@ -1,7 +1,9 @@
<?php
-// Create our admin page
-$temp = new admin_settingpage('theme_overlay', get_string('configtitle','theme_overlay'));
+defined('MOODLE_INTERNAL') || die;
+
+if ($ADMIN->fulltree) {
+
// link color setting
$name = 'theme_overlay/linkcolor';
@@ -10,7 +12,7 @@
$default = '#428ab5';
$previewconfig = NULL;
$setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
-$temp->add($setting);
+$settings->add($setting);
// Tag line setting
@@ -20,21 +22,20 @@
$default = '#2a4c7b';
$previewconfig = NULL;
$setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
-$temp->add($setting);
+$settings->add($setting);
// Foot note setting
$name = 'theme_overlay/footertext';
$title = get_string('footertext','theme_overlay');
$description = get_string('footertextdesc', 'theme_overlay');
$setting = new admin_setting_confightmleditor($name, $title, $description, '');
-$temp->add($setting);
+$settings->add($setting);
// Custom CSS file
$name = 'theme_overlay/customcss';
$title = get_string('customcss','theme_overlay');
$description = get_string('customcssdesc', 'theme_overlay');
$setting = new admin_setting_configtextarea($name, $title, $description, '');
-$temp->add($setting);
+$settings->add($setting);
-// Add our page to the structure of the admin tree
-$ADMIN->add('themes', $temp);
+}
17 theme/sky_high/settings.php
View
@@ -4,15 +4,16 @@
* Settings for the sky_high theme
*/
-// Create our admin page
-$temp = new admin_settingpage('theme_sky_high', get_string('configtitle','theme_sky_high'));
+defined('MOODLE_INTERNAL') || die;
+
+if ($ADMIN->fulltree) {
// Logo file setting
$name = 'theme_sky_high/logo';
$title = get_string('logo','theme_sky_high');
$description = get_string('logodesc', 'theme_sky_high');
$setting = new admin_setting_configtext($name, $title, $description, '', PARAM_URL);
-$temp->add($setting);
+$settings->add($setting);
// Block region width
$name = 'theme_sky_high/regionwidth';
@@ -21,22 +22,24 @@
$default = 240;
$choices = array(200=>'200px', 240=>'240px', 290=>'290px', 350=>'350px', 420=>'420px');
$setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
-$temp->add($setting);
+$settings->add($setting);
// Foot note setting
$name = 'theme_sky_high/footnote';
$title = get_string('footnote','theme_sky_high');
$description = get_string('footnotedesc', 'theme_sky_high');
$setting = new admin_setting_confightmleditor($name, $title, $description, '');
-$temp->add($setting);
+$settings->add($setting);
// Custom CSS file
$name = 'theme_sky_high/customcss';
$title = get_string('customcss','theme_sky_high');
$description = get_string('customcssdesc', 'theme_sky_high');
$setting = new admin_setting_configtextarea($name, $title, $description, '');
-$temp->add($setting);
+$settings->add($setting);
// Add our page to the structure of the admin tree
-$ADMIN->add('themes', $temp);
+
+
+}
?>
22 theme/splash/settings.php
View
@@ -24,28 +24,29 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-// Create our admin page
-$temp = new admin_settingpage('theme_splash', get_string('configtitle','theme_splash'));
-
+defined('MOODLE_INTERNAL') || die;
+
+if ($ADMIN->fulltree) {
+
// Logo file setting
$name = 'theme_splash/logo';
$title = get_string('logo','theme_splash');
$description = get_string('logodesc', 'theme_splash');
$setting = new admin_setting_configtext($name, $title, $description, '', PARAM_URL);
-$temp->add($setting);
+$settings->add($setting);
// Tagline setting
$name = 'theme_splash/tagline';
$title = get_string('tagline','theme_splash');
$description = get_string('taglinedesc', 'theme_splash');
$setting = new admin_setting_configtextarea($name, $title, $description, get_string('defaulttagline', 'theme_splash'));
-$temp->add($setting);
+$settings->add($setting);
$name = 'theme_splash/hide_tagline';
$title = get_string('hide_tagline','theme_splash');
$description = get_string('hide_taglinedesc', 'theme_splash');
$setting = new admin_setting_configcheckbox($name, $title, $description, 0);
-$temp->add($setting);
+$settings->add($setting);
/*
// Block region width
@@ -62,14 +63,13 @@
$title = get_string('footnote','theme_splash');
$description = get_string('footnotedesc', 'theme_splash');
$setting = new admin_setting_confightmleditor($name, $title, $description, '');
-$temp->add($setting);
+$settings->add($setting);
// Custom CSS file
$name = 'theme_splash/customcss';
$title = get_string('customcss','theme_splash');
$description = get_string('customcssdesc', 'theme_splash');
$setting = new admin_setting_configtextarea($name, $title, $description, '');
-$temp->add($setting);
-
-// Add our page to the structure of the admin tree
-$ADMIN->add('themes', $temp);
+$settings->add($setting);
+
+}
Please sign in to comment.
Something went wrong with that request. Please try again.