If you have thought of an updating facility within your website, this blog will guide you to create an update server for Joomla's update system.

A. Create or Edit an update stream

Goto your Akeeba Release System's control panel, you will find the Update stream logo.

b2ap3_thumbnail_update_stream_icon.png

Update stream is a relationship between the extension release inside the specified category.

Stream Name : A name for the update stream. It can be anything you want and is only used in the Joomla! 1.6 XML format streams.
Note : This is what Joomla! will also display in the Extension Name when it lists new available updates.

Alias : Used to construct the URL in the front-end. Keep it short and sweet.

Extension type : This is what type of your extension.

Category : The category where we're going to look for updates.

Package naming pattern : An update stream looks for files following a specific naming convention. You need to provide a filename and use a single question mark (?) to match any single character or a single start (*) to match any number of characters. Only items whose File or URL field matches this pattern will be included in the update stream.

For instance, if installation packages are named com_example-VERSIONNUMBER-core.zip, where only VERSIONNUMBER changes, i.e. com_example-3.1-core.zip, com_example-3.1.5-core.zip etc. This leads us to a naming pattern of com_example-*-core.zip .

Element : This is required for Joomla! 1.6 update streams. It should contain the name of your extension, e.g. com_something, mod_something, plg_something etc.

Site area (client_id) : All update streams must indicate the site area (frontend or backend) the extension applies to. Forcomponent, library and file extensions you must always use "Backend". For plugins, modules and templates select "Frontend" or "Backend" depending on whether your extension applies to the frontend or the backend of your clients' sites respectively.

Folder (for plugins) : For all extension types except plugins, leave this blank. For plugins, this must be set to the plugin type. For example, if you have a system plugin, type insystem in this box. If you have a content plugin, type in content in this box.

JED Extension ID : This is optional and only needs to be entered for extensions listed in the Joomla! Extensions Directory (JED). This is the numeric ID of your extension as listed in the JED. This is used for the Install from Web feature integration. For more information please take a look at the Content - Akeeba Release System Latest Version plugin which contains the plumbing to actually provide the URLs you need to use for the (quite convoluted) Install from Web feature.

Published : The status of the stream, also unpublished streams result in empty pages.

 

B.  Setup update server in your extension

This definition can be used in all Joomla! 2.5 and newer 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. This code should be added to the extension manifest file, within the root "extension" element. The update server is defined as follows for each type:

<updateservers>
<server type="extension" priority="1" name="SocialAds updates"><![CDATA[https://www.example.com/index.php?option=com_ars&view=update&task=stream&format=xml&id=1&dummy=extension.xml]]></server>
</updateservers>

Allowing your user to upgrade extensions with restricted downloads

Most of us developers want to provide downloads that are not openly accessible to the public. All you have to do is to create component parameters in your component's config.xml file. If you want to use username/password pairs, add the following lines after your <params> tag:

<field name="downloadid" type="text" default="" size="30"
label="Download ID"
description ="Enter your Download ID to enable Live Updates" />
<field name="username" type="text" default="" size="30"
label="Username"
description ="Enter the username to our site in order to enable Live Updates" />
<field name="password" type="text" default="" size="30"
label="Password"
description ="Enter the password to our site in order to enable Live Updates" />

Finally you can check for update by going to Extension Manager -> Update

 

 

Read more

© 2024 Extly, CB - All rights reserved.