Creating Addons for the Vanilla Addon Site

This help topic covers some of the considerations addon authors have to consider in order to upload their addons to Vanilla's addon site at vanillaforums.org/addons.

The Info Array

Every addon has an array of information that describes it to the addons site and your application. The format and location of this array is slightly different for each type of addon so I will describe them here. Please note that although the info arrays are php code they are not parsed by php when uploaded to the plugin site so some valid php may not be recognized. In general, keep the following in mind when editing your info array:
  1. Put each entry on a single line.
  2. Enter your text as simple single or double quoted strings without concatenation or variables.

Plugins

Plugins are located in your /plugins folder. Each plugin must contain a file called either default.php or class.classname.plugin.php. The plugin's info array goes at the top of this file. It has the following format:
$PluginInfo['PluginKey'] = array( // The plugin key must match the folder the plugin is in.
   'Name' => 'The name of the plugin.',
   'Description' => 'Plugin description goes here.', // Be as descriptive as possible.
   'Version' => '1.0', // A version number compatible with php's version_compare().
   'RequiredApplications' => array('ApplicationKey' => MinVersion),
   'RequiredTheme' => array('ThemeKey' => MinVersion),
   'RequiredPlugins' => array('PluginKey' => MinVersion),
   'HasLocale' => FALSE,
   'Author' => 'Your name here.',
   'AuthorEmail' => 'Your email here', // optional
   'AuthorUrl' => 'Your url here' // optional
);

Themes

Themes are located in your /themes folder. Each theme must contain a file called about.php. The info array goes at the top of this file. It has the following format:
$ThemeInfo['ThemeKey'] = array( // The theme key should match the folder the theme is in.
   'Name' => 'The name of the theme.'
   'Description' => 'Theme description goes here.', // Be as descriptive as possible.
   'Version' => '1.0', // A version number compatible with php's version_compare().
   'RequiredApplications' => array('ApplicationKey' => MinVersion),
   'RequiredTheme' => array('ThemeKey' => MinVersion),
   'RequiredPlugins' => array('PluginKey' => MinVersion),
   'HasLocale' => FALSE,
   'Author' => 'Your name here.',
   'AuthorEmail' => 'Your email here', // optional
   'AuthorUrl' => 'Your url here' // optional
);

Applications

Applications are located in your /applications folder. Each application must contain a file called about.php in its settings folder. The info array goes at the top of this file. It has the following format:
$ApplicationInfo['ApplicationKey'] = array( // The application key must match its folder name.
   'Name' => 'The name of the application.'
   'Description' => 'Application description goes here.', // Be as descriptive as possible.
   'Version' => '1.0', // A version number compatible with php's version_compare().
   'RequiredApplications' => array('ApplicationKey' => MinVersion),
   'RequiredTheme' => array('ThemeKey' => MinVersion),
   'RequiredPlugins' => array('PluginKey' => MinVersion),
   'HasLocale' => FALSE,
   'Author' => 'Your name here.',
   'AuthorEmail' => 'Your email here', // optional
   'AuthorUrl' => 'Your url here' // optional
);

Locales

Support for locale packs was added to Vanilla 2.0.11. Locales are located in your /locales folder. Each locale must contain a file called definitions.php. The info array goes at the top of this file. It has the following format:

$LocaleInfo['LocaleKey'] = array( // The locale key must match the folder the locale is in.
   'Locale' => 'en-CA' // The code of the locale
   'Name' => 'The name of the locale.'
   'Description' => 'Locale description goes here.', // Be as descriptive as possible.
   'Version' => '1.0', // A version number compatible with php's version_compare().
   'Author' => 'Your name here.',
   'AuthorEmail' => 'Your email here', // optional
   'AuthorUrl' => 'Your url here' // optional
);

Please do not use a locale code like 'en-CA' for your locale. Different people may make a locale pack with the same locale as you and both must be able to co-exist on the addons site and even in an application.

If you have language definitions from before and you want to convert them to the new format you can get some help here.

Other Considerations

Here are some other things to consider when structuring your addon:
  1. Addons must be uploaded as zip files.
  2. The addon key cannot be a number and cannot contain any of the following characters: -,;:/\.
  3. Addon keys must be unique for each type of addon across the entire addon site so try not to make your key to generic.
  4. When you upload a new version of an addon you must increment its version number or it will be rejected.

See Also

Edited October 2010 by Todd