I know how to add a theme, but when i log in as admin through my local host i cant find the part where it selects what theme i want to use,
can anyone point me in the right direction?
many thanks
Moodle 1.7: Administration ► Appearance ► Themes ► Theme Selector
Moodle 1.6: Administration -> Configuration -> Themes
great, thanks for that.
hi,i'm new to moodle.tried adding new themes in moodle 1.7+.Even though i have unzipped and stored all the files of the new theme in ~/moodle/theme/ folder,they are not available in appearence->theme selector even in administrator mode.Please help me out.Thanks in advance..
There are a couple of possible reasons:
check permissions of that folder (read and write) and config.php of your theme folder. Did you modify some other theme (from previous moodle versions)? Did you edit files with notepad or some other text editor?
Notepad is OK but if you add spaces or enters to config files (moodle or themes) after last ?> tags or some important sign is dropped or added to wrong place you may find problems. An other thing is how you save a file. If you just press Save everything is ok. But if you select Save as and the format of the file is txt or character set is not the same as original one tags may change their meaning.
Notepad is much safer than for example Word etc.
Hi Karolina,
you will find more info from http://docs.moodle.org/en/Theme
If you start from Standard theme and copy it with another name, edit README.html with notepad (Change there the name of your theme). Check the list of themes now. Usually there is no need for changing permissions (folders 755 and files 644). There is one "special case", chameleon . Usually moodlers just change header image and some colors. Theme config.php has the info about stylesheets and pix of your theme. You don't need to but you may change these:
$THEME->sheets = array('styles_layout', 'styles_fonts', 'styles_color');
This variable is an array containing the names of all the stylesheet (without .css)files you want included in this theme, and in what order
$THEME->standardsheets = true;
This variable can be set to an array containing filenames from the *STANDARD* theme. If the array exists, it will be used to choose the files to include in the standard style sheet. When false, then no files are used. When true or NON-EXISTENT, then ALL standard files are used. This parameter can be used, for example, to prevent having to override too many classes. Note that the trailing .css should not be included eg $THEME->standardsheets = array('styles_layout','styles_fonts','styles_color');
$THEME->parent = '';
This variable can be set to the name of a parent theme which you want to have included before the current theme. This can make it easy to make modifications to another theme without having to actually change the files. If this variable is empty or false then a parent theme is not used.
$THEME->parentsheets = false;
This variable can be set to an array containing filenames from a chosen *PARENT* theme. If the array exists, it will be used to choose the files to include in the standard style sheet. When false, then no files are used. When true or NON-EXISTENT, then ALL standard files are used. This parameter can be used, for example, to prevent having to override too many classes. Note that the trailing .css should not be included eg $THEME->parentsheets = array('styles_layout','styles_fonts','styles_color');
$THEME->modsheets = true;
When this is enabled, then this theme will search for files named "styles.php" inside all Activity modules and include them. This allows modules to provide some basic layouts so they work out of the box. It is HIGHLY recommended to leave this enabled.
$THEME->blocksheets = true;
When this is enabled, then this theme will search for files named "styles.php" inside all Block modules and include them. This allows Blocks to provide some basic layouts so they work out of the box. It is HIGHLY recommended to leave this enabled.
$THEME->langsheets = false;
By setting this to true, then this theme will search for a file named "styles.php" inside the current language directory. This allows different languages to provide different styles.
$THEME->navmenuwidth = 50;
You can use this to control the cutoff point for strings in the navmenus (list of activities in popup menu etc) Default is 50 characters wide.
$THEME->makenavmenulist = false;
By setting this to true, then you will have access to a new variable in your header.html and footer.html called $navmenulist ... this contains a simple XHTML menu of all activities in the current course, mostly useful for creating popup navigation menus and so on.
$THEME->custompix = false;
If true, then this theme must have a "pix" subdirectory that contains copies of all files from the moodle/pix directory, plus a "pix/mod" directory containing all the icons for all the activity modules. Have a look at other themes with custom pix.
Whatever theme you have you need to upload the image to your theme folder first (or have link to some image somewhere in www)
Edit header.html with notepad and find code starting with <div id="header-home"... and copy there a code like
<div id="header-home" class="clearfix">
<h1 class="headermain"><img src='<?php echo "$CFG->wwwroot/theme/" ?>nameofyourtheme/mainLogo.gif' id="mainLogo" alt="<?php echo $heading ?>" /></h1>
<div class="headermenu"><?php echo $menu ?></div>
</div>
(here mainLogo.gif is the image you need to have in header and nameofyourtheme is the name of your theme)
or for example
<div id="header-home">
<div class="headermain"><img src="<?php echo
$CFG->httpswwwroot.'/theme/'.current_theme() ?>/mainLogo.gif" width="300"
height="100" alt="mypage" title="mypage" id="logo" /></div>
<div class="headermenu"><?php echo $menu ?></div>
</div>
When you upload with ftp try to use mouse right click over a folder or a file. Most ftp programs show a table where you may add permissions for your folders and files. Sometimes there is a menu for setting permissions and sometimes you must use commands
If your server permissions are correct and you still can't see your theme in theme list could you send it to me (zip) to mauno.korpelainen@hyvinkaa.fi
I could check if there is some wrong sign or format. Sometimes reloading browser does help (cache).
Do you have moodle 1.7, 1.6 or 1.5?