/downloadid-custom-field

Download ID as Custom Joomla Form Field

Primary LanguagePHPGNU General Public License v3.0GPL-3.0

Download ID Field

This is a custom Form Field to help Joomla! extension developers to implement Joomla Update System and meet the new JED requirement for PAID extensions.

This field is developed to be used with Akeeba Subscriptions and Akeeba Release System packages, although it can be customized to work with other subscriptions and realease/downlaod managers.

How To Use?

First of all, download the downloadid.php file and add it in a proper folder inside your extension package I recommend assets/fields, so the the relative path should be YOUR_EXTENSION/assets/fields/downloadid.php

Now, the Download ID field is ready to be used as any other standard form field within your installation xml file.

This is an example of a module installation file, let's say mod_somemodule.xml

<config>

<fields name="params">

<fieldset name="basic" addfieldpath="/modules/mod_somemodule/assets/fields">

...

<field

name="dlid"

type="downloadid"

label="Download ID"

description="Download ID description"

default=""

extension="Some Module"

key="dlid"

/>

...

</fieldset>

</fields>

</config>

<updateservers>

<server type="extension" name="Some Module" priority="1">http://www.yourwebsite.com/somemodule_update.xml</server>

</updateservers>

Important

The Download ID field has two important additional attributes, extension and key where:

extension: must be the same as the name attribute of <server>, this is very important to set the update the correct record in the update_sites table.

key: has a default value of "dlid" which is used with Akeeba Subs & Release System combination, of course you can give it any other value if needed with any other subs and release managers.

Note:

I developed and tested this custom field in the Stats Pro for JED module.

Any comments or suggessions are welcome.

You can use the Download ID field as it is, without any gaurantees.