Coding with SPIP 2.1
SPIP 2.1 Technical Documentation

> > > The minimal plugin.xml

The minimal plugin.xml

The plugin.xml file must be created in the root directory of your plugin. It contains the description of the plugin and allows it to define certain actions.

The minimum content of the plugin file might be as follows (non-ASCII characters are "escaped"):

  1. <plugin>
  2. <nom>Porte plume - Une barre d'outil pour bien &eacute;crire</nom>
  3. <auteur>Matthieu Marcillaud</auteur>
  4. <licence>GNU/GLP</licence>
  5. <version>1.2.1</version>
  6. <description>
  7. "Porte plume" est une barre d'outil g&eacute;niale pour SPIP [...]
  8. </description>
  9. <etat>stable</etat>
  10. <prefix>porte_plume</prefix>
  11. </plugin>

Download

These attributes are easy to understand, but are described below nonetheless:

  • nom: name of the plugin,
  • auteur: author(s) of the plugin,
  • licence: license(s) for the plugin,
  • version: version of the plugin. This detail is displayed in the private area when requesting information about the plugin, and it also serves for handling dependencies between plugins, when coupled with the prefix. Another attribute not to be confused with this one is the ’version_base’ which is used when the plugin creates tables or fields in the database,
  • description: pretty obvious! But note that this description and the plugin name are often written using multilingual "idioms" as text placeholders that will be replaced by the appropriate string for the current language, defined in the "lang" files for the plugin.
  • etat: the state of development of the plugin, perhaps "dev" (in development), "test" (under testing) or stable
  • prefix: a unique prefix distinguishing this plugin from any others. No numerals are permitted here, and it must be in lower case.