Notice: file_get_contents(): read of 8192 bytes failed with errno=21 Is a directory in /data/www/joomla4/plugins/content/atomicexample/atomicexample.php on line 32

Warning: count(): Parameter must be an array or an object that implements Countable in /data/www/joomla4/plugins/content/atomicexample/atomicexample.php on line 18
Test
167

Layouts test output

Introduction#

We host a server that provides automatic updates to the extensions we develop. The update server is hosted at extensions.jarbomarketing.com.

File Structure#

The server is sorted first by extension type, then by client, then by extension.

E.g. /pkg/jrb/eventsmanager/

📝
Note: General purpose extensions fall under the Jarbo directories.

At the root level, there are the following folders:

  • /mod/ for modules
  • /com/ for components
  • /pkg/ for packages

As an example, say you were creating a directory for a general purpose module named "Hello World". You would create the following directory:

/mod/jrb/helloworld/

Adding an Extension#

Create a Directory#

The first step to add an extension to the server is to create its directory. For example, say you were creating a directory for a general purpose module named "Hello World". You would create the following directory:

/mod/jrb/helloworld/

<Callout emoji="📝"> Refer to the extension server overview for information on how directories are structured and named. </Callout>

Add Default Files#

Once you've created your directory, you need to set up the basic file structure. Copy the starting files from Active Clients to the directory you created. Then create a folder in your directory named dl.

<Callout emoji="📝"> Path for starting files: Active Clients/_Admin/Hosting/Extension Server/Starting Files/ </Callout>

Your directory should now look like this:

mod/
|-- jrb/
|   |-- helloworld/
|   |-- dl/
|   |-- updates.xml

<Callout type="warning" emoji="⚠️"> Note: If the extension has separate versions for Joomla 3 and 4, create two updates.xml files and name them updates3.xml and updates4.xml. </Callout>

Create a Changelog#

Changelogs are helpful for keeping track of what's new or different between versions. Changelogs for our extensions are stored in the /changelogs/ directory at the root of the extension server. The changelogs are sorted by client, then named by extension.

For example, an extension named "Hello World" for Commercial Service would have a changelog at the following path:

/changelogs/com/helloworld.md

Adding an Update#

Upload the .zip Archive#

Add the .zip archive(s) for your extension to the extension's /dl/ folder.

Typically these are named as follows:

<type/client>_<name>-<version>_[j3 or j4="1"].zip[/j3]

Examples:

  • cs_featuredtags-1.0.1.zip
  • jrb_ctamodal-1.1.1.zip
  • pkg_eventsmanager-2.0.0.zip

Create the updates.xml Entry#

Create a new <update> entry in the appropriate updates.xml.

Here's an example entry for a general purpose module named "Hello World", being updated to version 1.0.0:

<update>
  <name>Hello World 1.0.0</name>
  <element>mod_helloworld</element>
  <type>module</type>
  <client>site</client>
  <version>1.0.0</version>
  <infourl>https://extensions.jarbomarketing.com/changelog/helloworld</infourl>
  <downloads>
    <downloadurl type="full" format="zip">https://extensions.jarbomarketing.com/mod/jrb/helloworld/dl/mod_helloworld-1.0.0.zip</downloadurl>
  </downloads>
  <targetplatform name="joomla" version="3|4" />
</update>

Some important things to remember:

  • The <element> tag contains the internal name for the extension.
  • The <type> tag contains either module, component, package.
  • The <client> tag contains site for modules and packages, and contains admin for components.
  • The <infourl> tag contains a link to the extension's changelog on the extension server, formatted as the three letter client name followed by the extension (you can omit the client name if it's jrb).
  • The <downloadurl> tag contains a link to the .zip file for this version.
  • Be sure to set the version attribute on <targetplatform> accordingly:
    • 3 for Joomla 3
    • 4 for Joomla 4
    • 3|4 for both
  • Be sure to update the version numbers in both the <name> and <version> tags.

Create the Changelog Entry#

Create a new section in the extension's changelog describing the contents of your update. Be sure to put newer updates at the top of the file.

<Callout emoji="📝"> There are predefined sections you can use for changelogs. You can copy them from the example file at Active Clients/_Admin/Hosting/Extension Server/changelog_samples.md </Callout>

Here's an example layout for an update:

## 2.0.0 <small id="2.0.0">(2022/07/18)</small>

### <i class="fa fa-code"></i> New

- Added new feature

### <i class="fa fa-gears"></i> Changes

- Changed how something works