A theme is a set of template files that Vanilla uses when rendering xhtml to the screen. The “template” files are really just plain php files that contain a mixture of php and xhtml. Different template files are used in different places in Vanilla. To see the template files in Vanilla’s default theme, navigate to your vanilla’s installation folder and look in the /themes/vanilla directory.
You may be tempted to edit the template files in the /themes/vanilla directory. Do not edit those files! Even if the change you want to make is tiny, do not alter the default template files. Regardless of the scale of your desired changes, you should always create an entirely new theme. Here is how you do it:
The default template files will be overwritten as upgrades are made to Vanilla, and any changes you’ve made will be overwritten.
We strongly advise that you ONLY copy the template files that you need to alter. This will make upgrading easier later on since you will easily see which of your templates may need updating in order to work with newer versions of Vanilla.
Go to the settings tab and clicking on the “Themes and Styles” link. Select the new theme you want to use from the first dropdown and then select the style you want to use from the second (it will likely be the default style). Check the “Apply to all users” box and click save.
Once you’ve configured your THEME_PATH, Vanilla will always look in that folder for a template file *first*. If Vanilla can’t find your custom template file, it will include the base template file in the root themes folder.
We’ve done our best to give each of the template files descriptive names. Here are some pointers which may help you out in finding your way around:
Once you have finished creating your new theme, you can upload it to Lussumo so that other people can use it. Do so by following the Add-on Guidelines to prepare your theme for being added to the Add-on Management application.