This feature is only available on Vanilla Cloud Learn More...
If you have Vanilla Cloud, custom addons will be hidden by default. This is to ensure custom addons are only visible to their respective owners.
This functionality is defined using a theme’s addon.json.
There are multiple methods for changing addon visibility. Later methods take precedence over earlier ones for backwards compatibility reasons.
The sites
key:
If no other methods have been used, the sites key is used. It should be set in the addon.json file. Confused about addons and plugins? Learn the difference between Addons, Plugins, and Themes.
{
"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"
]
}
Adding a domain to the sites
array allows a vanilla forum hosted at that domain see your addon. These domains should be the original vanilla domain, not a custom domain.
This is the best method for custom client addons.
Site Configuration Option
The following method works only with theme
type addons. A theme can be shown on a specific site by using the following config key:
{
"Garden": {
"Themes": {
"Visible": "my-theme-key, my-theme-key2"
}
}
}
You can add multiple domains by separating them with a comma.
This method is discouraged.
The hidden
key
In the addon.json file, you can set the addon’s visibility with the hidden
key.
Example:
{
"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
}
Core themes have their hidden
key set to false
to be visible to all clients.
Notes
- You can use an asterisk in the site name for wildcard matches (ex. ‘site-*.example.com’). Wildcards are great for clusters that are on the Vanilla Hub.
- The key
key
works like sites
, but only takes one site, as a string. This key is deprecated, use sites
instead.