Question

i created module and put it into joomla repository. I created the update for that module, and put into repository too. Into my xml file i write some line to be install tags:

 <install version="1.5" type="module" client="site" method="upgrade">

I known how to updated extentions in joomla (Update extentions)

<extension type="component" version="2.5.0" method="upgrade">

But how to update the modules? In admin part i can't see my update from repository. Can you help me, or can you give some links where i can read about only modules update in Joomla.

Thank!

Was it helpful?

Solution

You firstly need to add the following to your XML file for your module:

<updateservers>
    <server type="extension" name="Name of Module" priority="1">http://www.example.com/update.xml</server>
</updateservers>

Then, create a new XML file called update.xml (if you want to call it something else, then be sure to change the name in the code above) and add the following code to it:

<updates>
    <update>
       <name>Name of Module</name>
       <description>description goes here</description>
       <element>mod_my_module</element>
       <type>module</type>
       <version>1.0.0</version>
       <downloads>
           <downloadurl type="full" format="zip">http://www.example.com/module.zip</downloadurl>
       </downloads>
       <maintainer>Company Name</maintainer>
       <maintainerurl>http://www.example.com</maintainerurl>
       <targetplatform name="joomla" version="2.5"/>
       <client>0</client>
       <client_id>0</client_id>
    </update>
<updates>

Every time you want to release an update, you simply need to duplicate the <update> tags and everything inside it and put it above the previous one. So here would be an example of version 1.0.0 and 1.1.0

<updates>
    <update>
       <name>Name of Module</name>
       <description>description goes here</description>
       <element>mod_my_module</element>
       <type>module</type>
       <version>1.1.0</version>
       <downloads>
           <downloadurl type="full" format="zip">http://www.example.com/module.zip</downloadurl>
       </downloads>
       <maintainer>Company Name</maintainer>
       <maintainerurl>http://www.example.com</maintainerurl>
       <targetplatform name="joomla" version="2.5"/>
       <client>0</client>
       <client_id>0</client_id>
    </update>
    <update>
       <name>Name of Module</name>
       <description>description goes here</description>
       <element>mod_my_module</element>
       <type>module</type>
       <version>1.0.0</version>
       <downloads>
           <downloadurl type="full" format="zip">http://www.example.com/module.zip</downloadurl>
       </downloads>
       <maintainer>Company Name</maintainer>
       <maintainerurl>http://www.example.com</maintainerurl>
       <targetplatform name="joomla" version="2.5"/>
       <client>0</client>
       <client_id>0</client_id>
    </update>
<updates>

Hope this helps

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top