Joomla
Joomla Tutorials
How to upgrade a Joomla 1.5 module to Joomla 1.6
|
|
How to upgrade a Joomla 1.5 module to Joomla 1.6If you need to upgrade modules you are currently using with Joomla 1.5 to Joomla 1.6, this is not as difficult as it sounds. The following are the basic steps need to upgrade a module from Joomla 1.5 to Joomla 1.6 Step 1. - Language FilesAs stated in the specifications language files should have UTF-8 character encoding and may not contain any of the following names as 'key' (ini files are structured like KEY="value"):
If you do use one of these words as key, your language file won't be translated by Joomla, without any error message shown to alert you of that. To prevent this, prefix the keys above with a character, such as 'J'. Some example keys that are prefixed would be: JYES, JNO, JNULL, etc. Both spaces and the following characters are also prohibited in keys: { } | & ~ ! [ ( ) ^ " Another change in language files is that in Joomla 1.6 you should use double quotes around values. Below an example: instead of the Joomla 1.5 way
Step 2. - Double quotes in Joomla 1.6 languages filesBut what if you want to use a double quote in your language string? According to the specifications you need to use two double quotes, but testing that showed me this doesn't work. What does work though, is using "_QQ_" as a double quote. PHP will replace that value with a double quote. Shows the following language string: The reason why you should use "_QQ_" is that PHP's ini file parser (parse_ini_string and parse_ini_file) seems to behave differently since PHP version 5.3.1. Using "_QQ_" you make sure everybody sees the language string correctly.
Step 3. - Comments in Joomla 1.6 language files;COMMENT_LABEL="Comment this line out in Joomla 1.6" instead of the old Step 4. - The XML fileThere are also several changes to the XML file that is packaged with your module (for example mod_breadcrumbs.xml). Change: Also change the matching closing tag '</install>' to '</extension>' The <params> section is replaced by a <config> section. Change: To: If you have custom fields, set the path to your custom fields in the <fields> tag, as shown below: Change: Furthermore, you no longer should extend JElement if you used to do that in your module, but instead you should now extend JFormField. See this document for detailed information about that.
Final Step - Your own module filesAfter applying the described steps, try to install your module in Joomla 1.6. With the above changes in place, the installation should probably work now. Depending on the complexity of your module however, you might need to do some additional changes to your own module files. These changes could include:
Only registered users can write comments!
Powered by !JoomlaComment 3.26
3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved." |
|||||||
Accept Paypal donations or payments in your Joomla site! Very easy way to integrate Paypal payments. 1.5 and 2.5 versions!