Tuesday, February 19, 2013

Copy a theme folder to create your own theme

I'm going to use the new "aardvark" theme as my base folder. I'm going to rename the files so it all points to "mytheme name" instead of "aardvark."

Every place I use the yellow highlighter below is the area in which you must replace with your own theme name.

1)  Make a new folder for your theme -- only use lowercase letters. Copy this name so you can reuse in the next steps.

2)  Go into theme/lang/en.  Rename the file to:   theme_newthemename.php
Go inside that same file.

$string['pluginname'] = 'newthemename';  <-- Only place you can use uppercase letters
$string['region-side-post'] = 'Right';
$string['region-side-pre'] = 'Left';
$string['choosereadme'] = 'Aardvark is a three column fixed-width theme for Moodle 2.1+ originally created by Shaun Daubney for <a href="http://www.newbury-college.ac.uk">Newbury College</a>';
$string['configtitle'] = 'newthemename theme';  <-- use lowercase here


3)  Go into theme/config.php. Rename the following using lowercase letters here
$THEME->name = 'newthemename';  
$THEME->csspostprocess = 'newthemename_process_css';

4)  Go into theme/lib.php. Use the finder box to locate and replace all the "aardvarks" to "newthemename."
     Go into theme/settings.php and do exactly the same:  find and replace.

5)  Go into theme/settings.php. Change this line:  $plugin->component = 'theme_newthemename';

No comments:

Post a Comment