Plugin Description File
Plugins compatible with Plugin Manager must include a file named “mtplugin.pkg” in their distribution. That file must conform to the following “Packaging Format Specification.” This file instructs Plugin Manager how to install the plugin, uninstall the plugin and where to find updates for the plugin. Without it, Plugin Manager would not work.
The file format is meant to be as flexible as possible allowing plugin developers to create a Plugin Manager spec file that is capable of installing any plugin regardless of your plugin’s directory heirarchy or organization.
Each plugin compatible with Plugin Manager must contain a file by the name of mtplugin.pkg. This file must conform to the schema detailed by this specification.
File Paths
Throughout the Packaging Format, there are references to files. These references must be relative to the base directory of the archive. For example, suppose you have a plugin archive that contains the following files.
TestPlugin-1.0/plugins/TestPlugin/lib/TestPlugin/App.pmTestPlugin-1.0/plugins/TestPlugin/lib/TestPlugin/Plugin.pmTestPlugin-1.0/plugins/TestPlugin/TestPlugin.plTestPlugin-1.0/plugins/TestPlugin/mtplugin.pkgTestPlugin-1.0/README.txt
Then the following <file> definition (detailed below):
<file>
<src>TestPlugin-1.0/plugins/TestPlugin/lib</src>
<destination>plugins/TestPlugin/lib</destination>
</file>
Will have the effect of installing the following files:
plugins/TestPlugin/lib/TestPlugin/App.pmplugins/TestPlugin/lib/TestPlugin/Plugin.pm
Remember, regardless of where mtplugin.pkg file resides, all paths must be relative to the base directory of the archive.
Elements
The following is a description of each element within the plugin packaging format.
<plugin>
The plugin element is a container element for all plugin description meta data. Its contents are used to describe how to install and uninstall plugins.
Child Elements:
- name
- version_url
- sig
- icon
- files
- uninstall
<name>
The name of the plugin being installed.by Plugin Manager. The value of this element is used in displaying the name of the plugin among the list of plugins installed by Plugin Manager.
<version_url>
The URL from which Plugin Manager can retrieve the most recent information about an installed plugin. The URL references a document in the Plugin Version Information Format.
<sig>
A string representing the key uniquely indentifying the plugin within the Movable Type installation. A plugin signature, or key corresponds to the path to the plugin’s .pl file, relative to the Movable Type plugins directory.
For example, if a plugin’s .pl file is located in $MT_HOME/plugins/FooPlugin/Foo.pl when the sig element will be equal to FooPlugin/Foo.pl.
The value of this element is used to access the plugin’s meta data registered with Movable Type via the add_plugin method..
<icon>
The relative path pointing to the icon associated with a plugin. Icons must be at most 32 pixels wide and 32 pixels high. The path is relative to the Movable Type home directory, or the same directory in which mt.cgi can be found.
<files>
A container element for all the files and directories to be installed by Plugin Manager during its installation process.
Child Elements:
- file
<file>
Identifies a single file or directory within the plugin archive, its permissions, whether it is a static file or not and the intended destination of the file within the Movable Type installation.
If the file element references a single file then that file will be copied to the specified destination.
If the file element references a directory then that directory and all of its contents will be copied recursively into the specified destination.
If the destination of the file references or contains a directory that does not exist, the directory will be created automatically during the installation process.
Child Elements:
- src
- destination
- static
- permissions
<src>
Identifies the file or directory within the plugin archive that will be copied to the specified
<destination>
Identifies the destination within the Movable Type installation where the
<static>
If the static element is ‘1’ then the file referenced by the
<permissions>
Identifies the permissions that will be assigned to the destination file or directory after it is installed. This is used primarily to ensure that certain files are given the proper execute permissions.
The value of this element must be an ordinal value such as ‘0755’.
<uninstall>
The uninstall element is a container element for all the commands that will be executed during the plugin’s uninstall process.
Child Elements:
- rmdir
<rmdir>
Identifies a directory to be removed during the uninstallation process of a plugin.
Attributes:
• static: (0 or 1). If the static attribute is true then the directory removed will be relative to the Movable Type static web path.

