Addon Visibility

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. Still using the deprecated about.php? Follow along by learning differences between addon.json and AddonInfo/PluginInfo.

There are multiple methods for changing addon visibility. Later methods take precedance 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": "[email protected]",
            "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": "mysite.vanillacommunities.com, mysite.vanillastaging.com"
        }
    }
}

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": "[email protected]"
        }
    ],
    "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.

Cloud Hosting

We believe that online communities should be intuitive, engaging and true to your brand. Vanilla allows you to create a customized community that rewards positive participation, automatically curates content and lets members drive moderation.

Learn More …