Addon Visibility on Vanilla Cloud - 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/159YWQ11DA0Y/microsoftteams-image-288-29.png" rel="nofollow noreferrer noopener ugc" target="_blank"> <img class="embedImage-img" src="https://us.v-cdn.net/6030677/uploads/159YWQ11DA0Y/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>If you have <a href="http://vanillaforums.com/" rel="nofollow noreferrer ugc">Vanilla Cloud</a>, custom addons will be hidden by default. This is to ensure custom addons are only visible to their respective owners.</p><ul><li>This functionality is defined using a theme’s <a href="https://success.vanillaforums.com/kb/articles/151-the-addon-json-file" rel="nofollow noreferrer ugc">addon.json</a>.</li><li>There are multiple methods for changing addon visibility. Later methods take precedence over earlier ones for backwards compatibility reasons.</li></ul><h2 data-id="the-sites-key">The <code class="code codeInline" spellcheck="false" tabindex="0">sites</code> key</h2><p><strong>📝 NOTE</strong>: This is the best method for custom client addons.</p><p>If no other methods have been used, the <strong>sites</strong> key is used. It should be set in the <a href="https://success.vanillaforums.com/kb/articles/151-the-addon-json-file" rel="nofollow noreferrer ugc">addon.json file</a>. </p><p><strong>📝 NOTE</strong>: Confused about addons and plugins? Learn the difference between <a href="https://success.vanillaforums.com/kb/articles/152-what-is-an-addon" rel="nofollow noreferrer ugc">Addons, Plugins, and Themes</a>.</p><pre class="code codeBlock" spellcheck="false" tabindex="0">{ "type": "addon", "key": "fancyaddon", "name": "Lincoln's Fancy Addon ", "description": "This is a fancy addon!", "version": "1.0.0", "mobileFriendly": true, "authors": [ { "name": "Your Name", "email": "you@yourdomain.com", "homepage": "http://yourdomain.com" } ], "sites": [ "mysite.vanillastaging.com", "mysite.vanillacommunities.com" ] } </pre><p>Adding a domain to the <code class="code codeInline" spellcheck="false" tabindex="0">sites</code> array allows a Vanilla community hosted at that domain to see your addon. These domains should be the original Vanilla domain, <em>not</em> a custom domain.</p><h2 data-id="site-configuration-option">Site configuration option</h2><p>The following method works only with <code class="code codeInline" spellcheck="false" tabindex="0">theme</code> type addons. A theme can be shown on a specific site by using the following config key:</p><pre class="code codeBlock" spellcheck="false" tabindex="0">{ "Garden": { "Themes": { "Visible": "my-theme-key, my-theme-key2" } } } </pre><p><strong>📝 NOTE</strong>: You can add multiple domains by separating them with a comma.</p><p><strong>This method is discouraged</strong>.</p><h2 data-id="the-hidden-key">The <code class="code codeInline" spellcheck="false" tabindex="0">hidden</code> key</h2><p>In the <a href="https://success.vanillaforums.com/kb/articles/151-the-addon-json-file" rel="nofollow noreferrer ugc">addon.json file</a>, you can set the addon’s visibility with the <code class="code codeInline" spellcheck="false" tabindex="0">hidden</code> key.</p><p><strong>⭐️ EXAMPLE</strong>: </p><pre class="code codeBlock" spellcheck="false" tabindex="0">{ "key": "example-theme", "name": "Example Theme", "description": "Custom Theme Example", "version": "2.0.0", "type": "theme", "license": "MIT", "author": [ { "name": "Adam Charron", "email": "adam.c@vanillaforums.com" } ], "hidden": true } </pre><p><strong>📝 NOTE</strong>: Core themes have their <code class="code codeInline" spellcheck="false" tabindex="0">hidden</code> key set to <code class="code codeInline" spellcheck="false" tabindex="0">false</code> to be visible to all clients.</p><h2 data-id="notes">Notes</h2><ul><li>You can use an asterisk in the site name for wildcard matches (e.g., site-*.example.com). Wildcards are great for clusters that are on the Vanilla Hub.</li><li>The key <code class="code codeInline" spellcheck="false" tabindex="0">key</code> works like <code class="code codeInline" spellcheck="false" tabindex="0">sites</code>, but only takes one site as a string. This key is deprecated: use <code class="code codeInline" spellcheck="false" tabindex="0">sites</code> instead.</li></ul><p><br></p> </article> </main>