Plugin Structure
On This Page:
Plugin Structure.
General Information
Every Revive Adserver plugin needs to be packaged as a standard .zip file; Revive Adserver will allow users to install the plugin by uploading the .zip file as an administrator user in the Revive Adserver UI.
However, this means that within the .zip file, a standard directory & file structure must be followed, otherwise the Revive Adserver UI will not allow the plugin to be installed.
Â
Plugin Structure
{$pluginName} [1] /plugins /etc /{$pluginName}.xml [2] /{$pluginName}.readme.txt [3] /{$pluginName}.uninstall.txt [4] /{$pluginGroup1} [5] /_lang [6] /etc [7] /DataObjects /changes /tables_{$pluginGroup1}.xml /{$pluginGroup1}.xml [8] ... /{$pluginName} [9] /{$pluginHoook1} [10] /{$pluginGroup1} [11] ... ... /www /admin /plugins [12] Â
[1] The {$pluginName}
 is the top level directory for the plugin, ideally with a name that describes the plugin purpose.
[2] The /plugins/etc/{$pluginName}.xml
 file is the top level XML file that describes:
- the plugin details (name, author, description, version, etc.);
- the files packaged in the plugin (at a top level, if any); and
- the plugin groups.
See below for further details on the top level XML file.
[3] TheÂ
 is an optional file, containing readme information for the plugin./plugins/etc/{
$pluginName}.readme.txt
[4] TheÂ
 is an optional file, containing information which will be displayed to the administrator if the plugin is uninstalled./plugins/etc/{
$pluginName}.uninstall.txt
[5] TheÂ
 directory is an optional directory containing the files related to a plugin group./plugins/etc/{
$pluginGroup1}
- Plugins can contain multiple groups; and
- The plugin group directory name needs to match that of the group name defined in theÂ
{$pluginName}.xml
 file.
[6] TheÂ
 directory in a plugin group is an optional directory that contains the translation files for the plugin group. /plugins/etc/{
$pluginGroup1}/_lang
See below for further details on the structure of the _lang
 directory in plugin groups.
[7] The
 directory in a plugin group is an optional directory containing details relating to database tables created and managed by the plugin. /plugins/etc/{
$pluginGroup1}/etc
See below for further details on the structure of the etc
directory in plugin groups.
[8] TheÂ
is the top level XML file for the plugin group that describes:
{$pluginGroup1}.xml/plugins/etc/{
$pluginGroup1}/
- The plugin group details (name, author, description, version, etc.);
- The files packaged in the plugin (at the group level); and
- The plugin components that the plugin group provides.
See below for further details on the plugin group level XML file.
If a plugin contains a plugin group, then the plugin group level XML file is mandatory.
[9] TheÂ
directory is an optional directory in which code which provides shared functionality to the plugin, but which is not directly related to a plugin hook (see below) should be placed, if required. For example, database access code which is shared by all hooks, etc.
{$pluginName}/plugins/
[10] TheÂ
directory is an optional directory where the name of the directory corresponds to one of the Plugin Hooks supported.
{$pluginHook1}/plugins/
- The directory name must match the plugin hook name; and
- Plugins can contain multiple directories, if the plugin will be providing functionality for multiple plugin hooks - however, the plugin does not have to contain any directories based on plugin hook names, if the plugin does not provide functionality via any plugin hooks.
[11] TheÂ
directory is an optional directory to store code that relates both to the plugin hook, and to the plugin group of the same name. That is:
{$pluginHook1}/{$pluginGroup}/plugins/
- If the plugin has a plugin group, and the plugin provides functionality based on a plugin hook, then the code for that plugin group/plugin hook must be located in this directory.
- If the plugin has a plugin group, and provides functionality for multiple plugin hooks, then the plugin group directory will exist under each plugin hook directory for which there is functionality being provided.Â
[12] The /www/admin/plugins
directory is an optional directory in which code required for use in the user interface is located.
See below for further details on the structure of this directory.
Top Level Plugin XML File
To be written.
Plugin Group _lang
 Directory
To be written.
Plugin Group etc
Directory
To be written.
Plugin Group Level XML File
To be written.
Plugin www/admin/plugin Directory
To be written.