Actions

Difference between revisions of "Manifest files"

From Joomla! Documentation

(Added information)
(Language files: Corrected tags)
(40 intermediate revisions by 13 users not shown)
Line 1: Line 1:
 
{{incomplete}}
 
{{incomplete}}
{{inuse}}
 
 
{{RightTOC}}
 
{{RightTOC}}
 
==Introduction==
 
==Introduction==
Line 6: Line 5:
  
 
==Naming conventions==
 
==Naming conventions==
The file must be named manifest.xml or <extension_name>.xml and located in the root directory of the installation package.
+
The file must be named <tt>manifest.xml</tt> or <tt><extension_name>.xml</tt> and located in the root directory of the installation package.
  
 
==Syntax==
 
==Syntax==
Line 18: Line 17:
 
{|class="wikitable"
 
{|class="wikitable"
 
|-
 
|-
! style="width: 150px" | Attribute || style="width: 150px" | Values || Description
+
! style="width: 150px" | Attribute || style="width: 150px" | Values || Applicable&nbsp;to || Description
 
|-
 
|-
| type || component<br /> module<br /> plugin<br />template  
+
| type || <code>component</code><br /><code>file</code><br /><code>language</code><br /><code>library</code><br /><code>module</code><br /><code>package</code><br /><code>plugin</code><br /><code>template</code> || All extensions
 
| This attribute describes the type of the extension for the installer. Based on this type further requirements to sub-tags apply.
 
| This attribute describes the type of the extension for the installer. Based on this type further requirements to sub-tags apply.
 
|-
 
|-
 
| version
 
| version
| 1.6
+
| <code>1.6</code> || All extensions
 
| String that identifies the version of Joomla for which this extension is developed. For Joomla 1.6 a version higher than 1.5 is required.
 
| String that identifies the version of Joomla for which this extension is developed. For Joomla 1.6 a version higher than 1.5 is required.
 
|-
 
|-
 
| method
 
| method
| new<br />upgrade
+
| <code>new</code><br /><code>upgrade</code> || All extensions
 
| The default value install will be also used if the method attribute is not used. In these cases the installer will gracefully stop if he finds any existing file/folder of the new extension
 
| The default value install will be also used if the method attribute is not used. In these cases the installer will gracefully stop if he finds any existing file/folder of the new extension
 
|-
 
|-
 
| client
 
| client
| site<br />administrator
+
| <code>site</code><br /><code>administrator</code> || Modules
| ''Applicable for modules'' The client allows to specify for which application client the new module is available.
+
| The client attribute allows you to specify for which application client the new module is available.
 
|-
 
|-
 
| group
 
| group
| <free name>
+
| ''string'' || Plugins
| ''Applicable for plugins'' The group name specifies for which group of plugins the new plugin is available. The existing groups are the folder names within the directory /plugins. The installer will create new folder names for group names that do not exist yet.
+
| The group name specifies for which group of plugins the new plugin is available. The existing groups are the folder names within the directory <tt>/plugins</tt>. The installer will create new folder names for group names that do not exist yet.
 
|}
 
|}
  
Line 55: Line 54:
  
 
=== Front-end files ===
 
=== Front-end files ===
 +
 +
<source lang="xml">
 +
<files folder="from-folder">
 +
<filename>example.php</filename>
 +
<folder>examples</folder>
 +
</files>
 +
</source>
  
 
Files to copy to the front-end directory should be placed in the <code><files></code> element. You can use the optional <code>folder</code> attribute to specify a directory '''in the ZIP package''' to copy '''from'''. Each file to copy must be represented by a <code><filename></code> element. If you want to copy an entire folder at once, you can define it as a <code><folder></code>.
 
Files to copy to the front-end directory should be placed in the <code><files></code> element. You can use the optional <code>folder</code> attribute to specify a directory '''in the ZIP package''' to copy '''from'''. Each file to copy must be represented by a <code><filename></code> element. If you want to copy an entire folder at once, you can define it as a <code><folder></code>.
 +
 +
=== Media files ===
 +
 +
<source lang="xml>
 +
<media folder="media" destination="com_example">
 +
<filename>com_example_logo.png</filename>
 +
<folder>css</folder>
 +
<folder>js</folder>
 +
</media>
 +
</source>
 +
 +
This example will copy the file(s) (<tt>/media/com_example_logo.png</tt>) and folders ( <tt>/media/css/</tt> and <tt>/media/js/</tt> ) listed to <tt>/media/com_example/</tt>, creating the <tt>com_example</tt> folder if required. You can use the optional <code>folder</code> attribute to specify a directory '''in the ZIP package''' to copy '''from''' (in this case, <tt>media</tt>).
 +
 +
