Higher Logic Vanilla (Vanilla) is a 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 overview
- Before Vanilla
2.5
there were plugins, applications, and themes, and each had varying functionalities and capabilities. - Starting with Vanilla
2.5
, all three have been combined into a single format: Addons.
Many references to "plugin" have been changed to "addon." The remaining references to "addon," "plugin," and "theme" are as follows:
Addon definition
An installable extension to a Vanilla. An addon provides additional functionality and is contained in a top-level folder that gets symlinked into the plugins
directory of a Vanilla 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.
An Addon
can contain:
- A plugin (an instance of
Gdn_Plugin
) - Controllers (
Vanilla\Web\Page
, \Vanilla\Web\Controller
, or Gdn_Controller
). These could be controllers or pages, or APIv2 endpoints. - Models (
Vanilla\Models\Model
, or Gdn_Model
) - New views or view overrides
Theme definition
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 about.php
file.
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.
- A theme will automatically load a javascript file at
<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.
Most themes only override the Master View and include some additional stylesheets and javascript. This type of the theme is the most easily maintainable. The fewer themehooks and view overrides inside of a theme, the more likely it is to work throughout updates to Vanilla without modification.
Plugin definition
A class that extends or implements Gdn_Plugin
or implements Gdn_IPlugin
.
Self-Hosted to Cloud Upgrade Considerations
If you’re considering moving to one of our cloud plans in the future, we recommend using our Foundation theme and modify it using the Foundation theme editor. Our cloud hosted customers use almost exclusively the Foundation Theme engine.
Getting Started
Check out our guides to get started on a new addon or theme!
Addon Quickstart
Theme Quickstart
Theme Hooks
Ultimate Vanilla Forums Theme Guide