This tutorial is designed to teach developers how to create an update server for integration with the update system introduced in Joomla! 1.6. By adding an update server listing to your extension's manifest, developers enable users to update their extensions via the Extension Manager's Update view with only a few clicks.
In order to use this feature, an update server must be defined in your extension's manifest. This definition can be used in all Joomla! 1.6 and 1.7 compatible extensions but is not available for templates. You can use two options for your server type; collection or extension. These will be explained in detail shortly. The update server is defined as follows for each type:
<updateservers> <server type="collection">http://example.com/list.xml</server> <server type="extension" priority="2" name="My Extension's Updates">http://example.com/extension.xml</server> </updateservers>
Multiple servers can be defined within the <updateservers> tag.
The collection server type allows developers to define an extension's manifest to pull updates from a collection. This type of server can be used if the developer wants to define all of their extension's updates in a single file (not recommended) or if their extension has multiple sub-extensions which are not distributed or updated at the same time (such as a package extension type). The below example is the collection definition used by the updater when processing core Joomla! updates:
<extensionset name="Joomla Core" description="Joomla! Core"> <extension name="Joomla" element="joomla" type="file" version="1.7.0" detailsurl="http://update.joomla.org/core/extension.xml"/> </extensionset>
All definitions must be defined between <extensionset> tags in your collection manifest. The <extensionset> tag has two optional parameters; name and description. For each extension that this collection references, a separate <extension> tag is required. The <extension> tag has the following parameters, all of which are required for updates to properly process:
The extension server type allows developers to define an extension's manifest to pull updates from a single extension's manifest. All collection manifests eventually point to this XML file. All updates in this file must be defined after an <updates> tag at the beginning of the file. The below example is the update definition for the Joomla! 1.7.0 release:
<update> <name>Joomla! 1.7</name> <description>Joomla! 1.7 CMS</description> <element>joomla</element> <type>file</type> <version>1.7.0</version> <infourl title="Joomla!">http://www.joomla.org/</infourl> <downloads> <downloadurl type="full" format="zip">http://joomlacode.org/gf/download/frsrelease/15279/66552/Joomla_1.6.5_to_1.7.0_Package.zip</downloadurl> </downloads> <tags> <tag>stable</tag> </tags> <maintainer>Sam Moffatt</maintainer> <maintainerurl>http://sammoffatt.com.au</maintainerurl> <targetplatform name="joomla" version="1.6"/> </update>
The following section describes the elements of a single update entity.
A separate <update> definition will be required for each version of your extension you release.
Maintaining your update server files can be difficult depending on the manner in which you set up your files. An extension which can help you to maintain this is the Akeeba Release System, available free of charge from https://www.akeebabackup.com