Skip to end of metadata
Go to start of metadata

On This Page:

Plugin Structure.

Details of the directory & file structure required for Revive Adserver plugins.

 


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

[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 /plugins/etc/{$pluginName}.readme.txt is an optional file, containing readme information for the plugin.

[4] The /plugins/etc/{$pluginName}.uninstall.txt is an optional file, containing information which will be displayed to the administrator if the plugin is uninstalled.

[5] The /plugins/etc/{$pluginGroup1} directory is an optional directory containing the files related to a plugin group.

  • 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 /plugins/etc/{$pluginGroup1}/_lang directory in a plugin group is an optional directory that contains the translation files for the plugin group. 

See below for further details on the structure of the _lang directory in plugin groups.

[7] The /plugins/etc/{$pluginGroup1}/etc directory in a plugin group is an optional directory containing details relating to database tables created and managed by the plugin. 

See below for further details on the structure of the etc directory in plugin groups.

[8] The /plugins/etc/{$pluginGroup1}/{$pluginGroup1}.xml is the top level XML file for the plugin group that describes:

  • 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 /plugins/{$pluginName} 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.

[10] The /plugins/{$pluginHook1} directory is an optional directory where the name of the directory corresponds to one of the Plugin Hooks supported.

  • 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 /plugins/{$pluginHook1}/{$pluginGroup} 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:

  • 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.

  • No labels