|
Feb 02
2011
|
Upgrading Joomla 1.5 Extensions to Joomla 1.6Posted by kelchuk in Untagged |
|
Joomla 1.6 is now the future for Joomla. From now on, most developers will develope extensions for the new version of the Joomla CMS. This article is not to reinvent the wheel, but, rather point to a solid page with the required information required to perfom such an upgrade.
Upgrading Joomla 1.5 Modules to Joomla 1.6
To upgrade a Joomla 1.5 module,
1) Open the module xml file.
2) Change the description tag by adding underscores
i.e. <description>PLEASE_GO_TO_MY_MODULE_FOR_DESCRIPTION</description>
3) If you are using a lanuguage file, the underscores must be changed there too in addition to added quotations and # changed to ;
a) change "<param " with "<field "
b) change "</param>" with </field>"
c) change "<params> with "<config><fields name="params"><fieldset name="basic">"
d) change "</params>" with "</fieldset></fields></config>"
e) change "<install" with "<extension "
f) change "</install>" with "</extension>"
5) The method to retrieve parameters is the same as Joomla 1.5
i.e. color:<?= $params->get('modtextcolor'); ?>;
Alternative Module Templates for Joomla 1.6
f you have various templates in the tmpl folder, you need to modify the main php file. For example, if your extension is mod_myextension you would edit mod_myextension.php.
The code you add to the file is shown below.
Change
The files need names like my_second_templatefile_items.php
The code needed to add the template files in the xml file is:
Upgrading Joomla 1.5 Modules to Joomla 1.6
To upgrade a Joomla 1.5 module,
1) Open the module xml file.
2) Change the description tag by adding underscores
i.e. <description>PLEASE_GO_TO_MY_MODULE_FOR_DESCRIPTION</description>
3) If you are using a lanuguage file, the underscores must be changed there too in addition to added quotations and # changed to ;
i.e.
; $Id: en-GB.mod_mine.ini
; BWS
; Copyright (C) 2011 BWS
; License GNU/GPL
; Note : All ini files need to be saved as UTF-8
PLEASE_GO_TO_MY_MODULE_FOR_DESCRIPTION="<div id="holdthem"><h1>MY Module for Joomla 1.6x</h1>"
4) Convert the Parameters ; $Id: en-GB.mod_mine.ini
; BWS
; Copyright (C) 2011 BWS
; License GNU/GPL
; Note : All ini files need to be saved as UTF-8
PLEASE_GO_TO_MY_MODULE_FOR_DESCRIPTION="<div id="holdthem"><h1>MY Module for Joomla 1.6x</h1>"
a) change "<param " with "<field "
b) change "</param>" with </field>"
c) change "<params> with "<config><fields name="params"><fieldset name="basic">"
d) change "</params>" with "</fieldset></fields></config>"
e) change "<install" with "<extension "
f) change "</install>" with "</extension>"
5) The method to retrieve parameters is the same as Joomla 1.5
i.e. color:<?= $params->get('modtextcolor'); ?>;
Alternative Module Templates for Joomla 1.6
f you have various templates in the tmpl folder, you need to modify the main php file. For example, if your extension is mod_myextension you would edit mod_myextension.php.
The code you add to the file is shown below.
Change
/*Joomla 1.5 version
require(JModuleHelper::getLayoutPath('mod_mymodule'));*/
Change to:
require JModuleHelper::getLayoutPath('mod_mymodule',
$params->get('layout', 'default').'_items');
require(JModuleHelper::getLayoutPath('mod_mymodule'));*/
Change to:
require JModuleHelper::getLayoutPath('mod_mymodule',
$params->get('layout', 'default').'_items');
The files need names like my_second_templatefile_items.php
The code needed to add the template files in the xml file is:
<field name="layout" type="filelist" label="Layout" description="Set a Custom Template/Background"
directory="/modules/mod_mymodule/tmpl" default="default" hide_default="1" stripext="1" filter="\.php?" />
More details regarding how to upgrade Joomla 1.5 extensions to Joomla 1.6 extensions can be found here.directory="/modules/mod_mymodule/tmpl" default="default" hide_default="1" stripext="1" filter="\.php?" />




