From 109cdf6bd801e5ce48c748195f8d054eb8055b44 Mon Sep 17 00:00:00 2001 From: Mary Evans Date: Wed, 24 Apr 2013 21:35:15 +0100 Subject: [PATCH] MDL-39276 theme_clean: Renamed Simple theme to Clean theme. --- theme/{simple => clean}/README.txt | 24 ++++++++-------- theme/{simple => clean}/config.php | 8 +++--- .../lang/en/theme_clean.php} | 18 ++++++------ theme/{simple => clean}/layout/general.php | 0 theme/{simple => clean}/lib.php | 16 +++++------ theme/{simple => clean}/pix/screenshot.jpg | Bin theme/{simple => clean}/settings.php | 26 +++++++++--------- theme/{simple => clean}/style/custom.css | 0 theme/{simple => clean}/version.php | 6 ++-- 9 files changed, 49 insertions(+), 49 deletions(-) rename theme/{simple => clean}/README.txt (78%) rename theme/{simple => clean}/config.php (92%) rename theme/{simple/lang/en/theme_simple.php => clean/lang/en/theme_clean.php} (82%) rename theme/{simple => clean}/layout/general.php (100%) rename theme/{simple => clean}/lib.php (82%) rename theme/{simple => clean}/pix/screenshot.jpg (100%) rename theme/{simple => clean}/settings.php (74%) rename theme/{simple => clean}/style/custom.css (100%) rename theme/{simple => clean}/version.php (92%) diff --git a/theme/simple/README.txt b/theme/clean/README.txt similarity index 78% rename from theme/simple/README.txt rename to theme/clean/README.txt index 6c75ffb7e7f..3a7315659ae 100644 --- a/theme/simple/README.txt +++ b/theme/clean/README.txt @@ -2,7 +2,7 @@ /* How to copy and customise this theme. ----------------------------------------*/ -This document describes how to copy and customise the Simple (bootstrap) theme so that +This document describes how to copy and customise the Clean (bootstrapbase) theme so that you can build on this to create a theme of your own. It assumes you have some understanding of how themes work within Moodle 2.5, as well as a basic understanding of HTML and CSS. @@ -10,13 +10,13 @@ of HTML and CSS. Getting started --------------- -From your Moodle theme directory right click on simple and then copy and paste back -into your Moodle theme directory. You should now have a folder called Copy of simple. +From your Moodle theme directory right click on clean and then copy and paste back +into your Moodle theme directory. You should now have a folder called Copy of clean. If you right click this folder you are given the option to Rename it. So rename this folder to your chosen theme name, using only lower case letters, and if needed, -underscores. For the purpose of this tutorial we will call the theme 'simple2'. +underscores. For the purpose of this tutorial we will call the theme 'cleantheme'. -On opening 'simple2' your you will find several files and sub-directories which have +On opening 'cleantheme' your you will find several files and sub-directories which have files within them. These are: @@ -38,7 +38,7 @@ version.php if and when you want to add them. /lang/en/ This sub-directory contains your language files, in this case English. -/lang/en/theme_simple.php +/lang/en/theme_clean.php This file contains all the language strings for your theme. (Contains some elements that require renaming as well as the filename itself). /layout/ @@ -57,10 +57,10 @@ Renaming elements ----------------- The problem when copying a theme is that you need to rename all those instances -where the old theme name occurs, in this case simple. So using the above list as +where the old theme name occurs, in this case clean. So using the above list as a guide, search through and change all the instances of the theme name -'simple' to 'simple2'. This includes the filename of the lang/en/theme_simple.php. -You need to change this to 'theme_simple2.php'. +'clean' to 'cleantheme'. This includes the filename of the lang/en/theme_clean.php. +You need to change this to 'theme_cleantheme.php'. Installing your theme --------------------- @@ -74,12 +74,12 @@ If not then navigate to Administration > Notifications. Once your theme is successfully installed you can select it and begin to modify it using the custom settings page found by navigating to... Administration > Site Administration > Appearance > Themes >> -and then click on (Simple2) or whatever you renamed the theme to, +and then click on (Cleantheme) or whatever you renamed your theme to, from the list of theme names that appear at this point in the side block. Customisation using custom theme settings ----------------------------------------- -The settings page for this theme can be located by navigating to: +The settings page for the Clean theme can be located by navigating to: -Administration > Site Administration > Appearance > Themes > Simple +Administration > Site Administration > Appearance > Themes > Clean diff --git a/theme/simple/config.php b/theme/clean/config.php similarity index 92% rename from theme/simple/config.php rename to theme/clean/config.php index d131739693c..4413b52baa2 100644 --- a/theme/simple/config.php +++ b/theme/clean/config.php @@ -23,17 +23,17 @@ * For full information about creating Moodle themes, see: * http://docs.moodle.org/dev/Themes_2.0 * - * @package theme_simple + * @package theme_clean * @copyright 2013 Moodle, moodle.org * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -$THEME->name = 'simple'; +$THEME->name = 'clean'; ///////////////////////////////// // The only thing you need to change in this file when copying it to // create a new theme is the name above. You also need to change the name -// in version.php and lang/en/theme_simple.php as well. +// in version.php and lang/en/theme_clean.php as well. ////////////////////////////////// // $THEME->doctype = 'html5'; @@ -56,7 +56,7 @@ $THEME->plugins_exclude_sheets = array( ); $THEME->rendererfactory = 'theme_overridden_renderer_factory'; -$THEME->csspostprocess = 'simple_process_css'; +$THEME->csspostprocess = 'clean_process_css'; $useragent = ''; if (!empty($_SERVER['HTTP_USER_AGENT'])) { diff --git a/theme/simple/lang/en/theme_simple.php b/theme/clean/lang/en/theme_clean.php similarity index 82% rename from theme/simple/lang/en/theme_simple.php rename to theme/clean/lang/en/theme_clean.php index 6d52d9e0d8b..618a3bfacb3 100644 --- a/theme/simple/lang/en/theme_simple.php +++ b/theme/clean/lang/en/theme_clean.php @@ -15,22 +15,22 @@ // along with Moodle. If not, see . /** - * Strings for component 'theme_simple', language 'en' + * Strings for component 'theme_clean', language 'en' * - * @package theme_simple - * @copyright 2013 Bas Brands, www.basbrands.nl + * @package theme_clean + * @copyright 2013 Moodle, moodle.org * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $string['choosereadme'] = '
-