Extensions should be storing assets they need to be web accessible (JS, CSS, images etc) in <code>media</code>. Amongst other things this feature was added as step in the progression to multi-site support and the eventual move of code files (PHP) out of the web accessible areas of the server.
 +
 +
Ref:
 +
* [https://groups.google.com/forum/#!msg/joomla-dev-cms/4CAASJqFY-k/PvPj14gP29EJ Google Groups - joomla-dev-cms thread]
 +
* [https://groups.google.com/forum/#!msg/joomla-dev-cms/uNmhX98sKbE/p8p68Jke680J Google Groups - joomla-dev-cms thread]
  
 
=== Administration section ===
 
=== Administration section ===
  
The administration section is defined in the <code><administration></code> element.
+
<source lang="xml">
 +
<administration>
 +
<!-- various elements -->
 +
</administration>
 +
</source>
 +
 
 +
The administration section is defined in the <code><administration></code> element. Since only [[Component|components]] apply to both the [[Site (Application)|site]] and the [[Administrator (Application)|administrator]], '''only component manifests can include this element'''.
  
 
==== Back-end files ====
 
==== Back-end files ====
  
Files to copy to the back-end directory should be placed in the <code><files></code> element. You can use the optional <code>folder</code> attribute to specify a directory '''in the ZIP package''' to copy '''from'''. See ''Front-end files'' for further rules.
+
Files to copy to the back-end directory should be placed in the <code><files></code> element under the <code><administration></code>. You can use the optional <code>folder</code> attribute to specify a directory '''in the ZIP package''' to copy '''from'''. See ''Front-end files'' for further rules.
 +
 
 +
==== Menu links and submenus ====
 +
 
 +
<source lang="xml">
 +
<menu>COM_EXAMPLE</menu>
 +
<submenu>
 +
<menu link="anoption=avalue">COM_EXAMPLE_SUBMENU_ANOPTION</menu>
 +
<menu view="viewname">COM_EXAMPLE_SUBMENU_VIEWNAME</menu>
 +
</submenu>
 +
</source>
 +
 
 +
The text for the main menu item for the component is defined in the <code><menu><code> item, a child of <code><administration></code>. A <code><submenu></code> element may also be present (also a child of <code><administration></code>), which may contain more menu items defined by <code><menu></code>.
 +
 
 +
Additionally, each <code><menu></code> item can define the following attributes:
 +
 
 +
{| class="wikitable"
 +
! style="width: 150px" | Attribute || Description
 +
|-
 +
| link || A link to send the user to when the menu item is clicked
 +
|-
 +
| img || The (relative) path to an image (16x16 pixels) to appear beside the menu item.
 +
<u>Must be an url compatible as a file too (e.g. no spaces) !</u>
 +
| alt ||
 +
|-
 +
| ''string'' || An URL parameter to add to the link.  For example, <code><menu view="cpanel">COM_EXAMPLE</menu></code> in com_example's XML manifest would cause the URL of the menu item to be <tt>index.php?option=com_example&view=cpanel</tt>.
 +
|-
 +
|}
 +
 
 +
The value inside the tag is the menu's label. Unlike Joomla! 1.5, you can not use a natural language string. For example, if you would enter "Example Component" instead of COM_EXAMPLE, it would result in your component name appearing as example-component in the menu and you would be unable to provide a translation. In order to provide a translation you need to create a file named en-GB.com_example.sys.ini in administrator/languages/en-GB (you can use the manifest's <code><languages></code> tag to copy it during installation) or in administrator/components/com_example/language/en-GB. In the latter case, you must not include the translation file in the <code><languages></code> tag. As long as you have placed the language directory in your <code><files></code> tag, it will be copied along when the component is being installed.
 +
 
 +
The contents of that file should be:
 +
<source>
 +
COM_EXAMPLE="Example Component"
 +
COM_EXAMPLE_SUBMENU_ANOPTION="Another Option"
 +
COM_EXAMPLE_SUBMENU_VIEWNAME="Another View"
 +
 
 +
</source>
 +
 
 +
Please note that the language string must be enclosed in double quotes, as per Joomla!'s translation standards. Important note: Joomla! 1.6 and later sorts the Component menu items based on the actual translation of the key you supply in your XML manifest. This means that the sorting order is correct no matter what you call your translation key and no matter which language the site is being displayed in. Essentially, Joomla! 1.6 fixed the wrong sorting of the Components menu for the majority (non-English speaking!) of Joomla! users experienced under Joomla! 1.5.
 +
 
 +
{{Needsinfo|In Platform 11.1 no alt attribute processed and if link provide in menu tag other provided attributes were ignore. The other tags are task, view, controller, act, layout, sub. Please confirm this, please.}}
  
 
=== Configuration ===
 
=== Configuration ===
 +
{{warning|Components '''do not support''' configuration definitions '''in the manifest'''. This is a way implemented in Joomla! 1.5. They can define configuration options for multiple levels using [[Component configuration metadata]].}}
 
The <code><config></code> element, a child of the root, describes the configuration options for the extension. If applicable, the options will be shown by the appropriate Manager (Plugin Manager, Module Manager or Template Manager). '''Configuration options can also be defined in a separate file named <code>config.xml</code>. Its root element should be <code><config></code>.'''
 
The <code><config></code> element, a child of the root, describes the configuration options for the extension. If applicable, the options will be shown by the appropriate Manager (Plugin Manager, Module Manager or Template Manager). '''Configuration options can also be defined in a separate file named <code>config.xml</code>. Its root element should be <code><config></code>.'''
  
 
{{:XML JForm form definitions}}
 
{{:XML JForm form definitions}}
  
== Example ==
+
=== SQL ===
See [http://joomlacode.org/gf/project/joomla/scmsvn/?action=browse&path=%2Fdevelopment%2Ftags%2F1.6.x%2F1.6.3%2Fadministrator%2Fcomponents%2Fcom_banners%2Fbanners.xml&revision=21172&view=markup the manifest of the Banner component in version 1.6.3].
+
 
 +
<source lang="xml">
 +
    <install folder="admin">
 +
        <sql>
 +
            <file driver="mysql" charset="utf8">sql/example.install.sql</file>
 +
        </sql>
 +
    </install>
 +
    <uninstall folder="admin">
 +
        <sql>
 +
            <file driver="mysql" charset="utf8">sql/example.uninstall.sql</file>
 +
        </sql>
 +
    </uninstall>
 +
</source>
 +
 
 +
In above example, we put sql files in "admin/sql" folder of installation package. You have to include "sql" folder in administration files.
 +
 
 +
You can execute SQL during installation and/or uninstallation using the <code><install></code> and <code><uninstall></code> elements, respectively. An <code><sql></code> element should appear as a child of these elements. <code><sql></code> can contain any number of <code><file></code> elements, each defining a single SQL file to execute. Their database driver types are described by the <code>driver</code> attribute, their character sets by the <code>charset</code> attribute.
 +
 
 +
==== Update of the SQL schema ====
 +
 
 +
<source lang="xml">
 +
<update>
 +
<schemas>
 +
<schemapath type="mysql">sql/updates/mysql</schemapath>
 +
<schemapath type="sqlsrv">sql/updates/sqlsrv</schemapath>
 +
</schemas>
 +
</update>
 +
</source>
 +
 
 +
Since 1.6, there is also an <code><update></code> tag, which allows to provide a series of SQL files to update the current schema.
 +
 
 +
=== Language files ===
 +
In Joomla! 1.5, we put extension language files in Joomla! main language file, using <languages>..</languages> tag as shown below. '''This tag considered to be deprecated since Joomla! 1.6.''' We encourage you to put extension 's language files in extension folder and Joomla! is responsible for loading of required language files.
 +
 
 +
<source lang="xml">
 +
<!-- Joomla! 1.5 language tag, deprecated since Joomla! 1.6 -->
 +
<languages folder="langfiles">
 +
<language tag="en-GB">en-GB.com_example.ini</language>
 +
</languages>
 +
</source>
 +
 
 +
Storing extension language files in extension folder, you gain benefit when removing some language from Joomla! installation. As your language files were not removed, when reinstall the language again you can use that files without install them again.
 +
 
 +
The structure of language folder for frontend and backend is the same. You put them in <language> tag of your folder e.g. language/en-GB/. You have to specify these folders in front-end and back-end files too.
 +
 
 +
During development you can turn on language debuggin in Joomla! global configuration. So you can investigate if the problems exists.
 +
 
 +
=== Script file ===
 +
 
 +
<source lang="xml">
 +
    <scriptfile>example.script.php</scriptfile>
 +
</source>
 +
 
 +
An optional '''script file''' (PHP code that is run before, during and/or after installation, uninstallation and upgrading) can be defined using a <code><scriptfile></code> element. This file should contain a class named "<element_name>IntallerScript" where <element_name> is the name of your extension (e.g. com_componentname, mod_modulename, etc.). Plugins requires to state the group (e.g. plgsystempluginname). The structure of the class is as follows:
 +
 
 +
<source lang="php">
 +
 
 +
class com_componentnameInstallerScript
 +
{
 +
/**
 +
* Constructor
 +
*
 +
* @param  JAdapterInstance  $adapter  The object responsible for running this script
 +
*/
 +
public function __constructor(JAdapterInstance $adapter);
 +
 +
/**
 +
* Called before any type of action
 +
*
 +
* @param  string  $route  Which action is happening (install|uninstall|discover_install)
 +
* @param  JAdapterInstance  $adapter  The object responsible for running this script
 +
*
 +
* @return  boolean  True on success
 +
*/
 +
public function preflight($route, JAdapterInstance $adapter);
 +
 +
/**
 +
* Called after any type of action
 +
*
 +
* @param  string  $route  Which action is happening (install|uninstall|discover_install)
 +
* @param  JAdapterInstance  $adapter  The object responsible for running this script
 +
*
 +
* @return  boolean  True on success
 +
*/
 +
public function postflight($route, JAdapterInstance $adapter);
 +
 +
/**
 +
* Called on installation
 +
*
 +
* @param  JAdapterInstance  $adapter  The object responsible for running this script
 +
*
 +
* @return  boolean  True on success
 +
*/
 +
public function install(JAdapterInstance $adapter);
 +
 +
/**
 +
* Called on update
 +
*
 +
* @param  JAdapterInstance  $adapter  The object responsible for running this script
 +
*
 +
* @return  boolean  True on success
 +
*/
 +
public function update(JAdapterInstance $adapter);
 +
 +
/**
 +
* Called on uninstallation
 +
*
 +
* @param  JAdapterInstance  $adapter  The object responsible for running this script
 +
*/
 +
public function uninstall(JAdapterInstance $adapter);
 +
}
 +
 
 +
</source>
 +
 
 +
=== Update servers ===
 +
 
 +
<source lang="xml">
 +
    <updateservers>
 +
        <server type="extension" priority="1" name="Extension Update Site">http://example.com/extension.xml</server>
 +
        <server type="collection" priority="2" name="Collection Update Site">http://example.com/collection.xml</server>
 +
    </updateservers>
 +
</source>
 +
 
 +
Update servers can be defined in the <code><updateservers></code> element, a child of the root. This element may contain one or more <code><server></code> element, each describing a location to fetch updates from. Each <code><server></code> item can define the following attributes:
 +
 
 +
{| class="wikitable"
 +
! style="width: 150px" | Attribute || style="width: 150px" | Values || Description
 +
|-
 +
| type || <code>extension</code><br /><code>collection</code> || The update server type
 +
|-
 +
| priority || ''integer'' || The priority of the update server
 +
|-
 +
| name || ''string'' || The name of the update server
 +
|}
 +
 
 +
== Examples ==
 +
For a real-life example, see [http://joomlacode.org/gf/project/joomla/scmsvn/?action=browse&path=%2Fdevelopment%2Ftags%2F1.6.x%2F1.6.5%2Fadministrator%2Fcomponents%2Fcom_banners%2Fbanners.xml&view=markup the manifest of the Banner component in version 1.6.5].
 +
 
 +
The Joomla testing process uses several extensions to test whether the installer works correctly. The latest versions of the manifests of these extensions are:
 +
 
 +
* [http://svn.joomla.org/project/cms/development/trunk/tests/_data/installer_packages/com_alpha/alpha.xml com_alpha manifest]
 +
* [http://svn.joomla.org/project/cms/development/trunk/tests/_data/installer_packages/mod_alpha/mod_alpha.xml mod_alpha manifest]
 +
* [http://svn.joomla.org/project/cms/development/trunk/tests/_data/installer_packages/plg_system_alpha/alpha.xml plg_system_alpha manifest]
 +
* [http://svn.joomla.org/project/cms/development/trunk/tests/_data/installer_packages/tpl_simple/templateDetails.xml tpl_simple manifest]
 +
* [http://svn.joomla.org/project/cms/development/trunk/tests/_data/installer_packages/lng_xx-XX/xx-XX.xml lng_xx-XX manifest]
  
 
== Contributors ==
 
== Contributors ==
 
*[[User:akede|Alex Kempkens]]
 
*[[User:akede|Alex Kempkens]]
 
*[[User:dperaza|Daniel Peraza]]
 
*[[User:dperaza|Daniel Peraza]]
 +
*[[User:nikosdion|Nicholas K. Dionysopoulos]]
 +
*[[User:mrs.siam|Prasit Gebsaap]]
 +
*[[User:cppl|Craig Phillips]]
  
  
[[Category:Development Working Group]]
+
[[Category:Extension development]]
[[Category:Extensions]]
+
[[Category:Specifications]]

Revision as of 09:38, 11 December 2012

Quill icon.png
Content is Incomplete

This article or section is incomplete, which means it may be lacking information. You are welcome to assist in its completion by editing it as well. If this article or section has not been edited in several days, please consider helping complete the content.
This article was last edited by Matthewtbaker (talk| contribs) 20 months ago. (Purge)

Contents

Introduction

Within Joomla there are manifest files for all of the extensions. These files include the general installation information as well as parameters for the configuration of the extension itself. Since Joomla! 1.6 Joomla 1.6, there are very few differences between the manifest file formats for the different types of extensions, allowing each type to access the full power of the Joomla! installer.

Naming conventions

The file must be named manifest.xml or <extension_name>.xml and located in the root directory of the installation package.

Syntax

Root element

The primary tag of the installation file is:

<extension></extension>

This starting and closing tags are now valid for all extensions. The new tag <extension> replaces the old <install></install> from Joomla Joomla 1.5. The following attributes are allowed within the tag:

Attribute Values Applicable to Description
type component
file
language
library
module
package
plugin
template
All extensions This attribute describes the type of the extension for the installer. Based on this type further requirements to sub-tags apply.
version 1.6 All extensions String that identifies the version of Joomla for which this extension is developed. For Joomla 1.6 a version higher than 1.5 is required.
method new
upgrade
All extensions The default value install will be also used if the method attribute is not used. In these cases the installer will gracefully stop if he finds any existing file/folder of the new extension
client site
administrator
Modules The client attribute allows you to specify for which application client the new module is available.
group string Plugins The group name specifies for which group of plugins the new plugin is available. The existing groups are the folder names within the directory /plugins. The installer will create new folder names for group names that do not exist yet.

Metadata

The following elements can be used to insert metadata. None of these elements are required; if they are present, they must be a child of the root element.

  • <name> – raw component name (e.g. com_banners)
  • <author> – author's name (e.g. Joomla! Project)
  • <creationDate> – date of creation or release (e.g. April 2006)
  • <copyright> – a copyright statement (e.g. (C) 2005 - 2011 Open Source Matters. All rights reserved.)
  • <license> – a license statement (e.g. NU General Public License version 2 or later; see LICENSE.txt)
  • <authorEmail> – author's email address (e.g. admin@joomla.org)
  • <authorUrl> – URL to the author's website (e.g. www.joomla.org)
  • <version> – the version number of the extension (e.g. 1.6.0)
  • <description> – the description of the component. This is a translatable field. (e.g. COM_BANNERS_XML_DESCRIPTION)

Front-end files

        <files folder="from-folder">
                <filename>example.php</filename>
                <folder>examples</folder>
        </files>

Files to copy to the front-end directory should be placed in the <files> element. You can use the optional folder attribute to specify a directory in the ZIP package to copy from. Each file to copy must be represented by a <filename> element. If you want to copy an entire folder at once, you can define it as a <folder>.

Media files

        <media folder="media" destination="com_example">
                <filename>com_example_logo.png</filename>
                <folder>css</folder>
                <folder>js</folder>
        </media>

This example will copy the file(s) (/media/com_example_logo.png) and folders ( /media/css/ and /media/js/ ) listed to /media/com_example/, creating the com_example folder if required. You can use the optional folder attribute to specify a directory in the ZIP package to copy from (in this case, media).

Extensions should be storing assets they need to be web accessible (JS, CSS, images etc) in media. Amongst other things this feature was added as step in the progression to multi-site support and the eventual move of code files (PHP) out of the web accessible areas of the server.

Ref:

Administration section

        <administration>
                <!-- various elements -->
        </administration>

The administration section is defined in the <administration> element. Since only components apply to both the site and the administrator, only component manifests can include this element.

Back-end files

Files to copy to the back-end directory should be placed in the <files> element under the <administration>. You can use the optional folder attribute to specify a directory in the ZIP package to copy from. See Front-end files for further rules.

Menu links and submenus

        <menu>COM_EXAMPLE</menu>
        <submenu>
                <menu link="anoption=avalue">COM_EXAMPLE_SUBMENU_ANOPTION</menu>
                <menu view="viewname">COM_EXAMPLE_SUBMENU_VIEWNAME</menu>
        </submenu>

The text for the main menu item for the component is defined in the <menu> item, a child of <administration>. A <submenu> element may also be present (also a child of <administration>), which may contain more menu items defined by <menu>.

Additionally, each <menu> item can define the following attributes:

Attribute Description
link A link to send the user to when the menu item is clicked
img The (relative) path to an image (16x16 pixels) to appear beside the menu item.

Must be an url compatible as a file too (e.g. no spaces) !

alt
string An URL parameter to add to the link. For example, <menu view="cpanel">COM_EXAMPLE</menu> in com_example's XML manifest would cause the URL of the menu item to be index.php?option=com_example&view=cpanel.

The value inside the tag is the menu's label. Unlike Joomla! 1.5, you can not use a natural language string. For example, if you would enter "Example Component" instead of COM_EXAMPLE, it would result in your component name appearing as example-component in the menu and you would be unable to provide a translation. In order to provide a translation you need to create a file named en-GB.com_example.sys.ini in administrator/languages/en-GB (you can use the manifest's tag as shown below. This tag considered to be deprecated since Joomla! 1.6. We encourage you to put extension 's language files in extension folder and Joomla! is responsible for loading of required language files.

<!-- Joomla! 1.5 language tag, deprecated since Joomla! 1.6 -->
<languages folder="langfiles">
        <language tag="en-GB">en-GB.com_example.ini</language>
</languages>

Storing extension language files in extension folder, you gain benefit when removing some language from Joomla! installation. As your language files were not removed, when reinstall the language again you can use that files without install them again.

The structure of language folder for frontend and backend is the same. You put them in <language> tag of your folder e.g. language/en-GB/. You have to specify these folders in front-end and back-end files too.

During development you can turn on language debuggin in Joomla! global configuration. So you can investigate if the problems exists.

Script file

    <scriptfile>example.script.php</scriptfile>

An optional script file (PHP code that is run before, during and/or after installation, uninstallation and upgrading) can be defined using a <scriptfile> element. This file should contain a class named "<element_name>IntallerScript" where <element_name> is the name of your extension (e.g. com_componentname, mod_modulename, etc.). Plugins requires to state the group (e.g. plgsystempluginname). The structure of the class is as follows:

class com_componentnameInstallerScript
{
        /**
         * Constructor
         *
         * @param   JAdapterInstance  $adapter  The object responsible for running this script
         */
        public function __constructor(JAdapterInstance $adapter);
 
        /**
         * Called before any type of action
         *
         * @param   string  $route  Which action is happening (install|uninstall|discover_install)
         * @param   JAdapterInstance  $adapter  The object responsible for running this script
         *
         * @return  boolean  True on success
         */
        public function preflight($route, JAdapterInstance $adapter);
 
        /**
         * Called after any type of action
         *
         * @param   string  $route  Which action is happening (install|uninstall|discover_install)
         * @param   JAdapterInstance  $adapter  The object responsible for running this script
         *
         * @return  boolean  True on success
         */
        public function postflight($route, JAdapterInstance $adapter);
 
        /**
         * Called on installation
         *
         * @param   JAdapterInstance  $adapter  The object responsible for running this script
         *
         * @return  boolean  True on success
         */
        public function install(JAdapterInstance $adapter);
 
        /**
         * Called on update
         *
         * @param   JAdapterInstance  $adapter  The object responsible for running this script
         *
         * @return  boolean  True on success
         */
        public function update(JAdapterInstance $adapter);
 
        /**
         * Called on uninstallation
         *
         * @param   JAdapterInstance  $adapter  The object responsible for running this script
         */
        public function uninstall(JAdapterInstance $adapter);
}

Update servers

    <updateservers>
        <server type="extension" priority="1" name="Extension Update Site">http://example.com/extension.xml</server>
        <server type="collection" priority="2" name="Collection Update Site">http://example.com/collection.xml</server>
    </updateservers>

Update servers can be defined in the <updateservers> element, a child of the root. This element may contain one or more <server> element, each describing a location to fetch updates from. Each <server> item can define the following attributes:

Attribute Values Description
type extension
collection
The update server type
priority integer The priority of the update server
name string The name of the update server

Examples

For a real-life example, see the manifest of the Banner component in version 1.6.5.

The Joomla testing process uses several extensions to test whether the installer works correctly. The latest versions of the manifests of these extensions are:

Contributors