2

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!

Brotheryura
  • 1,158
  • 13
  • 21

1 Answers1

5

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

Lodder
  • 19,758
  • 10
  • 59
  • 100
  • It's simple and perfect! Thank you very much;-) – Brotheryura Feb 24 '14 at 15:22
  • Does it work with local server? I tried to implement it to my module in my localhost with joomla 3.0, but joomla never recognize the update – webchun Nov 26 '14 at 17:15
  • It works fine for me on a local server using Wampserver. I'm not sure about Xampp as I refuse to use it, so you will need to check your localhost setting to allow outgoing requests like this – Lodder Nov 26 '14 at 17:23
  • @Lodder I tried to install one of your module, JJ Social Image , that uses updater, and I got this message on Joomla 2.5 : Update: :Extension: Could not open http://www.joomjunk.co.uk/updates/socialimages_update.xml but JCE working fine. see https://www.dropbox.com/s/yaxos8hqd3nymnz/65ita.jpg?dl=0 . In Joomla 3.3 nothing happened (no update recognized) – webchun Nov 27 '14 at 01:19
  • @Lodder fyi I don't have old version of JJ Social images so I changed the JJ Social image version on its xml file on my localhost to make it recognizes an update – webchun Nov 27 '14 at 01:57
  • @Lodder ok it looks like the problem is with my local installation. I have made a new install and it now works properly. Thanks for the reply. I have voted up your answer. – webchun Nov 27 '14 at 02:38
  • @dreamexploded - Glad you got it working :) Just be sure to request support for one of my extensions on JJ Forum rather than Stackoverflow as the question asked here was regarding updating an extension from a repository such as Github ;) – Lodder Nov 27 '14 at 08:15
  • Hi there. Please help. I am concerned about the tag 'client'. What value should I use for a plugin? @dreamexploded – Daydah Dec 10 '16 at 13:16
  • @Daydah you dont need to use `client` for plugins. It's only for modules and templates – Lodder Dec 10 '16 at 13:35
  • @Lodder actually you do - folder and client tags are compulsory for plugins. I just found out. "...Plugins and front-end modules are automatically installed with a client of 0 (site), but you will need to specify the client in an update or it will default to 1 (administrator) and then found update would not be shown because it would not match any extension..." from https://docs.joomla.org/Deploying_an_Update_Server – Daydah Dec 13 '16 at 06:10