Simple

-

+

Clean

+

About

-

Simple is a modified Moodle bootstrap theme which inherits styles and renderers from its parent theme.

+

Clean is a modified Moodle bootstrap theme which inherits styles and renderers from its parent theme.

Parents

This theme is based upon the Bootstrap theme, which was created for Moodle 2.5, with the help of:
Stuart Lamour, Mark Aberdour, Paul Hibbitts, Mary Evans.

@@ -42,10 +42,10 @@ Website: www.basbrands.nl

Report a bug:

http://tracker.moodle.org

More information

-

How to copy and customise this theme.

+

How to copy and customise this theme.

'; -$string['configtitle'] = 'Simple'; +$string['configtitle'] = 'Clean'; $string['customcss'] = 'Custom CSS'; $string['customcssdesc'] = 'Whatever CSS rules you add to this textarea will be reflected in every page, making for easier customization of this theme.'; @@ -61,7 +61,7 @@ $string['logodesc'] = 'Please upload your custom logo here if you want to add it If the height of your logo is more than 75px add the following CSS rule to the Custom CSS box below.
a.logo {height: 100px;} or whatever height in pixels the logo is.'; -$string['pluginname'] = 'Simple'; +$string['pluginname'] = 'Clean'; $string['region-side-post'] = 'Right'; $string['region-side-pre'] = 'Left'; diff --git a/theme/simple/layout/general.php b/theme/clean/layout/general.php similarity index 100% rename from theme/simple/layout/general.php rename to theme/clean/layout/general.php diff --git a/theme/simple/lib.php b/theme/clean/lib.php similarity index 82% rename from theme/simple/lib.php rename to theme/clean/lib.php index 25322c52f71..47844de2936 100644 --- a/theme/simple/lib.php +++ b/theme/clean/lib.php @@ -23,16 +23,16 @@ * For full information about creating Moodle themes, see: * http://docs.moodle.org/dev/Themes_2.0 * - * @package theme_simple + * @package theme_clean * @copyright 2013 Moodle, moodle.org * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -function simple_process_css($css, $theme) { +function clean_process_css($css, $theme) { // Set the background image for the logo. $logo = $theme->setting_file_url('logo', 'logo'); - $css = simple_set_logo($css, $logo); + $css = clean_set_logo($css, $logo); // Set custom CSS. if (!empty($theme->settings->customcss)) { @@ -40,12 +40,12 @@ function simple_process_css($css, $theme) { } else { $customcss = null; } - $css = simple_set_customcss($css, $customcss); + $css = clean_set_customcss($css, $customcss); return $css; } -function simple_set_logo($css, $logo) { +function clean_set_logo($css, $logo) { global $OUTPUT; $tag = '[[setting:logo]]'; $replacement = $logo; @@ -58,16 +58,16 @@ function simple_set_logo($css, $logo) { return $css; } -function theme_simple_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload, array $options = array()) { +function theme_clean_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload, array $options = array()) { if ($context->contextlevel == CONTEXT_SYSTEM and $filearea === 'logo') { - $theme = theme_config::load('simple'); + $theme = theme_config::load('clean'); return $theme->setting_file_serve('logo', $args, $forcedownload, $options); } else { send_file_not_found(); } } -function simple_set_customcss($css, $customcss) { +function clean_set_customcss($css, $customcss) { $tag = '[[setting:customcss]]'; $replacement = $customcss; if (is_null($replacement)) { diff --git a/theme/simple/pix/screenshot.jpg b/theme/clean/pix/screenshot.jpg similarity index 100% rename from theme/simple/pix/screenshot.jpg rename to theme/clean/pix/screenshot.jpg diff --git a/theme/simple/settings.php b/theme/clean/settings.php similarity index 74% rename from theme/simple/settings.php rename to theme/clean/settings.php index 30f4e2bd132..ffebbc3c53d 100644 --- a/theme/simple/settings.php +++ b/theme/clean/settings.php @@ -23,7 +23,7 @@ * For full information about creating Moodle themes, see: * http://docs.moodle.org/dev/Themes_2.0 * - * @package theme_simple + * @package theme_clean * @copyright 2013 Moodle, moodle.org * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ @@ -33,32 +33,32 @@ defined('MOODLE_INTERNAL') || die; if ($ADMIN->fulltree) { // Invert Navbar to dark background. - $name = 'theme_simple/invert'; - $title = get_string('invert', 'theme_simple'); - $description = get_string('invertdesc', 'theme_simple'); + $name = 'theme_clean/invert'; + $title = get_string('invert', 'theme_clean'); + $description = get_string('invertdesc', 'theme_clean'); $setting = new admin_setting_configcheckbox($name, $title, $description, 0); $settings->add($setting); // Logo file setting. - $name = 'theme_simple/logo'; - $title = get_string('logo','theme_simple'); - $description = get_string('logodesc', 'theme_simple'); + $name = 'theme_clean/logo'; + $title = get_string('logo','theme_clean'); + $description = get_string('logodesc', 'theme_clean'); $setting = new admin_setting_configstoredfile($name, $title, $description, 'logo'); $setting->set_updatedcallback('theme_reset_all_caches'); $settings->add($setting); // Custom CSS file. - $name = 'theme_simple/customcss'; - $title = get_string('customcss', 'theme_simple'); - $description = get_string('customcssdesc', 'theme_simple'); + $name = 'theme_clean/customcss'; + $title = get_string('customcss', 'theme_clean'); + $description = get_string('customcssdesc', 'theme_clean'); $default = ''; $setting = new admin_setting_configtextarea($name, $title, $description, $default); $settings->add($setting); // Footnote setting. - $name = 'theme_simple/footnote'; - $title = get_string('footnote', 'theme_simple'); - $description = get_string('footnotedesc', 'theme_simple'); + $name = 'theme_clean/footnote'; + $title = get_string('footnote', 'theme_clean'); + $description = get_string('footnotedesc', 'theme_clean'); $default = ''; $setting = new admin_setting_confightmleditor($name, $title, $description, $default); $settings->add($setting); diff --git a/theme/simple/style/custom.css b/theme/clean/style/custom.css similarity index 100% rename from theme/simple/style/custom.css rename to theme/clean/style/custom.css diff --git a/theme/simple/version.php b/theme/clean/version.php similarity index 92% rename from theme/simple/version.php rename to theme/clean/version.php index 722fce49225..a18fdaf0381 100644 --- a/theme/simple/version.php +++ b/theme/clean/version.php @@ -23,13 +23,13 @@ * For full information about creating Moodle themes, see: * http://docs.moodle.org/dev/Themes_2.0 * - * @package theme_simple + * @package theme_clean * @copyright 2013 Moodle, moodle.org * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die; -$plugin->version = 2013041000; +$plugin->version = 2013042400; $plugin->requires = 2013040500; -$plugin->component = 'theme_simple'; +$plugin->component = 'theme_clean';