What is an Addon? - HL Vanilla Community
<main> <article class="userContent"> <div class="embedExternal embedImage display-large float-none"> <div class="embedExternal-content"> <a class="embedImage-link" href="https://us.v-cdn.net/6030677/uploads/45J7TDVD8O5L/microsoftteams-image-288-29.png" rel="nofollow noreferrer noopener ugc" target="_blank"> <img class="embedImage-img" src="https://us.v-cdn.net/6030677/uploads/45J7TDVD8O5L/microsoftteams-image-288-29.png" alt="MicrosoftTeams-image (8).png" height="108" width="1356" loading="lazy" data-display-size="large" data-float="none"></img></a> </div> </div> <p><strong>Higher Logic Vanilla (Vanilla)</strong> is a customizable, flexible platform because there are many ways to hook into it without ever modifying its code. There are normal vanilla <a href="https://docs.vanillaforums.com/developer/addons/#addon-definition" rel="nofollow noreferrer ugc">addons</a> and <a href="https://docs.vanillaforums.com/developer/addons/#theme-definition" rel="nofollow noreferrer ugc">themes</a>. Themes and addons are very similar, but serve different purposes.</p><h2 data-id="addons-overview">Addons overview</h2><ul><li>Before Vanilla <code class="code codeInline" spellcheck="false" tabindex="0">2.5</code> there were plugins, applications, and themes, and each had varying functionalities and capabilities. </li><li>Starting with Vanilla <code class="code codeInline" spellcheck="false" tabindex="0">2.5</code>, all three have been combined into a single format: <strong>Addons</strong>. </li></ul><p>Many references to "plugin" have been changed to "addon." The remaining references to "addon," "plugin," and "theme" are as follows:</p><h3 data-id="addon-definition">Addon definition</h3><p>An installable extension to a Vanilla. An addon provides additional functionality and is contained in a top-level folder that gets symlinked into the <code class="code codeInline" spellcheck="false" tabindex="0">plugins</code> directory of a Vanilla installation. </p><p>In the future, Addons will be installable to an <code class="code codeInline" spellcheck="false" tabindex="0">addons</code> directory instead. Its information is defined in an <a href="https://success.vanillaforums.com/kb/articles/151" rel="nofollow noreferrer ugc">addon.json file</a> with its <code class="code codeInline" spellcheck="false" tabindex="0">type</code> key set to <code class="code codeInline" spellcheck="false" tabindex="0">addon</code>. Older addons defined <code class="code codeInline" spellcheck="false" tabindex="0">$PluginInfo</code> in their plugin file.</p><p>An <code class="code codeInline" spellcheck="false" tabindex="0">Addon</code> can contain:</p><ul><li>A plugin (an instance of <code class="code codeInline" spellcheck="false" tabindex="0">Gdn_Plugin</code>)<ul><li><a href="https://docs.vanillaforums.com/developer/addons/events-and-handlers" rel="nofollow noreferrer ugc">Handle events</a> fired by existing classes that extend <code class="code codeInline" spellcheck="false" tabindex="0">Gdn_Pluggable</code> - Controllers, Modules, Models, Router, Plugin, Model, etc</li><li><a href="https://docs.vanillaforums.com/developer/addons/css-and-javascript" rel="nofollow noreferrer ugc">Inject new CSS/JS</a> into the page</li><li><a href="https://docs.vanillaforums.com/developer/addons/function-overrides" rel="nofollow noreferrer ugc">Override core functions</a></li><li>Run code when addon is enabled or <code class="code codeInline" spellcheck="false" tabindex="0">utility/update</code> is called</li></ul></li><li>Controllers (<code class="code codeInline" spellcheck="false" tabindex="0">Vanilla\Web\Page</code>, <code class="code codeInline" spellcheck="false" tabindex="0">\Vanilla\Web\Controller</code>, or <code class="code codeInline" spellcheck="false" tabindex="0">Gdn_Controller</code>). These could be controllers or pages, or APIv2 endpoints.</li><li>Models (<code class="code codeInline" spellcheck="false" tabindex="0">Vanilla\Models\Model</code>, or <code class="code codeInline" spellcheck="false" tabindex="0">Gdn_Model</code>)</li><li>New views or view overrides</li></ul><h3 data-id="theme-definition">Theme definition</h3><p>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 <code class="code codeInline" spellcheck="false" tabindex="0">themes</code> directory of a Vanilla Forums installation. Its information is defined in an <a href="https://docs.vanillaforums.com/developer/addons/addon-info#theme-addon-json-example" rel="nofollow noreferrer ugc">addon.json file</a> with its <code class="code codeInline" spellcheck="false" tabindex="0">type</code> key set to <code class="code codeInline" spellcheck="false" tabindex="0">theme</code>. Older themes may define <a href="https://docs.vanillaforums.com/developer/addons/plugin-theme-info#themes" rel="nofollow noreferrer ugc">$ThemeInfo</a> in an <code class="code codeInline" spellcheck="false" tabindex="0">about.php</code> file.</p><p>The goal of a theme is to selectively override CSS and views in a forum.</p><p>Themes can do everything a normal Addon can do, but gains the following additional functionality and requirements.</p><ul><li>A Theme can contain a Plugin. If it does the plugin must have a classname ending in <code class="code codeInline" spellcheck="false" tabindex="0">ThemeHooks</code> and must have a filename containing <code class="code codeInline" spellcheck="false" tabindex="0">class.themehooks.php</code>. The prevailing convention results in a class <code class="code codeInline" spellcheck="false" tabindex="0">MySiteThemeHooks</code> and file <code class="code codeInline" spellcheck="false" tabindex="0">class.mysite.themehooks.php</code>. See our <a href="https://success.vanillaforums.com/kb/articles/246-theme-hooks" rel="nofollow noreferrer ugc">Theme Hooks guide</a> for more details.</li><li>A theme can define a <a href="https://docs.vanillaforums.com/developer/theming/views/#the-master-view" rel="nofollow noreferrer ugc">Master View</a> to be automatically loaded in place of the default master view.</li><li>A theme will automatically load a javascript file at <code class="code codeInline" spellcheck="false" tabindex="0"><mythemefolder>/js/custom.js</code> and a CSS file at <code class="code codeInline" spellcheck="false" tabindex="0"><mythemefolder>/design/custom.css</code> into the head of the site.</li><li>A theme can define <a href="https://docs.vanillaforums.com/developer/addons/theme-options" rel="nofollow noreferrer ugc">Theme Options</a> to offer an easy way to load different styles and text for a single theme.</li></ul><p>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.</p><h3 data-id="plugin-definition">Plugin definition</h3><p>A class that extends or implements <code class="code codeInline" spellcheck="false" tabindex="0">Gdn_Plugin</code> or implements <code class="code codeInline" spellcheck="false" tabindex="0">Gdn_IPlugin</code>.</p><h2 data-id="self-hosted-to-cloud-upgrade-considerations">Self-Hosted to Cloud Upgrade Considerations</h2><p>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.</p><h2 data-id="getting-started">Getting Started</h2><p>Check out our guides to get started on a new addon or theme!</p><p><a href="https://docs.vanillaforums.com/developer/addons/addon-quickstart" rel="nofollow noreferrer ugc">Addon Quickstart</a></p><p><a href="https://docs.vanillaforums.com/developer/addons/theme-quickstart" rel="nofollow noreferrer ugc">Theme Quickstart</a></p><p><a href="https://docs.vanillaforums.com/developer/addons/theme-hooks" rel="nofollow noreferrer ugc">Theme Hooks</a></p><p><a href="http://blog.vanillaforums.com/help/vanilla-forums-themes/" rel="nofollow noreferrer ugc">Ultimate Vanilla Forums Theme Guide</a></p> </article> </main>