Vanilla is a very customizable, flexible platform because there are many ways to hook into it without ever modifying its code. There are normal vanilla addons and themes. Themes and addons are very similar, but serve different purposes.
Addons and Plugins and Themes - Oh My!
2.5 there were plugins, applications, and themes. Each had varying functionalities and capabilities. Starting in Vanilla
2.5 all 3 of these have been combined into 1 format - Addons. An addon is capable of doing everything that each those 3 used to do. Existing plugins, themes, and applications are treated as addons in Vanilla
Many references to
Plugin have been changed to
Addon. Remaining references to
Theme should be undestood as follows:
A class that extends
Gdn_Plugin or implements
An installable extension to a Vanilla Forum. An addon provides additional functionality and is contained in a top level folder that gets symlinked into the
plugins directory of a Vanilla Forums installation. In the future Addons will be installable to an
addons directory instead. Its information is defined in an addon.json file with its
type key set to
addon. Older addons defined $PluginInfo in their plugin file.
Addon can contain
- A Plugin (an instance of
- Controllers (instances of
- Modules (instances of
- Models (instances of
- New views or view overrides
A theme is a special type of Addon, with some additional facilities provided in order to to simplify development. It is placed in a top level folder that gets symlinked into the
themes directory of a Vanilla Forums installation. Its information is defined in an addon.json file with its
type key set to
theme. Older themes may define $ThemeInfo in an
The goal of a theme is to selectively override CSS and views in a forum.
Themes can do everything a normal Addon can do, but gains the following additional functionality and requirements.
- A Theme can contain a Plugin. If it does the plugin must have a classname ending in
ThemeHooks and must have a filename containing
class.themehooks.php. The prevailing convention results in a class
MySiteThemeHooks and file
class.mysite.themehooks.php. See our Theme Hooks guide for more details.
- A theme can define a Master View to be automatically loaded in place of the default master view.
<mythemefolder>/js/custom.js and a CSS file at
<mythemefolder>/design/custom.css into the head of the site.
- A theme can define Theme Options to offer an easy way to load different styles and text for a single theme.
Cloud upgrade considerations
If you’re considering moving to one of our cloud plans in the future, we recommend limiting your modifications to the default.master.tpl view and CSS overrides. That will allow a smooth transition without any customization services being required.
Check out our guides to get started on a new addon or theme!
Ultimate Vanilla Forums Theme Guide