Upgrading a Joomla 1.5 module to Joomla 2.5

What?
So this is a note to myself so that I have a checklist and can quickly update any extensions designed for Joomla 1.5.x and make these compatible with Joomla 2.5.x websites.

In the past, I have only ever changed the words <params> to <fields> but for more stability, there are a few more tweaks to do.

How?
For demo purposes we will be referring to a Joomla module called "mod_moduletoupgrade" in British English (en-GB). I don't think it actually exists in reality but you replace the name "moduletoupgrade" with whatever you're upgrading and follow the below instructions.

I'm also going on the basis tha.

Basic Checklist
  1. Download all J1.5 files to one folder:
    • /modules/mod_moduletoupgrade/mod_moduletoupgrade.xml
    • /modules/mod_moduletoupgrade/mod_moduletoupgrade.php
    • [if exists] /modules/mod_moduletoupgrade/helper.php
    • [if exists] /modules/mod_moduletoupgrade/tmpl/default.php
    • /language/en-GB/en-GB.mod_moduletoupgrade.ini

  2. Upgrade XML File:
    • Change open/close <install> tags to <extension> (update attributes, eg. <extension type="module" version="1.6.0" client="site" method="upgrade">)
    • Change <params> to <config><fields name="params">
    • Change </params> to </fields></config>
    • Change all <param ... tags to <field ... (eg. <param name="myparam... to <field name="myparam...)
    • Change all closing </param> tags to </field>
    • If the module has parameters add <fieldset name="basic"> for a basic parameters section (right-sidebar in admin panel) with a closing </fieldset>. You can separate fieldsets as groups for your parameters or put all the module parameters within one fieldset. eg. <config><fields name="params"><fieldset name="basic">

  3. Upgrade PHP File:
    • Check for any legacy code needing to be upgraded from PHP4 to PHP5.
    • I tend to leave this alone as we're referring internally the same in Joomla 1.5 sites.

  4. Upgrade Language File:
    • Change MYLABEL=myValue to MYLABEL="myValue"
    • Change any comments prefix from hash/pound sign (#) to semi-colon (;)
    • Check escaped HTML and numerical entities (eg. revert apostrophes)

  5. Add License.txt file:
    • This could be licence.txt but don't get bogged down with internationalizations.
    • If you are submitting this extension to Joomla.Org then this is a mandatory step.

  6. Add blank index.html file(s):
    • Create a blank index.html file and put this in the root folder as well as any subfolders.
    • It is recommended to NOT skip this step as it safeguards against servers which allow directory listing.


Further Checks
  1. Check this is in an MVC structure. (subfolders for template and language)

Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com

Related Articles

Joes Revolver Map

Accreditation

Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Paypal:
Donate to Joel Lipman via PayPal

Bitcoin:
Donate to Joel Lipman with Bitcoin bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4

Ethereum:
Donate to Joel Lipman with Ethereum 0xb038962F3809b425D661EF5D22294Cf45E02FebF
© 2024 Joel Lipman .com. All Rights Reserved.