All plugins should include a manifest in the form of an XML document named the same as the plugin. So, a plugin named test.php would have an accompanying test.xml manifest.

Directory & Files

Manifests are stored in the same directory as the plugin file itself and must be named the same (file extension being the obvious exception).



A typical plugin manifest:

<?xml version="1.0" encoding="utf-8"?>
<extension version="1.7" type="plugin" group="system">
	<name>System - Test</name>
	<creationDate>Month 2008</creationDate>
	<copyright>Copyright (C) 2008 Holder. All rights reserved.</copyright>
	<license>GNU General Public License</license>
	<description>A test system plugin</description>
		<filename plugin="example">example.php</filename>
  			<field name="example"
  				description="An example text parameter" />

Let's go through some of the most important tags:

This tag has several key attributes. The type must be "plugin" and you must specify the group. The group attribute is required and is the name of the directory you saved your files in (for example, system, content, etc). We use the method="upgrade" attribute to allow us to install the extension without uninstalling. In other words, if you are sharing this plugin with other, they can just install the new version over the top of the old one.
We usually start the name with the type of plugin this is. Our example is a system plugin and it has some some nebulous test purpose. So we have named the plugin "System - Test". You can name the plugins in any way, but this is a common format.
The files tag includes all of the files that will will be installed with the plugin. Plugins can also support be installed with subdirectories. To specify these just all a FOLDER tag, <folder>test</folder>. It is common practice to have only one subdirectory and name it the same as the plugin PHP file (without the extension of course).
Any number of parameters can be specified for a plugin. Please note there is no "advanced" group for plugins as there is in modules and components.

Last modified:

  • Copyright © 2022 Hubzero
  • Powered by Hubzero®