<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.sandbox.joomla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mariusvr</id>
	<title>Joomla! Documentation - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.sandbox.joomla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mariusvr"/>
	<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/Special:Contributions/Mariusvr"/>
	<updated>2026-10-07T05:30:47Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J2.5:Potential_backward_compatibility_issues_in_Joomla_2.5_and_Joomla_Platform_11.4&amp;diff=64266</id>
		<title>J2.5:Potential backward compatibility issues in Joomla 2.5 and Joomla Platform 11.4</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J2.5:Potential_backward_compatibility_issues_in_Joomla_2.5_and_Joomla_Platform_11.4&amp;diff=64266"/>
		<updated>2012-01-07T13:20:17Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: /* JError */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This documents track potential backward compatibility issues for Joomla 2.5 and Joomla Platform 11.4 which will be included in Joomla 2.5. Listed are issues which potentially breaks extensions and newly deprecated APIs.&lt;br /&gt;
Please help making this document complete.&lt;br /&gt;
&lt;br /&gt;
The base of this comparison is Joomla 1.7/Platform 11.2.&lt;br /&gt;
&lt;br /&gt;
Backwards compatibility issues were also tracked for Joomla 1.7: [[Potential backward compatibility issues in Joomla 1.7 and Joomla Platform 11.1]]&lt;br /&gt;
&lt;br /&gt;
= Platform =&lt;br /&gt;
&lt;br /&gt;
== JFTP ==&lt;br /&gt;
*All class members except JFTP::$instances have become private&lt;br /&gt;
&lt;br /&gt;
== JError ==&lt;br /&gt;
*JError::$_error has become protected&lt;br /&gt;
&lt;br /&gt;
== JRequest ==&lt;br /&gt;
* JRequest::_cleanArray has been removed&lt;br /&gt;
&lt;br /&gt;
== JArchive ==&lt;br /&gt;
* The following class member have become private:&lt;br /&gt;
**JArchiveGzip:: $_flags&lt;br /&gt;
**JArchiveGzip:: $_data&lt;br /&gt;
**JArchiveTar:: $_types&lt;br /&gt;
**JArchiveTar:: $_flags&lt;br /&gt;
**JArchiveTar:: $_data&lt;br /&gt;
**JArchiveTar:: $_metadata&lt;br /&gt;
**JArchiveZip:: $_methods&lt;br /&gt;
**JArchiveZip:: $_ctrlDirHeader&lt;br /&gt;
**JArchiveZip:: $_ctrlDirEnd&lt;br /&gt;
**JArchiveZip:: $_fileHeader&lt;br /&gt;
**JArchiveZip:: $_data&lt;br /&gt;
&lt;br /&gt;
== JSimpleXML ==&lt;br /&gt;
*The following class members have become private:&lt;br /&gt;
**JSimpleXML:: $_parser&lt;br /&gt;
**JSimpleXML:: $_xml&lt;br /&gt;
**JSimpleXML:: $_stack&lt;br /&gt;
&lt;br /&gt;
== JComponentHelper ==&lt;br /&gt;
*In JComponentHelper::renderComponent the execution of the component is moved to the new function JComponentHelper::executeComponent. This means that a component cannot change or use any of the (internal) variables of renderComponent that might be used by the function later on, like $task or $option. Solution is to get the values, via JRequest, in the component itself.&lt;br /&gt;
&lt;br /&gt;
== Plug-in events ==&lt;br /&gt;
*onPrepareUserProfileData has been removed. Instead respond to onContentPrepareData with a context of com_users.profile&lt;br /&gt;
&lt;br /&gt;
= CMS =&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J2.5:Potential_backward_compatibility_issues_in_Joomla_2.5_and_Joomla_Platform_11.4&amp;diff=64263</id>
		<title>J2.5:Potential backward compatibility issues in Joomla 2.5 and Joomla Platform 11.4</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J2.5:Potential_backward_compatibility_issues_in_Joomla_2.5_and_Joomla_Platform_11.4&amp;diff=64263"/>
		<updated>2012-01-07T10:03:33Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: /* JError */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This documents track potential backward compatibility issues for Joomla 2.5 and Joomla Platform 11.4 which will be included in Joomla 2.5. Listed are issues which potentially breaks extensions and newly deprecated APIs.&lt;br /&gt;
Please help making this document complete.&lt;br /&gt;
&lt;br /&gt;
The base of this comparison is Joomla 1.7/Platform 11.2.&lt;br /&gt;
&lt;br /&gt;
Backwards compatibility issues were also tracked for Joomla 1.7: [[Potential backward compatibility issues in Joomla 1.7 and Joomla Platform 11.1]]&lt;br /&gt;
&lt;br /&gt;
= Platform =&lt;br /&gt;
&lt;br /&gt;
== JFTP ==&lt;br /&gt;
*All class members except JFTP::$instances have become private&lt;br /&gt;
&lt;br /&gt;
== JError ==&lt;br /&gt;
*variables of the JError class have become protected. Use the functions instead of direct calls (JError::$_error , $error-&amp;gt;message, etc) to access variables. Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$errors = JError::getErrors(); &lt;br /&gt;
foreach ($errors as $error) {&lt;br /&gt;
    $message = $error-&amp;gt;__toString() &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== JRequest ==&lt;br /&gt;
* JRequest::_cleanArray has been removed&lt;br /&gt;
&lt;br /&gt;
== JArchive ==&lt;br /&gt;
* The following class member have become private:&lt;br /&gt;
**JArchiveGzip:: $_flags&lt;br /&gt;
**JArchiveGzip:: $_data&lt;br /&gt;
**JArchiveTar:: $_types&lt;br /&gt;
**JArchiveTar:: $_flags&lt;br /&gt;
**JArchiveTar:: $_data&lt;br /&gt;
**JArchiveTar:: $_metadata&lt;br /&gt;
**JArchiveZip:: $_methods&lt;br /&gt;
**JArchiveZip:: $_ctrlDirHeader&lt;br /&gt;
**JArchiveZip:: $_ctrlDirEnd&lt;br /&gt;
**JArchiveZip:: $_fileHeader&lt;br /&gt;
**JArchiveZip:: $_data&lt;br /&gt;
&lt;br /&gt;
== JSimpleXML ==&lt;br /&gt;
*The following class members have become private:&lt;br /&gt;
**JSimpleXML:: $_parser&lt;br /&gt;
**JSimpleXML:: $_xml&lt;br /&gt;
**JSimpleXML:: $_stack&lt;br /&gt;
&lt;br /&gt;
== JComponentHelper ==&lt;br /&gt;
*In JComponentHelper::renderComponent the execution of the component is moved to the new function JComponentHelper::executeComponent. This means that a component cannot change or use any of the (internal) variables of renderComponent that might be used by the function later on, like $task or $option. Solution is to get the values, via JRequest, in the component itself.&lt;br /&gt;
&lt;br /&gt;
== Plug-in events ==&lt;br /&gt;
*onPrepareUserProfileData has been removed. Instead respond to onContentPrepareData with a context of com_users.profile&lt;br /&gt;
&lt;br /&gt;
= CMS =&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J2.5:Potential_backward_compatibility_issues_in_Joomla_2.5_and_Joomla_Platform_11.4&amp;diff=64262</id>
		<title>J2.5:Potential backward compatibility issues in Joomla 2.5 and Joomla Platform 11.4</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J2.5:Potential_backward_compatibility_issues_in_Joomla_2.5_and_Joomla_Platform_11.4&amp;diff=64262"/>
		<updated>2012-01-07T09:52:15Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: /* JError */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This documents track potential backward compatibility issues for Joomla 2.5 and Joomla Platform 11.4 which will be included in Joomla 2.5. Listed are issues which potentially breaks extensions and newly deprecated APIs.&lt;br /&gt;
Please help making this document complete.&lt;br /&gt;
&lt;br /&gt;
The base of this comparison is Joomla 1.7/Platform 11.2.&lt;br /&gt;
&lt;br /&gt;
Backwards compatibility issues were also tracked for Joomla 1.7: [[Potential backward compatibility issues in Joomla 1.7 and Joomla Platform 11.1]]&lt;br /&gt;
&lt;br /&gt;
= Platform =&lt;br /&gt;
&lt;br /&gt;
== JFTP ==&lt;br /&gt;
*All class members except JFTP::$instances have become private&lt;br /&gt;
&lt;br /&gt;
== JError ==&lt;br /&gt;
*variables of the JError class have become protected. Use the functions instead to access variables. Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$errors = JError::getErrors(); &lt;br /&gt;
foreach ($errors as $error) {&lt;br /&gt;
    $message = $error-&amp;gt;__toString() &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== JRequest ==&lt;br /&gt;
* JRequest::_cleanArray has been removed&lt;br /&gt;
&lt;br /&gt;
== JArchive ==&lt;br /&gt;
* The following class member have become private:&lt;br /&gt;
**JArchiveGzip:: $_flags&lt;br /&gt;
**JArchiveGzip:: $_data&lt;br /&gt;
**JArchiveTar:: $_types&lt;br /&gt;
**JArchiveTar:: $_flags&lt;br /&gt;
**JArchiveTar:: $_data&lt;br /&gt;
**JArchiveTar:: $_metadata&lt;br /&gt;
**JArchiveZip:: $_methods&lt;br /&gt;
**JArchiveZip:: $_ctrlDirHeader&lt;br /&gt;
**JArchiveZip:: $_ctrlDirEnd&lt;br /&gt;
**JArchiveZip:: $_fileHeader&lt;br /&gt;
**JArchiveZip:: $_data&lt;br /&gt;
&lt;br /&gt;
== JSimpleXML ==&lt;br /&gt;
*The following class members have become private:&lt;br /&gt;
**JSimpleXML:: $_parser&lt;br /&gt;
**JSimpleXML:: $_xml&lt;br /&gt;
**JSimpleXML:: $_stack&lt;br /&gt;
&lt;br /&gt;
== JComponentHelper ==&lt;br /&gt;
*In JComponentHelper::renderComponent the execution of the component is moved to the new function JComponentHelper::executeComponent. This means that a component cannot change or use any of the (internal) variables of renderComponent that might be used by the function later on, like $task or $option. Solution is to get the values, via JRequest, in the component itself.&lt;br /&gt;
&lt;br /&gt;
== Plug-in events ==&lt;br /&gt;
*onPrepareUserProfileData has been removed. Instead respond to onContentPrepareData with a context of com_users.profile&lt;br /&gt;
&lt;br /&gt;
= CMS =&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=37192</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=37192"/>
		<updated>2011-02-13T13:35:10Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse, see [[Setting up your workstation for Joomla! development]].&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
[[What&#039;s new in Joomla 1.6#Developers]] describes most changes of Joomla 1.6 and how this affect developers. Please note that the API documentation on the joomla wiki is incomplete/inaccurate. Therefore the best way to look at the Joomla 1.6 API is to look directly at the joomla source code.&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes, add quotes to string values and update your comments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Double quotes are NOT allowed inside the string value&#039;&#039;&#039;, except when using &amp;quot;_QQ_&amp;quot; to represent them. In case of js use, better use html entities or single quotes.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Single quotes are allowed. &lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening double quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
Enabling Debug System in Global configuration will display the parsing errors per file and lines.&lt;br /&gt;
&lt;br /&gt;
If you do not remove the illegal strings, then your language file will load until one of them is reached. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Legacy mode removed ==&lt;br /&gt;
More information needed....&lt;br /&gt;
&lt;br /&gt;
== New installer XML system ==&lt;br /&gt;
Joomla 1.6 now uses a different XML system for installing extension. There are some good tutorials published on the internet about this. Sadly joomla wiki policy forbids linking to these articles and you will need to google yourself to find this critical documentation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Load language in plugins ==&lt;br /&gt;
On the day of release, the way Language files are loaded for Joomla! 1.6 Plugins was changed. As a result, all Plugins must add the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
 public function __construct(&amp;amp; $subject, $config)&lt;br /&gt;
        {&lt;br /&gt;
&lt;br /&gt;
                parent::__construct($subject, $config);&lt;br /&gt;
&lt;br /&gt;
                $this-&amp;gt;loadLanguage();&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== change in BuildRoute logic ==&lt;br /&gt;
In Joomla! 1.6, the router BuildRoute logic for each Component was changed to require a Menu Item in order to build the link.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        // we need a menu item.  Either the one specified in the query, or the current active one if none specified&lt;br /&gt;
        if (empty($query[&#039;Itemid&#039;])) {&lt;br /&gt;
                $menuItem = $menu-&amp;gt;getActive();&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        else {&lt;br /&gt;
&lt;br /&gt;
                $menuItem = $menu-&amp;gt;getItem($query[&#039;Itemid&#039;]);&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There continue to be problems with the router. It is not uncommon to see a URL that bears the existing page URL as the &amp;quot;base&amp;quot; (if you will), followed by it&#039;s real URL. Look for these situations and report them on the tracker.&lt;br /&gt;
&lt;br /&gt;
For those who have been around long enough, forcing the Menu Item on the URL was done in 1.0.12 and it turned out poorly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Accessing component parameters in front-end ==&lt;br /&gt;
&lt;br /&gt;
Accessing component parameters in frontend for specific menu item, we will use com_content as example : in 1.5 this was done with&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;?php&lt;br /&gt;
    $mycom_params =  JComponentHelper::getParams(&#039;com_content&#039;);&lt;br /&gt;
&lt;br /&gt;
    echo $mycom_params-&amp;gt;get(&#039;num_leading_articles&#039;);&lt;br /&gt;
&lt;br /&gt;
    ?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
above code in joomla 1.6will output the DEFAULT com_content params , not affected with menu item so the new code for 1.6 would be&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;?php&lt;br /&gt;
    $app = JFactory::getApplication(&#039;site&#039;);&lt;br /&gt;
&lt;br /&gt;
    mycom_params =  &amp;amp; $app-&amp;gt;getParams(&#039;com_content&#039;);&lt;br /&gt;
&lt;br /&gt;
    echo $mycom_params-&amp;gt;get(&#039;num_leading_articles&#039;);&lt;br /&gt;
&lt;br /&gt;
    ?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Plugin parameters ==&lt;br /&gt;
&lt;br /&gt;
In 1.5, you had to use the Plugin Helper to retrieve the Plugin object and then JParameter to retrieve the Parameter Object. Following those steps, you could work with a single parameter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$plugin = &amp;amp; JPluginHelper::getPlugin(&#039;content&#039;, &#039;emailcloak&#039;);&lt;br /&gt;
&lt;br /&gt;
$pluginParams = new JParameter($plugin-&amp;gt;params);&lt;br /&gt;
&lt;br /&gt;
$mode = $pluginParams-&amp;gt;def(&#039;mode&#039;, 1);&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In 1.6,Joomla makes the parameter object automatically available to you.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$mode = $this-&amp;gt;params-&amp;gt;def(&#039;mode&#039;, 1);&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing Javascript function overrides ==&lt;br /&gt;
Joomla now has some of its Javascript functions prefixed with &amp;quot;Joomla&amp;quot;. This means the functions are always unique and won&#039;t clash with other javascript functions on your server/webpage. However, you now need a different method to override the default Joomla Javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
For Joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing removed functions ==&lt;br /&gt;
Some functions were removed for various reasons. You can find a list of them on [[What&#039;s new in Joomla_1.6#Removed_features]].&lt;br /&gt;
&lt;br /&gt;
Note that the ADODB compatibility methods included function like $db-&amp;gt;Execute($query) which now need a separate $db-&amp;gt;setQuery($query);$db-&amp;gt;Query();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Renamed events ==&lt;br /&gt;
&lt;br /&gt;
A large number of the Joomla 1.5 events have been renamed. Here is the list of renamed events.&lt;br /&gt;
*onContentAfterSave&lt;br /&gt;
*onContentAfterTitle&lt;br /&gt;
*onContentAfterDisplay&lt;br /&gt;
*onContentBeforeDisplay&lt;br /&gt;
*onContentBeforeSave&lt;br /&gt;
*onContentSearch&lt;br /&gt;
*onContentSearchAreas&lt;br /&gt;
*onUserAuthenticate&lt;br /&gt;
*onUserAfterDelete&lt;br /&gt;
*onUserAfterSave&lt;br /&gt;
*onUserBeforeDelete&lt;br /&gt;
*onUserBeforeSave&lt;br /&gt;
*onUserLogin&lt;br /&gt;
*onUserLogout&lt;br /&gt;
*All content events (except for search and search areas) now pass a &#039;context&#039; as the first argument to alert the plugin as to what type of content is being passed.  The plugin event may or may not heed this context.&lt;br /&gt;
&lt;br /&gt;
This means that if you use Joomla events you have two options:&amp;lt;br/&amp;gt;&lt;br /&gt;
1) rename the event and your extension can only be used on Joomla 1.6&amp;lt;br/&amp;gt;&lt;br /&gt;
2) create your own &amp;quot;legacy layer&amp;quot; and add the new event function name to your plugin. Here is an example of the user plugin:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    //joomla 1.6 compatibility code &lt;br /&gt;
 	public function onUserLogin($user, $options){&lt;br /&gt;
 	    $result = $this-&amp;gt;onLoginUser($user, $options);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
 	}&lt;br /&gt;
	public function onUserLogout($user)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onLogoutUser($user);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterDelete($user, $succes, $msg)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterDeleteUser($user, $succes, $msg);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserBeforeSave($user, $isnew, $new){&lt;br /&gt;
 	    $result = $this-&amp;gt;onBeforeStoreUser($user, $isnew, $new);&lt;br /&gt;
 	    return $result;	&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterSave($user, $isnew, $success, $msg){&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterStoreUser($user, $isnew, $success, $msg);&lt;br /&gt;
 	    return $result;			&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing name=&amp;quot;adminForm&amp;quot; to id=&amp;quot;adminForm&amp;quot; ==&lt;br /&gt;
To create your own admin forms in joomla you now need to use id=&amp;quot;adminForm&amp;quot;. This is because the use of the tag &amp;quot;name&amp;quot; is not valid HTML strict and has compatibility issues when used in XHTML served as XML.\. Although there is build in compatibility check to look for the old name=&amp;quot;adminForm&amp;quot; tag, it is best to add the new id tag. Depending on the features you want to use you may need to include both, name=&amp;quot;adminForm&amp;quot; and id=&amp;quot;adminForm&amp;quot; because not all core functionality has been updated to use id&#039;s.  An example of the new form code is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;index.php&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot;&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Removing references to index2.php and index3.php ==&lt;br /&gt;
Joomla 1.0 had different index files to serve admin content in different manners. Joomla 1.6 has now got better way to handle this and you need to search your codebase for &amp;quot;index2.php&amp;quot; and &amp;quot;index3.php&amp;quot; to ensure you don&#039;t have any Joomla 1.0 style links. If you need to display your component without any of the other Joomla 1.6 admin content (menus, etc) then add the following to the url: &amp;quot;&amp;amp;tmpl=component&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Upgrading core table and field name usage ==&lt;br /&gt;
Many of the core Joomla tables have been simplified, combined or renamed. This was needed to get rid of some limitation dating back to Joomla 1.0. This means however that if you have code that directly manipulates Joomla tables, that you need to add a function that detects Joomla 1.6 and had different SQL queries based on the joomla version. Plase note that both tables and field names have been renamed or removed. An example is the following function that can find if a plugin is published on both Joomla 1.5 and 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;		&lt;br /&gt;
function getPluginStatus($element, $folder) {&lt;br /&gt;
    //get joomla specs&lt;br /&gt;
    $db = &amp;amp; JFactory::getDBO();		&lt;br /&gt;
    $version = new JVersion;&lt;br /&gt;
    $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
    if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
        //Joomla 1.6 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__extensions WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; . $db-&amp;gt;Quote($folder);&lt;br /&gt;
    } else {&lt;br /&gt;
        //Joomla 1.0/1.5 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__plugins WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; .   $db-&amp;gt;Quote($folder); &lt;br /&gt;
    }&lt;br /&gt;
    $db-&amp;gt;setQuery($query);&lt;br /&gt;
    $result = $db-&amp;gt;loadResult();&lt;br /&gt;
    return $result;&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing in the XML installer manifest file ==&lt;br /&gt;
Joomla 1.6 now uses a more streamlined approach to the XML file inside the ZIP file that installs Joomla extentions.&lt;br /&gt;
&lt;br /&gt;
== New mootools version ==&lt;br /&gt;
Most important is that the Ajax class has been depreciated and replaced by the Request class. That means that if you use ajax calls you need to have a version switcher (below a sample code)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$version = new JVersion;&lt;br /&gt;
$joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
&lt;br /&gt;
..... (your code) ....&lt;br /&gt;
&lt;br /&gt;
    /* our ajax istance for starting the sync */&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
 echo &#039;var ajax = new Request.HTML({&lt;br /&gt;
           url: url,&#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
 echo &#039;var ajax = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
     echo &#039;var ajaxsync = new Request.HTML({&lt;br /&gt;
        url: url, &#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
echo &#039;var ajaxsync = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also another common usuage of mootools in  Joomla is the popup box. The Joomla 1.5 javascript code to close this box is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;document.getElementById(&#039;sbox-window&#039;).close();&amp;lt;/source&amp;gt;&lt;br /&gt;
in Joomla 1.6 you need to use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;window.parent.SqueezeBox.close();&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Converting your JParameters to JForms ==&lt;br /&gt;
Joomla 1.6 now uses the JForms class to handle parameters and it has also changed the way parameters are defined in your XML files. To make menu/component/module/plugin parameters work, first you need to update the XML file. Here is an automated way to handle the bulk of the conversion. (added &amp;quot;&amp;quot; to the examples below so you can see spaces in the search query as well). Use eclipse to search and replace parameters in *.xml files&lt;br /&gt;
&lt;br /&gt;
replace &amp;quot;&amp;lt;param &amp;quot; with &amp;quot;&amp;lt;field &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/param&amp;gt;&amp;quot; with &amp;lt;/field&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params*?&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/params&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/fieldset&amp;gt;&amp;lt;/fields&amp;gt;&amp;lt;/config&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;install &amp;quot; with &amp;quot;&amp;lt;extension &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/install&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/extension&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Change the &amp;quot;extension&amp;quot; node to add the following attributes:&lt;br /&gt;
* Keep the existing &amp;quot;type&amp;quot; attribute&lt;br /&gt;
* version=&amp;quot;1.6.0&amp;quot;&lt;br /&gt;
* client=&amp;quot;site&amp;quot;&lt;br /&gt;
* method=&amp;quot;upgrade&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example for a module:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;module&amp;quot; version=&amp;quot;1.6.0&amp;quot; client=&amp;quot;site&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now if you want to use your joomla extension on both Joomla 1.5 and 1.6 you will need to go to your &amp;quot;team synchronising&amp;quot; view in eclipse. Double click on your changed xml file, which will open the compare editor. Then simply copy-paste back your old Joomla 1.5 params into your new Joomla 1.6 xml file and save.&lt;br /&gt;
&lt;br /&gt;
If you have custom parameter types, you will need to do some additional work. In Joomla 1.5 you would use the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;params addpath=&amp;quot;/administrator/components/com_yourname/elements&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
In joomla 1.6 JParameter classes won&#039;t work and you will need to convert your jparameter fields into JForm fields. Create a new directory and copy your &amp;quot;old elements&amp;quot; into them. Then you need to load these new fields with the individual parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;field name=&amp;quot;sample&amp;quot; type=&amp;quot;sampleField&amp;quot; size=&amp;quot;5&amp;quot; default=&amp;quot;&amp;quot;			label=&amp;quot;sampleField&amp;quot; description=&amp;quot;sampleField&amp;quot; addfieldpath=&amp;quot;/administrator/components/com_yourname/fields&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use eclipse to search and replace files in your newly created fields directory.&lt;br /&gt;
replace &amp;quot;JElement&amp;quot; with &amp;quot;JFormField&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;var $_name =&amp;quot; with &amp;quot;public $type =&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;function fetchElement($name, $value, &amp;amp;$node, $control_name)&amp;quot; with &amp;quot;protected function getInput()&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you still need to replace the references to $control_name and others in your new JForm field, but at least the bulk of the work has been done automatically&lt;br /&gt;
&lt;br /&gt;
== renamed core component names and login form parameters ==&lt;br /&gt;
A login module for Joomla 1.5 will not work without modifications on Joomla 1.6. Here is a part of the logout module that will work on both Joomla 1.5 and Joomla 1.6. You can compare the two to see the difference in input names.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        $version = new JVersion;&lt;br /&gt;
        $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
        if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
            //joomla 1.6 format          &lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;user.logout&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_users&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
        } else {    &lt;br /&gt;
            //joomla 1.5 format&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;logout&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_user&amp;quot; /&amp;gt;&#039;;            &lt;br /&gt;
        } &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
here is the code for the login module&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        $version = new JVersion;&lt;br /&gt;
        $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
        if(substr($joomla,0,3) == &#039;1.6&#039;){        &lt;br /&gt;
            //joomla 1.6 format     &lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;user.login&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_users&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input id=&amp;quot;modlgn_passwd&amp;quot; type=&amp;quot;password&amp;quot; name=&amp;quot;password&amp;quot; class=&amp;quot;inputbox&amp;quot; size=&amp;quot;18&amp;quot; alt=&amp;quot;password&amp;quot; /&amp;gt; &#039;;&lt;br /&gt;
        } else {&lt;br /&gt;
            //joomla 1.5 format&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;login&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_user&amp;quot; /&amp;gt;&#039;;     &lt;br /&gt;
            $output .= &#039;&amp;lt;input id=&amp;quot;modlgn_passwd&amp;quot; type=&amp;quot;password&amp;quot; name=&amp;quot;passwd&amp;quot; class=&amp;quot;inputbox&amp;quot; size=&amp;quot;18&amp;quot; alt=&amp;quot;password&amp;quot; /&amp;gt; &#039;;               	&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These changes might also apply to front-end forms of other Joomla core components (more information needed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ACL changes ==&lt;br /&gt;
Joomla 1.6 now has an advanced ACL system. It is unknown how this affects people that have previously used the ACL API in their extension. Please add some information here if you know more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Plugin files now in different locations ==&lt;br /&gt;
Joomla 1.6 now creates a different hierarchy structure for plugins.  Files are no longer placed where they used to be, so if your other parts of your application (comp, mods, etc.) expects them to be in a certain position, it won&#039;t work. The change has been that now plugins are in an additional subdirectory. If you only load your plugins via the 1.5 API you should be fine.&lt;br /&gt;
* Joomla 1.5 example location &lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;JPATH_SITE . DS . &#039;plugins&#039; . DS . &#039;authentication&#039; . DS . &#039;example.php&#039;;&amp;lt;/source&amp;gt;&lt;br /&gt;
* Joomla 1.6 example location&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;JPATH_SITE . DS . &#039;plugins&#039; . DS . &#039;authentication&#039; . DS . &#039;example&#039;. DS . &#039;example.php&#039;;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changes to view parameters ==&lt;br /&gt;
J!1.6 has a strict new way of specifying parameters for views.  J!1.5 allowed a bit of freedom where the parameters could be defined at the view.html.php level but now ithas to be at the tmpl level.  AE believes the view paramters were removed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation process - preflight, postflight, etc ==&lt;br /&gt;
These are new events that can screw up an existing installlation process.  -1 on me for not documenting the process while stepping through xdebug.&lt;br /&gt;
They should be totally optional access points to the installation process.  But if your 1.5 install process is tricky for some reason, then these can be used to do clean up activities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Admin template changes ==&lt;br /&gt;
Admin functions that depended on certain functions, naming conventions etc no longer work.  Khepri has been removed.  Other admin functions/libraries may have changed.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ACL ==&lt;br /&gt;
gid and aid have been removed.  Significant changes to ACL archtecture.  Bricking refers to totally locking your self and everyone else out - Last chance backdoor involves adding a emergency pw to the config file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==sys.ini language translation file==&lt;br /&gt;
This file has 3 purposes:&lt;br /&gt;
&lt;br /&gt;
1. It is used for installation process translations, when a folder language is included in the pack.&lt;br /&gt;
&lt;br /&gt;
pack/language/en-gb/en-gb.extension.ini&lt;br /&gt;
&lt;br /&gt;
pack/language/en-gb/en-gb.extension.sys.ini&lt;br /&gt;
&lt;br /&gt;
In this case, the &amp;lt;description&amp;gt;COM_MYCOMPONENT_XML_DESCRIPTION&amp;lt;/description&amp;gt; used in the sys.ini will display on installing/updating the extension.&lt;br /&gt;
&lt;br /&gt;
When editing the extension in administration, it will be the .ini version of COM_MYCOMPONENT_XML_DESCRIPTION which will display.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. It is used to replace the former .menu.ini&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. It is used to display the translated extension name in many managers.&lt;br /&gt;
&lt;br /&gt;
== removed include folders ==&lt;br /&gt;
Most of the 3rd party libraries (Archive, domit, js, PEAR, etc) in the include folder have been removed in J!1.6. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Use paths defined in defines.php. ==&lt;br /&gt;
(Note they are different for the site and the administration)&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Module Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Plugin Development]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=37106</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=37106"/>
		<updated>2011-02-12T14:21:17Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: /* Plugin parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse, see [[Setting up your workstation for Joomla! development]].&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
[[What&#039;s new in Joomla 1.6#Developers]] describes most changes of Joomla 1.6 and how this affect developers. Please note that the API documentation on the joomla wiki is incomplete/inaccurate. Therefore the best way to look at the Joomla 1.6 API is to look directly at the joomla source code.&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes, add quotes to string values and update your comments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Double quotes are NOT allowed inside the string value&#039;&#039;&#039;, except when using &amp;quot;_QQ_&amp;quot; to represent them. In case of js use, better use html entities or single quotes.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Single quotes are allowed. &lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening double quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
Enabling Debug System in Global configuration will display the parsing errors per file and lines.&lt;br /&gt;
&lt;br /&gt;
If you do not remove the illegal strings, then your language file will load until one of them is reached. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Legacy mode removed ==&lt;br /&gt;
&lt;br /&gt;
== Load language in plugins ==&lt;br /&gt;
On the day of release, the way Language files are loaded for Joomla! 1.6 Plugins was changed. As a result, all Plugins must add the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
 public function __construct(&amp;amp; $subject, $config)&lt;br /&gt;
        {&lt;br /&gt;
&lt;br /&gt;
                parent::__construct($subject, $config);&lt;br /&gt;
&lt;br /&gt;
                $this-&amp;gt;loadLanguage();&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== change in BuildRoute logic ==&lt;br /&gt;
In Joomla! 1.6, the router BuildRoute logic for each Component was changed to require a Menu Item in order to build the link.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        // we need a menu item.  Either the one specified in the query, or the current active one if none specified&lt;br /&gt;
        if (empty($query[&#039;Itemid&#039;])) {&lt;br /&gt;
                $menuItem = $menu-&amp;gt;getActive();&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        else {&lt;br /&gt;
&lt;br /&gt;
                $menuItem = $menu-&amp;gt;getItem($query[&#039;Itemid&#039;]);&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There continue to be problems with the router. It is not uncommon to see a URL that bears the existing page URL as the &amp;quot;base&amp;quot; (if you will), followed by it&#039;s real URL. Look for these situations and report them on the tracker.&lt;br /&gt;
&lt;br /&gt;
For those who have been around long enough, forcing the Menu Item on the URL was done in 1.0.12 and it turned out poorly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Accsessing component parameters in front-end ==&lt;br /&gt;
&lt;br /&gt;
Accsessing component parameters in frontend for specific menu item, we will use com_content as example : in 1.5 this was done with&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;?php&lt;br /&gt;
    $mycom_params =  JComponentHelper::getParams(&#039;com_content&#039;);&lt;br /&gt;
&lt;br /&gt;
    echo $mycom_params-&amp;gt;get(&#039;num_leading_articles&#039;);&lt;br /&gt;
&lt;br /&gt;
    ?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
above code in joomla 1.6will output the DEFAULT com_content params , not affected with menu item so the new code for 1.6 would be&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;?php&lt;br /&gt;
    $app = JFactory::getApplication(&#039;site&#039;);&lt;br /&gt;
&lt;br /&gt;
    mycom_params =  &amp;amp; $app-&amp;gt;getParams(&#039;com_content&#039;);&lt;br /&gt;
&lt;br /&gt;
    echo $mycom_params-&amp;gt;get(&#039;num_leading_articles&#039;);&lt;br /&gt;
&lt;br /&gt;
    ?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Plugin parameters ==&lt;br /&gt;
&lt;br /&gt;
In 1.5, you had to use the Plugin Helper to retrieve the Plugin object and then JParameter to retrieve the Parameter Object. Following those steps, you could work with a single parameter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$plugin = &amp;amp; JPluginHelper::getPlugin(&#039;content&#039;, &#039;emailcloak&#039;);&lt;br /&gt;
&lt;br /&gt;
$pluginParams = new JParameter($plugin-&amp;gt;params);&lt;br /&gt;
&lt;br /&gt;
$mode = $pluginParams-&amp;gt;def(&#039;mode&#039;, 1);&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In 1.6,Joomla makes the parameter object automatically available to you.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$mode = $this-&amp;gt;params-&amp;gt;def(&#039;mode&#039;, 1);&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing Javascript function overrides ==&lt;br /&gt;
Joomla now has some of its Javascript functions prefixed with &amp;quot;Joomla&amp;quot;. This means the functions are always unique and won&#039;t clash with other javascript functions on your server/webpage. However, you now need a different method to override the default Joomla Javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
For Joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing removed functions ==&lt;br /&gt;
Some functions were removed for various reasons. You can find a list of them on [[What&#039;s new in Joomla_1.6#Removed_features]].&lt;br /&gt;
&lt;br /&gt;
Note that the ADODB compatibility methods included function like $db-&amp;gt;Execute($query) which now need a separate $db-&amp;gt;setQuery($query);$db-&amp;gt;Query();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Renamed events ==&lt;br /&gt;
&lt;br /&gt;
A large number of the Joomla 1.5 events have been renamed. Here is the list of renamed events.&lt;br /&gt;
*onContentAfterSave&lt;br /&gt;
*onContentAfterTitle&lt;br /&gt;
*onContentAfterDisplay&lt;br /&gt;
*onContentBeforeDisplay&lt;br /&gt;
*onContentBeforeSave&lt;br /&gt;
*onContentSearch&lt;br /&gt;
*onContentSearchAreas&lt;br /&gt;
*onUserAuthenticate&lt;br /&gt;
*onUserAfterDelete&lt;br /&gt;
*onUserAfterSave&lt;br /&gt;
*onUserBeforeDelete&lt;br /&gt;
*onUserBeforeSave&lt;br /&gt;
*onUserLogin&lt;br /&gt;
*onUserLogout&lt;br /&gt;
*All content events (except for search and search areas) now pass a &#039;context&#039; as the first argument to alert the plugin as to what type of content is being passed.  The plugin event may or may not heed this context.&lt;br /&gt;
&lt;br /&gt;
This means that if you use Joomla events you have two options:&amp;lt;br/&amp;gt;&lt;br /&gt;
1) rename the event and your extension can only be used on Joomla 1.6&amp;lt;br/&amp;gt;&lt;br /&gt;
2) create your own &amp;quot;legacy layer&amp;quot; and add the new event function name to your plugin. Here is an example of the user plugin:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    //joomla 1.6 compatibility code &lt;br /&gt;
 	public function onUserLogin($user, $options){&lt;br /&gt;
 	    $result = $this-&amp;gt;onLoginUser($user, $options);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
 	}&lt;br /&gt;
	public function onUserLogout($user)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onLogoutUser($user);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterDelete($user, $succes, $msg)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterDeleteUser($user, $succes, $msg);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserBeforeSave($user, $isnew, $new){&lt;br /&gt;
 	    $result = $this-&amp;gt;onBeforeStoreUser($user, $isnew, $new);&lt;br /&gt;
 	    return $result;	&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterSave($user, $isnew, $success, $msg){&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterStoreUser($user, $isnew, $success, $msg);&lt;br /&gt;
 	    return $result;			&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing name=&amp;quot;adminForm&amp;quot; to id=&amp;quot;adminForm&amp;quot; ==&lt;br /&gt;
To create your own admin forms in joomla you now need to use id=&amp;quot;adminForm&amp;quot;. This is because the use of the tag &amp;quot;name&amp;quot; is not valid HTML strict and has compatibility issues when used in XHTML served as XML.\. Although there is build in compatibility check to look for the old name=&amp;quot;adminForm&amp;quot; tag, it is best to add the new id tag. Depending on the features you want to use you may need to include both, name=&amp;quot;adminForm&amp;quot; and id=&amp;quot;adminForm&amp;quot; because not all core functionality has been updated to use id&#039;s.  An example of the new form code is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;index.php&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot;&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Removing references to index2.php and index3.php ==&lt;br /&gt;
Joomla 1.0 had different index files to serve admin content in different manners. Joomla 1.6 has now got better way to handle this and you need to search your codebase for &amp;quot;index2.php&amp;quot; and &amp;quot;index3.php&amp;quot; to ensure you don&#039;t have any Joomla 1.0 style links. If you need to display your component without any of the other Joomla 1.6 admin content (menus, etc) then add the following to the url: &amp;quot;&amp;amp;tmpl=component&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Upgrading core table and field name usage ==&lt;br /&gt;
Many of the core Joomla tables have been simplified, combined or renamed. This was needed to get rid of some limitation dating back to Joomla 1.0. This means however that if you have code that directly manipulates Joomla tables, that you need to add a function that detects Joomla 1.6 and had different SQL queries based on the joomla version. Plase note that both tables and field names have been renamed or removed. An example is the following function that can find if a plugin is published on both Joomla 1.5 and 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;		&lt;br /&gt;
function getPluginStatus($element, $folder) {&lt;br /&gt;
    //get joomla specs&lt;br /&gt;
    $db = &amp;amp; JFactory::getDBO();		&lt;br /&gt;
    $version = new JVersion;&lt;br /&gt;
    $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
    if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
        //Joomla 1.6 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__extensions WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; . $db-&amp;gt;Quote($folder);&lt;br /&gt;
    } else {&lt;br /&gt;
        //Joomla 1.0/1.5 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__plugins WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; .   $db-&amp;gt;Quote($folder); &lt;br /&gt;
    }&lt;br /&gt;
    $db-&amp;gt;setQuery($query);&lt;br /&gt;
    $result = $db-&amp;gt;loadResult();&lt;br /&gt;
    return $result;&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing in the XML installer manifest file ==&lt;br /&gt;
Joomla 1.6 now uses a more streamlined approach to the XML file inside the ZIP file that installs Joomla extentions.&lt;br /&gt;
&lt;br /&gt;
== New mootools version ==&lt;br /&gt;
Most important is that the Ajax class has been depreciated and replaced by the Request class. That means that if you use ajax calls you need to have a version switcher (below a sample code)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$version = new JVersion;&lt;br /&gt;
$joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
&lt;br /&gt;
..... (your code) ....&lt;br /&gt;
&lt;br /&gt;
    /* our ajax istance for starting the sync */&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
 echo &#039;var ajax = new Request.HTML({&lt;br /&gt;
           url: url,&#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
 echo &#039;var ajax = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
     echo &#039;var ajaxsync = new Request.HTML({&lt;br /&gt;
        url: url, &#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
echo &#039;var ajaxsync = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also another common usuage of mootools in  Joomla is the popup box. The Joomla 1.5 javascript code to close this box is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;document.getElementById(&#039;sbox-window&#039;).close();&amp;lt;/source&amp;gt;&lt;br /&gt;
in Joomla 1.6 you need to use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;window.parent.SqueezeBox.close();&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Converting your JParameters to JForms ==&lt;br /&gt;
Joomla 1.6 now uses the JForms class to handle parameters and it has also changed the way parameters are defined in your XML files. To make menu/component/module/plugin parameters work, first you need to update the XML file. Here is an automated way to handle the bulk of the conversion. (added &amp;quot;&amp;quot; to the examples below so you can see spaces in the search query as well). Use eclipse to search and replace parameters in *.xml files&lt;br /&gt;
&lt;br /&gt;
replace &amp;quot;&amp;lt;param &amp;quot; with &amp;quot;&amp;lt;field &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/param&amp;gt;&amp;quot; with &amp;lt;/field&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params*?&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/params&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/fieldset&amp;gt;&amp;lt;/fields&amp;gt;&amp;lt;/config&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;install &amp;quot; with &amp;quot;&amp;lt;extension &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/install&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/extension&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Change the &amp;quot;extension&amp;quot; node to add the following attributes:&lt;br /&gt;
* Keep the existing &amp;quot;type&amp;quot; attribute&lt;br /&gt;
* version=&amp;quot;1.6.0&amp;quot;&lt;br /&gt;
* client=&amp;quot;site&amp;quot;&lt;br /&gt;
* method=&amp;quot;upgrade&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example for a module:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;module&amp;quot; version=&amp;quot;1.6.0&amp;quot; client=&amp;quot;site&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now if you want to use your joomla extension on both Joomla 1.5 and 1.6 you will need to go to your &amp;quot;team synchronising&amp;quot; view in eclipse. Double click on your changed xml file, which will open the compare editor. Then simply copy-paste back your old Joomla 1.5 params into your new Joomla 1.6 xml file and save.&lt;br /&gt;
&lt;br /&gt;
If you have custom parameter types, you will need to do some additional work. In Joomla 1.5 you would use the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;params addpath=&amp;quot;/administrator/components/com_yourname/elements&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
In joomla 1.6 JParameter classes won&#039;t work and you will need to convert your jparameter fields into JForm fields. Create a new directory and copy your &amp;quot;old elements&amp;quot; into them. Then you need to load these new fields with the individual parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;field name=&amp;quot;sample&amp;quot; type=&amp;quot;sampleField&amp;quot; size=&amp;quot;5&amp;quot; default=&amp;quot;&amp;quot;			label=&amp;quot;sampleField&amp;quot; description=&amp;quot;sampleField&amp;quot; addfieldpath=&amp;quot;/administrator/components/com_yourname/fields&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use eclipse to search and replace files in your newly created fields directory.&lt;br /&gt;
replace &amp;quot;JElement&amp;quot; with &amp;quot;JFormField&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;var $_name =&amp;quot; with &amp;quot;public $type =&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;function fetchElement($name, $value, &amp;amp;$node, $control_name)&amp;quot; with &amp;quot;protected function getInput()&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you still need to replace the references to $control_name and others in your new JForm field, but at least the bulk of the work has been done automatically&lt;br /&gt;
&lt;br /&gt;
== renamed core component names and login form parameters ==&lt;br /&gt;
A login module for Joomla 1.5 will not work without modifications on Joomla 1.6. Here is a part of the logout module that will work on both Joomla 1.5 and Joomla 1.6. You can compare the two to see the difference in input names.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        $version = new JVersion;&lt;br /&gt;
        $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
        if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
            //joomla 1.6 format          &lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;user.logout&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_users&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
        } else {    &lt;br /&gt;
            //joomla 1.5 format&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;logout&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_user&amp;quot; /&amp;gt;&#039;;            &lt;br /&gt;
        } &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
here is the code for the login module&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        $version = new JVersion;&lt;br /&gt;
        $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
        if(substr($joomla,0,3) == &#039;1.6&#039;){        &lt;br /&gt;
            //joomla 1.6 format     &lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;user.login&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_users&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input id=&amp;quot;modlgn_passwd&amp;quot; type=&amp;quot;password&amp;quot; name=&amp;quot;password&amp;quot; class=&amp;quot;inputbox&amp;quot; size=&amp;quot;18&amp;quot; alt=&amp;quot;password&amp;quot; /&amp;gt; &#039;;&lt;br /&gt;
        } else {&lt;br /&gt;
            //joomla 1.5 format&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;login&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_user&amp;quot; /&amp;gt;&#039;;     &lt;br /&gt;
            $output .= &#039;&amp;lt;input id=&amp;quot;modlgn_passwd&amp;quot; type=&amp;quot;password&amp;quot; name=&amp;quot;passwd&amp;quot; class=&amp;quot;inputbox&amp;quot; size=&amp;quot;18&amp;quot; alt=&amp;quot;password&amp;quot; /&amp;gt; &#039;;               	&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These changes might also apply to front-end forms of other Joomla core components (more information needed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ACL changes ==&lt;br /&gt;
Joomla 1.6 now has an advanced ACL system. It is unknown how this affects people that have previously used the ACL API in their extension. Please add some information here if you know more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Plugin files now in different locations ==&lt;br /&gt;
Joomla 1.6 now creates a different hierarchy structure for plugins.  Files are no longer placed where they used to be, so if your other parts of your application (comp, mods, etc.) expects them to be in a certain position, it won&#039;t work. The change has been that now plugins are in an additional subdirectory. If you only load your plugins via the 1.5 API you should be fine.&lt;br /&gt;
* Joomla 1.5 example location &lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;JPATH_SITE . DS . &#039;plugins&#039; . DS . &#039;authentication&#039; . DS . &#039;example.php&#039;;&amp;lt;/source&amp;gt;&lt;br /&gt;
* Joomla 1.6 example location&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;JPATH_SITE . DS . &#039;plugins&#039; . DS . &#039;authentication&#039; . DS . &#039;example&#039;. DS . &#039;example.php&#039;;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changes to view parameters ==&lt;br /&gt;
J!1.6 has a strict new way of specifying parameters for views.  J!1.5 allowed a bit of freedom where the parameters could be defined at the view.html.php level but now ithas to be at the tmpl level.  AE believes the view paramters were removed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation process - preflight, postflight, etc ==&lt;br /&gt;
These are new events that can screw up an existing installlation process.  -1 on me for not documenting the process while stepping through xdebug.&lt;br /&gt;
They should be totally optional access points to the installation process.  But if your 1.5 install process is tricky for some reason, then these can be used to do clean up activities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Admin template changes ==&lt;br /&gt;
Admin functions that depended on certain functions, naming conventions etc no longer work.  Khepri has been removed.  Other admin functions/libraries may have changed.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ACL ==&lt;br /&gt;
gid and aid have been removed.  Significant changes to ACL archtecture.  Bricking refers to totally locking your self and everyone else out - Last chance backdoor involves adding a emergency pw to the config file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==sys.ini language translation file==&lt;br /&gt;
This file has 3 purposes:&lt;br /&gt;
&lt;br /&gt;
1. It is used for installation process translations, when a folder language is included in the pack.&lt;br /&gt;
&lt;br /&gt;
pack/language/en-gb/en-gb.extension.ini&lt;br /&gt;
&lt;br /&gt;
pack/language/en-gb/en-gb.extension.sys.ini&lt;br /&gt;
&lt;br /&gt;
In this case, the &amp;lt;description&amp;gt;COM_MYCOMPONENT_XML_DESCRIPTION&amp;lt;/description&amp;gt; used in the sys.ini will display on installing/updating the extension.&lt;br /&gt;
&lt;br /&gt;
When editing the extension in administration, it will be the .ini version of COM_MYCOMPONENT_XML_DESCRIPTION which will display.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. It is used to replace the former .menu.ini&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. It is used to display the translated extension name in many managers.&lt;br /&gt;
&lt;br /&gt;
== removed include folders ==&lt;br /&gt;
Most of the 3rd party libraries (Archive, domit, js, PEAR, etc) in the include folder have been removed in J!1.6. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Use paths defined in defines.php. ==&lt;br /&gt;
(Note they are different for the site and the administration)&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Module Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Plugin Development]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=37105</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=37105"/>
		<updated>2011-02-12T14:19:47Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: /* Accsessing component parameters in frontent */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse, see [[Setting up your workstation for Joomla! development]].&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
[[What&#039;s new in Joomla 1.6#Developers]] describes most changes of Joomla 1.6 and how this affect developers. Please note that the API documentation on the joomla wiki is incomplete/inaccurate. Therefore the best way to look at the Joomla 1.6 API is to look directly at the joomla source code.&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes, add quotes to string values and update your comments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Double quotes are NOT allowed inside the string value&#039;&#039;&#039;, except when using &amp;quot;_QQ_&amp;quot; to represent them. In case of js use, better use html entities or single quotes.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Single quotes are allowed. &lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening double quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
Enabling Debug System in Global configuration will display the parsing errors per file and lines.&lt;br /&gt;
&lt;br /&gt;
If you do not remove the illegal strings, then your language file will load until one of them is reached. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Legacy mode removed ==&lt;br /&gt;
&lt;br /&gt;
== Load language in plugins ==&lt;br /&gt;
On the day of release, the way Language files are loaded for Joomla! 1.6 Plugins was changed. As a result, all Plugins must add the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
 public function __construct(&amp;amp; $subject, $config)&lt;br /&gt;
        {&lt;br /&gt;
&lt;br /&gt;
                parent::__construct($subject, $config);&lt;br /&gt;
&lt;br /&gt;
                $this-&amp;gt;loadLanguage();&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== change in BuildRoute logic ==&lt;br /&gt;
In Joomla! 1.6, the router BuildRoute logic for each Component was changed to require a Menu Item in order to build the link.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        // we need a menu item.  Either the one specified in the query, or the current active one if none specified&lt;br /&gt;
        if (empty($query[&#039;Itemid&#039;])) {&lt;br /&gt;
                $menuItem = $menu-&amp;gt;getActive();&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        else {&lt;br /&gt;
&lt;br /&gt;
                $menuItem = $menu-&amp;gt;getItem($query[&#039;Itemid&#039;]);&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There continue to be problems with the router. It is not uncommon to see a URL that bears the existing page URL as the &amp;quot;base&amp;quot; (if you will), followed by it&#039;s real URL. Look for these situations and report them on the tracker.&lt;br /&gt;
&lt;br /&gt;
For those who have been around long enough, forcing the Menu Item on the URL was done in 1.0.12 and it turned out poorly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Accsessing component parameters in front-end ==&lt;br /&gt;
&lt;br /&gt;
Accsessing component parameters in frontend for specific menu item, we will use com_content as example : in 1.5 this was done with&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;?php&lt;br /&gt;
    $mycom_params =  JComponentHelper::getParams(&#039;com_content&#039;);&lt;br /&gt;
&lt;br /&gt;
    echo $mycom_params-&amp;gt;get(&#039;num_leading_articles&#039;);&lt;br /&gt;
&lt;br /&gt;
    ?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
above code in joomla 1.6will output the DEFAULT com_content params , not affected with menu item so the new code for 1.6 would be&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;?php&lt;br /&gt;
    $app = JFactory::getApplication(&#039;site&#039;);&lt;br /&gt;
&lt;br /&gt;
    mycom_params =  &amp;amp; $app-&amp;gt;getParams(&#039;com_content&#039;);&lt;br /&gt;
&lt;br /&gt;
    echo $mycom_params-&amp;gt;get(&#039;num_leading_articles&#039;);&lt;br /&gt;
&lt;br /&gt;
    ?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Plugin parameters ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Changing Javascript function overrides ==&lt;br /&gt;
Joomla now has some of its Javascript functions prefixed with &amp;quot;Joomla&amp;quot;. This means the functions are always unique and won&#039;t clash with other javascript functions on your server/webpage. However, you now need a different method to override the default Joomla Javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
For Joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing removed functions ==&lt;br /&gt;
Some functions were removed for various reasons. You can find a list of them on [[What&#039;s new in Joomla_1.6#Removed_features]].&lt;br /&gt;
&lt;br /&gt;
Note that the ADODB compatibility methods included function like $db-&amp;gt;Execute($query) which now need a separate $db-&amp;gt;setQuery($query);$db-&amp;gt;Query();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Renamed events ==&lt;br /&gt;
&lt;br /&gt;
A large number of the Joomla 1.5 events have been renamed. Here is the list of renamed events.&lt;br /&gt;
*onContentAfterSave&lt;br /&gt;
*onContentAfterTitle&lt;br /&gt;
*onContentAfterDisplay&lt;br /&gt;
*onContentBeforeDisplay&lt;br /&gt;
*onContentBeforeSave&lt;br /&gt;
*onContentSearch&lt;br /&gt;
*onContentSearchAreas&lt;br /&gt;
*onUserAuthenticate&lt;br /&gt;
*onUserAfterDelete&lt;br /&gt;
*onUserAfterSave&lt;br /&gt;
*onUserBeforeDelete&lt;br /&gt;
*onUserBeforeSave&lt;br /&gt;
*onUserLogin&lt;br /&gt;
*onUserLogout&lt;br /&gt;
*All content events (except for search and search areas) now pass a &#039;context&#039; as the first argument to alert the plugin as to what type of content is being passed.  The plugin event may or may not heed this context.&lt;br /&gt;
&lt;br /&gt;
This means that if you use Joomla events you have two options:&amp;lt;br/&amp;gt;&lt;br /&gt;
1) rename the event and your extension can only be used on Joomla 1.6&amp;lt;br/&amp;gt;&lt;br /&gt;
2) create your own &amp;quot;legacy layer&amp;quot; and add the new event function name to your plugin. Here is an example of the user plugin:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    //joomla 1.6 compatibility code &lt;br /&gt;
 	public function onUserLogin($user, $options){&lt;br /&gt;
 	    $result = $this-&amp;gt;onLoginUser($user, $options);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
 	}&lt;br /&gt;
	public function onUserLogout($user)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onLogoutUser($user);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterDelete($user, $succes, $msg)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterDeleteUser($user, $succes, $msg);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserBeforeSave($user, $isnew, $new){&lt;br /&gt;
 	    $result = $this-&amp;gt;onBeforeStoreUser($user, $isnew, $new);&lt;br /&gt;
 	    return $result;	&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterSave($user, $isnew, $success, $msg){&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterStoreUser($user, $isnew, $success, $msg);&lt;br /&gt;
 	    return $result;			&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing name=&amp;quot;adminForm&amp;quot; to id=&amp;quot;adminForm&amp;quot; ==&lt;br /&gt;
To create your own admin forms in joomla you now need to use id=&amp;quot;adminForm&amp;quot;. This is because the use of the tag &amp;quot;name&amp;quot; is not valid HTML strict and has compatibility issues when used in XHTML served as XML.\. Although there is build in compatibility check to look for the old name=&amp;quot;adminForm&amp;quot; tag, it is best to add the new id tag. Depending on the features you want to use you may need to include both, name=&amp;quot;adminForm&amp;quot; and id=&amp;quot;adminForm&amp;quot; because not all core functionality has been updated to use id&#039;s.  An example of the new form code is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;index.php&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot;&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Removing references to index2.php and index3.php ==&lt;br /&gt;
Joomla 1.0 had different index files to serve admin content in different manners. Joomla 1.6 has now got better way to handle this and you need to search your codebase for &amp;quot;index2.php&amp;quot; and &amp;quot;index3.php&amp;quot; to ensure you don&#039;t have any Joomla 1.0 style links. If you need to display your component without any of the other Joomla 1.6 admin content (menus, etc) then add the following to the url: &amp;quot;&amp;amp;tmpl=component&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Upgrading core table and field name usage ==&lt;br /&gt;
Many of the core Joomla tables have been simplified, combined or renamed. This was needed to get rid of some limitation dating back to Joomla 1.0. This means however that if you have code that directly manipulates Joomla tables, that you need to add a function that detects Joomla 1.6 and had different SQL queries based on the joomla version. Plase note that both tables and field names have been renamed or removed. An example is the following function that can find if a plugin is published on both Joomla 1.5 and 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;		&lt;br /&gt;
function getPluginStatus($element, $folder) {&lt;br /&gt;
    //get joomla specs&lt;br /&gt;
    $db = &amp;amp; JFactory::getDBO();		&lt;br /&gt;
    $version = new JVersion;&lt;br /&gt;
    $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
    if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
        //Joomla 1.6 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__extensions WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; . $db-&amp;gt;Quote($folder);&lt;br /&gt;
    } else {&lt;br /&gt;
        //Joomla 1.0/1.5 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__plugins WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; .   $db-&amp;gt;Quote($folder); &lt;br /&gt;
    }&lt;br /&gt;
    $db-&amp;gt;setQuery($query);&lt;br /&gt;
    $result = $db-&amp;gt;loadResult();&lt;br /&gt;
    return $result;&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing in the XML installer manifest file ==&lt;br /&gt;
Joomla 1.6 now uses a more streamlined approach to the XML file inside the ZIP file that installs Joomla extentions.&lt;br /&gt;
&lt;br /&gt;
== New mootools version ==&lt;br /&gt;
Most important is that the Ajax class has been depreciated and replaced by the Request class. That means that if you use ajax calls you need to have a version switcher (below a sample code)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$version = new JVersion;&lt;br /&gt;
$joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
&lt;br /&gt;
..... (your code) ....&lt;br /&gt;
&lt;br /&gt;
    /* our ajax istance for starting the sync */&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
 echo &#039;var ajax = new Request.HTML({&lt;br /&gt;
           url: url,&#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
 echo &#039;var ajax = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
     echo &#039;var ajaxsync = new Request.HTML({&lt;br /&gt;
        url: url, &#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
echo &#039;var ajaxsync = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also another common usuage of mootools in  Joomla is the popup box. The Joomla 1.5 javascript code to close this box is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;document.getElementById(&#039;sbox-window&#039;).close();&amp;lt;/source&amp;gt;&lt;br /&gt;
in Joomla 1.6 you need to use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;window.parent.SqueezeBox.close();&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Converting your JParameters to JForms ==&lt;br /&gt;
Joomla 1.6 now uses the JForms class to handle parameters and it has also changed the way parameters are defined in your XML files. To make menu/component/module/plugin parameters work, first you need to update the XML file. Here is an automated way to handle the bulk of the conversion. (added &amp;quot;&amp;quot; to the examples below so you can see spaces in the search query as well). Use eclipse to search and replace parameters in *.xml files&lt;br /&gt;
&lt;br /&gt;
replace &amp;quot;&amp;lt;param &amp;quot; with &amp;quot;&amp;lt;field &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/param&amp;gt;&amp;quot; with &amp;lt;/field&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params*?&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/params&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/fieldset&amp;gt;&amp;lt;/fields&amp;gt;&amp;lt;/config&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;install &amp;quot; with &amp;quot;&amp;lt;extension &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/install&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/extension&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Change the &amp;quot;extension&amp;quot; node to add the following attributes:&lt;br /&gt;
* Keep the existing &amp;quot;type&amp;quot; attribute&lt;br /&gt;
* version=&amp;quot;1.6.0&amp;quot;&lt;br /&gt;
* client=&amp;quot;site&amp;quot;&lt;br /&gt;
* method=&amp;quot;upgrade&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example for a module:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;module&amp;quot; version=&amp;quot;1.6.0&amp;quot; client=&amp;quot;site&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now if you want to use your joomla extension on both Joomla 1.5 and 1.6 you will need to go to your &amp;quot;team synchronising&amp;quot; view in eclipse. Double click on your changed xml file, which will open the compare editor. Then simply copy-paste back your old Joomla 1.5 params into your new Joomla 1.6 xml file and save.&lt;br /&gt;
&lt;br /&gt;
If you have custom parameter types, you will need to do some additional work. In Joomla 1.5 you would use the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;params addpath=&amp;quot;/administrator/components/com_yourname/elements&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
In joomla 1.6 JParameter classes won&#039;t work and you will need to convert your jparameter fields into JForm fields. Create a new directory and copy your &amp;quot;old elements&amp;quot; into them. Then you need to load these new fields with the individual parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;field name=&amp;quot;sample&amp;quot; type=&amp;quot;sampleField&amp;quot; size=&amp;quot;5&amp;quot; default=&amp;quot;&amp;quot;			label=&amp;quot;sampleField&amp;quot; description=&amp;quot;sampleField&amp;quot; addfieldpath=&amp;quot;/administrator/components/com_yourname/fields&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use eclipse to search and replace files in your newly created fields directory.&lt;br /&gt;
replace &amp;quot;JElement&amp;quot; with &amp;quot;JFormField&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;var $_name =&amp;quot; with &amp;quot;public $type =&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;function fetchElement($name, $value, &amp;amp;$node, $control_name)&amp;quot; with &amp;quot;protected function getInput()&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you still need to replace the references to $control_name and others in your new JForm field, but at least the bulk of the work has been done automatically&lt;br /&gt;
&lt;br /&gt;
== renamed core component names and login form parameters ==&lt;br /&gt;
A login module for Joomla 1.5 will not work without modifications on Joomla 1.6. Here is a part of the logout module that will work on both Joomla 1.5 and Joomla 1.6. You can compare the two to see the difference in input names.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        $version = new JVersion;&lt;br /&gt;
        $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
        if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
            //joomla 1.6 format          &lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;user.logout&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_users&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
        } else {    &lt;br /&gt;
            //joomla 1.5 format&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;logout&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_user&amp;quot; /&amp;gt;&#039;;            &lt;br /&gt;
        } &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
here is the code for the login module&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        $version = new JVersion;&lt;br /&gt;
        $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
        if(substr($joomla,0,3) == &#039;1.6&#039;){        &lt;br /&gt;
            //joomla 1.6 format     &lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;user.login&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_users&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input id=&amp;quot;modlgn_passwd&amp;quot; type=&amp;quot;password&amp;quot; name=&amp;quot;password&amp;quot; class=&amp;quot;inputbox&amp;quot; size=&amp;quot;18&amp;quot; alt=&amp;quot;password&amp;quot; /&amp;gt; &#039;;&lt;br /&gt;
        } else {&lt;br /&gt;
            //joomla 1.5 format&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;login&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_user&amp;quot; /&amp;gt;&#039;;     &lt;br /&gt;
            $output .= &#039;&amp;lt;input id=&amp;quot;modlgn_passwd&amp;quot; type=&amp;quot;password&amp;quot; name=&amp;quot;passwd&amp;quot; class=&amp;quot;inputbox&amp;quot; size=&amp;quot;18&amp;quot; alt=&amp;quot;password&amp;quot; /&amp;gt; &#039;;               	&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These changes might also apply to front-end forms of other Joomla core components (more information needed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ACL changes ==&lt;br /&gt;
Joomla 1.6 now has an advanced ACL system. It is unknown how this affects people that have previously used the ACL API in their extension. Please add some information here if you know more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Plugin files now in different locations ==&lt;br /&gt;
Joomla 1.6 now creates a different hierarchy structure for plugins.  Files are no longer placed where they used to be, so if your other parts of your application (comp, mods, etc.) expects them to be in a certain position, it won&#039;t work. The change has been that now plugins are in an additional subdirectory. If you only load your plugins via the 1.5 API you should be fine.&lt;br /&gt;
* Joomla 1.5 example location &lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;JPATH_SITE . DS . &#039;plugins&#039; . DS . &#039;authentication&#039; . DS . &#039;example.php&#039;;&amp;lt;/source&amp;gt;&lt;br /&gt;
* Joomla 1.6 example location&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;JPATH_SITE . DS . &#039;plugins&#039; . DS . &#039;authentication&#039; . DS . &#039;example&#039;. DS . &#039;example.php&#039;;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changes to view parameters ==&lt;br /&gt;
J!1.6 has a strict new way of specifying parameters for views.  J!1.5 allowed a bit of freedom where the parameters could be defined at the view.html.php level but now ithas to be at the tmpl level.  AE believes the view paramters were removed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation process - preflight, postflight, etc ==&lt;br /&gt;
These are new events that can screw up an existing installlation process.  -1 on me for not documenting the process while stepping through xdebug.&lt;br /&gt;
They should be totally optional access points to the installation process.  But if your 1.5 install process is tricky for some reason, then these can be used to do clean up activities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Admin template changes ==&lt;br /&gt;
Admin functions that depended on certain functions, naming conventions etc no longer work.  Khepri has been removed.  Other admin functions/libraries may have changed.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ACL ==&lt;br /&gt;
gid and aid have been removed.  Significant changes to ACL archtecture.  Bricking refers to totally locking your self and everyone else out - Last chance backdoor involves adding a emergency pw to the config file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==sys.ini language translation file==&lt;br /&gt;
This file has 3 purposes:&lt;br /&gt;
&lt;br /&gt;
1. It is used for installation process translations, when a folder language is included in the pack.&lt;br /&gt;
&lt;br /&gt;
pack/language/en-gb/en-gb.extension.ini&lt;br /&gt;
&lt;br /&gt;
pack/language/en-gb/en-gb.extension.sys.ini&lt;br /&gt;
&lt;br /&gt;
In this case, the &amp;lt;description&amp;gt;COM_MYCOMPONENT_XML_DESCRIPTION&amp;lt;/description&amp;gt; used in the sys.ini will display on installing/updating the extension.&lt;br /&gt;
&lt;br /&gt;
When editing the extension in administration, it will be the .ini version of COM_MYCOMPONENT_XML_DESCRIPTION which will display.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. It is used to replace the former .menu.ini&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. It is used to display the translated extension name in many managers.&lt;br /&gt;
&lt;br /&gt;
== removed include folders ==&lt;br /&gt;
Most of the 3rd party libraries (Archive, domit, js, PEAR, etc) in the include folder have been removed in J!1.6. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Use paths defined in defines.php. ==&lt;br /&gt;
(Note they are different for the site and the administration)&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Module Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Plugin Development]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=37104</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=37104"/>
		<updated>2011-02-12T14:18:45Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: /* Moved system image files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse, see [[Setting up your workstation for Joomla! development]].&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
[[What&#039;s new in Joomla 1.6#Developers]] describes most changes of Joomla 1.6 and how this affect developers. Please note that the API documentation on the joomla wiki is incomplete/inaccurate. Therefore the best way to look at the Joomla 1.6 API is to look directly at the joomla source code.&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes, add quotes to string values and update your comments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Double quotes are NOT allowed inside the string value&#039;&#039;&#039;, except when using &amp;quot;_QQ_&amp;quot; to represent them. In case of js use, better use html entities or single quotes.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Single quotes are allowed. &lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening double quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
Enabling Debug System in Global configuration will display the parsing errors per file and lines.&lt;br /&gt;
&lt;br /&gt;
If you do not remove the illegal strings, then your language file will load until one of them is reached. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Legacy mode removed ==&lt;br /&gt;
&lt;br /&gt;
== Load language in plugins ==&lt;br /&gt;
On the day of release, the way Language files are loaded for Joomla! 1.6 Plugins was changed. As a result, all Plugins must add the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
 public function __construct(&amp;amp; $subject, $config)&lt;br /&gt;
        {&lt;br /&gt;
&lt;br /&gt;
                parent::__construct($subject, $config);&lt;br /&gt;
&lt;br /&gt;
                $this-&amp;gt;loadLanguage();&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== change in BuildRoute logic ==&lt;br /&gt;
In Joomla! 1.6, the router BuildRoute logic for each Component was changed to require a Menu Item in order to build the link.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        // we need a menu item.  Either the one specified in the query, or the current active one if none specified&lt;br /&gt;
        if (empty($query[&#039;Itemid&#039;])) {&lt;br /&gt;
                $menuItem = $menu-&amp;gt;getActive();&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        else {&lt;br /&gt;
&lt;br /&gt;
                $menuItem = $menu-&amp;gt;getItem($query[&#039;Itemid&#039;]);&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There continue to be problems with the router. It is not uncommon to see a URL that bears the existing page URL as the &amp;quot;base&amp;quot; (if you will), followed by it&#039;s real URL. Look for these situations and report them on the tracker.&lt;br /&gt;
&lt;br /&gt;
For those who have been around long enough, forcing the Menu Item on the URL was done in 1.0.12 and it turned out poorly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Accsessing component parameters in frontent ==&lt;br /&gt;
&lt;br /&gt;
Accsessing component parameters in frontend for specific menu item, we will use com_content as example : in 1.5 this was done with&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;?php&lt;br /&gt;
    $mycom_params =  JComponentHelper::getParams(&#039;com_content&#039;);&lt;br /&gt;
&lt;br /&gt;
    echo $mycom_params-&amp;gt;get(&#039;num_leading_articles&#039;);&lt;br /&gt;
&lt;br /&gt;
    ?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
above code in joomla 1.6will output the DEFAULT com_content params , not affected with menu item so the new code for 1.6 would be&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;?php&lt;br /&gt;
    $app = JFactory::getApplication(&#039;site&#039;);&lt;br /&gt;
&lt;br /&gt;
    mycom_params =  &amp;amp; $app-&amp;gt;getParams(&#039;com_content&#039;);&lt;br /&gt;
&lt;br /&gt;
    echo $mycom_params-&amp;gt;get(&#039;num_leading_articles&#039;);&lt;br /&gt;
&lt;br /&gt;
    ?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Plugin parameters ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Changing Javascript function overrides ==&lt;br /&gt;
Joomla now has some of its Javascript functions prefixed with &amp;quot;Joomla&amp;quot;. This means the functions are always unique and won&#039;t clash with other javascript functions on your server/webpage. However, you now need a different method to override the default Joomla Javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
For Joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing removed functions ==&lt;br /&gt;
Some functions were removed for various reasons. You can find a list of them on [[What&#039;s new in Joomla_1.6#Removed_features]].&lt;br /&gt;
&lt;br /&gt;
Note that the ADODB compatibility methods included function like $db-&amp;gt;Execute($query) which now need a separate $db-&amp;gt;setQuery($query);$db-&amp;gt;Query();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Renamed events ==&lt;br /&gt;
&lt;br /&gt;
A large number of the Joomla 1.5 events have been renamed. Here is the list of renamed events.&lt;br /&gt;
*onContentAfterSave&lt;br /&gt;
*onContentAfterTitle&lt;br /&gt;
*onContentAfterDisplay&lt;br /&gt;
*onContentBeforeDisplay&lt;br /&gt;
*onContentBeforeSave&lt;br /&gt;
*onContentSearch&lt;br /&gt;
*onContentSearchAreas&lt;br /&gt;
*onUserAuthenticate&lt;br /&gt;
*onUserAfterDelete&lt;br /&gt;
*onUserAfterSave&lt;br /&gt;
*onUserBeforeDelete&lt;br /&gt;
*onUserBeforeSave&lt;br /&gt;
*onUserLogin&lt;br /&gt;
*onUserLogout&lt;br /&gt;
*All content events (except for search and search areas) now pass a &#039;context&#039; as the first argument to alert the plugin as to what type of content is being passed.  The plugin event may or may not heed this context.&lt;br /&gt;
&lt;br /&gt;
This means that if you use Joomla events you have two options:&amp;lt;br/&amp;gt;&lt;br /&gt;
1) rename the event and your extension can only be used on Joomla 1.6&amp;lt;br/&amp;gt;&lt;br /&gt;
2) create your own &amp;quot;legacy layer&amp;quot; and add the new event function name to your plugin. Here is an example of the user plugin:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    //joomla 1.6 compatibility code &lt;br /&gt;
 	public function onUserLogin($user, $options){&lt;br /&gt;
 	    $result = $this-&amp;gt;onLoginUser($user, $options);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
 	}&lt;br /&gt;
	public function onUserLogout($user)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onLogoutUser($user);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterDelete($user, $succes, $msg)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterDeleteUser($user, $succes, $msg);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserBeforeSave($user, $isnew, $new){&lt;br /&gt;
 	    $result = $this-&amp;gt;onBeforeStoreUser($user, $isnew, $new);&lt;br /&gt;
 	    return $result;	&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterSave($user, $isnew, $success, $msg){&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterStoreUser($user, $isnew, $success, $msg);&lt;br /&gt;
 	    return $result;			&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing name=&amp;quot;adminForm&amp;quot; to id=&amp;quot;adminForm&amp;quot; ==&lt;br /&gt;
To create your own admin forms in joomla you now need to use id=&amp;quot;adminForm&amp;quot;. This is because the use of the tag &amp;quot;name&amp;quot; is not valid HTML strict and has compatibility issues when used in XHTML served as XML.\. Although there is build in compatibility check to look for the old name=&amp;quot;adminForm&amp;quot; tag, it is best to add the new id tag. Depending on the features you want to use you may need to include both, name=&amp;quot;adminForm&amp;quot; and id=&amp;quot;adminForm&amp;quot; because not all core functionality has been updated to use id&#039;s.  An example of the new form code is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;index.php&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot;&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Removing references to index2.php and index3.php ==&lt;br /&gt;
Joomla 1.0 had different index files to serve admin content in different manners. Joomla 1.6 has now got better way to handle this and you need to search your codebase for &amp;quot;index2.php&amp;quot; and &amp;quot;index3.php&amp;quot; to ensure you don&#039;t have any Joomla 1.0 style links. If you need to display your component without any of the other Joomla 1.6 admin content (menus, etc) then add the following to the url: &amp;quot;&amp;amp;tmpl=component&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Upgrading core table and field name usage ==&lt;br /&gt;
Many of the core Joomla tables have been simplified, combined or renamed. This was needed to get rid of some limitation dating back to Joomla 1.0. This means however that if you have code that directly manipulates Joomla tables, that you need to add a function that detects Joomla 1.6 and had different SQL queries based on the joomla version. Plase note that both tables and field names have been renamed or removed. An example is the following function that can find if a plugin is published on both Joomla 1.5 and 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;		&lt;br /&gt;
function getPluginStatus($element, $folder) {&lt;br /&gt;
    //get joomla specs&lt;br /&gt;
    $db = &amp;amp; JFactory::getDBO();		&lt;br /&gt;
    $version = new JVersion;&lt;br /&gt;
    $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
    if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
        //Joomla 1.6 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__extensions WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; . $db-&amp;gt;Quote($folder);&lt;br /&gt;
    } else {&lt;br /&gt;
        //Joomla 1.0/1.5 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__plugins WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; .   $db-&amp;gt;Quote($folder); &lt;br /&gt;
    }&lt;br /&gt;
    $db-&amp;gt;setQuery($query);&lt;br /&gt;
    $result = $db-&amp;gt;loadResult();&lt;br /&gt;
    return $result;&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing in the XML installer manifest file ==&lt;br /&gt;
Joomla 1.6 now uses a more streamlined approach to the XML file inside the ZIP file that installs Joomla extentions.&lt;br /&gt;
&lt;br /&gt;
== New mootools version ==&lt;br /&gt;
Most important is that the Ajax class has been depreciated and replaced by the Request class. That means that if you use ajax calls you need to have a version switcher (below a sample code)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$version = new JVersion;&lt;br /&gt;
$joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
&lt;br /&gt;
..... (your code) ....&lt;br /&gt;
&lt;br /&gt;
    /* our ajax istance for starting the sync */&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
 echo &#039;var ajax = new Request.HTML({&lt;br /&gt;
           url: url,&#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
 echo &#039;var ajax = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
     echo &#039;var ajaxsync = new Request.HTML({&lt;br /&gt;
        url: url, &#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
echo &#039;var ajaxsync = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also another common usuage of mootools in  Joomla is the popup box. The Joomla 1.5 javascript code to close this box is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;document.getElementById(&#039;sbox-window&#039;).close();&amp;lt;/source&amp;gt;&lt;br /&gt;
in Joomla 1.6 you need to use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;window.parent.SqueezeBox.close();&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Converting your JParameters to JForms ==&lt;br /&gt;
Joomla 1.6 now uses the JForms class to handle parameters and it has also changed the way parameters are defined in your XML files. To make menu/component/module/plugin parameters work, first you need to update the XML file. Here is an automated way to handle the bulk of the conversion. (added &amp;quot;&amp;quot; to the examples below so you can see spaces in the search query as well). Use eclipse to search and replace parameters in *.xml files&lt;br /&gt;
&lt;br /&gt;
replace &amp;quot;&amp;lt;param &amp;quot; with &amp;quot;&amp;lt;field &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/param&amp;gt;&amp;quot; with &amp;lt;/field&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params*?&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/params&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/fieldset&amp;gt;&amp;lt;/fields&amp;gt;&amp;lt;/config&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;install &amp;quot; with &amp;quot;&amp;lt;extension &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/install&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/extension&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Change the &amp;quot;extension&amp;quot; node to add the following attributes:&lt;br /&gt;
* Keep the existing &amp;quot;type&amp;quot; attribute&lt;br /&gt;
* version=&amp;quot;1.6.0&amp;quot;&lt;br /&gt;
* client=&amp;quot;site&amp;quot;&lt;br /&gt;
* method=&amp;quot;upgrade&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example for a module:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;module&amp;quot; version=&amp;quot;1.6.0&amp;quot; client=&amp;quot;site&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now if you want to use your joomla extension on both Joomla 1.5 and 1.6 you will need to go to your &amp;quot;team synchronising&amp;quot; view in eclipse. Double click on your changed xml file, which will open the compare editor. Then simply copy-paste back your old Joomla 1.5 params into your new Joomla 1.6 xml file and save.&lt;br /&gt;
&lt;br /&gt;
If you have custom parameter types, you will need to do some additional work. In Joomla 1.5 you would use the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;params addpath=&amp;quot;/administrator/components/com_yourname/elements&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
In joomla 1.6 JParameter classes won&#039;t work and you will need to convert your jparameter fields into JForm fields. Create a new directory and copy your &amp;quot;old elements&amp;quot; into them. Then you need to load these new fields with the individual parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;field name=&amp;quot;sample&amp;quot; type=&amp;quot;sampleField&amp;quot; size=&amp;quot;5&amp;quot; default=&amp;quot;&amp;quot;			label=&amp;quot;sampleField&amp;quot; description=&amp;quot;sampleField&amp;quot; addfieldpath=&amp;quot;/administrator/components/com_yourname/fields&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use eclipse to search and replace files in your newly created fields directory.&lt;br /&gt;
replace &amp;quot;JElement&amp;quot; with &amp;quot;JFormField&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;var $_name =&amp;quot; with &amp;quot;public $type =&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;function fetchElement($name, $value, &amp;amp;$node, $control_name)&amp;quot; with &amp;quot;protected function getInput()&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you still need to replace the references to $control_name and others in your new JForm field, but at least the bulk of the work has been done automatically&lt;br /&gt;
&lt;br /&gt;
== renamed core component names and login form parameters ==&lt;br /&gt;
A login module for Joomla 1.5 will not work without modifications on Joomla 1.6. Here is a part of the logout module that will work on both Joomla 1.5 and Joomla 1.6. You can compare the two to see the difference in input names.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        $version = new JVersion;&lt;br /&gt;
        $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
        if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
            //joomla 1.6 format          &lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;user.logout&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_users&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
        } else {    &lt;br /&gt;
            //joomla 1.5 format&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;logout&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_user&amp;quot; /&amp;gt;&#039;;            &lt;br /&gt;
        } &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
here is the code for the login module&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        $version = new JVersion;&lt;br /&gt;
        $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
        if(substr($joomla,0,3) == &#039;1.6&#039;){        &lt;br /&gt;
            //joomla 1.6 format     &lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;user.login&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_users&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input id=&amp;quot;modlgn_passwd&amp;quot; type=&amp;quot;password&amp;quot; name=&amp;quot;password&amp;quot; class=&amp;quot;inputbox&amp;quot; size=&amp;quot;18&amp;quot; alt=&amp;quot;password&amp;quot; /&amp;gt; &#039;;&lt;br /&gt;
        } else {&lt;br /&gt;
            //joomla 1.5 format&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;login&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_user&amp;quot; /&amp;gt;&#039;;     &lt;br /&gt;
            $output .= &#039;&amp;lt;input id=&amp;quot;modlgn_passwd&amp;quot; type=&amp;quot;password&amp;quot; name=&amp;quot;passwd&amp;quot; class=&amp;quot;inputbox&amp;quot; size=&amp;quot;18&amp;quot; alt=&amp;quot;password&amp;quot; /&amp;gt; &#039;;               	&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These changes might also apply to front-end forms of other Joomla core components (more information needed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ACL changes ==&lt;br /&gt;
Joomla 1.6 now has an advanced ACL system. It is unknown how this affects people that have previously used the ACL API in their extension. Please add some information here if you know more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Plugin files now in different locations ==&lt;br /&gt;
Joomla 1.6 now creates a different hierarchy structure for plugins.  Files are no longer placed where they used to be, so if your other parts of your application (comp, mods, etc.) expects them to be in a certain position, it won&#039;t work. The change has been that now plugins are in an additional subdirectory. If you only load your plugins via the 1.5 API you should be fine.&lt;br /&gt;
* Joomla 1.5 example location &lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;JPATH_SITE . DS . &#039;plugins&#039; . DS . &#039;authentication&#039; . DS . &#039;example.php&#039;;&amp;lt;/source&amp;gt;&lt;br /&gt;
* Joomla 1.6 example location&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;JPATH_SITE . DS . &#039;plugins&#039; . DS . &#039;authentication&#039; . DS . &#039;example&#039;. DS . &#039;example.php&#039;;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changes to view parameters ==&lt;br /&gt;
J!1.6 has a strict new way of specifying parameters for views.  J!1.5 allowed a bit of freedom where the parameters could be defined at the view.html.php level but now ithas to be at the tmpl level.  AE believes the view paramters were removed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation process - preflight, postflight, etc ==&lt;br /&gt;
These are new events that can screw up an existing installlation process.  -1 on me for not documenting the process while stepping through xdebug.&lt;br /&gt;
They should be totally optional access points to the installation process.  But if your 1.5 install process is tricky for some reason, then these can be used to do clean up activities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Admin template changes ==&lt;br /&gt;
Admin functions that depended on certain functions, naming conventions etc no longer work.  Khepri has been removed.  Other admin functions/libraries may have changed.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ACL ==&lt;br /&gt;
gid and aid have been removed.  Significant changes to ACL archtecture.  Bricking refers to totally locking your self and everyone else out - Last chance backdoor involves adding a emergency pw to the config file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==sys.ini language translation file==&lt;br /&gt;
This file has 3 purposes:&lt;br /&gt;
&lt;br /&gt;
1. It is used for installation process translations, when a folder language is included in the pack.&lt;br /&gt;
&lt;br /&gt;
pack/language/en-gb/en-gb.extension.ini&lt;br /&gt;
&lt;br /&gt;
pack/language/en-gb/en-gb.extension.sys.ini&lt;br /&gt;
&lt;br /&gt;
In this case, the &amp;lt;description&amp;gt;COM_MYCOMPONENT_XML_DESCRIPTION&amp;lt;/description&amp;gt; used in the sys.ini will display on installing/updating the extension.&lt;br /&gt;
&lt;br /&gt;
When editing the extension in administration, it will be the .ini version of COM_MYCOMPONENT_XML_DESCRIPTION which will display.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. It is used to replace the former .menu.ini&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. It is used to display the translated extension name in many managers.&lt;br /&gt;
&lt;br /&gt;
== removed include folders ==&lt;br /&gt;
Most of the 3rd party libraries (Archive, domit, js, PEAR, etc) in the include folder have been removed in J!1.6. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Use paths defined in defines.php. ==&lt;br /&gt;
(Note they are different for the site and the administration)&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Module Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Plugin Development]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=37103</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=37103"/>
		<updated>2011-02-12T14:17:57Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: /* Accsessing component parameters in frontent */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse, see [[Setting up your workstation for Joomla! development]].&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
[[What&#039;s new in Joomla 1.6#Developers]] describes most changes of Joomla 1.6 and how this affect developers. Please note that the API documentation on the joomla wiki is incomplete/inaccurate. Therefore the best way to look at the Joomla 1.6 API is to look directly at the joomla source code.&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes, add quotes to string values and update your comments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Double quotes are NOT allowed inside the string value&#039;&#039;&#039;, except when using &amp;quot;_QQ_&amp;quot; to represent them. In case of js use, better use html entities or single quotes.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Single quotes are allowed. &lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening double quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
Enabling Debug System in Global configuration will display the parsing errors per file and lines.&lt;br /&gt;
&lt;br /&gt;
If you do not remove the illegal strings, then your language file will load until one of them is reached. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Legacy mode removed ==&lt;br /&gt;
&lt;br /&gt;
== Load language in plugins ==&lt;br /&gt;
On the day of release, the way Language files are loaded for Joomla! 1.6 Plugins was changed. As a result, all Plugins must add the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
 public function __construct(&amp;amp; $subject, $config)&lt;br /&gt;
        {&lt;br /&gt;
&lt;br /&gt;
                parent::__construct($subject, $config);&lt;br /&gt;
&lt;br /&gt;
                $this-&amp;gt;loadLanguage();&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== change in BuildRoute logic ==&lt;br /&gt;
In Joomla! 1.6, the router BuildRoute logic for each Component was changed to require a Menu Item in order to build the link.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        // we need a menu item.  Either the one specified in the query, or the current active one if none specified&lt;br /&gt;
        if (empty($query[&#039;Itemid&#039;])) {&lt;br /&gt;
                $menuItem = $menu-&amp;gt;getActive();&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        else {&lt;br /&gt;
&lt;br /&gt;
                $menuItem = $menu-&amp;gt;getItem($query[&#039;Itemid&#039;]);&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There continue to be problems with the router. It is not uncommon to see a URL that bears the existing page URL as the &amp;quot;base&amp;quot; (if you will), followed by it&#039;s real URL. Look for these situations and report them on the tracker.&lt;br /&gt;
&lt;br /&gt;
For those who have been around long enough, forcing the Menu Item on the URL was done in 1.0.12 and it turned out poorly.&lt;br /&gt;
&lt;br /&gt;
== Moved system image files ==&lt;br /&gt;
&lt;br /&gt;
== Accsessing component parameters in frontent ==&lt;br /&gt;
&lt;br /&gt;
Accsessing component parameters in frontend for specific menu item, we will use com_content as example : in 1.5 this was done with&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;?php&lt;br /&gt;
    $mycom_params =  JComponentHelper::getParams(&#039;com_content&#039;);&lt;br /&gt;
&lt;br /&gt;
    echo $mycom_params-&amp;gt;get(&#039;num_leading_articles&#039;);&lt;br /&gt;
&lt;br /&gt;
    ?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
above code in joomla 1.6will output the DEFAULT com_content params , not affected with menu item so the new code for 1.6 would be&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;?php&lt;br /&gt;
    $app = JFactory::getApplication(&#039;site&#039;);&lt;br /&gt;
&lt;br /&gt;
    mycom_params =  &amp;amp; $app-&amp;gt;getParams(&#039;com_content&#039;);&lt;br /&gt;
&lt;br /&gt;
    echo $mycom_params-&amp;gt;get(&#039;num_leading_articles&#039;);&lt;br /&gt;
&lt;br /&gt;
    ?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Plugin parameters ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Changing Javascript function overrides ==&lt;br /&gt;
Joomla now has some of its Javascript functions prefixed with &amp;quot;Joomla&amp;quot;. This means the functions are always unique and won&#039;t clash with other javascript functions on your server/webpage. However, you now need a different method to override the default Joomla Javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
For Joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing removed functions ==&lt;br /&gt;
Some functions were removed for various reasons. You can find a list of them on [[What&#039;s new in Joomla_1.6#Removed_features]].&lt;br /&gt;
&lt;br /&gt;
Note that the ADODB compatibility methods included function like $db-&amp;gt;Execute($query) which now need a separate $db-&amp;gt;setQuery($query);$db-&amp;gt;Query();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Renamed events ==&lt;br /&gt;
&lt;br /&gt;
A large number of the Joomla 1.5 events have been renamed. Here is the list of renamed events.&lt;br /&gt;
*onContentAfterSave&lt;br /&gt;
*onContentAfterTitle&lt;br /&gt;
*onContentAfterDisplay&lt;br /&gt;
*onContentBeforeDisplay&lt;br /&gt;
*onContentBeforeSave&lt;br /&gt;
*onContentSearch&lt;br /&gt;
*onContentSearchAreas&lt;br /&gt;
*onUserAuthenticate&lt;br /&gt;
*onUserAfterDelete&lt;br /&gt;
*onUserAfterSave&lt;br /&gt;
*onUserBeforeDelete&lt;br /&gt;
*onUserBeforeSave&lt;br /&gt;
*onUserLogin&lt;br /&gt;
*onUserLogout&lt;br /&gt;
*All content events (except for search and search areas) now pass a &#039;context&#039; as the first argument to alert the plugin as to what type of content is being passed.  The plugin event may or may not heed this context.&lt;br /&gt;
&lt;br /&gt;
This means that if you use Joomla events you have two options:&amp;lt;br/&amp;gt;&lt;br /&gt;
1) rename the event and your extension can only be used on Joomla 1.6&amp;lt;br/&amp;gt;&lt;br /&gt;
2) create your own &amp;quot;legacy layer&amp;quot; and add the new event function name to your plugin. Here is an example of the user plugin:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    //joomla 1.6 compatibility code &lt;br /&gt;
 	public function onUserLogin($user, $options){&lt;br /&gt;
 	    $result = $this-&amp;gt;onLoginUser($user, $options);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
 	}&lt;br /&gt;
	public function onUserLogout($user)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onLogoutUser($user);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterDelete($user, $succes, $msg)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterDeleteUser($user, $succes, $msg);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserBeforeSave($user, $isnew, $new){&lt;br /&gt;
 	    $result = $this-&amp;gt;onBeforeStoreUser($user, $isnew, $new);&lt;br /&gt;
 	    return $result;	&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterSave($user, $isnew, $success, $msg){&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterStoreUser($user, $isnew, $success, $msg);&lt;br /&gt;
 	    return $result;			&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing name=&amp;quot;adminForm&amp;quot; to id=&amp;quot;adminForm&amp;quot; ==&lt;br /&gt;
To create your own admin forms in joomla you now need to use id=&amp;quot;adminForm&amp;quot;. This is because the use of the tag &amp;quot;name&amp;quot; is not valid HTML strict and has compatibility issues when used in XHTML served as XML.\. Although there is build in compatibility check to look for the old name=&amp;quot;adminForm&amp;quot; tag, it is best to add the new id tag. Depending on the features you want to use you may need to include both, name=&amp;quot;adminForm&amp;quot; and id=&amp;quot;adminForm&amp;quot; because not all core functionality has been updated to use id&#039;s.  An example of the new form code is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;index.php&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot;&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Removing references to index2.php and index3.php ==&lt;br /&gt;
Joomla 1.0 had different index files to serve admin content in different manners. Joomla 1.6 has now got better way to handle this and you need to search your codebase for &amp;quot;index2.php&amp;quot; and &amp;quot;index3.php&amp;quot; to ensure you don&#039;t have any Joomla 1.0 style links. If you need to display your component without any of the other Joomla 1.6 admin content (menus, etc) then add the following to the url: &amp;quot;&amp;amp;tmpl=component&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Upgrading core table and field name usage ==&lt;br /&gt;
Many of the core Joomla tables have been simplified, combined or renamed. This was needed to get rid of some limitation dating back to Joomla 1.0. This means however that if you have code that directly manipulates Joomla tables, that you need to add a function that detects Joomla 1.6 and had different SQL queries based on the joomla version. Plase note that both tables and field names have been renamed or removed. An example is the following function that can find if a plugin is published on both Joomla 1.5 and 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;		&lt;br /&gt;
function getPluginStatus($element, $folder) {&lt;br /&gt;
    //get joomla specs&lt;br /&gt;
    $db = &amp;amp; JFactory::getDBO();		&lt;br /&gt;
    $version = new JVersion;&lt;br /&gt;
    $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
    if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
        //Joomla 1.6 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__extensions WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; . $db-&amp;gt;Quote($folder);&lt;br /&gt;
    } else {&lt;br /&gt;
        //Joomla 1.0/1.5 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__plugins WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; .   $db-&amp;gt;Quote($folder); &lt;br /&gt;
    }&lt;br /&gt;
    $db-&amp;gt;setQuery($query);&lt;br /&gt;
    $result = $db-&amp;gt;loadResult();&lt;br /&gt;
    return $result;&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing in the XML installer manifest file ==&lt;br /&gt;
Joomla 1.6 now uses a more streamlined approach to the XML file inside the ZIP file that installs Joomla extentions.&lt;br /&gt;
&lt;br /&gt;
== New mootools version ==&lt;br /&gt;
Most important is that the Ajax class has been depreciated and replaced by the Request class. That means that if you use ajax calls you need to have a version switcher (below a sample code)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$version = new JVersion;&lt;br /&gt;
$joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
&lt;br /&gt;
..... (your code) ....&lt;br /&gt;
&lt;br /&gt;
    /* our ajax istance for starting the sync */&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
 echo &#039;var ajax = new Request.HTML({&lt;br /&gt;
           url: url,&#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
 echo &#039;var ajax = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
     echo &#039;var ajaxsync = new Request.HTML({&lt;br /&gt;
        url: url, &#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
echo &#039;var ajaxsync = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also another common usuage of mootools in  Joomla is the popup box. The Joomla 1.5 javascript code to close this box is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;document.getElementById(&#039;sbox-window&#039;).close();&amp;lt;/source&amp;gt;&lt;br /&gt;
in Joomla 1.6 you need to use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;window.parent.SqueezeBox.close();&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Converting your JParameters to JForms ==&lt;br /&gt;
Joomla 1.6 now uses the JForms class to handle parameters and it has also changed the way parameters are defined in your XML files. To make menu/component/module/plugin parameters work, first you need to update the XML file. Here is an automated way to handle the bulk of the conversion. (added &amp;quot;&amp;quot; to the examples below so you can see spaces in the search query as well). Use eclipse to search and replace parameters in *.xml files&lt;br /&gt;
&lt;br /&gt;
replace &amp;quot;&amp;lt;param &amp;quot; with &amp;quot;&amp;lt;field &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/param&amp;gt;&amp;quot; with &amp;lt;/field&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params*?&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/params&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/fieldset&amp;gt;&amp;lt;/fields&amp;gt;&amp;lt;/config&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;install &amp;quot; with &amp;quot;&amp;lt;extension &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/install&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/extension&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Change the &amp;quot;extension&amp;quot; node to add the following attributes:&lt;br /&gt;
* Keep the existing &amp;quot;type&amp;quot; attribute&lt;br /&gt;
* version=&amp;quot;1.6.0&amp;quot;&lt;br /&gt;
* client=&amp;quot;site&amp;quot;&lt;br /&gt;
* method=&amp;quot;upgrade&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example for a module:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;module&amp;quot; version=&amp;quot;1.6.0&amp;quot; client=&amp;quot;site&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now if you want to use your joomla extension on both Joomla 1.5 and 1.6 you will need to go to your &amp;quot;team synchronising&amp;quot; view in eclipse. Double click on your changed xml file, which will open the compare editor. Then simply copy-paste back your old Joomla 1.5 params into your new Joomla 1.6 xml file and save.&lt;br /&gt;
&lt;br /&gt;
If you have custom parameter types, you will need to do some additional work. In Joomla 1.5 you would use the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;params addpath=&amp;quot;/administrator/components/com_yourname/elements&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
In joomla 1.6 JParameter classes won&#039;t work and you will need to convert your jparameter fields into JForm fields. Create a new directory and copy your &amp;quot;old elements&amp;quot; into them. Then you need to load these new fields with the individual parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;field name=&amp;quot;sample&amp;quot; type=&amp;quot;sampleField&amp;quot; size=&amp;quot;5&amp;quot; default=&amp;quot;&amp;quot;			label=&amp;quot;sampleField&amp;quot; description=&amp;quot;sampleField&amp;quot; addfieldpath=&amp;quot;/administrator/components/com_yourname/fields&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use eclipse to search and replace files in your newly created fields directory.&lt;br /&gt;
replace &amp;quot;JElement&amp;quot; with &amp;quot;JFormField&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;var $_name =&amp;quot; with &amp;quot;public $type =&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;function fetchElement($name, $value, &amp;amp;$node, $control_name)&amp;quot; with &amp;quot;protected function getInput()&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you still need to replace the references to $control_name and others in your new JForm field, but at least the bulk of the work has been done automatically&lt;br /&gt;
&lt;br /&gt;
== renamed core component names and login form parameters ==&lt;br /&gt;
A login module for Joomla 1.5 will not work without modifications on Joomla 1.6. Here is a part of the logout module that will work on both Joomla 1.5 and Joomla 1.6. You can compare the two to see the difference in input names.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        $version = new JVersion;&lt;br /&gt;
        $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
        if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
            //joomla 1.6 format          &lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;user.logout&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_users&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
        } else {    &lt;br /&gt;
            //joomla 1.5 format&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;logout&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_user&amp;quot; /&amp;gt;&#039;;            &lt;br /&gt;
        } &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
here is the code for the login module&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        $version = new JVersion;&lt;br /&gt;
        $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
        if(substr($joomla,0,3) == &#039;1.6&#039;){        &lt;br /&gt;
            //joomla 1.6 format     &lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;user.login&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_users&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input id=&amp;quot;modlgn_passwd&amp;quot; type=&amp;quot;password&amp;quot; name=&amp;quot;password&amp;quot; class=&amp;quot;inputbox&amp;quot; size=&amp;quot;18&amp;quot; alt=&amp;quot;password&amp;quot; /&amp;gt; &#039;;&lt;br /&gt;
        } else {&lt;br /&gt;
            //joomla 1.5 format&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;login&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_user&amp;quot; /&amp;gt;&#039;;     &lt;br /&gt;
            $output .= &#039;&amp;lt;input id=&amp;quot;modlgn_passwd&amp;quot; type=&amp;quot;password&amp;quot; name=&amp;quot;passwd&amp;quot; class=&amp;quot;inputbox&amp;quot; size=&amp;quot;18&amp;quot; alt=&amp;quot;password&amp;quot; /&amp;gt; &#039;;               	&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These changes might also apply to front-end forms of other Joomla core components (more information needed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ACL changes ==&lt;br /&gt;
Joomla 1.6 now has an advanced ACL system. It is unknown how this affects people that have previously used the ACL API in their extension. Please add some information here if you know more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Plugin files now in different locations ==&lt;br /&gt;
Joomla 1.6 now creates a different hierarchy structure for plugins.  Files are no longer placed where they used to be, so if your other parts of your application (comp, mods, etc.) expects them to be in a certain position, it won&#039;t work. The change has been that now plugins are in an additional subdirectory. If you only load your plugins via the 1.5 API you should be fine.&lt;br /&gt;
* Joomla 1.5 example location &lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;JPATH_SITE . DS . &#039;plugins&#039; . DS . &#039;authentication&#039; . DS . &#039;example.php&#039;;&amp;lt;/source&amp;gt;&lt;br /&gt;
* Joomla 1.6 example location&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;JPATH_SITE . DS . &#039;plugins&#039; . DS . &#039;authentication&#039; . DS . &#039;example&#039;. DS . &#039;example.php&#039;;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changes to view parameters ==&lt;br /&gt;
J!1.6 has a strict new way of specifying parameters for views.  J!1.5 allowed a bit of freedom where the parameters could be defined at the view.html.php level but now ithas to be at the tmpl level.  AE believes the view paramters were removed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation process - preflight, postflight, etc ==&lt;br /&gt;
These are new events that can screw up an existing installlation process.  -1 on me for not documenting the process while stepping through xdebug.&lt;br /&gt;
They should be totally optional access points to the installation process.  But if your 1.5 install process is tricky for some reason, then these can be used to do clean up activities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Admin template changes ==&lt;br /&gt;
Admin functions that depended on certain functions, naming conventions etc no longer work.  Khepri has been removed.  Other admin functions/libraries may have changed.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ACL ==&lt;br /&gt;
gid and aid have been removed.  Significant changes to ACL archtecture.  Bricking refers to totally locking your self and everyone else out - Last chance backdoor involves adding a emergency pw to the config file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==sys.ini language translation file==&lt;br /&gt;
This file has 3 purposes:&lt;br /&gt;
&lt;br /&gt;
1. It is used for installation process translations, when a folder language is included in the pack.&lt;br /&gt;
&lt;br /&gt;
pack/language/en-gb/en-gb.extension.ini&lt;br /&gt;
&lt;br /&gt;
pack/language/en-gb/en-gb.extension.sys.ini&lt;br /&gt;
&lt;br /&gt;
In this case, the &amp;lt;description&amp;gt;COM_MYCOMPONENT_XML_DESCRIPTION&amp;lt;/description&amp;gt; used in the sys.ini will display on installing/updating the extension.&lt;br /&gt;
&lt;br /&gt;
When editing the extension in administration, it will be the .ini version of COM_MYCOMPONENT_XML_DESCRIPTION which will display.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. It is used to replace the former .menu.ini&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. It is used to display the translated extension name in many managers.&lt;br /&gt;
&lt;br /&gt;
== removed include folders ==&lt;br /&gt;
Most of the 3rd party libraries (Archive, domit, js, PEAR, etc) in the include folder have been removed in J!1.6. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Use paths defined in defines.php. ==&lt;br /&gt;
(Note they are different for the site and the administration)&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Module Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Plugin Development]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=37102</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=37102"/>
		<updated>2011-02-12T14:17:04Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: /* Accsessing component parameters in frontent */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse, see [[Setting up your workstation for Joomla! development]].&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
[[What&#039;s new in Joomla 1.6#Developers]] describes most changes of Joomla 1.6 and how this affect developers. Please note that the API documentation on the joomla wiki is incomplete/inaccurate. Therefore the best way to look at the Joomla 1.6 API is to look directly at the joomla source code.&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes, add quotes to string values and update your comments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Double quotes are NOT allowed inside the string value&#039;&#039;&#039;, except when using &amp;quot;_QQ_&amp;quot; to represent them. In case of js use, better use html entities or single quotes.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Single quotes are allowed. &lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening double quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
Enabling Debug System in Global configuration will display the parsing errors per file and lines.&lt;br /&gt;
&lt;br /&gt;
If you do not remove the illegal strings, then your language file will load until one of them is reached. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Legacy mode removed ==&lt;br /&gt;
&lt;br /&gt;
== Load language in plugins ==&lt;br /&gt;
On the day of release, the way Language files are loaded for Joomla! 1.6 Plugins was changed. As a result, all Plugins must add the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
 public function __construct(&amp;amp; $subject, $config)&lt;br /&gt;
        {&lt;br /&gt;
&lt;br /&gt;
                parent::__construct($subject, $config);&lt;br /&gt;
&lt;br /&gt;
                $this-&amp;gt;loadLanguage();&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== change in BuildRoute logic ==&lt;br /&gt;
In Joomla! 1.6, the router BuildRoute logic for each Component was changed to require a Menu Item in order to build the link.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        // we need a menu item.  Either the one specified in the query, or the current active one if none specified&lt;br /&gt;
        if (empty($query[&#039;Itemid&#039;])) {&lt;br /&gt;
                $menuItem = $menu-&amp;gt;getActive();&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        else {&lt;br /&gt;
&lt;br /&gt;
                $menuItem = $menu-&amp;gt;getItem($query[&#039;Itemid&#039;]);&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There continue to be problems with the router. It is not uncommon to see a URL that bears the existing page URL as the &amp;quot;base&amp;quot; (if you will), followed by it&#039;s real URL. Look for these situations and report them on the tracker.&lt;br /&gt;
&lt;br /&gt;
For those who have been around long enough, forcing the Menu Item on the URL was done in 1.0.12 and it turned out poorly.&lt;br /&gt;
&lt;br /&gt;
== Moved system image files ==&lt;br /&gt;
&lt;br /&gt;
== Accsessing component parameters in frontent ==&lt;br /&gt;
&lt;br /&gt;
    Accsessing component parameters in frontend for specific menu item, we will use com_content as example :&lt;br /&gt;
&lt;br /&gt;
    in 1.5 this was done with&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;?php&lt;br /&gt;
    $mycom_params =  JComponentHelper::getParams(&#039;com_content&#039;);&lt;br /&gt;
&lt;br /&gt;
    echo $mycom_params-&amp;gt;get(&#039;num_leading_articles&#039;);&lt;br /&gt;
&lt;br /&gt;
    ?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    above code in joomla 1.6will output the DEFAULT com_content params , not affected with menu item&lt;br /&gt;
&lt;br /&gt;
    so the new code for 1.6 would be&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;?php&lt;br /&gt;
    $app = JFactory::getApplication(&#039;site&#039;);&lt;br /&gt;
&lt;br /&gt;
    mycom_params =  &amp;amp; $app-&amp;gt;getParams(&#039;com_content&#039;);&lt;br /&gt;
&lt;br /&gt;
    echo $mycom_params-&amp;gt;get(&#039;num_leading_articles&#039;);&lt;br /&gt;
&lt;br /&gt;
    ?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Plugin parameters ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Changing Javascript function overrides ==&lt;br /&gt;
Joomla now has some of its Javascript functions prefixed with &amp;quot;Joomla&amp;quot;. This means the functions are always unique and won&#039;t clash with other javascript functions on your server/webpage. However, you now need a different method to override the default Joomla Javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
For Joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing removed functions ==&lt;br /&gt;
Some functions were removed for various reasons. You can find a list of them on [[What&#039;s new in Joomla_1.6#Removed_features]].&lt;br /&gt;
&lt;br /&gt;
Note that the ADODB compatibility methods included function like $db-&amp;gt;Execute($query) which now need a separate $db-&amp;gt;setQuery($query);$db-&amp;gt;Query();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Renamed events ==&lt;br /&gt;
&lt;br /&gt;
A large number of the Joomla 1.5 events have been renamed. Here is the list of renamed events.&lt;br /&gt;
*onContentAfterSave&lt;br /&gt;
*onContentAfterTitle&lt;br /&gt;
*onContentAfterDisplay&lt;br /&gt;
*onContentBeforeDisplay&lt;br /&gt;
*onContentBeforeSave&lt;br /&gt;
*onContentSearch&lt;br /&gt;
*onContentSearchAreas&lt;br /&gt;
*onUserAuthenticate&lt;br /&gt;
*onUserAfterDelete&lt;br /&gt;
*onUserAfterSave&lt;br /&gt;
*onUserBeforeDelete&lt;br /&gt;
*onUserBeforeSave&lt;br /&gt;
*onUserLogin&lt;br /&gt;
*onUserLogout&lt;br /&gt;
*All content events (except for search and search areas) now pass a &#039;context&#039; as the first argument to alert the plugin as to what type of content is being passed.  The plugin event may or may not heed this context.&lt;br /&gt;
&lt;br /&gt;
This means that if you use Joomla events you have two options:&amp;lt;br/&amp;gt;&lt;br /&gt;
1) rename the event and your extension can only be used on Joomla 1.6&amp;lt;br/&amp;gt;&lt;br /&gt;
2) create your own &amp;quot;legacy layer&amp;quot; and add the new event function name to your plugin. Here is an example of the user plugin:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    //joomla 1.6 compatibility code &lt;br /&gt;
 	public function onUserLogin($user, $options){&lt;br /&gt;
 	    $result = $this-&amp;gt;onLoginUser($user, $options);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
 	}&lt;br /&gt;
	public function onUserLogout($user)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onLogoutUser($user);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterDelete($user, $succes, $msg)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterDeleteUser($user, $succes, $msg);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserBeforeSave($user, $isnew, $new){&lt;br /&gt;
 	    $result = $this-&amp;gt;onBeforeStoreUser($user, $isnew, $new);&lt;br /&gt;
 	    return $result;	&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterSave($user, $isnew, $success, $msg){&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterStoreUser($user, $isnew, $success, $msg);&lt;br /&gt;
 	    return $result;			&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing name=&amp;quot;adminForm&amp;quot; to id=&amp;quot;adminForm&amp;quot; ==&lt;br /&gt;
To create your own admin forms in joomla you now need to use id=&amp;quot;adminForm&amp;quot;. This is because the use of the tag &amp;quot;name&amp;quot; is not valid HTML strict and has compatibility issues when used in XHTML served as XML.\. Although there is build in compatibility check to look for the old name=&amp;quot;adminForm&amp;quot; tag, it is best to add the new id tag. Depending on the features you want to use you may need to include both, name=&amp;quot;adminForm&amp;quot; and id=&amp;quot;adminForm&amp;quot; because not all core functionality has been updated to use id&#039;s.  An example of the new form code is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;index.php&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot;&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Removing references to index2.php and index3.php ==&lt;br /&gt;
Joomla 1.0 had different index files to serve admin content in different manners. Joomla 1.6 has now got better way to handle this and you need to search your codebase for &amp;quot;index2.php&amp;quot; and &amp;quot;index3.php&amp;quot; to ensure you don&#039;t have any Joomla 1.0 style links. If you need to display your component without any of the other Joomla 1.6 admin content (menus, etc) then add the following to the url: &amp;quot;&amp;amp;tmpl=component&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Upgrading core table and field name usage ==&lt;br /&gt;
Many of the core Joomla tables have been simplified, combined or renamed. This was needed to get rid of some limitation dating back to Joomla 1.0. This means however that if you have code that directly manipulates Joomla tables, that you need to add a function that detects Joomla 1.6 and had different SQL queries based on the joomla version. Plase note that both tables and field names have been renamed or removed. An example is the following function that can find if a plugin is published on both Joomla 1.5 and 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;		&lt;br /&gt;
function getPluginStatus($element, $folder) {&lt;br /&gt;
    //get joomla specs&lt;br /&gt;
    $db = &amp;amp; JFactory::getDBO();		&lt;br /&gt;
    $version = new JVersion;&lt;br /&gt;
    $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
    if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
        //Joomla 1.6 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__extensions WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; . $db-&amp;gt;Quote($folder);&lt;br /&gt;
    } else {&lt;br /&gt;
        //Joomla 1.0/1.5 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__plugins WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; .   $db-&amp;gt;Quote($folder); &lt;br /&gt;
    }&lt;br /&gt;
    $db-&amp;gt;setQuery($query);&lt;br /&gt;
    $result = $db-&amp;gt;loadResult();&lt;br /&gt;
    return $result;&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing in the XML installer manifest file ==&lt;br /&gt;
Joomla 1.6 now uses a more streamlined approach to the XML file inside the ZIP file that installs Joomla extentions.&lt;br /&gt;
&lt;br /&gt;
== New mootools version ==&lt;br /&gt;
Most important is that the Ajax class has been depreciated and replaced by the Request class. That means that if you use ajax calls you need to have a version switcher (below a sample code)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$version = new JVersion;&lt;br /&gt;
$joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
&lt;br /&gt;
..... (your code) ....&lt;br /&gt;
&lt;br /&gt;
    /* our ajax istance for starting the sync */&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
 echo &#039;var ajax = new Request.HTML({&lt;br /&gt;
           url: url,&#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
 echo &#039;var ajax = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
     echo &#039;var ajaxsync = new Request.HTML({&lt;br /&gt;
        url: url, &#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
echo &#039;var ajaxsync = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also another common usuage of mootools in  Joomla is the popup box. The Joomla 1.5 javascript code to close this box is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;document.getElementById(&#039;sbox-window&#039;).close();&amp;lt;/source&amp;gt;&lt;br /&gt;
in Joomla 1.6 you need to use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;window.parent.SqueezeBox.close();&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Converting your JParameters to JForms ==&lt;br /&gt;
Joomla 1.6 now uses the JForms class to handle parameters and it has also changed the way parameters are defined in your XML files. To make menu/component/module/plugin parameters work, first you need to update the XML file. Here is an automated way to handle the bulk of the conversion. (added &amp;quot;&amp;quot; to the examples below so you can see spaces in the search query as well). Use eclipse to search and replace parameters in *.xml files&lt;br /&gt;
&lt;br /&gt;
replace &amp;quot;&amp;lt;param &amp;quot; with &amp;quot;&amp;lt;field &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/param&amp;gt;&amp;quot; with &amp;lt;/field&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params*?&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/params&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/fieldset&amp;gt;&amp;lt;/fields&amp;gt;&amp;lt;/config&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;install &amp;quot; with &amp;quot;&amp;lt;extension &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/install&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/extension&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Change the &amp;quot;extension&amp;quot; node to add the following attributes:&lt;br /&gt;
* Keep the existing &amp;quot;type&amp;quot; attribute&lt;br /&gt;
* version=&amp;quot;1.6.0&amp;quot;&lt;br /&gt;
* client=&amp;quot;site&amp;quot;&lt;br /&gt;
* method=&amp;quot;upgrade&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example for a module:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;module&amp;quot; version=&amp;quot;1.6.0&amp;quot; client=&amp;quot;site&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now if you want to use your joomla extension on both Joomla 1.5 and 1.6 you will need to go to your &amp;quot;team synchronising&amp;quot; view in eclipse. Double click on your changed xml file, which will open the compare editor. Then simply copy-paste back your old Joomla 1.5 params into your new Joomla 1.6 xml file and save.&lt;br /&gt;
&lt;br /&gt;
If you have custom parameter types, you will need to do some additional work. In Joomla 1.5 you would use the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;params addpath=&amp;quot;/administrator/components/com_yourname/elements&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
In joomla 1.6 JParameter classes won&#039;t work and you will need to convert your jparameter fields into JForm fields. Create a new directory and copy your &amp;quot;old elements&amp;quot; into them. Then you need to load these new fields with the individual parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;field name=&amp;quot;sample&amp;quot; type=&amp;quot;sampleField&amp;quot; size=&amp;quot;5&amp;quot; default=&amp;quot;&amp;quot;			label=&amp;quot;sampleField&amp;quot; description=&amp;quot;sampleField&amp;quot; addfieldpath=&amp;quot;/administrator/components/com_yourname/fields&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use eclipse to search and replace files in your newly created fields directory.&lt;br /&gt;
replace &amp;quot;JElement&amp;quot; with &amp;quot;JFormField&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;var $_name =&amp;quot; with &amp;quot;public $type =&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;function fetchElement($name, $value, &amp;amp;$node, $control_name)&amp;quot; with &amp;quot;protected function getInput()&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you still need to replace the references to $control_name and others in your new JForm field, but at least the bulk of the work has been done automatically&lt;br /&gt;
&lt;br /&gt;
== renamed core component names and login form parameters ==&lt;br /&gt;
A login module for Joomla 1.5 will not work without modifications on Joomla 1.6. Here is a part of the logout module that will work on both Joomla 1.5 and Joomla 1.6. You can compare the two to see the difference in input names.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        $version = new JVersion;&lt;br /&gt;
        $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
        if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
            //joomla 1.6 format          &lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;user.logout&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_users&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
        } else {    &lt;br /&gt;
            //joomla 1.5 format&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;logout&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_user&amp;quot; /&amp;gt;&#039;;            &lt;br /&gt;
        } &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
here is the code for the login module&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        $version = new JVersion;&lt;br /&gt;
        $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
        if(substr($joomla,0,3) == &#039;1.6&#039;){        &lt;br /&gt;
            //joomla 1.6 format     &lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;user.login&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_users&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input id=&amp;quot;modlgn_passwd&amp;quot; type=&amp;quot;password&amp;quot; name=&amp;quot;password&amp;quot; class=&amp;quot;inputbox&amp;quot; size=&amp;quot;18&amp;quot; alt=&amp;quot;password&amp;quot; /&amp;gt; &#039;;&lt;br /&gt;
        } else {&lt;br /&gt;
            //joomla 1.5 format&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;login&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_user&amp;quot; /&amp;gt;&#039;;     &lt;br /&gt;
            $output .= &#039;&amp;lt;input id=&amp;quot;modlgn_passwd&amp;quot; type=&amp;quot;password&amp;quot; name=&amp;quot;passwd&amp;quot; class=&amp;quot;inputbox&amp;quot; size=&amp;quot;18&amp;quot; alt=&amp;quot;password&amp;quot; /&amp;gt; &#039;;               	&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These changes might also apply to front-end forms of other Joomla core components (more information needed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ACL changes ==&lt;br /&gt;
Joomla 1.6 now has an advanced ACL system. It is unknown how this affects people that have previously used the ACL API in their extension. Please add some information here if you know more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Plugin files now in different locations ==&lt;br /&gt;
Joomla 1.6 now creates a different hierarchy structure for plugins.  Files are no longer placed where they used to be, so if your other parts of your application (comp, mods, etc.) expects them to be in a certain position, it won&#039;t work. The change has been that now plugins are in an additional subdirectory. If you only load your plugins via the 1.5 API you should be fine.&lt;br /&gt;
* Joomla 1.5 example location &lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;JPATH_SITE . DS . &#039;plugins&#039; . DS . &#039;authentication&#039; . DS . &#039;example.php&#039;;&amp;lt;/source&amp;gt;&lt;br /&gt;
* Joomla 1.6 example location&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;JPATH_SITE . DS . &#039;plugins&#039; . DS . &#039;authentication&#039; . DS . &#039;example&#039;. DS . &#039;example.php&#039;;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changes to view parameters ==&lt;br /&gt;
J!1.6 has a strict new way of specifying parameters for views.  J!1.5 allowed a bit of freedom where the parameters could be defined at the view.html.php level but now ithas to be at the tmpl level.  AE believes the view paramters were removed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation process - preflight, postflight, etc ==&lt;br /&gt;
These are new events that can screw up an existing installlation process.  -1 on me for not documenting the process while stepping through xdebug.&lt;br /&gt;
They should be totally optional access points to the installation process.  But if your 1.5 install process is tricky for some reason, then these can be used to do clean up activities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Admin template changes ==&lt;br /&gt;
Admin functions that depended on certain functions, naming conventions etc no longer work.  Khepri has been removed.  Other admin functions/libraries may have changed.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ACL ==&lt;br /&gt;
gid and aid have been removed.  Significant changes to ACL archtecture.  Bricking refers to totally locking your self and everyone else out - Last chance backdoor involves adding a emergency pw to the config file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==sys.ini language translation file==&lt;br /&gt;
This file has 3 purposes:&lt;br /&gt;
&lt;br /&gt;
1. It is used for installation process translations, when a folder language is included in the pack.&lt;br /&gt;
&lt;br /&gt;
pack/language/en-gb/en-gb.extension.ini&lt;br /&gt;
&lt;br /&gt;
pack/language/en-gb/en-gb.extension.sys.ini&lt;br /&gt;
&lt;br /&gt;
In this case, the &amp;lt;description&amp;gt;COM_MYCOMPONENT_XML_DESCRIPTION&amp;lt;/description&amp;gt; used in the sys.ini will display on installing/updating the extension.&lt;br /&gt;
&lt;br /&gt;
When editing the extension in administration, it will be the .ini version of COM_MYCOMPONENT_XML_DESCRIPTION which will display.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. It is used to replace the former .menu.ini&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. It is used to display the translated extension name in many managers.&lt;br /&gt;
&lt;br /&gt;
== removed include folders ==&lt;br /&gt;
Most of the 3rd party libraries (Archive, domit, js, PEAR, etc) in the include folder have been removed in J!1.6. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Use paths defined in defines.php. ==&lt;br /&gt;
(Note they are different for the site and the administration)&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Module Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Plugin Development]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=37101</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=37101"/>
		<updated>2011-02-12T14:15:28Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: /* Load language in plugins */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse, see [[Setting up your workstation for Joomla! development]].&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
[[What&#039;s new in Joomla 1.6#Developers]] describes most changes of Joomla 1.6 and how this affect developers. Please note that the API documentation on the joomla wiki is incomplete/inaccurate. Therefore the best way to look at the Joomla 1.6 API is to look directly at the joomla source code.&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes, add quotes to string values and update your comments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Double quotes are NOT allowed inside the string value&#039;&#039;&#039;, except when using &amp;quot;_QQ_&amp;quot; to represent them. In case of js use, better use html entities or single quotes.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Single quotes are allowed. &lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening double quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
Enabling Debug System in Global configuration will display the parsing errors per file and lines.&lt;br /&gt;
&lt;br /&gt;
If you do not remove the illegal strings, then your language file will load until one of them is reached. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Legacy mode removed ==&lt;br /&gt;
&lt;br /&gt;
== Load language in plugins ==&lt;br /&gt;
On the day of release, the way Language files are loaded for Joomla! 1.6 Plugins was changed. As a result, all Plugins must add the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
 public function __construct(&amp;amp; $subject, $config)&lt;br /&gt;
        {&lt;br /&gt;
&lt;br /&gt;
                parent::__construct($subject, $config);&lt;br /&gt;
&lt;br /&gt;
                $this-&amp;gt;loadLanguage();&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== change in BuildRoute logic ==&lt;br /&gt;
In Joomla! 1.6, the router BuildRoute logic for each Component was changed to require a Menu Item in order to build the link.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        // we need a menu item.  Either the one specified in the query, or the current active one if none specified&lt;br /&gt;
        if (empty($query[&#039;Itemid&#039;])) {&lt;br /&gt;
                $menuItem = $menu-&amp;gt;getActive();&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        else {&lt;br /&gt;
&lt;br /&gt;
                $menuItem = $menu-&amp;gt;getItem($query[&#039;Itemid&#039;]);&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There continue to be problems with the router. It is not uncommon to see a URL that bears the existing page URL as the &amp;quot;base&amp;quot; (if you will), followed by it&#039;s real URL. Look for these situations and report them on the tracker.&lt;br /&gt;
&lt;br /&gt;
For those who have been around long enough, forcing the Menu Item on the URL was done in 1.0.12 and it turned out poorly.&lt;br /&gt;
&lt;br /&gt;
== Moved system image files ==&lt;br /&gt;
&lt;br /&gt;
== Accsessing component parameters in frontent ==&lt;br /&gt;
&lt;br /&gt;
== Plugin parameters ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Changing Javascript function overrides ==&lt;br /&gt;
Joomla now has some of its Javascript functions prefixed with &amp;quot;Joomla&amp;quot;. This means the functions are always unique and won&#039;t clash with other javascript functions on your server/webpage. However, you now need a different method to override the default Joomla Javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
For Joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing removed functions ==&lt;br /&gt;
Some functions were removed for various reasons. You can find a list of them on [[What&#039;s new in Joomla_1.6#Removed_features]].&lt;br /&gt;
&lt;br /&gt;
Note that the ADODB compatibility methods included function like $db-&amp;gt;Execute($query) which now need a separate $db-&amp;gt;setQuery($query);$db-&amp;gt;Query();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Renamed events ==&lt;br /&gt;
&lt;br /&gt;
A large number of the Joomla 1.5 events have been renamed. Here is the list of renamed events.&lt;br /&gt;
*onContentAfterSave&lt;br /&gt;
*onContentAfterTitle&lt;br /&gt;
*onContentAfterDisplay&lt;br /&gt;
*onContentBeforeDisplay&lt;br /&gt;
*onContentBeforeSave&lt;br /&gt;
*onContentSearch&lt;br /&gt;
*onContentSearchAreas&lt;br /&gt;
*onUserAuthenticate&lt;br /&gt;
*onUserAfterDelete&lt;br /&gt;
*onUserAfterSave&lt;br /&gt;
*onUserBeforeDelete&lt;br /&gt;
*onUserBeforeSave&lt;br /&gt;
*onUserLogin&lt;br /&gt;
*onUserLogout&lt;br /&gt;
*All content events (except for search and search areas) now pass a &#039;context&#039; as the first argument to alert the plugin as to what type of content is being passed.  The plugin event may or may not heed this context.&lt;br /&gt;
&lt;br /&gt;
This means that if you use Joomla events you have two options:&amp;lt;br/&amp;gt;&lt;br /&gt;
1) rename the event and your extension can only be used on Joomla 1.6&amp;lt;br/&amp;gt;&lt;br /&gt;
2) create your own &amp;quot;legacy layer&amp;quot; and add the new event function name to your plugin. Here is an example of the user plugin:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    //joomla 1.6 compatibility code &lt;br /&gt;
 	public function onUserLogin($user, $options){&lt;br /&gt;
 	    $result = $this-&amp;gt;onLoginUser($user, $options);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
 	}&lt;br /&gt;
	public function onUserLogout($user)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onLogoutUser($user);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterDelete($user, $succes, $msg)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterDeleteUser($user, $succes, $msg);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserBeforeSave($user, $isnew, $new){&lt;br /&gt;
 	    $result = $this-&amp;gt;onBeforeStoreUser($user, $isnew, $new);&lt;br /&gt;
 	    return $result;	&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterSave($user, $isnew, $success, $msg){&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterStoreUser($user, $isnew, $success, $msg);&lt;br /&gt;
 	    return $result;			&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing name=&amp;quot;adminForm&amp;quot; to id=&amp;quot;adminForm&amp;quot; ==&lt;br /&gt;
To create your own admin forms in joomla you now need to use id=&amp;quot;adminForm&amp;quot;. This is because the use of the tag &amp;quot;name&amp;quot; is not valid HTML strict and has compatibility issues when used in XHTML served as XML.\. Although there is build in compatibility check to look for the old name=&amp;quot;adminForm&amp;quot; tag, it is best to add the new id tag. Depending on the features you want to use you may need to include both, name=&amp;quot;adminForm&amp;quot; and id=&amp;quot;adminForm&amp;quot; because not all core functionality has been updated to use id&#039;s.  An example of the new form code is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;index.php&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot;&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Removing references to index2.php and index3.php ==&lt;br /&gt;
Joomla 1.0 had different index files to serve admin content in different manners. Joomla 1.6 has now got better way to handle this and you need to search your codebase for &amp;quot;index2.php&amp;quot; and &amp;quot;index3.php&amp;quot; to ensure you don&#039;t have any Joomla 1.0 style links. If you need to display your component without any of the other Joomla 1.6 admin content (menus, etc) then add the following to the url: &amp;quot;&amp;amp;tmpl=component&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Upgrading core table and field name usage ==&lt;br /&gt;
Many of the core Joomla tables have been simplified, combined or renamed. This was needed to get rid of some limitation dating back to Joomla 1.0. This means however that if you have code that directly manipulates Joomla tables, that you need to add a function that detects Joomla 1.6 and had different SQL queries based on the joomla version. Plase note that both tables and field names have been renamed or removed. An example is the following function that can find if a plugin is published on both Joomla 1.5 and 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;		&lt;br /&gt;
function getPluginStatus($element, $folder) {&lt;br /&gt;
    //get joomla specs&lt;br /&gt;
    $db = &amp;amp; JFactory::getDBO();		&lt;br /&gt;
    $version = new JVersion;&lt;br /&gt;
    $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
    if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
        //Joomla 1.6 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__extensions WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; . $db-&amp;gt;Quote($folder);&lt;br /&gt;
    } else {&lt;br /&gt;
        //Joomla 1.0/1.5 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__plugins WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; .   $db-&amp;gt;Quote($folder); &lt;br /&gt;
    }&lt;br /&gt;
    $db-&amp;gt;setQuery($query);&lt;br /&gt;
    $result = $db-&amp;gt;loadResult();&lt;br /&gt;
    return $result;&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing in the XML installer manifest file ==&lt;br /&gt;
Joomla 1.6 now uses a more streamlined approach to the XML file inside the ZIP file that installs Joomla extentions.&lt;br /&gt;
&lt;br /&gt;
== New mootools version ==&lt;br /&gt;
Most important is that the Ajax class has been depreciated and replaced by the Request class. That means that if you use ajax calls you need to have a version switcher (below a sample code)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$version = new JVersion;&lt;br /&gt;
$joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
&lt;br /&gt;
..... (your code) ....&lt;br /&gt;
&lt;br /&gt;
    /* our ajax istance for starting the sync */&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
 echo &#039;var ajax = new Request.HTML({&lt;br /&gt;
           url: url,&#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
 echo &#039;var ajax = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
     echo &#039;var ajaxsync = new Request.HTML({&lt;br /&gt;
        url: url, &#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
echo &#039;var ajaxsync = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also another common usuage of mootools in  Joomla is the popup box. The Joomla 1.5 javascript code to close this box is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;document.getElementById(&#039;sbox-window&#039;).close();&amp;lt;/source&amp;gt;&lt;br /&gt;
in Joomla 1.6 you need to use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;window.parent.SqueezeBox.close();&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Converting your JParameters to JForms ==&lt;br /&gt;
Joomla 1.6 now uses the JForms class to handle parameters and it has also changed the way parameters are defined in your XML files. To make menu/component/module/plugin parameters work, first you need to update the XML file. Here is an automated way to handle the bulk of the conversion. (added &amp;quot;&amp;quot; to the examples below so you can see spaces in the search query as well). Use eclipse to search and replace parameters in *.xml files&lt;br /&gt;
&lt;br /&gt;
replace &amp;quot;&amp;lt;param &amp;quot; with &amp;quot;&amp;lt;field &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/param&amp;gt;&amp;quot; with &amp;lt;/field&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params*?&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/params&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/fieldset&amp;gt;&amp;lt;/fields&amp;gt;&amp;lt;/config&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;install &amp;quot; with &amp;quot;&amp;lt;extension &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/install&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/extension&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Change the &amp;quot;extension&amp;quot; node to add the following attributes:&lt;br /&gt;
* Keep the existing &amp;quot;type&amp;quot; attribute&lt;br /&gt;
* version=&amp;quot;1.6.0&amp;quot;&lt;br /&gt;
* client=&amp;quot;site&amp;quot;&lt;br /&gt;
* method=&amp;quot;upgrade&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example for a module:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;module&amp;quot; version=&amp;quot;1.6.0&amp;quot; client=&amp;quot;site&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now if you want to use your joomla extension on both Joomla 1.5 and 1.6 you will need to go to your &amp;quot;team synchronising&amp;quot; view in eclipse. Double click on your changed xml file, which will open the compare editor. Then simply copy-paste back your old Joomla 1.5 params into your new Joomla 1.6 xml file and save.&lt;br /&gt;
&lt;br /&gt;
If you have custom parameter types, you will need to do some additional work. In Joomla 1.5 you would use the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;params addpath=&amp;quot;/administrator/components/com_yourname/elements&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
In joomla 1.6 JParameter classes won&#039;t work and you will need to convert your jparameter fields into JForm fields. Create a new directory and copy your &amp;quot;old elements&amp;quot; into them. Then you need to load these new fields with the individual parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;field name=&amp;quot;sample&amp;quot; type=&amp;quot;sampleField&amp;quot; size=&amp;quot;5&amp;quot; default=&amp;quot;&amp;quot;			label=&amp;quot;sampleField&amp;quot; description=&amp;quot;sampleField&amp;quot; addfieldpath=&amp;quot;/administrator/components/com_yourname/fields&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use eclipse to search and replace files in your newly created fields directory.&lt;br /&gt;
replace &amp;quot;JElement&amp;quot; with &amp;quot;JFormField&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;var $_name =&amp;quot; with &amp;quot;public $type =&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;function fetchElement($name, $value, &amp;amp;$node, $control_name)&amp;quot; with &amp;quot;protected function getInput()&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you still need to replace the references to $control_name and others in your new JForm field, but at least the bulk of the work has been done automatically&lt;br /&gt;
&lt;br /&gt;
== renamed core component names and login form parameters ==&lt;br /&gt;
A login module for Joomla 1.5 will not work without modifications on Joomla 1.6. Here is a part of the logout module that will work on both Joomla 1.5 and Joomla 1.6. You can compare the two to see the difference in input names.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        $version = new JVersion;&lt;br /&gt;
        $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
        if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
            //joomla 1.6 format          &lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;user.logout&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_users&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
        } else {    &lt;br /&gt;
            //joomla 1.5 format&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;logout&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_user&amp;quot; /&amp;gt;&#039;;            &lt;br /&gt;
        } &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
here is the code for the login module&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        $version = new JVersion;&lt;br /&gt;
        $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
        if(substr($joomla,0,3) == &#039;1.6&#039;){        &lt;br /&gt;
            //joomla 1.6 format     &lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;user.login&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_users&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input id=&amp;quot;modlgn_passwd&amp;quot; type=&amp;quot;password&amp;quot; name=&amp;quot;password&amp;quot; class=&amp;quot;inputbox&amp;quot; size=&amp;quot;18&amp;quot; alt=&amp;quot;password&amp;quot; /&amp;gt; &#039;;&lt;br /&gt;
        } else {&lt;br /&gt;
            //joomla 1.5 format&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;login&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_user&amp;quot; /&amp;gt;&#039;;     &lt;br /&gt;
            $output .= &#039;&amp;lt;input id=&amp;quot;modlgn_passwd&amp;quot; type=&amp;quot;password&amp;quot; name=&amp;quot;passwd&amp;quot; class=&amp;quot;inputbox&amp;quot; size=&amp;quot;18&amp;quot; alt=&amp;quot;password&amp;quot; /&amp;gt; &#039;;               	&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These changes might also apply to front-end forms of other Joomla core components (more information needed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ACL changes ==&lt;br /&gt;
Joomla 1.6 now has an advanced ACL system. It is unknown how this affects people that have previously used the ACL API in their extension. Please add some information here if you know more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Plugin files now in different locations ==&lt;br /&gt;
Joomla 1.6 now creates a different hierarchy structure for plugins.  Files are no longer placed where they used to be, so if your other parts of your application (comp, mods, etc.) expects them to be in a certain position, it won&#039;t work. The change has been that now plugins are in an additional subdirectory. If you only load your plugins via the 1.5 API you should be fine.&lt;br /&gt;
* Joomla 1.5 example location &lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;JPATH_SITE . DS . &#039;plugins&#039; . DS . &#039;authentication&#039; . DS . &#039;example.php&#039;;&amp;lt;/source&amp;gt;&lt;br /&gt;
* Joomla 1.6 example location&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;JPATH_SITE . DS . &#039;plugins&#039; . DS . &#039;authentication&#039; . DS . &#039;example&#039;. DS . &#039;example.php&#039;;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changes to view parameters ==&lt;br /&gt;
J!1.6 has a strict new way of specifying parameters for views.  J!1.5 allowed a bit of freedom where the parameters could be defined at the view.html.php level but now ithas to be at the tmpl level.  AE believes the view paramters were removed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation process - preflight, postflight, etc ==&lt;br /&gt;
These are new events that can screw up an existing installlation process.  -1 on me for not documenting the process while stepping through xdebug.&lt;br /&gt;
They should be totally optional access points to the installation process.  But if your 1.5 install process is tricky for some reason, then these can be used to do clean up activities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Admin template changes ==&lt;br /&gt;
Admin functions that depended on certain functions, naming conventions etc no longer work.  Khepri has been removed.  Other admin functions/libraries may have changed.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ACL ==&lt;br /&gt;
gid and aid have been removed.  Significant changes to ACL archtecture.  Bricking refers to totally locking your self and everyone else out - Last chance backdoor involves adding a emergency pw to the config file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==sys.ini language translation file==&lt;br /&gt;
This file has 3 purposes:&lt;br /&gt;
&lt;br /&gt;
1. It is used for installation process translations, when a folder language is included in the pack.&lt;br /&gt;
&lt;br /&gt;
pack/language/en-gb/en-gb.extension.ini&lt;br /&gt;
&lt;br /&gt;
pack/language/en-gb/en-gb.extension.sys.ini&lt;br /&gt;
&lt;br /&gt;
In this case, the &amp;lt;description&amp;gt;COM_MYCOMPONENT_XML_DESCRIPTION&amp;lt;/description&amp;gt; used in the sys.ini will display on installing/updating the extension.&lt;br /&gt;
&lt;br /&gt;
When editing the extension in administration, it will be the .ini version of COM_MYCOMPONENT_XML_DESCRIPTION which will display.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. It is used to replace the former .menu.ini&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. It is used to display the translated extension name in many managers.&lt;br /&gt;
&lt;br /&gt;
== removed include folders ==&lt;br /&gt;
Most of the 3rd party libraries (Archive, domit, js, PEAR, etc) in the include folder have been removed in J!1.6. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Use paths defined in defines.php. ==&lt;br /&gt;
(Note they are different for the site and the administration)&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Module Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Plugin Development]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=37100</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=37100"/>
		<updated>2011-02-12T14:11:36Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: added some new categories&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse, see [[Setting up your workstation for Joomla! development]].&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
[[What&#039;s new in Joomla 1.6#Developers]] describes most changes of Joomla 1.6 and how this affect developers. Please note that the API documentation on the joomla wiki is incomplete/inaccurate. Therefore the best way to look at the Joomla 1.6 API is to look directly at the joomla source code.&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes, add quotes to string values and update your comments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Double quotes are NOT allowed inside the string value&#039;&#039;&#039;, except when using &amp;quot;_QQ_&amp;quot; to represent them. In case of js use, better use html entities or single quotes.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Single quotes are allowed. &lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening double quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
Enabling Debug System in Global configuration will display the parsing errors per file and lines.&lt;br /&gt;
&lt;br /&gt;
If you do not remove the illegal strings, then your language file will load until one of them is reached. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Legacy mode removed ==&lt;br /&gt;
&lt;br /&gt;
== Load language in plugins ==&lt;br /&gt;
&lt;br /&gt;
== Moved system image files ==&lt;br /&gt;
&lt;br /&gt;
== Accsessing component parameters in frontent ==&lt;br /&gt;
&lt;br /&gt;
== Plugin parameters ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Changing Javascript function overrides ==&lt;br /&gt;
Joomla now has some of its Javascript functions prefixed with &amp;quot;Joomla&amp;quot;. This means the functions are always unique and won&#039;t clash with other javascript functions on your server/webpage. However, you now need a different method to override the default Joomla Javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
For Joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing removed functions ==&lt;br /&gt;
Some functions were removed for various reasons. You can find a list of them on [[What&#039;s new in Joomla_1.6#Removed_features]].&lt;br /&gt;
&lt;br /&gt;
Note that the ADODB compatibility methods included function like $db-&amp;gt;Execute($query) which now need a separate $db-&amp;gt;setQuery($query);$db-&amp;gt;Query();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Renamed events ==&lt;br /&gt;
&lt;br /&gt;
A large number of the Joomla 1.5 events have been renamed. Here is the list of renamed events.&lt;br /&gt;
*onContentAfterSave&lt;br /&gt;
*onContentAfterTitle&lt;br /&gt;
*onContentAfterDisplay&lt;br /&gt;
*onContentBeforeDisplay&lt;br /&gt;
*onContentBeforeSave&lt;br /&gt;
*onContentSearch&lt;br /&gt;
*onContentSearchAreas&lt;br /&gt;
*onUserAuthenticate&lt;br /&gt;
*onUserAfterDelete&lt;br /&gt;
*onUserAfterSave&lt;br /&gt;
*onUserBeforeDelete&lt;br /&gt;
*onUserBeforeSave&lt;br /&gt;
*onUserLogin&lt;br /&gt;
*onUserLogout&lt;br /&gt;
*All content events (except for search and search areas) now pass a &#039;context&#039; as the first argument to alert the plugin as to what type of content is being passed.  The plugin event may or may not heed this context.&lt;br /&gt;
&lt;br /&gt;
This means that if you use Joomla events you have two options:&amp;lt;br/&amp;gt;&lt;br /&gt;
1) rename the event and your extension can only be used on Joomla 1.6&amp;lt;br/&amp;gt;&lt;br /&gt;
2) create your own &amp;quot;legacy layer&amp;quot; and add the new event function name to your plugin. Here is an example of the user plugin:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    //joomla 1.6 compatibility code &lt;br /&gt;
 	public function onUserLogin($user, $options){&lt;br /&gt;
 	    $result = $this-&amp;gt;onLoginUser($user, $options);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
 	}&lt;br /&gt;
	public function onUserLogout($user)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onLogoutUser($user);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterDelete($user, $succes, $msg)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterDeleteUser($user, $succes, $msg);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserBeforeSave($user, $isnew, $new){&lt;br /&gt;
 	    $result = $this-&amp;gt;onBeforeStoreUser($user, $isnew, $new);&lt;br /&gt;
 	    return $result;	&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterSave($user, $isnew, $success, $msg){&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterStoreUser($user, $isnew, $success, $msg);&lt;br /&gt;
 	    return $result;			&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing name=&amp;quot;adminForm&amp;quot; to id=&amp;quot;adminForm&amp;quot; ==&lt;br /&gt;
To create your own admin forms in joomla you now need to use id=&amp;quot;adminForm&amp;quot;. This is because the use of the tag &amp;quot;name&amp;quot; is not valid HTML strict and has compatibility issues when used in XHTML served as XML.\. Although there is build in compatibility check to look for the old name=&amp;quot;adminForm&amp;quot; tag, it is best to add the new id tag. Depending on the features you want to use you may need to include both, name=&amp;quot;adminForm&amp;quot; and id=&amp;quot;adminForm&amp;quot; because not all core functionality has been updated to use id&#039;s.  An example of the new form code is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;index.php&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot;&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Removing references to index2.php and index3.php ==&lt;br /&gt;
Joomla 1.0 had different index files to serve admin content in different manners. Joomla 1.6 has now got better way to handle this and you need to search your codebase for &amp;quot;index2.php&amp;quot; and &amp;quot;index3.php&amp;quot; to ensure you don&#039;t have any Joomla 1.0 style links. If you need to display your component without any of the other Joomla 1.6 admin content (menus, etc) then add the following to the url: &amp;quot;&amp;amp;tmpl=component&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Upgrading core table and field name usage ==&lt;br /&gt;
Many of the core Joomla tables have been simplified, combined or renamed. This was needed to get rid of some limitation dating back to Joomla 1.0. This means however that if you have code that directly manipulates Joomla tables, that you need to add a function that detects Joomla 1.6 and had different SQL queries based on the joomla version. Plase note that both tables and field names have been renamed or removed. An example is the following function that can find if a plugin is published on both Joomla 1.5 and 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;		&lt;br /&gt;
function getPluginStatus($element, $folder) {&lt;br /&gt;
    //get joomla specs&lt;br /&gt;
    $db = &amp;amp; JFactory::getDBO();		&lt;br /&gt;
    $version = new JVersion;&lt;br /&gt;
    $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
    if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
        //Joomla 1.6 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__extensions WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; . $db-&amp;gt;Quote($folder);&lt;br /&gt;
    } else {&lt;br /&gt;
        //Joomla 1.0/1.5 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__plugins WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; .   $db-&amp;gt;Quote($folder); &lt;br /&gt;
    }&lt;br /&gt;
    $db-&amp;gt;setQuery($query);&lt;br /&gt;
    $result = $db-&amp;gt;loadResult();&lt;br /&gt;
    return $result;&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing in the XML installer manifest file ==&lt;br /&gt;
Joomla 1.6 now uses a more streamlined approach to the XML file inside the ZIP file that installs Joomla extentions.&lt;br /&gt;
&lt;br /&gt;
== New mootools version ==&lt;br /&gt;
Most important is that the Ajax class has been depreciated and replaced by the Request class. That means that if you use ajax calls you need to have a version switcher (below a sample code)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$version = new JVersion;&lt;br /&gt;
$joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
&lt;br /&gt;
..... (your code) ....&lt;br /&gt;
&lt;br /&gt;
    /* our ajax istance for starting the sync */&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
 echo &#039;var ajax = new Request.HTML({&lt;br /&gt;
           url: url,&#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
 echo &#039;var ajax = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
     echo &#039;var ajaxsync = new Request.HTML({&lt;br /&gt;
        url: url, &#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
echo &#039;var ajaxsync = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also another common usuage of mootools in  Joomla is the popup box. The Joomla 1.5 javascript code to close this box is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;document.getElementById(&#039;sbox-window&#039;).close();&amp;lt;/source&amp;gt;&lt;br /&gt;
in Joomla 1.6 you need to use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;window.parent.SqueezeBox.close();&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Converting your JParameters to JForms ==&lt;br /&gt;
Joomla 1.6 now uses the JForms class to handle parameters and it has also changed the way parameters are defined in your XML files. To make menu/component/module/plugin parameters work, first you need to update the XML file. Here is an automated way to handle the bulk of the conversion. (added &amp;quot;&amp;quot; to the examples below so you can see spaces in the search query as well). Use eclipse to search and replace parameters in *.xml files&lt;br /&gt;
&lt;br /&gt;
replace &amp;quot;&amp;lt;param &amp;quot; with &amp;quot;&amp;lt;field &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/param&amp;gt;&amp;quot; with &amp;lt;/field&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params*?&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/params&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/fieldset&amp;gt;&amp;lt;/fields&amp;gt;&amp;lt;/config&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;install &amp;quot; with &amp;quot;&amp;lt;extension &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/install&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/extension&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Change the &amp;quot;extension&amp;quot; node to add the following attributes:&lt;br /&gt;
* Keep the existing &amp;quot;type&amp;quot; attribute&lt;br /&gt;
* version=&amp;quot;1.6.0&amp;quot;&lt;br /&gt;
* client=&amp;quot;site&amp;quot;&lt;br /&gt;
* method=&amp;quot;upgrade&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example for a module:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;module&amp;quot; version=&amp;quot;1.6.0&amp;quot; client=&amp;quot;site&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now if you want to use your joomla extension on both Joomla 1.5 and 1.6 you will need to go to your &amp;quot;team synchronising&amp;quot; view in eclipse. Double click on your changed xml file, which will open the compare editor. Then simply copy-paste back your old Joomla 1.5 params into your new Joomla 1.6 xml file and save.&lt;br /&gt;
&lt;br /&gt;
If you have custom parameter types, you will need to do some additional work. In Joomla 1.5 you would use the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;params addpath=&amp;quot;/administrator/components/com_yourname/elements&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
In joomla 1.6 JParameter classes won&#039;t work and you will need to convert your jparameter fields into JForm fields. Create a new directory and copy your &amp;quot;old elements&amp;quot; into them. Then you need to load these new fields with the individual parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;field name=&amp;quot;sample&amp;quot; type=&amp;quot;sampleField&amp;quot; size=&amp;quot;5&amp;quot; default=&amp;quot;&amp;quot;			label=&amp;quot;sampleField&amp;quot; description=&amp;quot;sampleField&amp;quot; addfieldpath=&amp;quot;/administrator/components/com_yourname/fields&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use eclipse to search and replace files in your newly created fields directory.&lt;br /&gt;
replace &amp;quot;JElement&amp;quot; with &amp;quot;JFormField&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;var $_name =&amp;quot; with &amp;quot;public $type =&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;function fetchElement($name, $value, &amp;amp;$node, $control_name)&amp;quot; with &amp;quot;protected function getInput()&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you still need to replace the references to $control_name and others in your new JForm field, but at least the bulk of the work has been done automatically&lt;br /&gt;
&lt;br /&gt;
== renamed core component names and login form parameters ==&lt;br /&gt;
A login module for Joomla 1.5 will not work without modifications on Joomla 1.6. Here is a part of the logout module that will work on both Joomla 1.5 and Joomla 1.6. You can compare the two to see the difference in input names.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        $version = new JVersion;&lt;br /&gt;
        $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
        if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
            //joomla 1.6 format          &lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;user.logout&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_users&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
        } else {    &lt;br /&gt;
            //joomla 1.5 format&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;logout&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_user&amp;quot; /&amp;gt;&#039;;            &lt;br /&gt;
        } &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
here is the code for the login module&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        $version = new JVersion;&lt;br /&gt;
        $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
        if(substr($joomla,0,3) == &#039;1.6&#039;){        &lt;br /&gt;
            //joomla 1.6 format     &lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;user.login&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_users&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input id=&amp;quot;modlgn_passwd&amp;quot; type=&amp;quot;password&amp;quot; name=&amp;quot;password&amp;quot; class=&amp;quot;inputbox&amp;quot; size=&amp;quot;18&amp;quot; alt=&amp;quot;password&amp;quot; /&amp;gt; &#039;;&lt;br /&gt;
        } else {&lt;br /&gt;
            //joomla 1.5 format&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;login&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_user&amp;quot; /&amp;gt;&#039;;     &lt;br /&gt;
            $output .= &#039;&amp;lt;input id=&amp;quot;modlgn_passwd&amp;quot; type=&amp;quot;password&amp;quot; name=&amp;quot;passwd&amp;quot; class=&amp;quot;inputbox&amp;quot; size=&amp;quot;18&amp;quot; alt=&amp;quot;password&amp;quot; /&amp;gt; &#039;;               	&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These changes might also apply to front-end forms of other Joomla core components (more information needed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ACL changes ==&lt;br /&gt;
Joomla 1.6 now has an advanced ACL system. It is unknown how this affects people that have previously used the ACL API in their extension. Please add some information here if you know more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Plugin files now in different locations ==&lt;br /&gt;
Joomla 1.6 now creates a different hierarchy structure for plugins.  Files are no longer placed where they used to be, so if your other parts of your application (comp, mods, etc.) expects them to be in a certain position, it won&#039;t work. The change has been that now plugins are in an additional subdirectory. If you only load your plugins via the 1.5 API you should be fine.&lt;br /&gt;
* Joomla 1.5 example location &lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;JPATH_SITE . DS . &#039;plugins&#039; . DS . &#039;authentication&#039; . DS . &#039;example.php&#039;;&amp;lt;/source&amp;gt;&lt;br /&gt;
* Joomla 1.6 example location&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;JPATH_SITE . DS . &#039;plugins&#039; . DS . &#039;authentication&#039; . DS . &#039;example&#039;. DS . &#039;example.php&#039;;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changes to view parameters ==&lt;br /&gt;
J!1.6 has a strict new way of specifying parameters for views.  J!1.5 allowed a bit of freedom where the parameters could be defined at the view.html.php level but now ithas to be at the tmpl level.  AE believes the view paramters were removed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation process - preflight, postflight, etc ==&lt;br /&gt;
These are new events that can screw up an existing installlation process.  -1 on me for not documenting the process while stepping through xdebug.&lt;br /&gt;
They should be totally optional access points to the installation process.  But if your 1.5 install process is tricky for some reason, then these can be used to do clean up activities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Admin template changes ==&lt;br /&gt;
Admin functions that depended on certain functions, naming conventions etc no longer work.  Khepri has been removed.  Other admin functions/libraries may have changed.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ACL ==&lt;br /&gt;
gid and aid have been removed.  Significant changes to ACL archtecture.  Bricking refers to totally locking your self and everyone else out - Last chance backdoor involves adding a emergency pw to the config file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==sys.ini language translation file==&lt;br /&gt;
This file has 3 purposes:&lt;br /&gt;
&lt;br /&gt;
1. It is used for installation process translations, when a folder language is included in the pack.&lt;br /&gt;
&lt;br /&gt;
pack/language/en-gb/en-gb.extension.ini&lt;br /&gt;
&lt;br /&gt;
pack/language/en-gb/en-gb.extension.sys.ini&lt;br /&gt;
&lt;br /&gt;
In this case, the &amp;lt;description&amp;gt;COM_MYCOMPONENT_XML_DESCRIPTION&amp;lt;/description&amp;gt; used in the sys.ini will display on installing/updating the extension.&lt;br /&gt;
&lt;br /&gt;
When editing the extension in administration, it will be the .ini version of COM_MYCOMPONENT_XML_DESCRIPTION which will display.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. It is used to replace the former .menu.ini&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. It is used to display the translated extension name in many managers.&lt;br /&gt;
&lt;br /&gt;
== removed include folders ==&lt;br /&gt;
Most of the 3rd party libraries (Archive, domit, js, PEAR, etc) in the include folder have been removed in J!1.6. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Use paths defined in defines.php. ==&lt;br /&gt;
(Note they are different for the site and the administration)&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Module Development]]&lt;br /&gt;
[[Category:Component Development]]&lt;br /&gt;
[[Category:Plugin Development]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=36059</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=36059"/>
		<updated>2011-01-25T13:34:45Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: changed the separate list on the bottom into wiki markup&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse, see [[Setting up your workstation for Joomla! development]].&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
[[What&#039;s new in Joomla 1.6#Developers]] describes most changes of Joomla 1.6 and how this affect developers.&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes, add quotes to string values and update your comments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;An earlier version of this document noted that &#039;&#039;&#039;double&#039;&#039;&#039; quotes were not allowed, but see [http://php.net/manual/en/function.parse-ini-file.php the PHP parse_ini_file documentation] and below for further information.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Single quotes are now not allowed. This can be easily bypassed by searching &#039; and replace with &amp;quot;. &lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
If you do not remove these illegal strings, then your language file won&#039;t load and you won&#039;t get any error message. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are now handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing Javascript function overrides ==&lt;br /&gt;
Joomla now has some of its Javascript functions prefixed with &amp;quot;Joomla&amp;quot;. This means the functions are always unique and won&#039;t clash with other javascript functions on your server/webpage. However, you now need a different method to override the default Joomla Javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
For Joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing removed functions ==&lt;br /&gt;
Some functions were removed for various reasons. You can find a list of them on [[What&#039;s new in Joomla_1.6#Removed_features]].&lt;br /&gt;
&lt;br /&gt;
Note that the ADODB compatibility methods included function like $db-&amp;gt;Execute($query) which now need a separate $db-&amp;gt;setQuery($query);$db-&amp;gt;Query();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Renamed events ==&lt;br /&gt;
&lt;br /&gt;
A large number of the Joomla 1.5 events have been renamed. Here is the list of renamed events.&lt;br /&gt;
*onContentAfterSave&lt;br /&gt;
*onContentAfterTitle&lt;br /&gt;
*onContentAfterDisplay&lt;br /&gt;
*onContentBeforeDisplay&lt;br /&gt;
*onContentBeforeSave&lt;br /&gt;
*onContentSearch&lt;br /&gt;
*onContentSearchAreas&lt;br /&gt;
*onUserAuthenticate&lt;br /&gt;
*onUserAfterDelete&lt;br /&gt;
*onUserAfterSave&lt;br /&gt;
*onUserBeforeDelete&lt;br /&gt;
*onUserBeforeSave&lt;br /&gt;
*onUserLogin&lt;br /&gt;
*onUserLogout&lt;br /&gt;
*All content events (except for search and search areas) now pass a &#039;context&#039; as the first argument to alert the plugin as to what type of content is being passed.  The plugin event may or may not heed this context.&lt;br /&gt;
&lt;br /&gt;
This means that if you use Joomla events you have two options:&amp;lt;br/&amp;gt;&lt;br /&gt;
1) rename the event and your extension can only be used on Joomla 1.6&amp;lt;br/&amp;gt;&lt;br /&gt;
2) create your own &amp;quot;legacy layer&amp;quot; and add the new event function name to your plugin. Here is an example of the user plugin:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    //joomla 1.6 compatibility code &lt;br /&gt;
 	public function onUserLogin($user, $options){&lt;br /&gt;
 	    $result = $this-&amp;gt;onLoginUser($user, $options);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
 	}&lt;br /&gt;
	public function onUserLogout($user)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onLogoutUser($user);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterDelete($user, $succes, $msg)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterDeleteUser($user, $succes, $msg);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserBeforeSave($user, $isnew, $new){&lt;br /&gt;
 	    $result = $this-&amp;gt;onBeforeStoreUser($user, $isnew, $new);&lt;br /&gt;
 	    return $result;	&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterSave($user, $isnew, $success, $msg){&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterStoreUser($user, $isnew, $success, $msg);&lt;br /&gt;
 	    return $result;			&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing name=&amp;quot;adminForm&amp;quot; to id=&amp;quot;adminForm&amp;quot; ==&lt;br /&gt;
To create your own admin forms in joomla you now need to use id=&amp;quot;adminForm&amp;quot;. This is because the use of the tag &amp;quot;name&amp;quot; is not valid HTML strict and has compatibility issues when used in XHTML served as XML.\. Although there is build in compatibility check to look for the old name=&amp;quot;adminForm&amp;quot; tag, it is best to add the new id tag. Depending on the features you want to use you may need to include both, name=&amp;quot;adminForm&amp;quot; and id=&amp;quot;adminForm&amp;quot; because not all core functionality has been updated to use id&#039;s.  An example of the new form code is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;index.php&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot;&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Removing references to index2.php and index3.php ==&lt;br /&gt;
Joomla 1.0 had different index files to serve admin content in different manners. Joomla 1.6 has now got better way to handle this and you need to search your codebase for &amp;quot;index2.php&amp;quot; and &amp;quot;index3.php&amp;quot; to ensure you don&#039;t have any Joomla 1.0 style links. If you need to display your component without any of the other Joomla 1.6 admin content (menus, etc) then add the following to the url: &amp;quot;&amp;amp;tmpl=component&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Upgrading core table and field name usage ==&lt;br /&gt;
Many of the core Joomla tables have been simplified, combined or renamed. This was needed to get rid of some limitation dating back to Joomla 1.0. This means however that if you have code that directly manipulates Joomla tables, that you need to add a function that detects Joomla 1.6 and had different SQL queries based on the joomla version. Plase note that both tables and field names have been renamed or removed. An example is the following function that can find if a plugin is published on both Joomla 1.5 and 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;		&lt;br /&gt;
function getPluginStatus($element, $folder) {&lt;br /&gt;
    //get joomla specs&lt;br /&gt;
    $db = &amp;amp; JFactory::getDBO();		&lt;br /&gt;
    $version = new JVersion;&lt;br /&gt;
    $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
    if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
        //Joomla 1.6 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__extensions WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; . $db-&amp;gt;Quote($folder);&lt;br /&gt;
    } else {&lt;br /&gt;
        //Joomla 1.0/1.5 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__plugins WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; .   $db-&amp;gt;Quote($folder); &lt;br /&gt;
    }&lt;br /&gt;
    $db-&amp;gt;setQuery($query);&lt;br /&gt;
    $result = $db-&amp;gt;loadResult();&lt;br /&gt;
    return $result;&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing in the XML installer manifest file ==&lt;br /&gt;
Joomla 1.6 now uses a more streamlined approach to the XML file inside the ZIP file that installs Joomla extentions.&lt;br /&gt;
&lt;br /&gt;
== New mootools version ==&lt;br /&gt;
Most important is that the Ajax class has been depreciated and replaced by the Request class. That means that if you use ajax calls you need to have a version switcher (below a sample code)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$version = new JVersion;&lt;br /&gt;
$joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
&lt;br /&gt;
..... (your code) ....&lt;br /&gt;
&lt;br /&gt;
    /* our ajax istance for starting the sync */&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
 echo &#039;var ajax = new Request.HTML({&lt;br /&gt;
           url: url,&#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
 echo &#039;var ajax = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
     echo &#039;var ajaxsync = new Request.HTML({&lt;br /&gt;
        url: url, &#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
echo &#039;var ajaxsync = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also another common usuage of mootools in  Joomla is the popup box. The Joomla 1.5 javascript code to close this box is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;document.getElementById(&#039;sbox-window&#039;).close();&amp;lt;/source&amp;gt;&lt;br /&gt;
in Joomla 1.6 you need to use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;window.parent.SqueezeBox.close();&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Converting your JParameters to JForms ==&lt;br /&gt;
Joomla 1.6 now uses the JForms class to handle parameters and it has also changed the way parameters are defined in your XML files. To make menu/component/module/plugin parameters work, first you need to update the XML file. Here is an automated way to handle the bulk of the conversion. (added &amp;quot;&amp;quot; to the examples below so you can see spaces in the search query as well). Use eclipse to search and replace parameters in *.xml files&lt;br /&gt;
&lt;br /&gt;
replace &amp;quot;&amp;lt;param &amp;quot; with &amp;quot;&amp;lt;field &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/param&amp;gt;&amp;quot; with &amp;lt;/field&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params*?&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/params&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/fieldset&amp;gt;&amp;lt;/fields&amp;gt;&amp;lt;/config&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;install &amp;quot; with &amp;quot;&amp;lt;extension &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/install&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/extension&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Change the &amp;quot;extension&amp;quot; node to add the following attributes:&lt;br /&gt;
* Keep the existing &amp;quot;type&amp;quot; attribute&lt;br /&gt;
* version=&amp;quot;1.6.0&amp;quot;&lt;br /&gt;
* client=&amp;quot;site&amp;quot;&lt;br /&gt;
* method=&amp;quot;upgrade&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example for a module:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;module&amp;quot; version=&amp;quot;1.6.0&amp;quot; client=&amp;quot;site&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now if you want to use your joomla extension on both Joomla 1.5 and 1.6 you will need to go to your &amp;quot;team synchronising&amp;quot; view in eclipse. Double click on your changed xml file, which will open the compare editor. Then simply copy-paste back your old Joomla 1.5 params into your new Joomla 1.6 xml file and save.&lt;br /&gt;
&lt;br /&gt;
If you have custom parameter types, you will need to do some additional work. In Joomla 1.5 you would use the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;params addpath=&amp;quot;/administrator/components/com_yourname/elements&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
In joomla 1.6 JParameter classes won&#039;t work and you will need to convert your jparameter fields into JForm fields. Create a new directory and copy your &amp;quot;old elements&amp;quot; into them. Then you need to load these new fields with the individual parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;field name=&amp;quot;sample&amp;quot; type=&amp;quot;sampleField&amp;quot; size=&amp;quot;5&amp;quot; default=&amp;quot;&amp;quot;			label=&amp;quot;sampleField&amp;quot; description=&amp;quot;sampleField&amp;quot; addfieldpath=&amp;quot;/administrator/components/com_yourname/fields&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use eclipse to search and replace files in your newly created fields directory.&lt;br /&gt;
replace &amp;quot;JElement&amp;quot; with &amp;quot;JFormField&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;var $_name =&amp;quot; with &amp;quot;public $type =&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;function fetchElement($name, $value, &amp;amp;$node, $control_name)&amp;quot; with &amp;quot;protected function getInput()&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you still need to replace the references to $control_name and others in your new JForm field, but at least the bulk of the work has been done automatically&lt;br /&gt;
&lt;br /&gt;
== renamed core component names and login form parameters ==&lt;br /&gt;
A login module for Joomla 1.5 will not work without modifications on Joomla 1.6. Here is a part of the logout module that will work on both Joomla 1.5 and Joomla 1.6. You can compare the two to see the difference in input names.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        $version = new JVersion;&lt;br /&gt;
        $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
        if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
            //joomla 1.6 format          &lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;user.logout&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_users&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
        } else {    &lt;br /&gt;
            //joomla 1.5 format&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;logout&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_user&amp;quot; /&amp;gt;&#039;;            &lt;br /&gt;
        } &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
here is the code for the login module&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        $version = new JVersion;&lt;br /&gt;
        $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
        if(substr($joomla,0,3) == &#039;1.6&#039;){        &lt;br /&gt;
            //joomla 1.6 format     &lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;user.login&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_users&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input id=&amp;quot;modlgn_passwd&amp;quot; type=&amp;quot;password&amp;quot; name=&amp;quot;password&amp;quot; class=&amp;quot;inputbox&amp;quot; size=&amp;quot;18&amp;quot; alt=&amp;quot;password&amp;quot; /&amp;gt; &#039;;&lt;br /&gt;
        } else {&lt;br /&gt;
            //joomla 1.5 format&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;login&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_user&amp;quot; /&amp;gt;&#039;;     &lt;br /&gt;
            $output .= &#039;&amp;lt;input id=&amp;quot;modlgn_passwd&amp;quot; type=&amp;quot;password&amp;quot; name=&amp;quot;passwd&amp;quot; class=&amp;quot;inputbox&amp;quot; size=&amp;quot;18&amp;quot; alt=&amp;quot;password&amp;quot; /&amp;gt; &#039;;               	&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These changes might also apply to front-end forms of other Joomla core components (more information needed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ACL changes ==&lt;br /&gt;
Joomla 1.6 now has an advanced ACL system. It is unknown how this affects people that have previously used the ACL API in their extension. Please add some information here if you know more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Plugin files now in different locations ==&lt;br /&gt;
Joomla 1.6 now creates a different hierarchy structure for plugins.  Files are no longer placed where they used to be, so if your other parts of your application (comp, mods, etc.) expects them to be in a certain position, it won&#039;t work. The change has been that now plugins are in an additional subdirectory. If you only load your plugins via the 1.5 API you should be fine.&lt;br /&gt;
* Joomla 1.5 example location &lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;JPATH_SITE . DS . &#039;plugins&#039; . DS . &#039;authentication&#039; . DS . &#039;example&#039;. DS . &#039;example.php&#039;;&amp;lt;/source&amp;gt;&lt;br /&gt;
* Joomla 1.6 example location&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;JPATH_SITE . DS . &#039;plugins&#039; . DS . &#039;authentication&#039; . DS . &#039;example.php&#039;;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Changes to view parameters ==&lt;br /&gt;
J!1.6 has a strict new way of specifying parameters for views.  J!1.5 allowed a bit of freedom where the parameters could be defined at the view.html.php level but now ithas to be at the tmpl level.  AE believes the view paramters were removed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation process - preflight, postflight, etc ==&lt;br /&gt;
These are new events that can screw up an existing installlation process.  -1 on me for not documenting the process while stepping through xdebug.&lt;br /&gt;
They should be totally optional access points to the installation process.  But if your 1.5 install process is tricky for some reason, then these can be used to do clean up activities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Admin template changes ==&lt;br /&gt;
Admin functions that depended on certain functions, naming conventions etc no longer work.  Khepri has been removed.  Other admin functions/libraries may have changed.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ACL ==&lt;br /&gt;
gid and aid have been removed.  Significant changes to ACL archtecture.  Bricking refers to totally locking your self and everyone else out - Last chance backdoor involves adding a emergency pw to the config file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==sys.ini language translation file==&lt;br /&gt;
This file is used for installation process translations...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== removed include folders ==&lt;br /&gt;
Most of the 3rd party libraries (Archive, domit, js, PEAR, etc) in the include folder have been removed in J!1.6. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Use paths defined in defines.php. ==&lt;br /&gt;
(Note they are different for the site and the administration)&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=36058</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=36058"/>
		<updated>2011-01-25T13:29:14Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: added plugin location information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse, see [[Setting up your workstation for Joomla! development]].&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
[[What&#039;s new in Joomla 1.6#Developers]] describes most changes of Joomla 1.6 and how this affect developers.&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes, add quotes to string values and update your comments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;An earlier version of this document noted that &#039;&#039;&#039;double&#039;&#039;&#039; quotes were not allowed, but see [http://php.net/manual/en/function.parse-ini-file.php the PHP parse_ini_file documentation] and below for further information.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Single quotes are now not allowed. This can be easily bypassed by searching &#039; and replace with &amp;quot;. &lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
If you do not remove these illegal strings, then your language file won&#039;t load and you won&#039;t get any error message. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are now handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing Javascript function overrides ==&lt;br /&gt;
Joomla now has some of its Javascript functions prefixed with &amp;quot;Joomla&amp;quot;. This means the functions are always unique and won&#039;t clash with other javascript functions on your server/webpage. However, you now need a different method to override the default Joomla Javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
For Joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing removed functions ==&lt;br /&gt;
Some functions were removed for various reasons. You can find a list of them on [[What&#039;s new in Joomla_1.6#Removed_features]].&lt;br /&gt;
&lt;br /&gt;
Note that the ADODB compatibility methods included function like $db-&amp;gt;Execute($query) which now need a separate $db-&amp;gt;setQuery($query);$db-&amp;gt;Query();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Renamed events ==&lt;br /&gt;
&lt;br /&gt;
A large number of the Joomla 1.5 events have been renamed. Here is the list of renamed events.&lt;br /&gt;
*onContentAfterSave&lt;br /&gt;
*onContentAfterTitle&lt;br /&gt;
*onContentAfterDisplay&lt;br /&gt;
*onContentBeforeDisplay&lt;br /&gt;
*onContentBeforeSave&lt;br /&gt;
*onContentSearch&lt;br /&gt;
*onContentSearchAreas&lt;br /&gt;
*onUserAuthenticate&lt;br /&gt;
*onUserAfterDelete&lt;br /&gt;
*onUserAfterSave&lt;br /&gt;
*onUserBeforeDelete&lt;br /&gt;
*onUserBeforeSave&lt;br /&gt;
*onUserLogin&lt;br /&gt;
*onUserLogout&lt;br /&gt;
*All content events (except for search and search areas) now pass a &#039;context&#039; as the first argument to alert the plugin as to what type of content is being passed.  The plugin event may or may not heed this context.&lt;br /&gt;
&lt;br /&gt;
This means that if you use Joomla events you have two options:&amp;lt;br/&amp;gt;&lt;br /&gt;
1) rename the event and your extension can only be used on Joomla 1.6&amp;lt;br/&amp;gt;&lt;br /&gt;
2) create your own &amp;quot;legacy layer&amp;quot; and add the new event function name to your plugin. Here is an example of the user plugin:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    //joomla 1.6 compatibility code &lt;br /&gt;
 	public function onUserLogin($user, $options){&lt;br /&gt;
 	    $result = $this-&amp;gt;onLoginUser($user, $options);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
 	}&lt;br /&gt;
	public function onUserLogout($user)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onLogoutUser($user);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterDelete($user, $succes, $msg)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterDeleteUser($user, $succes, $msg);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserBeforeSave($user, $isnew, $new){&lt;br /&gt;
 	    $result = $this-&amp;gt;onBeforeStoreUser($user, $isnew, $new);&lt;br /&gt;
 	    return $result;	&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterSave($user, $isnew, $success, $msg){&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterStoreUser($user, $isnew, $success, $msg);&lt;br /&gt;
 	    return $result;			&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing name=&amp;quot;adminForm&amp;quot; to id=&amp;quot;adminForm&amp;quot; ==&lt;br /&gt;
To create your own admin forms in joomla you now need to use id=&amp;quot;adminForm&amp;quot;. This is because the use of the tag &amp;quot;name&amp;quot; is not valid HTML strict and has compatibility issues when used in XHTML served as XML.\. Although there is build in compatibility check to look for the old name=&amp;quot;adminForm&amp;quot; tag, it is best to add the new id tag. Depending on the features you want to use you may need to include both, name=&amp;quot;adminForm&amp;quot; and id=&amp;quot;adminForm&amp;quot; because not all core functionality has been updated to use id&#039;s.  An example of the new form code is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;index.php&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot;&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Removing references to index2.php and index3.php ==&lt;br /&gt;
Joomla 1.0 had different index files to serve admin content in different manners. Joomla 1.6 has now got better way to handle this and you need to search your codebase for &amp;quot;index2.php&amp;quot; and &amp;quot;index3.php&amp;quot; to ensure you don&#039;t have any Joomla 1.0 style links. If you need to display your component without any of the other Joomla 1.6 admin content (menus, etc) then add the following to the url: &amp;quot;&amp;amp;tmpl=component&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Upgrading core table and field name usage ==&lt;br /&gt;
Many of the core Joomla tables have been simplified, combined or renamed. This was needed to get rid of some limitation dating back to Joomla 1.0. This means however that if you have code that directly manipulates Joomla tables, that you need to add a function that detects Joomla 1.6 and had different SQL queries based on the joomla version. Plase note that both tables and field names have been renamed or removed. An example is the following function that can find if a plugin is published on both Joomla 1.5 and 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;		&lt;br /&gt;
function getPluginStatus($element, $folder) {&lt;br /&gt;
    //get joomla specs&lt;br /&gt;
    $db = &amp;amp; JFactory::getDBO();		&lt;br /&gt;
    $version = new JVersion;&lt;br /&gt;
    $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
    if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
        //Joomla 1.6 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__extensions WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; . $db-&amp;gt;Quote($folder);&lt;br /&gt;
    } else {&lt;br /&gt;
        //Joomla 1.0/1.5 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__plugins WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; .   $db-&amp;gt;Quote($folder); &lt;br /&gt;
    }&lt;br /&gt;
    $db-&amp;gt;setQuery($query);&lt;br /&gt;
    $result = $db-&amp;gt;loadResult();&lt;br /&gt;
    return $result;&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing in the XML installer manifest file ==&lt;br /&gt;
Joomla 1.6 now uses a more streamlined approach to the XML file inside the ZIP file that installs Joomla extentions.&lt;br /&gt;
&lt;br /&gt;
== New mootools version ==&lt;br /&gt;
Most important is that the Ajax class has been depreciated and replaced by the Request class. That means that if you use ajax calls you need to have a version switcher (below a sample code)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$version = new JVersion;&lt;br /&gt;
$joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
&lt;br /&gt;
..... (your code) ....&lt;br /&gt;
&lt;br /&gt;
    /* our ajax istance for starting the sync */&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
 echo &#039;var ajax = new Request.HTML({&lt;br /&gt;
           url: url,&#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
 echo &#039;var ajax = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
     echo &#039;var ajaxsync = new Request.HTML({&lt;br /&gt;
        url: url, &#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
echo &#039;var ajaxsync = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also another common usuage of mootools in  Joomla is the popup box. The Joomla 1.5 javascript code to close this box is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;document.getElementById(&#039;sbox-window&#039;).close();&amp;lt;/source&amp;gt;&lt;br /&gt;
in Joomla 1.6 you need to use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;window.parent.SqueezeBox.close();&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Converting your JParameters to JForms ==&lt;br /&gt;
Joomla 1.6 now uses the JForms class to handle parameters and it has also changed the way parameters are defined in your XML files. To make menu/component/module/plugin parameters work, first you need to update the XML file. Here is an automated way to handle the bulk of the conversion. (added &amp;quot;&amp;quot; to the examples below so you can see spaces in the search query as well). Use eclipse to search and replace parameters in *.xml files&lt;br /&gt;
&lt;br /&gt;
replace &amp;quot;&amp;lt;param &amp;quot; with &amp;quot;&amp;lt;field &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/param&amp;gt;&amp;quot; with &amp;lt;/field&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params*?&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/params&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/fieldset&amp;gt;&amp;lt;/fields&amp;gt;&amp;lt;/config&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;install &amp;quot; with &amp;quot;&amp;lt;extension &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/install&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/extension&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Change the &amp;quot;extension&amp;quot; node to add the following attributes:&lt;br /&gt;
* Keep the existing &amp;quot;type&amp;quot; attribute&lt;br /&gt;
* version=&amp;quot;1.6.0&amp;quot;&lt;br /&gt;
* client=&amp;quot;site&amp;quot;&lt;br /&gt;
* method=&amp;quot;upgrade&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example for a module:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;module&amp;quot; version=&amp;quot;1.6.0&amp;quot; client=&amp;quot;site&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now if you want to use your joomla extension on both Joomla 1.5 and 1.6 you will need to go to your &amp;quot;team synchronising&amp;quot; view in eclipse. Double click on your changed xml file, which will open the compare editor. Then simply copy-paste back your old Joomla 1.5 params into your new Joomla 1.6 xml file and save.&lt;br /&gt;
&lt;br /&gt;
If you have custom parameter types, you will need to do some additional work. In Joomla 1.5 you would use the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;params addpath=&amp;quot;/administrator/components/com_yourname/elements&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
In joomla 1.6 JParameter classes won&#039;t work and you will need to convert your jparameter fields into JForm fields. Create a new directory and copy your &amp;quot;old elements&amp;quot; into them. Then you need to load these new fields with the individual parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;field name=&amp;quot;sample&amp;quot; type=&amp;quot;sampleField&amp;quot; size=&amp;quot;5&amp;quot; default=&amp;quot;&amp;quot;			label=&amp;quot;sampleField&amp;quot; description=&amp;quot;sampleField&amp;quot; addfieldpath=&amp;quot;/administrator/components/com_yourname/fields&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use eclipse to search and replace files in your newly created fields directory.&lt;br /&gt;
replace &amp;quot;JElement&amp;quot; with &amp;quot;JFormField&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;var $_name =&amp;quot; with &amp;quot;public $type =&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;function fetchElement($name, $value, &amp;amp;$node, $control_name)&amp;quot; with &amp;quot;protected function getInput()&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you still need to replace the references to $control_name and others in your new JForm field, but at least the bulk of the work has been done automatically&lt;br /&gt;
&lt;br /&gt;
== renamed core component names and login form parameters ==&lt;br /&gt;
A login module for Joomla 1.5 will not work without modifications on Joomla 1.6. Here is a part of the logout module that will work on both Joomla 1.5 and Joomla 1.6. You can compare the two to see the difference in input names.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        $version = new JVersion;&lt;br /&gt;
        $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
        if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
            //joomla 1.6 format          &lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;user.logout&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_users&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
        } else {    &lt;br /&gt;
            //joomla 1.5 format&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;logout&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_user&amp;quot; /&amp;gt;&#039;;            &lt;br /&gt;
        } &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
here is the code for the login module&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        $version = new JVersion;&lt;br /&gt;
        $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
        if(substr($joomla,0,3) == &#039;1.6&#039;){        &lt;br /&gt;
            //joomla 1.6 format     &lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;user.login&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_users&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input id=&amp;quot;modlgn_passwd&amp;quot; type=&amp;quot;password&amp;quot; name=&amp;quot;password&amp;quot; class=&amp;quot;inputbox&amp;quot; size=&amp;quot;18&amp;quot; alt=&amp;quot;password&amp;quot; /&amp;gt; &#039;;&lt;br /&gt;
        } else {&lt;br /&gt;
            //joomla 1.5 format&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;login&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_user&amp;quot; /&amp;gt;&#039;;     &lt;br /&gt;
            $output .= &#039;&amp;lt;input id=&amp;quot;modlgn_passwd&amp;quot; type=&amp;quot;password&amp;quot; name=&amp;quot;passwd&amp;quot; class=&amp;quot;inputbox&amp;quot; size=&amp;quot;18&amp;quot; alt=&amp;quot;password&amp;quot; /&amp;gt; &#039;;               	&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These changes might also apply to front-end forms of other Joomla core components (more information needed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ACL changes ==&lt;br /&gt;
Joomla 1.6 now has an advanced ACL system. It is unknown how this affects people that have previously used the ACL API in their extension. Please add some information here if you know more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Plugin files now in different locations ==&lt;br /&gt;
Joomla 1.6 now creates a different hierarchy structure for plugins.  Files are no longer placed where they used to be, so if your other parts of your application (comp, mods, etc.) expects them to be in a certain position, it won&#039;t work. The change has been that now plugins are in an additional subdirectory. If you only load your plugins via the 1.5 API you should be fine.&lt;br /&gt;
* Joomla 1.5 example location &lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;JPATH_SITE . DS . &#039;plugins&#039; . DS . &#039;authentication&#039; . DS . &#039;example&#039;. DS . &#039;example.php&#039;;&amp;lt;/source&amp;gt;&lt;br /&gt;
* Joomla 1.6 example location&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;JPATH_SITE . DS . &#039;plugins&#039; . DS . &#039;authentication&#039; . DS . &#039;example.php&#039;;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Component conversion planning items ==&lt;br /&gt;
Here is an informal and unordered list of things to consider if you are planning to convert your 1.5 extensions to 1.6. They are mostly from the Google general development group around the time of 1.6b15.&lt;br /&gt;
&lt;br /&gt;
1. Language file - J!1.6 enforces strict rules for language&lt;br /&gt;
translations.  No more spaces in the keys or values that aren&#039;t&lt;br /&gt;
enclosed in double quotes. This change will hopefully get much better performance than the previous loose enforcement.&lt;br /&gt;
&lt;br /&gt;
2. Changes to view parameters - J!1.6 has a strict new way of&lt;br /&gt;
specifying parameters for views.  J!1.5 allowed a bit of freedom where&lt;br /&gt;
the parameters could be defined at the view.html.php level but now it&lt;br /&gt;
has to be at the tmpl level.  AE believes the view paramters were removed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Installation process - preflight, postflight, etc - These are new&lt;br /&gt;
events that can screw up an existing installlation process.  -1 on me for not documenting the process while stepping through xdebug.&lt;br /&gt;
They should be totally optional access points to the installation process.  But if your 1.5 install process is tricky for some reason, then these can be used to do clean up activities.&lt;br /&gt;
&lt;br /&gt;
5. Custom fields - This could be a could be huge depending the volume and vagaries your 1.5 usage of custom fields. The entire process changed and now the custom fields must inherit from J! base classes.  (AE) This is no different from 1.5 inheriting from JElement.  In 1.6 you inherit from JFormField which is a much more robust class.&lt;br /&gt;
&lt;br /&gt;
6. Admin template changes - Admin functions that depended on certain&lt;br /&gt;
functions, naming conventions etc no longer work.  Khepri has been removed.  Other admin functions/libraries may have changed.  &lt;br /&gt;
&lt;br /&gt;
7. ACL - gid and aid have been removed.  Significant changes to ACL archtecture.  Bricking refers to totally locking your self and everyone else out - Last chance backdoor involves adding a emergency pw to the config file.&lt;br /&gt;
&lt;br /&gt;
8. Renamed methods, table names, etc. &lt;br /&gt;
&lt;br /&gt;
9. sys.ini language translation file - This file is used for installation process translations...&lt;br /&gt;
&lt;br /&gt;
10. include folder - All of the libraries (Archive, domit, js, PEAR, etc) in the include folder have been removed in J!1.6. &lt;br /&gt;
&lt;br /&gt;
11. Mootools version changed from 1.1 (Joomla 1.5.19 has a upgrade plug-in for 1.2) to 1.3.  Mootools 1.3 is not compatible with Mootools 1.1 but it is compatible with Mootools 1.2.&lt;br /&gt;
&lt;br /&gt;
12. Use paths defined in defines.php. (Note they are different for the site and the administration)&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=36057</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=36057"/>
		<updated>2011-01-25T13:08:20Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse, see [[Setting up your workstation for Joomla! development]].&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
[[What&#039;s new in Joomla 1.6#Developers]] describes most changes of Joomla 1.6 and how this affect developers.&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes, add quotes to string values and update your comments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;An earlier version of this document noted that &#039;&#039;&#039;double&#039;&#039;&#039; quotes were not allowed, but see [http://php.net/manual/en/function.parse-ini-file.php the PHP parse_ini_file documentation] and below for further information.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Single quotes are now not allowed. This can be easily bypassed by searching &#039; and replace with &amp;quot;. &lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
If you do not remove these illegal strings, then your language file won&#039;t load and you won&#039;t get any error message. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are now handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing Javascript function overrides ==&lt;br /&gt;
Joomla now has some of its Javascript functions prefixed with &amp;quot;Joomla&amp;quot;. This means the functions are always unique and won&#039;t clash with other javascript functions on your server/webpage. However, you now need a different method to override the default Joomla Javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
For Joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing removed functions ==&lt;br /&gt;
Some functions were removed for various reasons. You can find a list of them on [[What&#039;s new in Joomla_1.6#Removed_features]].&lt;br /&gt;
&lt;br /&gt;
Note that the ADODB compatibility methods included function like $db-&amp;gt;Execute($query) which now need a separate $db-&amp;gt;setQuery($query);$db-&amp;gt;Query();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Renamed events ==&lt;br /&gt;
&lt;br /&gt;
A large number of the Joomla 1.5 events have been renamed. Here is the list of renamed events.&lt;br /&gt;
*onContentAfterSave&lt;br /&gt;
*onContentAfterTitle&lt;br /&gt;
*onContentAfterDisplay&lt;br /&gt;
*onContentBeforeDisplay&lt;br /&gt;
*onContentBeforeSave&lt;br /&gt;
*onContentSearch&lt;br /&gt;
*onContentSearchAreas&lt;br /&gt;
*onUserAuthenticate&lt;br /&gt;
*onUserAfterDelete&lt;br /&gt;
*onUserAfterSave&lt;br /&gt;
*onUserBeforeDelete&lt;br /&gt;
*onUserBeforeSave&lt;br /&gt;
*onUserLogin&lt;br /&gt;
*onUserLogout&lt;br /&gt;
*All content events (except for search and search areas) now pass a &#039;context&#039; as the first argument to alert the plugin as to what type of content is being passed.  The plugin event may or may not heed this context.&lt;br /&gt;
&lt;br /&gt;
This means that if you use Joomla events you have two options:&amp;lt;br/&amp;gt;&lt;br /&gt;
1) rename the event and your extension can only be used on Joomla 1.6&amp;lt;br/&amp;gt;&lt;br /&gt;
2) create your own &amp;quot;legacy layer&amp;quot; and add the new event function name to your plugin. Here is an example of the user plugin:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    //joomla 1.6 compatibility code &lt;br /&gt;
 	public function onUserLogin($user, $options){&lt;br /&gt;
 	    $result = $this-&amp;gt;onLoginUser($user, $options);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
 	}&lt;br /&gt;
	public function onUserLogout($user)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onLogoutUser($user);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterDelete($user, $succes, $msg)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterDeleteUser($user, $succes, $msg);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserBeforeSave($user, $isnew, $new){&lt;br /&gt;
 	    $result = $this-&amp;gt;onBeforeStoreUser($user, $isnew, $new);&lt;br /&gt;
 	    return $result;	&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterSave($user, $isnew, $success, $msg){&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterStoreUser($user, $isnew, $success, $msg);&lt;br /&gt;
 	    return $result;			&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing name=&amp;quot;adminForm&amp;quot; to id=&amp;quot;adminForm&amp;quot; ==&lt;br /&gt;
To create your own admin forms in joomla you now need to use id=&amp;quot;adminForm&amp;quot;. This is because the use of the tag &amp;quot;name&amp;quot; is not valid HTML strict and has compatibility issues when used in XHTML served as XML.\. Although there is build in compatibility check to look for the old name=&amp;quot;adminForm&amp;quot; tag, it is best to add the new id tag. Depending on the features you want to use you may need to include both, name=&amp;quot;adminForm&amp;quot; and id=&amp;quot;adminForm&amp;quot; because not all core functionality has been updated to use id&#039;s.  An example of the new form code is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;index.php&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot;&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Removing references to index2.php and index3.php ==&lt;br /&gt;
Joomla 1.0 had different index files to serve admin content in different manners. Joomla 1.6 has now got better way to handle this and you need to search your codebase for &amp;quot;index2.php&amp;quot; and &amp;quot;index3.php&amp;quot; to ensure you don&#039;t have any Joomla 1.0 style links. If you need to display your component without any of the other Joomla 1.6 admin content (menus, etc) then add the following to the url: &amp;quot;&amp;amp;tmpl=component&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Upgrading core table and field name usage ==&lt;br /&gt;
Many of the core Joomla tables have been simplified, combined or renamed. This was needed to get rid of some limitation dating back to Joomla 1.0. This means however that if you have code that directly manipulates Joomla tables, that you need to add a function that detects Joomla 1.6 and had different SQL queries based on the joomla version. Plase note that both tables and field names have been renamed or removed. An example is the following function that can find if a plugin is published on both Joomla 1.5 and 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;		&lt;br /&gt;
function getPluginStatus($element, $folder) {&lt;br /&gt;
    //get joomla specs&lt;br /&gt;
    $db = &amp;amp; JFactory::getDBO();		&lt;br /&gt;
    $version = new JVersion;&lt;br /&gt;
    $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
    if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
        //Joomla 1.6 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__extensions WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; . $db-&amp;gt;Quote($folder);&lt;br /&gt;
    } else {&lt;br /&gt;
        //Joomla 1.0/1.5 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__plugins WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; .   $db-&amp;gt;Quote($folder); &lt;br /&gt;
    }&lt;br /&gt;
    $db-&amp;gt;setQuery($query);&lt;br /&gt;
    $result = $db-&amp;gt;loadResult();&lt;br /&gt;
    return $result;&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing in the XML installer manifest file ==&lt;br /&gt;
Joomla 1.6 now uses a more streamlined approach to the XML file inside the ZIP file that installs Joomla extentions.&lt;br /&gt;
&lt;br /&gt;
== New mootools version ==&lt;br /&gt;
Most important is that the Ajax class has been depreciated and replaced by the Request class. That means that if you use ajax calls you need to have a version switcher (below a sample code)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$version = new JVersion;&lt;br /&gt;
$joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
&lt;br /&gt;
..... (your code) ....&lt;br /&gt;
&lt;br /&gt;
    /* our ajax istance for starting the sync */&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
 echo &#039;var ajax = new Request.HTML({&lt;br /&gt;
           url: url,&#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
 echo &#039;var ajax = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
     echo &#039;var ajaxsync = new Request.HTML({&lt;br /&gt;
        url: url, &#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
echo &#039;var ajaxsync = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also another common usuage of mootools in  Joomla is the popup box. The Joomla 1.5 javascript code to close this box is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;document.getElementById(&#039;sbox-window&#039;).close();&amp;lt;/source&amp;gt;&lt;br /&gt;
in Joomla 1.6 you need to use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;window.parent.SqueezeBox.close();&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Converting your JParameters to JForms ==&lt;br /&gt;
Joomla 1.6 now uses the JForms class to handle parameters and it has also changed the way parameters are defined in your XML files. To make menu/component/module/plugin parameters work, first you need to update the XML file. Here is an automated way to handle the bulk of the conversion. (added &amp;quot;&amp;quot; to the examples below so you can see spaces in the search query as well). Use eclipse to search and replace parameters in *.xml files&lt;br /&gt;
&lt;br /&gt;
replace &amp;quot;&amp;lt;param &amp;quot; with &amp;quot;&amp;lt;field &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/param&amp;gt;&amp;quot; with &amp;lt;/field&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params*?&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/params&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/fieldset&amp;gt;&amp;lt;/fields&amp;gt;&amp;lt;/config&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;install &amp;quot; with &amp;quot;&amp;lt;extension &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/install&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/extension&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Change the &amp;quot;extension&amp;quot; node to add the following attributes:&lt;br /&gt;
* Keep the existing &amp;quot;type&amp;quot; attribute&lt;br /&gt;
* version=&amp;quot;1.6.0&amp;quot;&lt;br /&gt;
* client=&amp;quot;site&amp;quot;&lt;br /&gt;
* method=&amp;quot;upgrade&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example for a module:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;module&amp;quot; version=&amp;quot;1.6.0&amp;quot; client=&amp;quot;site&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now if you want to use your joomla extension on both Joomla 1.5 and 1.6 you will need to go to your &amp;quot;team synchronising&amp;quot; view in eclipse. Double click on your changed xml file, which will open the compare editor. Then simply copy-paste back your old Joomla 1.5 params into your new Joomla 1.6 xml file and save.&lt;br /&gt;
&lt;br /&gt;
If you have custom parameter types, you will need to do some additional work. In Joomla 1.5 you would use the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;params addpath=&amp;quot;/administrator/components/com_yourname/elements&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
In joomla 1.6 JParameter classes won&#039;t work and you will need to convert your jparameter fields into JForm fields. Create a new directory and copy your &amp;quot;old elements&amp;quot; into them. Then you need to load these new fields with the individual parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;field name=&amp;quot;sample&amp;quot; type=&amp;quot;sampleField&amp;quot; size=&amp;quot;5&amp;quot; default=&amp;quot;&amp;quot;			label=&amp;quot;sampleField&amp;quot; description=&amp;quot;sampleField&amp;quot; addfieldpath=&amp;quot;/administrator/components/com_yourname/fields&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use eclipse to search and replace files in your newly created fields directory.&lt;br /&gt;
replace &amp;quot;JElement&amp;quot; with &amp;quot;JFormField&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;var $_name =&amp;quot; with &amp;quot;public $type =&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;function fetchElement($name, $value, &amp;amp;$node, $control_name)&amp;quot; with &amp;quot;protected function getInput()&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you still need to replace the references to $control_name and others in your new JForm field, but at least the bulk of the work has been done automatically&lt;br /&gt;
&lt;br /&gt;
== renamed core component names and login form parameters ==&lt;br /&gt;
A login module for Joomla 1.5 will not work without modifications on Joomla 1.6. Here is a part of the logout module that will work on both Joomla 1.5 and Joomla 1.6. You can compare the two to see the difference in input names.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        $version = new JVersion;&lt;br /&gt;
        $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
        if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
            //joomla 1.6 format          &lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;user.logout&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_users&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
        } else {    &lt;br /&gt;
            //joomla 1.5 format&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;logout&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_user&amp;quot; /&amp;gt;&#039;;            &lt;br /&gt;
        } &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
here is the code for the login module&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        $version = new JVersion;&lt;br /&gt;
        $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
        if(substr($joomla,0,3) == &#039;1.6&#039;){        &lt;br /&gt;
            //joomla 1.6 format     &lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;user.login&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_users&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input id=&amp;quot;modlgn_passwd&amp;quot; type=&amp;quot;password&amp;quot; name=&amp;quot;password&amp;quot; class=&amp;quot;inputbox&amp;quot; size=&amp;quot;18&amp;quot; alt=&amp;quot;password&amp;quot; /&amp;gt; &#039;;&lt;br /&gt;
        } else {&lt;br /&gt;
            //joomla 1.5 format&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;login&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_user&amp;quot; /&amp;gt;&#039;;     &lt;br /&gt;
            $output .= &#039;&amp;lt;input id=&amp;quot;modlgn_passwd&amp;quot; type=&amp;quot;password&amp;quot; name=&amp;quot;passwd&amp;quot; class=&amp;quot;inputbox&amp;quot; size=&amp;quot;18&amp;quot; alt=&amp;quot;password&amp;quot; /&amp;gt; &#039;;               	&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These changes might also apply to front-end forms of other Joomla core components (more information needed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ACL changes ==&lt;br /&gt;
Joomla 1.6 now has an advanced ACL system. It is unknown how this affects people that have previously used the ACL API in their extension. Please add some information here if you know more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Component conversion planning items ==&lt;br /&gt;
Here is an informal and unordered list of things to consider if you are planning to convert your 1.5 extensions to 1.6. They are mostly from the Google general development group around the time of 1.6b15.&lt;br /&gt;
&lt;br /&gt;
1. Language file - J!1.6 enforces strict rules for language&lt;br /&gt;
translations.  No more spaces in the keys or values that aren&#039;t&lt;br /&gt;
enclosed in double quotes. This change will hopefully get much better performance than the previous loose enforcement.&lt;br /&gt;
&lt;br /&gt;
2. Changes to view parameters - J!1.6 has a strict new way of&lt;br /&gt;
specifying parameters for views.  J!1.5 allowed a bit of freedom where&lt;br /&gt;
the parameters could be defined at the view.html.php level but now it&lt;br /&gt;
has to be at the tmpl level.  AE believes the view paramters were removed.&lt;br /&gt;
&lt;br /&gt;
3. Plugins - J!1.6 now creates a different hierarchy structure for&lt;br /&gt;
plugin types.  Files are no longer placed where they used to be, so if&lt;br /&gt;
your other parts of your application (comp, mods, etc.) expects them to be in a certain position, it won&#039;t&lt;br /&gt;
work.  If you only load your plugins via the 1.5 API you should be fine.&lt;br /&gt;
&lt;br /&gt;
4. Installation process - preflight, postflight, etc - These are new&lt;br /&gt;
events that can screw up an existing installlation process.  -1 on me for not documenting the process while stepping through xdebug.&lt;br /&gt;
They should be totally optional access points to the installation process.  But if your 1.5 install process is tricky for some reason, then these can be used to do clean up activities.&lt;br /&gt;
&lt;br /&gt;
5. Custom fields - This could be a could be huge depending the volume and vagaries your 1.5 usage of custom fields. The entire process changed and now the custom fields must inherit from J! base classes.  (AE) This is no different from 1.5 inheriting from JElement.  In 1.6 you inherit from JFormField which is a much more robust class.&lt;br /&gt;
&lt;br /&gt;
6. Admin template changes - Admin functions that depended on certain&lt;br /&gt;
functions, naming conventions etc no longer work.  Khepri has been removed.  Other admin functions/libraries may have changed.  &lt;br /&gt;
&lt;br /&gt;
7. ACL - gid and aid have been removed.  Significant changes to ACL archtecture.  Bricking refers to totally locking your self and everyone else out - Last chance backdoor involves adding a emergency pw to the config file.&lt;br /&gt;
&lt;br /&gt;
8. Renamed methods, table names, etc. &lt;br /&gt;
&lt;br /&gt;
9. sys.ini language translation file - This file is used for installation process translations...&lt;br /&gt;
&lt;br /&gt;
10. include folder - All of the libraries (Archive, domit, js, PEAR, etc) in the include folder have been removed in J!1.6. &lt;br /&gt;
&lt;br /&gt;
11. Mootools version changed from 1.1 (Joomla 1.5.19 has a upgrade plug-in for 1.2) to 1.3.  Mootools 1.3 is not compatible with Mootools 1.1 but it is compatible with Mootools 1.2.&lt;br /&gt;
&lt;br /&gt;
12. Use paths defined in defines.php. (Note they are different for the site and the administration)&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=36056</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=36056"/>
		<updated>2011-01-25T13:00:17Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse, see [[Setting up your workstation for Joomla! development]].&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
[[What&#039;s new in Joomla 1.6#Developers]] describes most changes of Joomla 1.6 and how this affect developers.&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes, add quotes to string values and update your comments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;An earlier version of this document noted that &#039;&#039;&#039;double&#039;&#039;&#039; quotes were not allowed, but see [http://php.net/manual/en/function.parse-ini-file.php the PHP parse_ini_file documentation] and below for further information.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Single quotes are now not allowed. This can be easily bypassed by searching &#039; and replace with &amp;quot;. &lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
If you do not remove these illegal strings, then your language file won&#039;t load and you won&#039;t get any error message. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are now handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing Javascript function overrides ==&lt;br /&gt;
Joomla now has some of its Javascript functions prefixed with &amp;quot;Joomla&amp;quot;. This means the functions are always unique and won&#039;t clash with other javascript functions on your server/webpage. However, you now need a different method to override the default Joomla Javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
For Joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing removed functions ==&lt;br /&gt;
Some functions were removed for various reasons. You can find a list of them on [[What&#039;s new in Joomla_1.6#Removed_features]].&lt;br /&gt;
&lt;br /&gt;
Note that the ADODB compatibility methods included function like $db-&amp;gt;Execute($query) which now need a separate $db-&amp;gt;setQuery($query);$db-&amp;gt;Query();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Renamed events ==&lt;br /&gt;
&lt;br /&gt;
A large number of the Joomla 1.5 events have been renamed. Here is the list of renamed events.&lt;br /&gt;
*onContentAfterSave&lt;br /&gt;
*onContentAfterTitle&lt;br /&gt;
*onContentAfterDisplay&lt;br /&gt;
*onContentBeforeDisplay&lt;br /&gt;
*onContentBeforeSave&lt;br /&gt;
*onContentSearch&lt;br /&gt;
*onContentSearchAreas&lt;br /&gt;
*onUserAuthenticate&lt;br /&gt;
*onUserAfterDelete&lt;br /&gt;
*onUserAfterSave&lt;br /&gt;
*onUserBeforeDelete&lt;br /&gt;
*onUserBeforeSave&lt;br /&gt;
*onUserLogin&lt;br /&gt;
*onUserLogout&lt;br /&gt;
*All content events (except for search and search areas) now pass a &#039;context&#039; as the first argument to alert the plugin as to what type of content is being passed.  The plugin event may or may not heed this context.&lt;br /&gt;
&lt;br /&gt;
This means that if you use Joomla events you have two options:&amp;lt;br/&amp;gt;&lt;br /&gt;
1) rename the event and your extension can only be used on Joomla 1.6&amp;lt;br/&amp;gt;&lt;br /&gt;
2) create your own &amp;quot;legacy layer&amp;quot; and add the new event function name to your plugin. Here is an example of the user plugin:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    //joomla 1.6 compatibility code &lt;br /&gt;
 	public function onUserLogin($user, $options){&lt;br /&gt;
 	    $result = $this-&amp;gt;onLoginUser($user, $options);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
 	}&lt;br /&gt;
	public function onUserLogout($user)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onLogoutUser($user);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterDelete($user, $succes, $msg)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterDeleteUser($user, $succes, $msg);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserBeforeSave($user, $isnew, $new){&lt;br /&gt;
 	    $result = $this-&amp;gt;onBeforeStoreUser($user, $isnew, $new);&lt;br /&gt;
 	    return $result;	&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterSave($user, $isnew, $success, $msg){&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterStoreUser($user, $isnew, $success, $msg);&lt;br /&gt;
 	    return $result;			&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing name=&amp;quot;adminForm&amp;quot; to id=&amp;quot;adminForm&amp;quot; ==&lt;br /&gt;
To create your own admin forms in joomla you now need to use id=&amp;quot;adminForm&amp;quot;. This is because the use of the tag &amp;quot;name&amp;quot; is not valid HTML strict and has compatibility issues when used in XHTML served as XML.\. Although there is build in compatibility check to look for the old name=&amp;quot;adminForm&amp;quot; tag, it is best to add the new id tag. Depending on the features you want to use you may need to include both, name=&amp;quot;adminForm&amp;quot; and id=&amp;quot;adminForm&amp;quot; because not all core functionality has been updated to use id&#039;s.  An example of the new form code is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;index.php&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot;&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Removing references to index2.php and index3.php ==&lt;br /&gt;
Joomla 1.0 had different index files to serve admin content in different manners. Joomla 1.6 has now got better way to handle this and you need to search your codebase for &amp;quot;index2.php&amp;quot; and &amp;quot;index3.php&amp;quot; to ensure you don&#039;t have any Joomla 1.0 style links. If you need to display your component without any of the other Joomla 1.6 admin content (menus, etc) then add the following to the url: &amp;quot;&amp;amp;tmpl=component&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Upgrading core table and field name usage ==&lt;br /&gt;
Many of the core Joomla tables have been simplified, combined or renamed. This was needed to get rid of some limitation dating back to Joomla 1.0. This means however that if you have code that directly manipulates Joomla tables, that you need to add a function that detects Joomla 1.6 and had different SQL queries based on the joomla version. Plase note that both tables and field names have been renamed or removed. An example is the following function that can find if a plugin is published on both Joomla 1.5 and 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;		&lt;br /&gt;
function getPluginStatus($element, $folder) {&lt;br /&gt;
    //get joomla specs&lt;br /&gt;
    $db = &amp;amp; JFactory::getDBO();		&lt;br /&gt;
    $version = new JVersion;&lt;br /&gt;
    $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
    if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
        //Joomla 1.6 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__extensions WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; . $db-&amp;gt;Quote($folder);&lt;br /&gt;
    } else {&lt;br /&gt;
        //Joomla 1.0/1.5 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__plugins WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; .   $db-&amp;gt;Quote($folder); &lt;br /&gt;
    }&lt;br /&gt;
    $db-&amp;gt;setQuery($query);&lt;br /&gt;
    $result = $db-&amp;gt;loadResult();&lt;br /&gt;
    return $result;&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing in the XML installer manifest file ==&lt;br /&gt;
Joomla 1.6 now uses a more streamlined approach to the XML file inside the ZIP file that installs Joomla extentions.&lt;br /&gt;
&lt;br /&gt;
== New mootools version ==&lt;br /&gt;
Most important is that the Ajax class has been depreciated and replaced by the Request class. That means that if you use ajax calls you need to have a version switcher (below a sample code)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$version = new JVersion;&lt;br /&gt;
$joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
&lt;br /&gt;
..... (your code) ....&lt;br /&gt;
&lt;br /&gt;
    /* our ajax istance for starting the sync */&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
 echo &#039;var ajax = new Request.HTML({&lt;br /&gt;
           url: url,&#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
 echo &#039;var ajax = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
     echo &#039;var ajaxsync = new Request.HTML({&lt;br /&gt;
        url: url, &#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
echo &#039;var ajaxsync = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also another common usuage of mootools in  Joomla is the popup box. The Joomla 1.5 javascript code to close this box is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;document.getElementById(&#039;sbox-window&#039;).close();&amp;lt;/source&amp;gt;&lt;br /&gt;
in Joomla 1.6 you need to use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;window.parent.SqueezeBox.close();&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Converting your JParameters to JForms ==&lt;br /&gt;
Joomla 1.6 now uses the JForms class to handle parameters and it has also changed the way parameters are defined in your XML files. To make menu/component/module/plugin parameters work, first you need to update the XML file. Here is an automated way to handle the bulk of the conversion. (added &amp;quot;&amp;quot; to the examples below so you can see spaces in the search query as well). Use eclipse to search and replace parameters in *.xml files&lt;br /&gt;
&lt;br /&gt;
replace &amp;quot;&amp;lt;param &amp;quot; with &amp;quot;&amp;lt;field &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/param&amp;gt;&amp;quot; with &amp;lt;/field&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params*?&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/params&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/fieldset&amp;gt;&amp;lt;/fields&amp;gt;&amp;lt;/config&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;install &amp;quot; with &amp;quot;&amp;lt;extension &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/install&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/extension&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Change the &amp;quot;extension&amp;quot; node to add the following attributes:&lt;br /&gt;
* Keep the existing &amp;quot;type&amp;quot; attribute&lt;br /&gt;
* version=&amp;quot;1.6.0&amp;quot;&lt;br /&gt;
* client=&amp;quot;site&amp;quot;&lt;br /&gt;
* method=&amp;quot;upgrade&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example for a module:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;module&amp;quot; version=&amp;quot;1.6.0&amp;quot; client=&amp;quot;site&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now if you want to use your joomla extension on both Joomla 1.5 and 1.6 you will need to go to your &amp;quot;team synchronising&amp;quot; view in eclipse. Double click on your changed xml file, which will open the compare editor. Then simply copy-paste back your old Joomla 1.5 params into your new Joomla 1.6 xml file and save.&lt;br /&gt;
&lt;br /&gt;
If you have custom parameter types, you will need to do some additional work. In Joomla 1.5 you would use the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;params addpath=&amp;quot;/administrator/components/com_yourname/elements&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
In joomla 1.6 JParameter classes won&#039;t work and you will need to convert your jparameter fields into JForm fields. Create a new directory and copy your &amp;quot;old elements&amp;quot; into them. Then you need to load these new fields with the individual parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;field name=&amp;quot;sample&amp;quot; type=&amp;quot;sampleField&amp;quot; size=&amp;quot;5&amp;quot; default=&amp;quot;&amp;quot;			label=&amp;quot;sampleField&amp;quot; description=&amp;quot;sampleField&amp;quot; addfieldpath=&amp;quot;/administrator/components/com_yourname/fields&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use eclipse to search and replace files in your newly created fields directory.&lt;br /&gt;
replace &amp;quot;JElement&amp;quot; with &amp;quot;JFormField&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;var $_name =&amp;quot; with &amp;quot;public $type =&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;function fetchElement($name, $value, &amp;amp;$node, $control_name)&amp;quot; with &amp;quot;protected function getInput()&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you still need to replace the references to $control_name and others in your new JForm field, but at least the bulk of the work has been done automatically&lt;br /&gt;
&lt;br /&gt;
== renamed core component names and login form parameters ==&lt;br /&gt;
A login module for Joomla 1.5 will not work without modifications on Joomla 1.6. Here is a part of the logout module that will work on both Joomla 1.5 and Joomla 1.6. You can compare the two to see the difference in input names.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        $version = new JVersion;&lt;br /&gt;
        $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
        if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
            //joomla 1.6 format          &lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;user.logout&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_users&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
        } else {    &lt;br /&gt;
            //joomla 1.5 format&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;logout&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_user&amp;quot; /&amp;gt;&#039;;            &lt;br /&gt;
        } &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
here is the code for the login module&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        $version = new JVersion;&lt;br /&gt;
        $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
        if(substr($joomla,0,3) == &#039;1.6&#039;){        &lt;br /&gt;
            //joomla 1.6 format     &lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;user.login&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_users&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input id=&amp;quot;modlgn_passwd&amp;quot; type=&amp;quot;password&amp;quot; name=&amp;quot;password&amp;quot; class=&amp;quot;inputbox&amp;quot; size=&amp;quot;18&amp;quot; alt=&amp;quot;password&amp;quot; /&amp;gt; &#039;;&lt;br /&gt;
        } else {&lt;br /&gt;
            //joomla 1.5 format&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;task&amp;quot; value=&amp;quot;login&amp;quot; /&amp;gt;&#039;;&lt;br /&gt;
            $output .= &#039;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;option&amp;quot; value=&amp;quot;com_user&amp;quot; /&amp;gt;&#039;;     &lt;br /&gt;
            $output .= &#039;&amp;lt;input id=&amp;quot;modlgn_passwd&amp;quot; type=&amp;quot;password&amp;quot; name=&amp;quot;passwd&amp;quot; class=&amp;quot;inputbox&amp;quot; size=&amp;quot;18&amp;quot; alt=&amp;quot;password&amp;quot; /&amp;gt; &#039;;               	&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These changes might also apply to front-end forms of other Joomla core components (more information needed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Component conversion planning items ==&lt;br /&gt;
Here is an informal and unordered list of things to consider if you are planning to convert your 1.5 extensions to 1.6. They are mostly from the Google general development group around the time of 1.6b15.&lt;br /&gt;
&lt;br /&gt;
1. Language file - J!1.6 enforces strict rules for language&lt;br /&gt;
translations.  No more spaces in the keys or values that aren&#039;t&lt;br /&gt;
enclosed in double quotes. This change will hopefully get much better performance than the previous loose enforcement.&lt;br /&gt;
&lt;br /&gt;
2. Changes to view parameters - J!1.6 has a strict new way of&lt;br /&gt;
specifying parameters for views.  J!1.5 allowed a bit of freedom where&lt;br /&gt;
the parameters could be defined at the view.html.php level but now it&lt;br /&gt;
has to be at the tmpl level.  AE believes the view paramters were removed.&lt;br /&gt;
&lt;br /&gt;
3. Plugins - J!1.6 now creates a different hierarchy structure for&lt;br /&gt;
plugin types.  Files are no longer placed where they used to be, so if&lt;br /&gt;
your other parts of your application (comp, mods, etc.) expects them to be in a certain position, it won&#039;t&lt;br /&gt;
work.  If you only load your plugins via the 1.5 API you should be fine.&lt;br /&gt;
&lt;br /&gt;
4. Installation process - preflight, postflight, etc - These are new&lt;br /&gt;
events that can screw up an existing installlation process.  -1 on me for not documenting the process while stepping through xdebug.&lt;br /&gt;
They should be totally optional access points to the installation process.  But if your 1.5 install process is tricky for some reason, then these can be used to do clean up activities.&lt;br /&gt;
&lt;br /&gt;
5. Custom fields - This could be a could be huge depending the volume and vagaries your 1.5 usage of custom fields. The entire process changed and now the custom fields must inherit from J! base classes.  (AE) This is no different from 1.5 inheriting from JElement.  In 1.6 you inherit from JFormField which is a much more robust class.&lt;br /&gt;
&lt;br /&gt;
6. Admin template changes - Admin functions that depended on certain&lt;br /&gt;
functions, naming conventions etc no longer work.  Khepri has been removed.  Other admin functions/libraries may have changed.  &lt;br /&gt;
&lt;br /&gt;
7. ACL - gid and aid have been removed.  Significant changes to ACL archtecture.  Bricking refers to totally locking your self and everyone else out - Last chance backdoor involves adding a emergency pw to the config file.&lt;br /&gt;
&lt;br /&gt;
8. Renamed methods, table names, etc. &lt;br /&gt;
&lt;br /&gt;
9. sys.ini language translation file - This file is used for installation process translations...&lt;br /&gt;
&lt;br /&gt;
10. include folder - All of the libraries (Archive, domit, js, PEAR, etc) in the include folder have been removed in J!1.6. &lt;br /&gt;
&lt;br /&gt;
11. Mootools version changed from 1.1 (Joomla 1.5.19 has a upgrade plug-in for 1.2) to 1.3.  Mootools 1.3 is not compatible with Mootools 1.1 but it is compatible with Mootools 1.2.&lt;br /&gt;
&lt;br /&gt;
12. Use paths defined in defines.php. (Note they are different for the site and the administration)&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=36055</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=36055"/>
		<updated>2011-01-25T12:41:22Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: /* New mootools version */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse, see [[Setting up your workstation for Joomla! development]].&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
[[What&#039;s new in Joomla 1.6#Developers]] describes most changes of Joomla 1.6 and how this affect developers.&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes, add quotes to string values and update your comments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;An earlier version of this document noted that &#039;&#039;&#039;double&#039;&#039;&#039; quotes were not allowed, but see [http://php.net/manual/en/function.parse-ini-file.php the PHP parse_ini_file documentation] and below for further information.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Single quotes are now not allowed. This can be easily bypassed by searching &#039; and replace with &amp;quot;. &lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
If you do not remove these illegal strings, then your language file won&#039;t load and you won&#039;t get any error message. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are now handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing Javascript function overrides ==&lt;br /&gt;
Joomla now has some of its Javascript functions prefixed with &amp;quot;Joomla&amp;quot;. This means the functions are always unique and won&#039;t clash with other javascript functions on your server/webpage. However, you now need a different method to override the default Joomla Javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
For Joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing removed functions ==&lt;br /&gt;
Some functions were removed for various reasons. You can find a list of them on [[What&#039;s new in Joomla_1.6#Removed_features]].&lt;br /&gt;
&lt;br /&gt;
Note that the ADODB compatibility methods included function like $db-&amp;gt;Execute($query) which now need a separate $db-&amp;gt;setQuery($query);$db-&amp;gt;Query();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Renamed events ==&lt;br /&gt;
&lt;br /&gt;
A large number of the Joomla 1.5 events have been renamed. Here is the list of renamed events.&lt;br /&gt;
*onContentAfterSave&lt;br /&gt;
*onContentAfterTitle&lt;br /&gt;
*onContentAfterDisplay&lt;br /&gt;
*onContentBeforeDisplay&lt;br /&gt;
*onContentBeforeSave&lt;br /&gt;
*onContentSearch&lt;br /&gt;
*onContentSearchAreas&lt;br /&gt;
*onUserAuthenticate&lt;br /&gt;
*onUserAfterDelete&lt;br /&gt;
*onUserAfterSave&lt;br /&gt;
*onUserBeforeDelete&lt;br /&gt;
*onUserBeforeSave&lt;br /&gt;
*onUserLogin&lt;br /&gt;
*onUserLogout&lt;br /&gt;
*All content events (except for search and search areas) now pass a &#039;context&#039; as the first argument to alert the plugin as to what type of content is being passed.  The plugin event may or may not heed this context.&lt;br /&gt;
&lt;br /&gt;
This means that if you use Joomla events you have two options:&amp;lt;br/&amp;gt;&lt;br /&gt;
1) rename the event and your extension can only be used on Joomla 1.6&amp;lt;br/&amp;gt;&lt;br /&gt;
2) create your own &amp;quot;legacy layer&amp;quot; and add the new event function name to your plugin. Here is an example of the user plugin:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    //joomla 1.6 compatibility code &lt;br /&gt;
 	public function onUserLogin($user, $options){&lt;br /&gt;
 	    $result = $this-&amp;gt;onLoginUser($user, $options);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
 	}&lt;br /&gt;
	public function onUserLogout($user)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onLogoutUser($user);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterDelete($user, $succes, $msg)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterDeleteUser($user, $succes, $msg);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserBeforeSave($user, $isnew, $new){&lt;br /&gt;
 	    $result = $this-&amp;gt;onBeforeStoreUser($user, $isnew, $new);&lt;br /&gt;
 	    return $result;	&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterSave($user, $isnew, $success, $msg){&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterStoreUser($user, $isnew, $success, $msg);&lt;br /&gt;
 	    return $result;			&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing name=&amp;quot;adminForm&amp;quot; to id=&amp;quot;adminForm&amp;quot; ==&lt;br /&gt;
To create your own admin forms in joomla you now need to use id=&amp;quot;adminForm&amp;quot;. This is because the use of the tag &amp;quot;name&amp;quot; is not valid HTML strict and has compatibility issues when used in XHTML served as XML.\. Although there is build in compatibility check to look for the old name=&amp;quot;adminForm&amp;quot; tag, it is best to add the new id tag. Depending on the features you want to use you may need to include both, name=&amp;quot;adminForm&amp;quot; and id=&amp;quot;adminForm&amp;quot; because not all core functionality has been updated to use id&#039;s.  An example of the new form code is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;index.php&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot;&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Removing references to index2.php and index3.php ==&lt;br /&gt;
Joomla 1.0 had different index files to serve admin content in different manners. Joomla 1.6 has now got better way to handle this and you need to search your codebase for &amp;quot;index2.php&amp;quot; and &amp;quot;index3.php&amp;quot; to ensure you don&#039;t have any Joomla 1.0 style links. If you need to display your component without any of the other Joomla 1.6 admin content (menus, etc) then add the following to the url: &amp;quot;&amp;amp;tmpl=component&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Upgrading core table and field name usage ==&lt;br /&gt;
Many of the core Joomla tables have been simplified, combined or renamed. This was needed to get rid of some limitation dating back to Joomla 1.0. This means however that if you have code that directly manipulates Joomla tables, that you need to add a function that detects Joomla 1.6 and had different SQL queries based on the joomla version. Plase note that both tables and field names have been renamed or removed. An example is the following function that can find if a plugin is published on both Joomla 1.5 and 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;		&lt;br /&gt;
function getPluginStatus($element, $folder) {&lt;br /&gt;
    //get joomla specs&lt;br /&gt;
    $db = &amp;amp; JFactory::getDBO();		&lt;br /&gt;
    $version = new JVersion;&lt;br /&gt;
    $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
    if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
        //Joomla 1.6 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__extensions WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; . $db-&amp;gt;Quote($folder);&lt;br /&gt;
    } else {&lt;br /&gt;
        //Joomla 1.0/1.5 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__plugins WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; .   $db-&amp;gt;Quote($folder); &lt;br /&gt;
    }&lt;br /&gt;
    $db-&amp;gt;setQuery($query);&lt;br /&gt;
    $result = $db-&amp;gt;loadResult();&lt;br /&gt;
    return $result;&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing in the XML installer manifest file ==&lt;br /&gt;
Joomla 1.6 now uses a more streamlined approach to the XML file inside the ZIP file that installs Joomla extentions.&lt;br /&gt;
&lt;br /&gt;
== New mootools version ==&lt;br /&gt;
Most important is that the Ajax class has been depreciated and replaced by the Request class. That means that if you use ajax calls you need to have a version switcher (below a sample code)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$version = new JVersion;&lt;br /&gt;
$joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
&lt;br /&gt;
..... (your code) ....&lt;br /&gt;
&lt;br /&gt;
    /* our ajax istance for starting the sync */&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
 echo &#039;var ajax = new Request.HTML({&lt;br /&gt;
           url: url,&#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
 echo &#039;var ajax = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
     echo &#039;var ajaxsync = new Request.HTML({&lt;br /&gt;
        url: url, &#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
echo &#039;var ajaxsync = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also another common usuage of mootools in  Joomla is the popup box. The Joomla 1.5 javascript code to close this box is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;document.getElementById(&#039;sbox-window&#039;).close();&amp;lt;/source&amp;gt;&lt;br /&gt;
in Joomla 1.6 you need to use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;window.parent.SqueezeBox.close();&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Converting your JParameters to JForms ==&lt;br /&gt;
Joomla 1.6 now uses the JForms class to handle parameters and it has also changed the way parameters are defined in your XML files. To make menu/component/module/plugin parameters work, first you need to update the XML file. Here is an automated way to handle the bulk of the conversion. (added &amp;quot;&amp;quot; to the examples below so you can see spaces in the search query as well). Use eclipse to search and replace parameters in *.xml files&lt;br /&gt;
&lt;br /&gt;
replace &amp;quot;&amp;lt;param &amp;quot; with &amp;quot;&amp;lt;field &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/param&amp;gt;&amp;quot; with &amp;lt;/field&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params*?&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/params&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/fieldset&amp;gt;&amp;lt;/fields&amp;gt;&amp;lt;/config&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;install &amp;quot; with &amp;quot;&amp;lt;extension &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/install&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/extension&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Change the &amp;quot;extension&amp;quot; node to add the following attributes:&lt;br /&gt;
* Keep the existing &amp;quot;type&amp;quot; attribute&lt;br /&gt;
* version=&amp;quot;1.6.0&amp;quot;&lt;br /&gt;
* client=&amp;quot;site&amp;quot;&lt;br /&gt;
* method=&amp;quot;upgrade&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example for a module:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;module&amp;quot; version=&amp;quot;1.6.0&amp;quot; client=&amp;quot;site&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now if you want to use your joomla extension on both Joomla 1.5 and 1.6 you will need to go to your &amp;quot;team synchronising&amp;quot; view in eclipse. Double click on your changed xml file, which will open the compare editor. Then simply copy-paste back your old Joomla 1.5 params into your new Joomla 1.6 xml file and save.&lt;br /&gt;
&lt;br /&gt;
If you have custom parameter types, you will need to do some additional work. In Joomla 1.5 you would use the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;params addpath=&amp;quot;/administrator/components/com_yourname/elements&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
In joomla 1.6 JParameter classes won&#039;t work and you will need to convert your jparameter fields into JForm fields. Create a new directory and copy your &amp;quot;old elements&amp;quot; into them. Then you need to load these new fields with the individual parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;field name=&amp;quot;sample&amp;quot; type=&amp;quot;sampleField&amp;quot; size=&amp;quot;5&amp;quot; default=&amp;quot;&amp;quot;			label=&amp;quot;sampleField&amp;quot; description=&amp;quot;sampleField&amp;quot; addfieldpath=&amp;quot;/administrator/components/com_yourname/fields&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use eclipse to search and replace files in your newly created fields directory.&lt;br /&gt;
replace &amp;quot;JElement&amp;quot; with &amp;quot;JFormField&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;var $_name =&amp;quot; with &amp;quot;public $type =&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;function fetchElement($name, $value, &amp;amp;$node, $control_name)&amp;quot; with &amp;quot;protected function getInput()&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you still need to replace the references to $control_name and others in your new JForm field, but at least the bulk of the work has been done automatically&lt;br /&gt;
&lt;br /&gt;
== Component conversion planning items ==&lt;br /&gt;
Here is an informal and unordered list of things to consider if you are planning to convert your 1.5 extensions to 1.6. They are mostly from the Google general development group around the time of 1.6b15.&lt;br /&gt;
&lt;br /&gt;
1. Language file - J!1.6 enforces strict rules for language&lt;br /&gt;
translations.  No more spaces in the keys or values that aren&#039;t&lt;br /&gt;
enclosed in double quotes. This change will hopefully get much better performance than the previous loose enforcement.&lt;br /&gt;
&lt;br /&gt;
2. Changes to view parameters - J!1.6 has a strict new way of&lt;br /&gt;
specifying parameters for views.  J!1.5 allowed a bit of freedom where&lt;br /&gt;
the parameters could be defined at the view.html.php level but now it&lt;br /&gt;
has to be at the tmpl level.  AE believes the view paramters were removed.&lt;br /&gt;
&lt;br /&gt;
3. Plugins - J!1.6 now creates a different hierarchy structure for&lt;br /&gt;
plugin types.  Files are no longer placed where they used to be, so if&lt;br /&gt;
your other parts of your application (comp, mods, etc.) expects them to be in a certain position, it won&#039;t&lt;br /&gt;
work.  If you only load your plugins via the 1.5 API you should be fine.&lt;br /&gt;
&lt;br /&gt;
4. Installation process - preflight, postflight, etc - These are new&lt;br /&gt;
events that can screw up an existing installlation process.  -1 on me for not documenting the process while stepping through xdebug.&lt;br /&gt;
They should be totally optional access points to the installation process.  But if your 1.5 install process is tricky for some reason, then these can be used to do clean up activities.&lt;br /&gt;
&lt;br /&gt;
5. Custom fields - This could be a could be huge depending the volume and vagaries your 1.5 usage of custom fields. The entire process changed and now the custom fields must inherit from J! base classes.  (AE) This is no different from 1.5 inheriting from JElement.  In 1.6 you inherit from JFormField which is a much more robust class.&lt;br /&gt;
&lt;br /&gt;
6. Admin template changes - Admin functions that depended on certain&lt;br /&gt;
functions, naming conventions etc no longer work.  Khepri has been removed.  Other admin functions/libraries may have changed.  &lt;br /&gt;
&lt;br /&gt;
7. ACL - gid and aid have been removed.  Significant changes to ACL archtecture.  Bricking refers to totally locking your self and everyone else out - Last chance backdoor involves adding a emergency pw to the config file.&lt;br /&gt;
&lt;br /&gt;
8. Renamed methods, table names, etc. &lt;br /&gt;
&lt;br /&gt;
9. sys.ini language translation file - This file is used for installation process translations...&lt;br /&gt;
&lt;br /&gt;
10. include folder - All of the libraries (Archive, domit, js, PEAR, etc) in the include folder have been removed in J!1.6. &lt;br /&gt;
&lt;br /&gt;
11. Mootools version changed from 1.1 (Joomla 1.5.19 has a upgrade plug-in for 1.2) to 1.3.  Mootools 1.3 is not compatible with Mootools 1.1 but it is compatible with Mootools 1.2.&lt;br /&gt;
&lt;br /&gt;
12. Use paths defined in defines.php. (Note they are different for the site and the administration)&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=36054</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=36054"/>
		<updated>2011-01-25T12:34:14Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: /* Upgrading core table and field name usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse, see [[Setting up your workstation for Joomla! development]].&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
[[What&#039;s new in Joomla 1.6#Developers]] describes most changes of Joomla 1.6 and how this affect developers.&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes, add quotes to string values and update your comments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;An earlier version of this document noted that &#039;&#039;&#039;double&#039;&#039;&#039; quotes were not allowed, but see [http://php.net/manual/en/function.parse-ini-file.php the PHP parse_ini_file documentation] and below for further information.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Single quotes are now not allowed. This can be easily bypassed by searching &#039; and replace with &amp;quot;. &lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
If you do not remove these illegal strings, then your language file won&#039;t load and you won&#039;t get any error message. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are now handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing Javascript function overrides ==&lt;br /&gt;
Joomla now has some of its Javascript functions prefixed with &amp;quot;Joomla&amp;quot;. This means the functions are always unique and won&#039;t clash with other javascript functions on your server/webpage. However, you now need a different method to override the default Joomla Javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
For Joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing removed functions ==&lt;br /&gt;
Some functions were removed for various reasons. You can find a list of them on [[What&#039;s new in Joomla_1.6#Removed_features]].&lt;br /&gt;
&lt;br /&gt;
Note that the ADODB compatibility methods included function like $db-&amp;gt;Execute($query) which now need a separate $db-&amp;gt;setQuery($query);$db-&amp;gt;Query();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Renamed events ==&lt;br /&gt;
&lt;br /&gt;
A large number of the Joomla 1.5 events have been renamed. Here is the list of renamed events.&lt;br /&gt;
*onContentAfterSave&lt;br /&gt;
*onContentAfterTitle&lt;br /&gt;
*onContentAfterDisplay&lt;br /&gt;
*onContentBeforeDisplay&lt;br /&gt;
*onContentBeforeSave&lt;br /&gt;
*onContentSearch&lt;br /&gt;
*onContentSearchAreas&lt;br /&gt;
*onUserAuthenticate&lt;br /&gt;
*onUserAfterDelete&lt;br /&gt;
*onUserAfterSave&lt;br /&gt;
*onUserBeforeDelete&lt;br /&gt;
*onUserBeforeSave&lt;br /&gt;
*onUserLogin&lt;br /&gt;
*onUserLogout&lt;br /&gt;
*All content events (except for search and search areas) now pass a &#039;context&#039; as the first argument to alert the plugin as to what type of content is being passed.  The plugin event may or may not heed this context.&lt;br /&gt;
&lt;br /&gt;
This means that if you use Joomla events you have two options:&amp;lt;br/&amp;gt;&lt;br /&gt;
1) rename the event and your extension can only be used on Joomla 1.6&amp;lt;br/&amp;gt;&lt;br /&gt;
2) create your own &amp;quot;legacy layer&amp;quot; and add the new event function name to your plugin. Here is an example of the user plugin:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    //joomla 1.6 compatibility code &lt;br /&gt;
 	public function onUserLogin($user, $options){&lt;br /&gt;
 	    $result = $this-&amp;gt;onLoginUser($user, $options);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
 	}&lt;br /&gt;
	public function onUserLogout($user)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onLogoutUser($user);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterDelete($user, $succes, $msg)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterDeleteUser($user, $succes, $msg);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserBeforeSave($user, $isnew, $new){&lt;br /&gt;
 	    $result = $this-&amp;gt;onBeforeStoreUser($user, $isnew, $new);&lt;br /&gt;
 	    return $result;	&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterSave($user, $isnew, $success, $msg){&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterStoreUser($user, $isnew, $success, $msg);&lt;br /&gt;
 	    return $result;			&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing name=&amp;quot;adminForm&amp;quot; to id=&amp;quot;adminForm&amp;quot; ==&lt;br /&gt;
To create your own admin forms in joomla you now need to use id=&amp;quot;adminForm&amp;quot;. This is because the use of the tag &amp;quot;name&amp;quot; is not valid HTML strict and has compatibility issues when used in XHTML served as XML.\. Although there is build in compatibility check to look for the old name=&amp;quot;adminForm&amp;quot; tag, it is best to add the new id tag. Depending on the features you want to use you may need to include both, name=&amp;quot;adminForm&amp;quot; and id=&amp;quot;adminForm&amp;quot; because not all core functionality has been updated to use id&#039;s.  An example of the new form code is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;index.php&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot;&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Removing references to index2.php and index3.php ==&lt;br /&gt;
Joomla 1.0 had different index files to serve admin content in different manners. Joomla 1.6 has now got better way to handle this and you need to search your codebase for &amp;quot;index2.php&amp;quot; and &amp;quot;index3.php&amp;quot; to ensure you don&#039;t have any Joomla 1.0 style links. If you need to display your component without any of the other Joomla 1.6 admin content (menus, etc) then add the following to the url: &amp;quot;&amp;amp;tmpl=component&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Upgrading core table and field name usage ==&lt;br /&gt;
Many of the core Joomla tables have been simplified, combined or renamed. This was needed to get rid of some limitation dating back to Joomla 1.0. This means however that if you have code that directly manipulates Joomla tables, that you need to add a function that detects Joomla 1.6 and had different SQL queries based on the joomla version. Plase note that both tables and field names have been renamed or removed. An example is the following function that can find if a plugin is published on both Joomla 1.5 and 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;		&lt;br /&gt;
function getPluginStatus($element, $folder) {&lt;br /&gt;
    //get joomla specs&lt;br /&gt;
    $db = &amp;amp; JFactory::getDBO();		&lt;br /&gt;
    $version = new JVersion;&lt;br /&gt;
    $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
    if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
        //Joomla 1.6 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__extensions WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; . $db-&amp;gt;Quote($folder);&lt;br /&gt;
    } else {&lt;br /&gt;
        //Joomla 1.0/1.5 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__plugins WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; .   $db-&amp;gt;Quote($folder); &lt;br /&gt;
    }&lt;br /&gt;
    $db-&amp;gt;setQuery($query);&lt;br /&gt;
    $result = $db-&amp;gt;loadResult();&lt;br /&gt;
    return $result;&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing in the XML installer manifest file ==&lt;br /&gt;
Joomla 1.6 now uses a more streamlined approach to the XML file inside the ZIP file that installs Joomla extentions.&lt;br /&gt;
&lt;br /&gt;
== New mootools version ==&lt;br /&gt;
Most important is that the Ajax class has been depreciated and replaced by the Request class. That means that if you use ajax calls you need to have a version switcher (below a sample code)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$version = new JVersion;&lt;br /&gt;
$joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
&lt;br /&gt;
..... (your code) ....&lt;br /&gt;
&lt;br /&gt;
    /* our ajax istance for starting the sync */&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
 echo &#039;var ajax = new Request.HTML({&lt;br /&gt;
           url: url,&#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
 echo &#039;var ajax = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
     echo &#039;var ajaxsync = new Request.HTML({&lt;br /&gt;
        url: url, &#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
echo &#039;var ajaxsync = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Converting your JParameters to JForms ==&lt;br /&gt;
Joomla 1.6 now uses the JForms class to handle parameters and it has also changed the way parameters are defined in your XML files. To make menu/component/module/plugin parameters work, first you need to update the XML file. Here is an automated way to handle the bulk of the conversion. (added &amp;quot;&amp;quot; to the examples below so you can see spaces in the search query as well). Use eclipse to search and replace parameters in *.xml files&lt;br /&gt;
&lt;br /&gt;
replace &amp;quot;&amp;lt;param &amp;quot; with &amp;quot;&amp;lt;field &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/param&amp;gt;&amp;quot; with &amp;lt;/field&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params*?&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/params&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/fieldset&amp;gt;&amp;lt;/fields&amp;gt;&amp;lt;/config&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;install &amp;quot; with &amp;quot;&amp;lt;extension &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/install&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/extension&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Change the &amp;quot;extension&amp;quot; node to add the following attributes:&lt;br /&gt;
* Keep the existing &amp;quot;type&amp;quot; attribute&lt;br /&gt;
* version=&amp;quot;1.6.0&amp;quot;&lt;br /&gt;
* client=&amp;quot;site&amp;quot;&lt;br /&gt;
* method=&amp;quot;upgrade&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example for a module:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;module&amp;quot; version=&amp;quot;1.6.0&amp;quot; client=&amp;quot;site&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now if you want to use your joomla extension on both Joomla 1.5 and 1.6 you will need to go to your &amp;quot;team synchronising&amp;quot; view in eclipse. Double click on your changed xml file, which will open the compare editor. Then simply copy-paste back your old Joomla 1.5 params into your new Joomla 1.6 xml file and save.&lt;br /&gt;
&lt;br /&gt;
If you have custom parameter types, you will need to do some additional work. In Joomla 1.5 you would use the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;params addpath=&amp;quot;/administrator/components/com_yourname/elements&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
In joomla 1.6 JParameter classes won&#039;t work and you will need to convert your jparameter fields into JForm fields. Create a new directory and copy your &amp;quot;old elements&amp;quot; into them. Then you need to load these new fields with the individual parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;field name=&amp;quot;sample&amp;quot; type=&amp;quot;sampleField&amp;quot; size=&amp;quot;5&amp;quot; default=&amp;quot;&amp;quot;			label=&amp;quot;sampleField&amp;quot; description=&amp;quot;sampleField&amp;quot; addfieldpath=&amp;quot;/administrator/components/com_yourname/fields&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use eclipse to search and replace files in your newly created fields directory.&lt;br /&gt;
replace &amp;quot;JElement&amp;quot; with &amp;quot;JFormField&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;var $_name =&amp;quot; with &amp;quot;public $type =&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;function fetchElement($name, $value, &amp;amp;$node, $control_name)&amp;quot; with &amp;quot;protected function getInput()&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you still need to replace the references to $control_name and others in your new JForm field, but at least the bulk of the work has been done automatically&lt;br /&gt;
&lt;br /&gt;
== Component conversion planning items ==&lt;br /&gt;
Here is an informal and unordered list of things to consider if you are planning to convert your 1.5 extensions to 1.6. They are mostly from the Google general development group around the time of 1.6b15.&lt;br /&gt;
&lt;br /&gt;
1. Language file - J!1.6 enforces strict rules for language&lt;br /&gt;
translations.  No more spaces in the keys or values that aren&#039;t&lt;br /&gt;
enclosed in double quotes. This change will hopefully get much better performance than the previous loose enforcement.&lt;br /&gt;
&lt;br /&gt;
2. Changes to view parameters - J!1.6 has a strict new way of&lt;br /&gt;
specifying parameters for views.  J!1.5 allowed a bit of freedom where&lt;br /&gt;
the parameters could be defined at the view.html.php level but now it&lt;br /&gt;
has to be at the tmpl level.  AE believes the view paramters were removed.&lt;br /&gt;
&lt;br /&gt;
3. Plugins - J!1.6 now creates a different hierarchy structure for&lt;br /&gt;
plugin types.  Files are no longer placed where they used to be, so if&lt;br /&gt;
your other parts of your application (comp, mods, etc.) expects them to be in a certain position, it won&#039;t&lt;br /&gt;
work.  If you only load your plugins via the 1.5 API you should be fine.&lt;br /&gt;
&lt;br /&gt;
4. Installation process - preflight, postflight, etc - These are new&lt;br /&gt;
events that can screw up an existing installlation process.  -1 on me for not documenting the process while stepping through xdebug.&lt;br /&gt;
They should be totally optional access points to the installation process.  But if your 1.5 install process is tricky for some reason, then these can be used to do clean up activities.&lt;br /&gt;
&lt;br /&gt;
5. Custom fields - This could be a could be huge depending the volume and vagaries your 1.5 usage of custom fields. The entire process changed and now the custom fields must inherit from J! base classes.  (AE) This is no different from 1.5 inheriting from JElement.  In 1.6 you inherit from JFormField which is a much more robust class.&lt;br /&gt;
&lt;br /&gt;
6. Admin template changes - Admin functions that depended on certain&lt;br /&gt;
functions, naming conventions etc no longer work.  Khepri has been removed.  Other admin functions/libraries may have changed.  &lt;br /&gt;
&lt;br /&gt;
7. ACL - gid and aid have been removed.  Significant changes to ACL archtecture.  Bricking refers to totally locking your self and everyone else out - Last chance backdoor involves adding a emergency pw to the config file.&lt;br /&gt;
&lt;br /&gt;
8. Renamed methods, table names, etc. &lt;br /&gt;
&lt;br /&gt;
9. sys.ini language translation file - This file is used for installation process translations...&lt;br /&gt;
&lt;br /&gt;
10. include folder - All of the libraries (Archive, domit, js, PEAR, etc) in the include folder have been removed in J!1.6. &lt;br /&gt;
&lt;br /&gt;
11. Mootools version changed from 1.1 (Joomla 1.5.19 has a upgrade plug-in for 1.2) to 1.3.  Mootools 1.3 is not compatible with Mootools 1.1 but it is compatible with Mootools 1.2.&lt;br /&gt;
&lt;br /&gt;
12. Use paths defined in defines.php. (Note they are different for the site and the administration)&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=36053</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=36053"/>
		<updated>2011-01-25T12:29:19Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: /* Changing removed functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse, see [[Setting up your workstation for Joomla! development]].&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
[[What&#039;s new in Joomla 1.6#Developers]] describes most changes of Joomla 1.6 and how this affect developers.&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes, add quotes to string values and update your comments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;An earlier version of this document noted that &#039;&#039;&#039;double&#039;&#039;&#039; quotes were not allowed, but see [http://php.net/manual/en/function.parse-ini-file.php the PHP parse_ini_file documentation] and below for further information.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Single quotes are now not allowed. This can be easily bypassed by searching &#039; and replace with &amp;quot;. &lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
If you do not remove these illegal strings, then your language file won&#039;t load and you won&#039;t get any error message. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are now handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing Javascript function overrides ==&lt;br /&gt;
Joomla now has some of its Javascript functions prefixed with &amp;quot;Joomla&amp;quot;. This means the functions are always unique and won&#039;t clash with other javascript functions on your server/webpage. However, you now need a different method to override the default Joomla Javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
For Joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing removed functions ==&lt;br /&gt;
Some functions were removed for various reasons. You can find a list of them on [[What&#039;s new in Joomla_1.6#Removed_features]].&lt;br /&gt;
&lt;br /&gt;
Note that the ADODB compatibility methods included function like $db-&amp;gt;Execute($query) which now need a separate $db-&amp;gt;setQuery($query);$db-&amp;gt;Query();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Renamed events ==&lt;br /&gt;
&lt;br /&gt;
A large number of the Joomla 1.5 events have been renamed. Here is the list of renamed events.&lt;br /&gt;
*onContentAfterSave&lt;br /&gt;
*onContentAfterTitle&lt;br /&gt;
*onContentAfterDisplay&lt;br /&gt;
*onContentBeforeDisplay&lt;br /&gt;
*onContentBeforeSave&lt;br /&gt;
*onContentSearch&lt;br /&gt;
*onContentSearchAreas&lt;br /&gt;
*onUserAuthenticate&lt;br /&gt;
*onUserAfterDelete&lt;br /&gt;
*onUserAfterSave&lt;br /&gt;
*onUserBeforeDelete&lt;br /&gt;
*onUserBeforeSave&lt;br /&gt;
*onUserLogin&lt;br /&gt;
*onUserLogout&lt;br /&gt;
*All content events (except for search and search areas) now pass a &#039;context&#039; as the first argument to alert the plugin as to what type of content is being passed.  The plugin event may or may not heed this context.&lt;br /&gt;
&lt;br /&gt;
This means that if you use Joomla events you have two options:&amp;lt;br/&amp;gt;&lt;br /&gt;
1) rename the event and your extension can only be used on Joomla 1.6&amp;lt;br/&amp;gt;&lt;br /&gt;
2) create your own &amp;quot;legacy layer&amp;quot; and add the new event function name to your plugin. Here is an example of the user plugin:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    //joomla 1.6 compatibility code &lt;br /&gt;
 	public function onUserLogin($user, $options){&lt;br /&gt;
 	    $result = $this-&amp;gt;onLoginUser($user, $options);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
 	}&lt;br /&gt;
	public function onUserLogout($user)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onLogoutUser($user);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterDelete($user, $succes, $msg)	{&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterDeleteUser($user, $succes, $msg);&lt;br /&gt;
 	    return $result;&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserBeforeSave($user, $isnew, $new){&lt;br /&gt;
 	    $result = $this-&amp;gt;onBeforeStoreUser($user, $isnew, $new);&lt;br /&gt;
 	    return $result;	&lt;br /&gt;
	}&lt;br /&gt;
	public function onUserAfterSave($user, $isnew, $success, $msg){&lt;br /&gt;
 	    $result = $this-&amp;gt;onAfterStoreUser($user, $isnew, $success, $msg);&lt;br /&gt;
 	    return $result;			&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing name=&amp;quot;adminForm&amp;quot; to id=&amp;quot;adminForm&amp;quot; ==&lt;br /&gt;
To create your own admin forms in joomla you now need to use id=&amp;quot;adminForm&amp;quot;. This is because the use of the tag &amp;quot;name&amp;quot; is not valid HTML strict and has compatibility issues when used in XHTML served as XML.\. Although there is build in compatibility check to look for the old name=&amp;quot;adminForm&amp;quot; tag, it is best to add the new id tag. Depending on the features you want to use you may need to include both, name=&amp;quot;adminForm&amp;quot; and id=&amp;quot;adminForm&amp;quot; because not all core functionality has been updated to use id&#039;s.  An example of the new form code is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;index.php&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot;&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Removing references to index2.php and index3.php ==&lt;br /&gt;
Joomla 1.0 had different index files to serve admin content in different manners. Joomla 1.6 has now got better way to handle this and you need to search your codebase for &amp;quot;index2.php&amp;quot; and &amp;quot;index3.php&amp;quot; to ensure you don&#039;t have any Joomla 1.0 style links. If you need to display your component without any of the other Joomla 1.6 admin content (menus, etc) then add the following to the url: &amp;quot;&amp;amp;tmpl=component&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Upgrading core table and field name usage ==&lt;br /&gt;
Many of the core Joomla tables have been simplified, combined or renamed. This was needed to get rid of some limitation dating back to Joomla 1.0. This means however that if you have code that directly manipulates Joomla tables, that you need to add a function that detects Joomla 1.6 and had different SQL queries based on the joomla version. An example is the following function that can find if a plugin is published on both Joomla 1.5 and 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;		&lt;br /&gt;
function getPluginStatus($element, $folder) {&lt;br /&gt;
    //get joomla specs&lt;br /&gt;
    $db = &amp;amp; JFactory::getDBO();		&lt;br /&gt;
    $version = new JVersion;&lt;br /&gt;
    $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
    if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
        //Joomla 1.6 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__extensions WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; . $db-&amp;gt;Quote($folder);&lt;br /&gt;
    } else {&lt;br /&gt;
        //Joomla 1.0/1.5 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__plugins WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; .   $db-&amp;gt;Quote($folder); &lt;br /&gt;
    }&lt;br /&gt;
    $db-&amp;gt;setQuery($query);&lt;br /&gt;
    $result = $db-&amp;gt;loadResult();&lt;br /&gt;
    return $result;&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing in the XML installer manifest file ==&lt;br /&gt;
Joomla 1.6 now uses a more streamlined approach to the XML file inside the ZIP file that installs Joomla extentions.&lt;br /&gt;
&lt;br /&gt;
== New mootools version ==&lt;br /&gt;
Most important is that the Ajax class has been depreciated and replaced by the Request class. That means that if you use ajax calls you need to have a version switcher (below a sample code)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$version = new JVersion;&lt;br /&gt;
$joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
&lt;br /&gt;
..... (your code) ....&lt;br /&gt;
&lt;br /&gt;
    /* our ajax istance for starting the sync */&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
 echo &#039;var ajax = new Request.HTML({&lt;br /&gt;
           url: url,&#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
 echo &#039;var ajax = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
     echo &#039;var ajaxsync = new Request.HTML({&lt;br /&gt;
        url: url, &#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
echo &#039;var ajaxsync = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Converting your JParameters to JForms ==&lt;br /&gt;
Joomla 1.6 now uses the JForms class to handle parameters and it has also changed the way parameters are defined in your XML files. To make menu/component/module/plugin parameters work, first you need to update the XML file. Here is an automated way to handle the bulk of the conversion. (added &amp;quot;&amp;quot; to the examples below so you can see spaces in the search query as well). Use eclipse to search and replace parameters in *.xml files&lt;br /&gt;
&lt;br /&gt;
replace &amp;quot;&amp;lt;param &amp;quot; with &amp;quot;&amp;lt;field &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/param&amp;gt;&amp;quot; with &amp;lt;/field&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params*?&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/params&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/fieldset&amp;gt;&amp;lt;/fields&amp;gt;&amp;lt;/config&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;install &amp;quot; with &amp;quot;&amp;lt;extension &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/install&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/extension&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Change the &amp;quot;extension&amp;quot; node to add the following attributes:&lt;br /&gt;
* Keep the existing &amp;quot;type&amp;quot; attribute&lt;br /&gt;
* version=&amp;quot;1.6.0&amp;quot;&lt;br /&gt;
* client=&amp;quot;site&amp;quot;&lt;br /&gt;
* method=&amp;quot;upgrade&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example for a module:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;extension type=&amp;quot;module&amp;quot; version=&amp;quot;1.6.0&amp;quot; client=&amp;quot;site&amp;quot; method=&amp;quot;upgrade&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now if you want to use your joomla extension on both Joomla 1.5 and 1.6 you will need to go to your &amp;quot;team synchronising&amp;quot; view in eclipse. Double click on your changed xml file, which will open the compare editor. Then simply copy-paste back your old Joomla 1.5 params into your new Joomla 1.6 xml file and save.&lt;br /&gt;
&lt;br /&gt;
If you have custom parameter types, you will need to do some additional work. In Joomla 1.5 you would use the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;params addpath=&amp;quot;/administrator/components/com_yourname/elements&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
In joomla 1.6 JParameter classes won&#039;t work and you will need to convert your jparameter fields into JForm fields. Create a new directory and copy your &amp;quot;old elements&amp;quot; into them. Then you need to load these new fields with the individual parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;field name=&amp;quot;sample&amp;quot; type=&amp;quot;sampleField&amp;quot; size=&amp;quot;5&amp;quot; default=&amp;quot;&amp;quot;			label=&amp;quot;sampleField&amp;quot; description=&amp;quot;sampleField&amp;quot; addfieldpath=&amp;quot;/administrator/components/com_yourname/fields&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use eclipse to search and replace files in your newly created fields directory.&lt;br /&gt;
replace &amp;quot;JElement&amp;quot; with &amp;quot;JFormField&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;var $_name =&amp;quot; with &amp;quot;public $type =&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;function fetchElement($name, $value, &amp;amp;$node, $control_name)&amp;quot; with &amp;quot;protected function getInput()&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you still need to replace the references to $control_name and others in your new JForm field, but at least the bulk of the work has been done automatically&lt;br /&gt;
&lt;br /&gt;
== Component conversion planning items ==&lt;br /&gt;
Here is an informal and unordered list of things to consider if you are planning to convert your 1.5 extensions to 1.6. They are mostly from the Google general development group around the time of 1.6b15.&lt;br /&gt;
&lt;br /&gt;
1. Language file - J!1.6 enforces strict rules for language&lt;br /&gt;
translations.  No more spaces in the keys or values that aren&#039;t&lt;br /&gt;
enclosed in double quotes. This change will hopefully get much better performance than the previous loose enforcement.&lt;br /&gt;
&lt;br /&gt;
2. Changes to view parameters - J!1.6 has a strict new way of&lt;br /&gt;
specifying parameters for views.  J!1.5 allowed a bit of freedom where&lt;br /&gt;
the parameters could be defined at the view.html.php level but now it&lt;br /&gt;
has to be at the tmpl level.  AE believes the view paramters were removed.&lt;br /&gt;
&lt;br /&gt;
3. Plugins - J!1.6 now creates a different hierarchy structure for&lt;br /&gt;
plugin types.  Files are no longer placed where they used to be, so if&lt;br /&gt;
your other parts of your application (comp, mods, etc.) expects them to be in a certain position, it won&#039;t&lt;br /&gt;
work.  If you only load your plugins via the 1.5 API you should be fine.&lt;br /&gt;
&lt;br /&gt;
4. Installation process - preflight, postflight, etc - These are new&lt;br /&gt;
events that can screw up an existing installlation process.  -1 on me for not documenting the process while stepping through xdebug.&lt;br /&gt;
They should be totally optional access points to the installation process.  But if your 1.5 install process is tricky for some reason, then these can be used to do clean up activities.&lt;br /&gt;
&lt;br /&gt;
5. Custom fields - This could be a could be huge depending the volume and vagaries your 1.5 usage of custom fields. The entire process changed and now the custom fields must inherit from J! base classes.  (AE) This is no different from 1.5 inheriting from JElement.  In 1.6 you inherit from JFormField which is a much more robust class.&lt;br /&gt;
&lt;br /&gt;
6. Admin template changes - Admin functions that depended on certain&lt;br /&gt;
functions, naming conventions etc no longer work.  Khepri has been removed.  Other admin functions/libraries may have changed.  &lt;br /&gt;
&lt;br /&gt;
7. ACL - gid and aid have been removed.  Significant changes to ACL archtecture.  Bricking refers to totally locking your self and everyone else out - Last chance backdoor involves adding a emergency pw to the config file.&lt;br /&gt;
&lt;br /&gt;
8. Renamed methods, table names, etc. &lt;br /&gt;
&lt;br /&gt;
9. sys.ini language translation file - This file is used for installation process translations...&lt;br /&gt;
&lt;br /&gt;
10. include folder - All of the libraries (Archive, domit, js, PEAR, etc) in the include folder have been removed in J!1.6. &lt;br /&gt;
&lt;br /&gt;
11. Mootools version changed from 1.1 (Joomla 1.5.19 has a upgrade plug-in for 1.2) to 1.3.  Mootools 1.3 is not compatible with Mootools 1.1 but it is compatible with Mootools 1.2.&lt;br /&gt;
&lt;br /&gt;
12. Use paths defined in defines.php. (Note they are different for the site and the administration)&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=35813</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=35813"/>
		<updated>2011-01-21T18:58:04Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: /* Converting your JParameters to JForms */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse, see [[Setting up your workstation for Joomla! development]].&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
[[What&#039;s new in Joomla 1.6#Developers]] describes most changes of Joomla 1.6 and how this affect developers.&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes, add quotes to string values and update your comments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;An earlier version of this document noted that &#039;&#039;&#039;double&#039;&#039;&#039; quotes were not allowed, but see [http://php.net/manual/en/function.parse-ini-file.php the PHP parse_ini_file documentation] and below for further information.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Single quotes are now not allowed. This can be easily bypassed by searching &#039; and replace with &amp;quot;. &lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
If you do not remove these illegal strings, then your language file won&#039;t load and you won&#039;t get any error message. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are now handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing Javascript function overrides ==&lt;br /&gt;
Joomla now has its Javascript functions with Joomla. This means the functions are always unique and won&#039;t clash with other javascript functions on your server/webpage. However, you now need a different method to override the default Joomla Javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
For Joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing removed functions ==&lt;br /&gt;
Some functions were removed for various reasons. You can find a list of them on [[What&#039;s new in Joomla_1.6#Removed_features]].&lt;br /&gt;
&lt;br /&gt;
Note that the ADODB compatibility methods included function like $db-&amp;gt;Execute($query) which now need a separate $db-&amp;gt;setQuery($query);$db-&amp;gt;Query();&lt;br /&gt;
&lt;br /&gt;
== Changing name=&amp;quot;adminForm&amp;quot; to id=&amp;quot;adminForm&amp;quot; ==&lt;br /&gt;
To create your own admin forms in joomla you now need to use id=&amp;quot;adminForm&amp;quot;. This is because the use of the tag &amp;quot;name&amp;quot; is not valid html strict. Although there is build in compatibility check to look for the old name=&amp;quot;adminForm&amp;quot; tag, it is best to add the new id tag. An example of the new form code is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;index.php&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Removing references to index2.php and index3.php ==&lt;br /&gt;
Joomla 1.0 had different index files to serve admin content in different manners. Joomla 1.6 has now got better way to handle this and you need to search your codebase for &amp;quot;index2.php&amp;quot; and &amp;quot;index3.php&amp;quot; to ensure you don&#039;t have any Joomla 1.0 style links. If you need to display your component without any of the other Joomla 1.6 admin content (menus, etc) then add the following to the url: &amp;quot;&amp;amp;tmpl=component&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Upgrading core table and field name usage ==&lt;br /&gt;
Many of the core Joomla tables have been simplified, combined or renamed. This was needed to get rid of some limitation dating back to Joomla 1.0. This means however that if you have code that directly manipulates Joomla tables, that you need to add a function that detects Joomla 1.6 and had different SQL queries based on the joomla version. An example is the following function that can find if a plugin is published on both Joomla 1.5 and 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;		&lt;br /&gt;
function getPluginStatus($element, $folder) {&lt;br /&gt;
    //get joomla specs&lt;br /&gt;
    $db = &amp;amp; JFactory::getDBO();		&lt;br /&gt;
    $version = new JVersion;&lt;br /&gt;
    $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
    if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
        //Joomla 1.6 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__extensions WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; . $db-&amp;gt;Quote($folder);&lt;br /&gt;
    } else {&lt;br /&gt;
        //Joomla 1.0/1.5 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__plugins WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; .   $db-&amp;gt;Quote($folder); &lt;br /&gt;
    }&lt;br /&gt;
    $db-&amp;gt;setQuery($query);&lt;br /&gt;
    $result = $db-&amp;gt;loadResult();&lt;br /&gt;
    return $result;&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing in the XML installer manifest file ==&lt;br /&gt;
Joomla 1.6 now uses a more streamlined approach to the XML file inside the ZIP file that installs Joomla extentions.&lt;br /&gt;
&lt;br /&gt;
== New mootools version ==&lt;br /&gt;
Most important is that the Ajax class has been depreciated and replaced by the Request class. That means that if you use ajax calls you need to have a version switcher (below a sample code)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$version = new JVersion;&lt;br /&gt;
$joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
&lt;br /&gt;
..... (your code) ....&lt;br /&gt;
&lt;br /&gt;
    /* our ajax istance for starting the sync */&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
 echo &#039;var ajax = new Request.HTML({&lt;br /&gt;
           url: url,&#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
 echo &#039;var ajax = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
     echo &#039;var ajaxsync = new Request.HTML({&lt;br /&gt;
        url: url, &#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
echo &#039;var ajaxsync = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Converting your JParameters to JForms ==&lt;br /&gt;
Joomla 1.6 now uses the JForms class to handle parameters and it has also changed the way parameters are defined in your XML files. To make menu/component/module/plugin parameters work, first you need to update the XML file. Here is an automated way to handle the bulk of the conversion. (added &amp;quot;&amp;quot; to the examples below so you can see spaces in the search query as well). Use eclipse to search and replace parameters in *.xml files&lt;br /&gt;
&lt;br /&gt;
replace &amp;quot;&amp;lt;param &amp;quot; with &amp;quot;&amp;lt;field &amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;params*?&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;&amp;lt;/params&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/fieldset&amp;gt;&amp;lt;/fields&amp;gt;&amp;lt;/config&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Now if you want to use your joomla extension on both Joomla 1.5 and 1.6 you will need to go to your &amp;quot;team synchronising&amp;quot; view in eclipse. Double click on your changed xml file, which will open the compare editor. Then simply copy-paste back your old Joomla 1.5 params into your new Joomla 1.6 xml file and save.&lt;br /&gt;
&lt;br /&gt;
If you have custom parameter types, you will need to do some additional work. In Joomla 1.5 you would use the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;params addpath=&amp;quot;/administrator/components/com_yourname/elements&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
In joomla 1.6 JParameter classes won&#039;t work and you will need to convert your jparameter fields into JForm fields. Create a new directory and copy your &amp;quot;old elements&amp;quot; into them. Then you need to load these new fields with the individual parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;field name=&amp;quot;sample&amp;quot; type=&amp;quot;sampleField&amp;quot; size=&amp;quot;5&amp;quot; default=&amp;quot;&amp;quot;			label=&amp;quot;sampleField&amp;quot; description=&amp;quot;sampleField&amp;quot; addfieldpath=&amp;quot;/administrator/components/com_yourname/fields&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use eclipse to search and replace files in your newly created fields directory.&lt;br /&gt;
replace &amp;quot;JElement&amp;quot; with &amp;quot;JFormField&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;var $_name =&amp;quot; with &amp;quot;public $type =&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
replace &amp;quot;function fetchElement($name, $value, &amp;amp;$node, $control_name)&amp;quot; with &amp;quot;protected function getInput()&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you still need to replace the references to $control_name and others in your new JForm field, but at least the bulk of the work has been done automatically&lt;br /&gt;
&lt;br /&gt;
== Component conversion planning items ==&lt;br /&gt;
Here is an informal and unordered list of things to consider if you are planning to convert your 1.5 extensions to 1.6. They are mostly from the Google general development group around the time of 1.6b15.&lt;br /&gt;
&lt;br /&gt;
1. Language file - J!1.6 enforces strict rules for language&lt;br /&gt;
translations.  No more spaces in the keys or values that aren&#039;t&lt;br /&gt;
enclosed in double quotes. This change will hopefully get much better performance than the previous loose enforcement.&lt;br /&gt;
&lt;br /&gt;
2. Changes to view parameters - J!1.6 has a strict new way of&lt;br /&gt;
specifying parameters for views.  J!1.5 allowed a bit of freedom where&lt;br /&gt;
the parameters could be defined at the view.html.php level but now it&lt;br /&gt;
has to be at the tmpl level.  AE believes the view paramters were removed.&lt;br /&gt;
&lt;br /&gt;
3. Plugins - J!1.6 now creates a different hierarchy structure for&lt;br /&gt;
plugin types.  Files are no longer placed where they used to be, so if&lt;br /&gt;
your other parts of your application (comp, mods, etc.) expects them to be in a certain position, it won&#039;t&lt;br /&gt;
work.  If you only load your plugins via the 1.5 API you should be fine.&lt;br /&gt;
&lt;br /&gt;
4. Installation process - preflight, postflight, etc - These are new&lt;br /&gt;
events that can screw up an existing installlation process.  -1 on me for not documenting the process while stepping through xdebug.&lt;br /&gt;
They should be totally optional access points to the installation process.  But if your 1.5 install process is tricky for some reason, then these can be used to do clean up activities.&lt;br /&gt;
&lt;br /&gt;
5. Custom fields - This could be a could be huge depending the volume and vagaries your 1.5 usage of custom fields. The entire process changed and now the custom fields must inherit from J! base classes.  (AE) This is no different from 1.5 inheriting from JElement.  In 1.6 you inherit from JFormField which is a much more robust class.&lt;br /&gt;
&lt;br /&gt;
6. Admin template changes - Admin functions that depended on certain&lt;br /&gt;
functions, naming conventions etc no longer work.  Khepri has been removed.  Other admin functions/libraries may have changed.  &lt;br /&gt;
&lt;br /&gt;
7. ACL - gid and aid have been removed.  Significant changes to ACL archtecture.  Bricking refers to totally locking your self and everyone else out - Last chance backdoor involves adding a emergency pw to the config file.&lt;br /&gt;
&lt;br /&gt;
8. Renamed methods, table names, etc. &lt;br /&gt;
&lt;br /&gt;
9. sys.ini language translation file - This file is used for installation process translations...&lt;br /&gt;
&lt;br /&gt;
10. include folder - All of the libraries (Archive, domit, js, PEAR, etc) in the include folder have been removed in J!1.6. &lt;br /&gt;
&lt;br /&gt;
11. Mootools version changed from 1.1 to 1.2.  1.2 is not compatible with 1.1&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=35812</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=35812"/>
		<updated>2011-01-21T18:45:53Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse, see [[Setting up your workstation for Joomla! development]].&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
[[What&#039;s new in Joomla 1.6#Developers]] describes most changes of Joomla 1.6 and how this affect developers.&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes, add quotes to string values and update your comments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;An earlier version of this document noted that &#039;&#039;&#039;double&#039;&#039;&#039; quotes were not allowed, but see [http://php.net/manual/en/function.parse-ini-file.php the PHP parse_ini_file documentation] and below for further information.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Single quotes are now not allowed. This can be easily bypassed by searching &#039; and replace with &amp;quot;. &lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
If you do not remove these illegal strings, then your language file won&#039;t load and you won&#039;t get any error message. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are now handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing Javascript function overrides ==&lt;br /&gt;
Joomla now has its Javascript functions with Joomla. This means the functions are always unique and won&#039;t clash with other javascript functions on your server/webpage. However, you now need a different method to override the default Joomla Javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
For Joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing removed functions ==&lt;br /&gt;
Some functions were removed for various reasons. You can find a list of them on [[What&#039;s new in Joomla_1.6#Removed_features]].&lt;br /&gt;
&lt;br /&gt;
Note that the ADODB compatibility methods included function like $db-&amp;gt;Execute($query) which now need a separate $db-&amp;gt;setQuery($query);$db-&amp;gt;Query();&lt;br /&gt;
&lt;br /&gt;
== Changing name=&amp;quot;adminForm&amp;quot; to id=&amp;quot;adminForm&amp;quot; ==&lt;br /&gt;
To create your own admin forms in joomla you now need to use id=&amp;quot;adminForm&amp;quot;. This is because the use of the tag &amp;quot;name&amp;quot; is not valid html strict. Although there is build in compatibility check to look for the old name=&amp;quot;adminForm&amp;quot; tag, it is best to add the new id tag. An example of the new form code is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;index.php&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Removing references to index2.php and index3.php ==&lt;br /&gt;
Joomla 1.0 had different index files to serve admin content in different manners. Joomla 1.6 has now got better way to handle this and you need to search your codebase for &amp;quot;index2.php&amp;quot; and &amp;quot;index3.php&amp;quot; to ensure you don&#039;t have any Joomla 1.0 style links. If you need to display your component without any of the other Joomla 1.6 admin content (menus, etc) then add the following to the url: &amp;quot;&amp;amp;tmpl=component&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Upgrading core table and field name usage ==&lt;br /&gt;
Many of the core Joomla tables have been simplified, combined or renamed. This was needed to get rid of some limitation dating back to Joomla 1.0. This means however that if you have code that directly manipulates Joomla tables, that you need to add a function that detects Joomla 1.6 and had different SQL queries based on the joomla version. An example is the following function that can find if a plugin is published on both Joomla 1.5 and 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;		&lt;br /&gt;
function getPluginStatus($element, $folder) {&lt;br /&gt;
    //get joomla specs&lt;br /&gt;
    $db = &amp;amp; JFactory::getDBO();		&lt;br /&gt;
    $version = new JVersion;&lt;br /&gt;
    $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
    if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
        //Joomla 1.6 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__extensions WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; . $db-&amp;gt;Quote($folder);&lt;br /&gt;
    } else {&lt;br /&gt;
        //Joomla 1.0/1.5 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__plugins WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; .   $db-&amp;gt;Quote($folder); &lt;br /&gt;
    }&lt;br /&gt;
    $db-&amp;gt;setQuery($query);&lt;br /&gt;
    $result = $db-&amp;gt;loadResult();&lt;br /&gt;
    return $result;&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing in the XML installer manifest file ==&lt;br /&gt;
Joomla 1.6 now uses a more streamlined approach to the XML file inside the ZIP file that installs Joomla extentions.&lt;br /&gt;
&lt;br /&gt;
== New mootools version ==&lt;br /&gt;
Most important is that the Ajax class has been depreciated and replaced by the Request class. That means that if you use ajax calls you need to have a version switcher (below a sample code)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$version = new JVersion;&lt;br /&gt;
$joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
&lt;br /&gt;
..... (your code) ....&lt;br /&gt;
&lt;br /&gt;
    /* our ajax istance for starting the sync */&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
 echo &#039;var ajax = new Request.HTML({&lt;br /&gt;
           url: url,&#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
 echo &#039;var ajax = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
     echo &#039;var ajaxsync = new Request.HTML({&lt;br /&gt;
        url: url, &#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
echo &#039;var ajaxsync = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Converting your JParameters to JForms ==&lt;br /&gt;
Joomla 1.6 now uses the JForms class to handle parameters and it has also changed the way parameters are defined in your XML files. To make menu/component/module/plugin parameters work, first you need to update the XML file. Here is an automated way to handle the bulk of the conversion. (added &amp;quot;&amp;quot; to the examples below so you can see spaces in the search query as well)&lt;br /&gt;
&lt;br /&gt;
replace &amp;quot;&amp;lt;param &amp;quot; with &amp;quot;&amp;lt;field &amp;quot;&lt;br /&gt;
replace &amp;quot;&amp;lt;params&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&lt;br /&gt;
replace &amp;quot;&amp;lt;params*?&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&lt;br /&gt;
replace &amp;quot;&amp;lt;/params&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/fieldset&amp;gt;&amp;lt;/fields&amp;gt;&amp;lt;/config&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Now if you want to use your joomla extension on both Joomla 1.5 and 1.6 you will need to go to your &amp;quot;team synchronising&amp;quot; view in eclipse. Double click on your changed xml file, which will open the compare editor. Then simply copy-paste back your old Joomla 1.5 params into your new Joomla 1.6 xml file and save.&lt;br /&gt;
&lt;br /&gt;
If you have custom parameter types, you will need to do some additional work. In Joomla 1.5 you would use the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;params addpath=&amp;quot;/administrator/components/com_yourname/elements&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
In joomla 1.6 JParameter classes won&#039;t work and you will need to convert your jparameter fields into JForm fields. Create a new directory and copy your &amp;quot;old elements&amp;quot; into them. Then you need to load these new fields with the individual parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;field name=&amp;quot;sample&amp;quot; type=&amp;quot;sampleField&amp;quot; size=&amp;quot;5&amp;quot; default=&amp;quot;&amp;quot;			label=&amp;quot;sampleField&amp;quot; description=&amp;quot;sampleField&amp;quot; addfieldpath=&amp;quot;/administrator/components/com_yourname/fields&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Component conversion planning items ==&lt;br /&gt;
Here is an informal and unordered list of things to consider if you are planning to convert your 1.5 extensions to 1.6. They are mostly from the Google general development group around the time of 1.6b15.&lt;br /&gt;
&lt;br /&gt;
1. Language file - J!1.6 enforces strict rules for language&lt;br /&gt;
translations.  No more spaces in the keys or values that aren&#039;t&lt;br /&gt;
enclosed in double quotes. This change will hopefully get much better performance than the previous loose enforcement.&lt;br /&gt;
&lt;br /&gt;
2. Changes to view parameters - J!1.6 has a strict new way of&lt;br /&gt;
specifying parameters for views.  J!1.5 allowed a bit of freedom where&lt;br /&gt;
the parameters could be defined at the view.html.php level but now it&lt;br /&gt;
has to be at the tmpl level.  AE believes the view paramters were removed.&lt;br /&gt;
&lt;br /&gt;
3. Plugins - J!1.6 now creates a different hierarchy structure for&lt;br /&gt;
plugin types.  Files are no longer placed where they used to be, so if&lt;br /&gt;
your other parts of your application (comp, mods, etc.) expects them to be in a certain position, it won&#039;t&lt;br /&gt;
work.  If you only load your plugins via the 1.5 API you should be fine.&lt;br /&gt;
&lt;br /&gt;
4. Installation process - preflight, postflight, etc - These are new&lt;br /&gt;
events that can screw up an existing installlation process.  -1 on me for not documenting the process while stepping through xdebug.&lt;br /&gt;
They should be totally optional access points to the installation process.  But if your 1.5 install process is tricky for some reason, then these can be used to do clean up activities.&lt;br /&gt;
&lt;br /&gt;
5. Custom fields - This could be a could be huge depending the volume and vagaries your 1.5 usage of custom fields. The entire process changed and now the custom fields must inherit from J! base classes.  (AE) This is no different from 1.5 inheriting from JElement.  In 1.6 you inherit from JFormField which is a much more robust class.&lt;br /&gt;
&lt;br /&gt;
6. Admin template changes - Admin functions that depended on certain&lt;br /&gt;
functions, naming conventions etc no longer work.  Khepri has been removed.  Other admin functions/libraries may have changed.  &lt;br /&gt;
&lt;br /&gt;
7. ACL - gid and aid have been removed.  Significant changes to ACL archtecture.  Bricking refers to totally locking your self and everyone else out - Last chance backdoor involves adding a emergency pw to the config file.&lt;br /&gt;
&lt;br /&gt;
8. Renamed methods, table names, etc. &lt;br /&gt;
&lt;br /&gt;
9. sys.ini language translation file - This file is used for installation process translations...&lt;br /&gt;
&lt;br /&gt;
10. include folder - All of the libraries (Archive, domit, js, PEAR, etc) in the include folder have been removed in J!1.6. &lt;br /&gt;
&lt;br /&gt;
11. Mootools version changed from 1.1 to 1.2.  1.2 is not compatible with 1.1&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=35811</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=35811"/>
		<updated>2011-01-21T18:44:53Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse, see [[Setting up your workstation for Joomla! development]].&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
[[What&#039;s new in Joomla 1.6#Developers]] describes most changes of Joomla 1.6 and how this affect developers.&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes, add quotes to string values and update your comments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;An earlier version of this document noted that &#039;&#039;&#039;double&#039;&#039;&#039; quotes were not allowed, but see [http://php.net/manual/en/function.parse-ini-file.php the PHP parse_ini_file documentation] and below for further information.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Single quotes are now not allowed. This can be easily bypassed by searching &#039; and replace with &amp;quot;. &lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
If you do not remove these illegal strings, then your language file won&#039;t load and you won&#039;t get any error message. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are now handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing Javascript function overrides ==&lt;br /&gt;
Joomla now has its Javascript functions with Joomla. This means the functions are always unique and won&#039;t clash with other javascript functions on your server/webpage. However, you now need a different method to override the default Joomla Javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
For Joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing removed functions ==&lt;br /&gt;
Some functions were removed for various reasons. You can find a list of them on [[What&#039;s new in Joomla_1.6#Removed_features]].&lt;br /&gt;
&lt;br /&gt;
Note that the ADODB compatibility methods included function like $db-&amp;gt;Execute($query) which now need a separate $db-&amp;gt;setQuery($query);$db-&amp;gt;Query();&lt;br /&gt;
&lt;br /&gt;
== Changing name=&amp;quot;adminForm&amp;quot; to id=&amp;quot;adminForm&amp;quot; ==&lt;br /&gt;
To create your own admin forms in joomla you now need to use id=&amp;quot;adminForm&amp;quot;. This is because the use of the tag &amp;quot;name&amp;quot; is not valid html strict. Although there is build in compatibility check to look for the old name=&amp;quot;adminForm&amp;quot; tag, it is best to add the new id tag. An example of the new form code is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;index.php&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Removing references to index2.php and index3.php ==&lt;br /&gt;
Joomla 1.0 had different index files to serve admin content in different manners. Joomla 1.6 has now got better way to handle this and you need to search your codebase for &amp;quot;index2.php&amp;quot; and &amp;quot;index3.php&amp;quot; to ensure you don&#039;t have any Joomla 1.0 style links. If you need to display your component without any of the other Joomla 1.6 admin content (menus, etc) then add the following to the url: &amp;quot;&amp;amp;tmpl=component&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Upgrading core table and field name usage ==&lt;br /&gt;
Many of the core Joomla tables have been simplified, combined or renamed. This was needed to get rid of some limitation dating back to Joomla 1.0. This means however that if you have code that directly manipulates Joomla tables, that you need to add a function that detects Joomla 1.6 and had different SQL queries based on the joomla version. An example is the following function that can find if a plugin is published on both Joomla 1.5 and 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;		&lt;br /&gt;
function getPluginStatus($element, $folder) {&lt;br /&gt;
    //get joomla specs&lt;br /&gt;
    $db = &amp;amp; JFactory::getDBO();		&lt;br /&gt;
    $version = new JVersion;&lt;br /&gt;
    $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
    if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
        //Joomla 1.6 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__extensions WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; . $db-&amp;gt;Quote($folder);&lt;br /&gt;
    } else {&lt;br /&gt;
        //Joomla 1.0/1.5 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__plugins WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; .   $db-&amp;gt;Quote($folder); &lt;br /&gt;
    }&lt;br /&gt;
    $db-&amp;gt;setQuery($query);&lt;br /&gt;
    $result = $db-&amp;gt;loadResult();&lt;br /&gt;
    return $result;&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing in the XML installer manifest file ==&lt;br /&gt;
Joomla 1.6 now uses a more streamlined approach to the XML file inside the ZIP file that installs Joomla extentions.&lt;br /&gt;
&lt;br /&gt;
== New mootools version ==&lt;br /&gt;
Most important is that the Ajax class has been depreciated and replaced by the Request class. That means that if you use ajax calls you need to have a version switcher (below a sample code)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$version = new JVersion;&lt;br /&gt;
$joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
&lt;br /&gt;
..... (your code) ....&lt;br /&gt;
&lt;br /&gt;
    /* our ajax istance for starting the sync */&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
 echo &#039;var ajax = new Request.HTML({&lt;br /&gt;
           url: url,&#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
 echo &#039;var ajax = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
     echo &#039;var ajaxsync = new Request.HTML({&lt;br /&gt;
        url: url, &#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
echo &#039;var ajaxsync = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Converting your JParameters to JForms ==&lt;br /&gt;
Joomla 1.6 now uses the JForms class to handle parameters and it has also changed the way parameters are defined in your XML files. To make menu/component/module/plugin parameters work, first you need to update the XML file. Here is an automated way to handle the bulk of the conversion. (added &amp;quot;&amp;quot; to the examples below so you can see spaces in the search query as well)&lt;br /&gt;
&lt;br /&gt;
replace &amp;quot;&amp;lt;param &amp;quot; with &amp;quot;&amp;lt;field &amp;quot;&lt;br /&gt;
replace &amp;quot;&amp;lt;params&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&lt;br /&gt;
replace &amp;quot;&amp;lt;params*?&amp;gt; with &amp;quot;&amp;lt;config&amp;gt;&amp;lt;fields name=&amp;quot;params&amp;quot;&amp;gt;&amp;lt;fieldset name=&amp;quot;basic&amp;quot;&amp;gt;&amp;quot;&lt;br /&gt;
replace &amp;quot;&amp;lt;/params&amp;gt;&amp;quot; with &amp;quot;&amp;lt;/fieldset&amp;gt;&amp;lt;/fields&amp;gt;&amp;lt;/config&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Now if you want to use your joomla extension on both Joomla 1.5 and 1.6 you will need to go to your &amp;quot;team synchronising&amp;quot; view in eclipse. Double click on your changed xml file, which will open the compare editor. Then simply copy-paste back your old Joomla 1.5 params into your new Joomla 1.6 xml file and save.&lt;br /&gt;
&lt;br /&gt;
If you have custom parameter types, you will need to do some additional work. In Joomla 1.5 you would use the following code:&lt;br /&gt;
&amp;lt;source&amp;gt;&amp;lt;params addpath=&amp;quot;/administrator/components/com_yourname/elements&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
In joomla 1.6 JParameter classes won&#039;t work and you will need to convert your jparameter fields into JForm fields. Create a new directory and copy your &amp;quot;old elements&amp;quot; into them. Then you need to load these new fields with the individual parameter&lt;br /&gt;
&amp;lt;source&amp;gt;&amp;lt;field name=&amp;quot;sample&amp;quot; type=&amp;quot;sampleField&amp;quot; size=&amp;quot;5&amp;quot; default=&amp;quot;&amp;quot;			label=&amp;quot;sampleField&amp;quot; description=&amp;quot;sampleField&amp;quot; addfieldpath=&amp;quot;/administrator/components/com_yourname/fields&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Component conversion planning items ==&lt;br /&gt;
Here is an informal and unordered list of things to consider if you are planning to convert your 1.5 extensions to 1.6. They are mostly from the Google general development group around the time of 1.6b15.&lt;br /&gt;
&lt;br /&gt;
1. Language file - J!1.6 enforces strict rules for language&lt;br /&gt;
translations.  No more spaces in the keys or values that aren&#039;t&lt;br /&gt;
enclosed in double quotes. This change will hopefully get much better performance than the previous loose enforcement.&lt;br /&gt;
&lt;br /&gt;
2. Changes to view parameters - J!1.6 has a strict new way of&lt;br /&gt;
specifying parameters for views.  J!1.5 allowed a bit of freedom where&lt;br /&gt;
the parameters could be defined at the view.html.php level but now it&lt;br /&gt;
has to be at the tmpl level.  AE believes the view paramters were removed.&lt;br /&gt;
&lt;br /&gt;
3. Plugins - J!1.6 now creates a different hierarchy structure for&lt;br /&gt;
plugin types.  Files are no longer placed where they used to be, so if&lt;br /&gt;
your other parts of your application (comp, mods, etc.) expects them to be in a certain position, it won&#039;t&lt;br /&gt;
work.  If you only load your plugins via the 1.5 API you should be fine.&lt;br /&gt;
&lt;br /&gt;
4. Installation process - preflight, postflight, etc - These are new&lt;br /&gt;
events that can screw up an existing installlation process.  -1 on me for not documenting the process while stepping through xdebug.&lt;br /&gt;
They should be totally optional access points to the installation process.  But if your 1.5 install process is tricky for some reason, then these can be used to do clean up activities.&lt;br /&gt;
&lt;br /&gt;
5. Custom fields - This could be a could be huge depending the volume and vagaries your 1.5 usage of custom fields. The entire process changed and now the custom fields must inherit from J! base classes.  (AE) This is no different from 1.5 inheriting from JElement.  In 1.6 you inherit from JFormField which is a much more robust class.&lt;br /&gt;
&lt;br /&gt;
6. Admin template changes - Admin functions that depended on certain&lt;br /&gt;
functions, naming conventions etc no longer work.  Khepri has been removed.  Other admin functions/libraries may have changed.  &lt;br /&gt;
&lt;br /&gt;
7. ACL - gid and aid have been removed.  Significant changes to ACL archtecture.  Bricking refers to totally locking your self and everyone else out - Last chance backdoor involves adding a emergency pw to the config file.&lt;br /&gt;
&lt;br /&gt;
8. Renamed methods, table names, etc. &lt;br /&gt;
&lt;br /&gt;
9. sys.ini language translation file - This file is used for installation process translations...&lt;br /&gt;
&lt;br /&gt;
10. include folder - All of the libraries (Archive, domit, js, PEAR, etc) in the include folder have been removed in J!1.6. &lt;br /&gt;
&lt;br /&gt;
11. Mootools version changed from 1.1 to 1.2.  1.2 is not compatible with 1.1&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=35451</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=35451"/>
		<updated>2011-01-16T14:09:03Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse, see [[Setting up your workstation for Joomla! development]].&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
[[What&#039;s new in Joomla 1.6#Developers]] describes most changes of Joomla 1.6 and how this affect developers.&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes, add quotes to string values and update your comments.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;An earlier version of this document noted that &#039;&#039;&#039;double&#039;&#039;&#039; quotes were not allowed, but see [http://php.net/manual/en/function.parse-ini-file.php the PHP parse_ini_file documentation] and below for further information.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Single quotes are now not allowed. This can be easily bypassed by searching &#039; and replace with &amp;quot;. &lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
If you do not remove these illegal strings, then your language file won&#039;t load and you won&#039;t get any error message. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are now handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing Javascript function overrides ==&lt;br /&gt;
Joomla now has its Javascript functions with Joomla. This means the functions are always unique and won&#039;t clash with other javascript functions on your server/webpage. However, you now need a different method to override the default Joomla Javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
For Joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing removed functions ==&lt;br /&gt;
Some functions were removed for various reasons. You can find a list of them on [[What&#039;s new in Joomla_1.6#Removed_features]].&lt;br /&gt;
&lt;br /&gt;
Note that the ADODB compatibility methods included function like $db-&amp;gt;Execute($query) which now need a separate $db-&amp;gt;setQuery($query);$db-&amp;gt;Query();&lt;br /&gt;
&lt;br /&gt;
== Changing name=&amp;quot;adminForm&amp;quot; to id=&amp;quot;adminForm&amp;quot; ==&lt;br /&gt;
To create your own admin forms in joomla you now need to use id=&amp;quot;adminForm&amp;quot;. This is because the use of the tag &amp;quot;name&amp;quot; is not valid html strict. Although there is build in compatibility check to look for the old name=&amp;quot;adminForm&amp;quot; tag, it is best to add the new id tag. An example of the new form code is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;index.php&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot;&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Removing references to index2.php and index3.php ==&lt;br /&gt;
Joomla 1.0 had different index files to serve admin content in different manners. Joomla 1.6 has now got better way to handle this and you need to search your codebase for &amp;quot;index2.php&amp;quot; and &amp;quot;index3.php&amp;quot; to ensure you don&#039;t have any Joomla 1.0 style links. If you need to display your component without any of the other Joomla 1.6 admin content (menus, etc) then add the following to the url: &amp;quot;&amp;amp;tmpl=component&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Upgrading core table and field name usage ==&lt;br /&gt;
Many of the core Joomla tables have been simplified, combined or renamed. This was needed to get rid of some limitation dating back to Joomla 1.0. This means however that if you have code that directly manipulates Joomla tables, that you need to add a function that detects Joomla 1.6 and had different SQL queries based on the joomla version. An example is the following function that can find if a plugin is published on both Joomla 1.5 and 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;		&lt;br /&gt;
function getPluginStatus($element, $folder) {&lt;br /&gt;
    //get joomla specs&lt;br /&gt;
    $db = &amp;amp; JFactory::getDBO();		&lt;br /&gt;
    $version = new JVersion;&lt;br /&gt;
    $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
    if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
        //Joomla 1.6 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__extensions WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; . $db-&amp;gt;Quote($folder);&lt;br /&gt;
    } else {&lt;br /&gt;
        //Joomla 1.0/1.5 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__plugins WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; .   $db-&amp;gt;Quote($folder); &lt;br /&gt;
    }&lt;br /&gt;
    $db-&amp;gt;setQuery($query);&lt;br /&gt;
    $result = $db-&amp;gt;loadResult();&lt;br /&gt;
    return $result;&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changing in the XML installer manifest file ==&lt;br /&gt;
Joomla 1.6 now uses a more streamlined approach to the XML file inside the ZIP file that installs Joomla extentions. You can either change your current XML file so that it only works with Joomla 1.6:&lt;br /&gt;
http://www.theartofjoomla.com/home/9-developer/112-upgrading-a-plugin-to-joomla-16.html&lt;br /&gt;
or you can try the following method that allows you to have your extention install on both Joomla 1.5 and Joomla 1.6:&lt;br /&gt;
http://www.netshinesoftware.com/component/option,com_myblog/Itemid,65/show,Creating-a-single-install-package-for-a-plugin-that-works-on-Joomla-1.-1.5-AND-1.6.html/&lt;br /&gt;
&lt;br /&gt;
== New mootools version ==&lt;br /&gt;
Most important is that the Ajax class has been depreciated and replaced by the Request class. That means that if you use ajax calls you need to have a version switcher (below a sample code)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$version = new JVersion;&lt;br /&gt;
$joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
&lt;br /&gt;
..... (your code) ....&lt;br /&gt;
&lt;br /&gt;
    /* our ajax istance for starting the sync */&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
 echo &#039;var ajax = new Request.HTML({&lt;br /&gt;
           url: url,&#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
 echo &#039;var ajax = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?php  if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
     echo &#039;var ajaxsync = new Request.HTML({&lt;br /&gt;
        url: url, &#039;;&lt;br /&gt;
    } else {&lt;br /&gt;
echo &#039;var ajaxsync = new Ajax(url, {&#039;;&lt;br /&gt;
    }?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
.... your code .....&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Component conversion planning items ==&lt;br /&gt;
Here is an informal and unordered list of things to consider if you are planning to convert your 1.5 extensions to 1.6. They are mostly from the Google general development group around the time of 1.6b15.&lt;br /&gt;
&lt;br /&gt;
1. Language file - J!1.6 enforces strict rules for language&lt;br /&gt;
translations.  No more spaces in the keys or values that aren&#039;t&lt;br /&gt;
enclosed in double quotes. This change will hopefully get much better performance than the previous loose enforcement.&lt;br /&gt;
&lt;br /&gt;
2. Changes to view parameters - J!1.6 has a strict new way of&lt;br /&gt;
specifying parameters for views.  J!1.5 allowed a bit of freedom where&lt;br /&gt;
the parameters could be defined at the view.html.php level but now it&lt;br /&gt;
has to be at the tmpl level.  AE believes the view paramters were removed.&lt;br /&gt;
&lt;br /&gt;
3. Plugins - J!1.6 now creates a different hierarchy structure for&lt;br /&gt;
plugin types.  Files are no longer placed where they used to be, so if&lt;br /&gt;
your other parts of your application (comp, mods, etc.) expects them to be in a certain position, it won&#039;t&lt;br /&gt;
work.  If you only load your plugins via the 1.5 API you should be fine.&lt;br /&gt;
&lt;br /&gt;
4. Installation process - preflight, postflight, etc - These are new&lt;br /&gt;
events that can screw up an existing installlation process.  -1 on me for not documenting the process while stepping through xdebug.&lt;br /&gt;
They should be totally optional access points to the installation process.  But if your 1.5 install process is tricky for some reason, then these can be used to do clean up activities.&lt;br /&gt;
&lt;br /&gt;
5. Custom fields - This could be a could be huge depending the volume and vagaries your 1.5 usage of custom fields. The entire process changed and now the custom fields must inherit from J! base classes.  (AE) This is no different from 1.5 inheriting from JElement.  In 1.6 you inherit from JFormField which is a much more robust class.&lt;br /&gt;
&lt;br /&gt;
6. Admin template changes - Admin functions that depended on certain&lt;br /&gt;
functions, naming conventions etc no longer work.  Khepri has been removed.  Other admin functions/libraries may have changed.  &lt;br /&gt;
&lt;br /&gt;
7. ACL - gid and aid have been removed.  Significant changes to ACL archtecture.  Bricking refers to totally locking your self and everyone else out - Last chance backdoor involves adding a emergency pw to the config file.&lt;br /&gt;
&lt;br /&gt;
8. Renamed methods, table names, etc. &lt;br /&gt;
&lt;br /&gt;
9. sys.ini language translation file - This file is used for installation process translations...&lt;br /&gt;
&lt;br /&gt;
10. include folder - All of the libraries (Archive, domit, js, PEAR, etc) in the include folder have been removed in J!1.6. &lt;br /&gt;
&lt;br /&gt;
11. Mootools version changed from 1.1 to 1.2.  1.2 is not compatible with 1.1&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=32513</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=32513"/>
		<updated>2010-12-07T08:20:12Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse visit:&lt;br /&gt;
http://docs.joomla.org/Setting_up_your_workstation_for_Joomla!_development&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
The following article describes most changes of Joomla 1.6 and how this affect developers.&lt;br /&gt;
http://docs.joomla.org/What%27s_new_in_Joomla_1.6#Developers&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes,  add quotes to string values and update your comments&lt;br /&gt;
&lt;br /&gt;
#Double quotes are now not allowed and this can be easily bypassed by searching &amp;quot; and replace with &#039;&lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
If you do not remove these illegal strings, then your language file won&#039;t load and you won&#039;t get any error message. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are now handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change in method on how to override javascript functions==&lt;br /&gt;
Joomla now has its jabascript functions with Joomla. this means the functions are always unique and won&#039;t clash with other javascript function on your server/webpage. However you now need a different method to override the default joomla javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
for joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==removed functions==&lt;br /&gt;
Some functions were removed for various reasons, you can find this list on:&lt;br /&gt;
http://docs.joomla.org/What%27s_new_in_Joomla_1.6#Removed_features&lt;br /&gt;
&lt;br /&gt;
Note that the ADODB compatibility methods included function like $db-&amp;gt;Execute($query) which now need a separate $db-&amp;gt;setQuery($query);$db-&amp;gt;Query();&lt;br /&gt;
&lt;br /&gt;
== the use of name=&amp;quot;adminForm&amp;quot; has changed ==&lt;br /&gt;
To create your own admin forms in joomla you now need to use id=&amp;quot;adminForm&amp;quot;. This is because the use of the tag &amp;quot;name&amp;quot; is not valid html strict. Although there is build in compatibility check to look for the old name=&amp;quot;adminForm&amp;quot; tag, it is best to add the new id tag. An example of the new form code is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;index.php&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot;&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== removed index2.php and index3.php ==&lt;br /&gt;
Joomla 1.0 had different index files to serve admin content in different manners. Joomla 1.6 has now got better way to handle this and you need to search your codebase for &amp;quot;index2.php&amp;quot; and &amp;quot;index3.php&amp;quot; to ensure you don&#039;t have any Joomla 1.0 style links. If you need to display your component without any of the other Joomla 1.6 admin content (menus, etc) then add the following to the url: &amp;quot;&amp;amp;tmpl=component&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== renamed core tables and field names in Joomla 1.6 ==&lt;br /&gt;
Many of the core Joomla tables have been simplified, combined or renamed. This was needed to get rid of some limitation dating back to Joomla 1.0. This means however that if you have code that directly manipulates Joomla tables, that you need to add a function that detects Joomla 1.6 and had different SQL queries based on the joomla version. An example is the following function that can find if a plugin is published on both Joomla 1.5 and 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;		&lt;br /&gt;
function getPluginStatus($element,$folder) {&lt;br /&gt;
    //get joomla specs&lt;br /&gt;
    $db = &amp;amp; JFactory::getDBO();		&lt;br /&gt;
    $version = new JVersion;&lt;br /&gt;
    $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
    if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
        //Joomla 1.6 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__extensions WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; . $db-&amp;gt;Quote($folder);&lt;br /&gt;
    } else {&lt;br /&gt;
        //Joomla 1.0/1.5 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__plugins WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; .   $db-&amp;gt;Quote($folder); &lt;br /&gt;
    }&lt;br /&gt;
    $db-&amp;gt;setQuery($query);&lt;br /&gt;
    $result = $db-&amp;gt;loadResult();&lt;br /&gt;
    return $result;&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Changes in the XML installer manifest file ==&lt;br /&gt;
Joomla 1.6 now uses a more streamlined approach to the XML file inside the ZIP file that installs Joomla extentions. You can either change your current XML file so that it only works with Joomla 1.6:&lt;br /&gt;
http://www.theartofjoomla.com/home/9-developer/112-upgrading-a-plugin-to-joomla-16.html&lt;br /&gt;
or you can try the following method that allows you to have your extention install on both Joomla 1.5 and Joomla 1.6:&lt;br /&gt;
http://www.netshinesoftware.com/component/option,com_myblog/Itemid,65/show,Creating-a-single-install-package-for-a-plugin-that-works-on-Joomla-1.-1.5-AND-1.6.html/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Tips:_Converting_extensions_to_1.6&amp;diff=32512</id>
		<title>Tips: Converting extensions to 1.6</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Tips:_Converting_extensions_to_1.6&amp;diff=32512"/>
		<updated>2010-12-07T08:13:05Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is intended as a collection of quick tips on API and general changes in 1.6. Please add any tips, and link to any further detailed information as its created. &lt;br /&gt;
&lt;br /&gt;
Also see page:&lt;br /&gt;
http://docs.joomla.org/Tutorial:Upgrade_Joomla_1.5_Extension_to_Joomla_1.6&lt;br /&gt;
&lt;br /&gt;
===API Changes===&lt;br /&gt;
* $mainframe is no longer defined, you have to do $mainframe = JFactory::getApplication();&lt;br /&gt;
* The user event &#039;onLoginUser&#039; is now &#039;onUserLogin&#039;&lt;br /&gt;
&lt;br /&gt;
===Application Changes===&lt;br /&gt;
* config.xml has different tags and supports multiple options pages.&lt;br /&gt;
* The modules, components and plugins tables were consolidated in the #__extensions table.&lt;br /&gt;
&lt;br /&gt;
===Formatting Changes===&lt;br /&gt;
* Translations format has changed. Avoid double quotes or encode them as &amp;quot;_QQ_&amp;quot;. Enclose all strings in double quotes.&lt;br /&gt;
* Parameters internal representation has changed from INI to JSON. If you do custom parsing, you need to be aware.&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=32511</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=32511"/>
		<updated>2010-12-07T08:10:14Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: /* removed index2.php and index3.php */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse visit:&lt;br /&gt;
http://docs.joomla.org/Setting_up_your_workstation_for_Joomla!_development&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
The following article describes most changes of Joomla 1.6 and how this affect developers.&lt;br /&gt;
http://docs.joomla.org/What%27s_new_in_Joomla_1.6#Developers&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes,  add quotes to string values and update your comments&lt;br /&gt;
&lt;br /&gt;
#Double quotes are now not allowed and this can be easily bypassed by searching &amp;quot; and replace with &#039;&lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
If you do not remove these illegal strings, then your language file won&#039;t load and you won&#039;t get any error message. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are now handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change in method on how to override javascript functions==&lt;br /&gt;
Joomla now has its jabascript functions with Joomla. this means the functions are always unique and won&#039;t clash with other javascript function on your server/webpage. However you now need a different method to override the default joomla javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
for joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==removed functions==&lt;br /&gt;
Some functions were removed for various reasons, you can find this list on:&lt;br /&gt;
http://docs.joomla.org/What%27s_new_in_Joomla_1.6#Removed_features&lt;br /&gt;
&lt;br /&gt;
Note that the ADODB compatibility methods included function like $db-&amp;gt;Execute($query) which now need a separate $db-&amp;gt;setQuery($query);$db-&amp;gt;Query();&lt;br /&gt;
&lt;br /&gt;
== the use of name=&amp;quot;adminForm&amp;quot; has changed ==&lt;br /&gt;
To create your own admin forms in joomla you now need to use id=&amp;quot;adminForm&amp;quot;. This is because the use of the tag &amp;quot;name&amp;quot; is not valid html strict. Although there is build in compatibility check to look for the old name=&amp;quot;adminForm&amp;quot; tag, it is best to add the new id tag. An example of the new form code is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;index.php&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot;&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== removed index2.php and index3.php ==&lt;br /&gt;
Joomla 1.0 had different index files to serve admin content in different manners. Joomla 1.6 has now got better way to handle this and you need to search your codebase for &amp;quot;index2.php&amp;quot; and &amp;quot;index3.php&amp;quot; to ensure you don&#039;t have any Joomla 1.0 style links. If you need to display your component without any of the other Joomla 1.6 admin content (menus, etc) then add the following to the url: &amp;quot;&amp;amp;tmpl=component&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== renamed core tables and field names in Joomla 1.6 ==&lt;br /&gt;
Many of the core Joomla tables have been simplified, combined or renamed. This was needed to get rid of some limitation dating back to Joomla 1.0. This means however that if you have code that directly manipulates Joomla tables, that you need to add a function that detects Joomla 1.6 and had different SQL queries based on the joomla version. An example is the following function that can find if a plugin is published on both Joomla 1.5 and 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;		&lt;br /&gt;
function getPluginStatus($element,$folder) {&lt;br /&gt;
    //get joomla specs&lt;br /&gt;
    $db = &amp;amp; JFactory::getDBO();		&lt;br /&gt;
    $version = new JVersion;&lt;br /&gt;
    $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
    if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
        //Joomla 1.6 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__extensions WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; . $db-&amp;gt;Quote($folder);&lt;br /&gt;
    } else {&lt;br /&gt;
        //Joomla 1.0/1.5 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__plugins WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; .   $db-&amp;gt;Quote($folder); &lt;br /&gt;
    }&lt;br /&gt;
    $db-&amp;gt;setQuery($query);&lt;br /&gt;
    $result = $db-&amp;gt;loadResult();&lt;br /&gt;
    return $result;&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=32510</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=32510"/>
		<updated>2010-12-07T08:08:17Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse visit:&lt;br /&gt;
http://docs.joomla.org/Setting_up_your_workstation_for_Joomla!_development&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
The following article describes most changes of Joomla 1.6 and how this affect developers.&lt;br /&gt;
http://docs.joomla.org/What%27s_new_in_Joomla_1.6#Developers&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes,  add quotes to string values and update your comments&lt;br /&gt;
&lt;br /&gt;
#Double quotes are now not allowed and this can be easily bypassed by searching &amp;quot; and replace with &#039;&lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
If you do not remove these illegal strings, then your language file won&#039;t load and you won&#039;t get any error message. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are now handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change in method on how to override javascript functions==&lt;br /&gt;
Joomla now has its jabascript functions with Joomla. this means the functions are always unique and won&#039;t clash with other javascript function on your server/webpage. However you now need a different method to override the default joomla javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
for joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==removed functions==&lt;br /&gt;
Some functions were removed for various reasons, you can find this list on:&lt;br /&gt;
http://docs.joomla.org/What%27s_new_in_Joomla_1.6#Removed_features&lt;br /&gt;
&lt;br /&gt;
Note that the ADODB compatibility methods included function like $db-&amp;gt;Execute($query) which now need a separate $db-&amp;gt;setQuery($query);$db-&amp;gt;Query();&lt;br /&gt;
&lt;br /&gt;
== the use of name=&amp;quot;adminForm&amp;quot; has changed ==&lt;br /&gt;
To create your own admin forms in joomla you now need to use id=&amp;quot;adminForm&amp;quot;. This is because the use of the tag &amp;quot;name&amp;quot; is not valid html strict. Although there is build in compatibility check to look for the old name=&amp;quot;adminForm&amp;quot; tag, it is best to add the new id tag. An example of the new form code is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;index.php&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot;&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== removed index2.php and index3.php ==&lt;br /&gt;
Joomla 1 had different index files to serve admin content in different manners. Joomla 1.6 has now got better way to handle this and you need to search your codebase for &amp;quot;index2.php&amp;quot; and &amp;quot;index3.php&amp;quot; to ensure you don&#039;t have any Joomla 1.0 style links&lt;br /&gt;
&lt;br /&gt;
== renamed core tables and field names in Joomla 1.6 ==&lt;br /&gt;
Many of the core Joomla tables have been simplified, combined or renamed. This was needed to get rid of some limitation dating back to Joomla 1.0. This means however that if you have code that directly manipulates Joomla tables, that you need to add a function that detects Joomla 1.6 and had different SQL queries based on the joomla version. An example is the following function that can find if a plugin is published on both Joomla 1.5 and 1.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;		&lt;br /&gt;
function getPluginStatus($element,$folder) {&lt;br /&gt;
    //get joomla specs&lt;br /&gt;
    $db = &amp;amp; JFactory::getDBO();		&lt;br /&gt;
    $version = new JVersion;&lt;br /&gt;
    $joomla = $version-&amp;gt;getShortVersion();&lt;br /&gt;
    if(substr($joomla,0,3) == &#039;1.6&#039;){&lt;br /&gt;
        //Joomla 1.6 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__extensions WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; . $db-&amp;gt;Quote($folder);&lt;br /&gt;
    } else {&lt;br /&gt;
        //Joomla 1.0/1.5 code&lt;br /&gt;
        $query = &#039;SELECT published FROM #__plugins WHERE element=&#039; . $db-&amp;gt;Quote($element) . &#039; AND folder=&#039; .   $db-&amp;gt;Quote($folder); &lt;br /&gt;
    }&lt;br /&gt;
    $db-&amp;gt;setQuery($query);&lt;br /&gt;
    $result = $db-&amp;gt;loadResult();&lt;br /&gt;
    return $result;&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=32509</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=32509"/>
		<updated>2010-12-07T08:01:46Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse visit:&lt;br /&gt;
http://docs.joomla.org/Setting_up_your_workstation_for_Joomla!_development&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
The following article describes most changes of Joomla 1.6 and how this affect developers.&lt;br /&gt;
http://docs.joomla.org/What%27s_new_in_Joomla_1.6#Developers&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes,  add quotes to string values and update your comments&lt;br /&gt;
&lt;br /&gt;
#Double quotes are now not allowed and this can be easily bypassed by searching &amp;quot; and replace with &#039;&lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
If you do not remove these illegal strings, then your language file won&#039;t load and you won&#039;t get any error message. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are now handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change in method on how to override javascript functions==&lt;br /&gt;
Joomla now has its jabascript functions with Joomla. this means the functions are always unique and won&#039;t clash with other javascript function on your server/webpage. However you now need a different method to override the default joomla javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
for joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==removed functions==&lt;br /&gt;
Some functions were removed for various reasons, you can find this list on:&lt;br /&gt;
http://docs.joomla.org/What%27s_new_in_Joomla_1.6#Removed_features&lt;br /&gt;
&lt;br /&gt;
Note that the ADODB compatibility methods included function like $db-&amp;gt;Execute($query) which now need a separate $db-&amp;gt;setQuery($query);$db-&amp;gt;Query();&lt;br /&gt;
&lt;br /&gt;
== the use of name=&amp;quot;adminForm&amp;quot; has changed ==&lt;br /&gt;
To create your own admin forms in joomla you now need to use id=&amp;quot;adminForm&amp;quot;. This is because the use of the tag &amp;quot;name&amp;quot; is not valid html strict. Although there is build in compatibility check to look for the old name=&amp;quot;adminForm&amp;quot; tag, it is best to add the new id tag. An example of the new form code is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;index.php&amp;quot; name=&amp;quot;adminForm&amp;quot; id=&amp;quot;adminForm&amp;quot;&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== removed index2.php and index3.php ==&lt;br /&gt;
Joomla 1 had different index files to serve admin content in different manners. Joomla 1.6 has now got better way to handle this and you need to search your codebase for &amp;quot;index2.php&amp;quot; and &amp;quot;index3.php&amp;quot; to ensure you don&#039;t have any Joomla 1.0 style links&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=32508</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=32508"/>
		<updated>2010-12-07T07:53:30Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: /* Change in method on how to override javascript functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse visit:&lt;br /&gt;
http://docs.joomla.org/Setting_up_your_workstation_for_Joomla!_development&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
The following article describes most changes of Joomla 1.6 and how this affect developers.&lt;br /&gt;
http://docs.joomla.org/What%27s_new_in_Joomla_1.6#Developers&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes,  add quotes to string values and update your comments&lt;br /&gt;
&lt;br /&gt;
#Double quotes are now not allowed and this can be easily bypassed by searching &amp;quot; and replace with &#039;&lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
If you do not remove these illegal strings, then your language file won&#039;t load and you won&#039;t get any error message. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are now handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change in method on how to override javascript functions==&lt;br /&gt;
Joomla now has its jabascript functions with Joomla. this means the functions are always unique and won&#039;t clash with other javascript function on your server/webpage. However you now need a different method to override the default joomla javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
for joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=32507</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=32507"/>
		<updated>2010-12-07T07:52:59Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: /* Updating your Joomla 1.5 language files to work on Joomla 1.6 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse visit:&lt;br /&gt;
http://docs.joomla.org/Setting_up_your_workstation_for_Joomla!_development&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
The following article describes most changes of Joomla 1.6 and how this affect developers.&lt;br /&gt;
http://docs.joomla.org/What%27s_new_in_Joomla_1.6#Developers&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes,  add quotes to string values and update your comments&lt;br /&gt;
&lt;br /&gt;
#Double quotes are now not allowed and this can be easily bypassed by searching &amp;quot; and replace with &#039;&lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
If you do not remove these illegal strings, then your language file won&#039;t load and you won&#039;t get any error message. The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are now handled by adding a &#039;J&#039; in-front of them.  Just make sure you change these language strings in your XML files as well. You can include in your language file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Change in method on how to override javascript functions==&lt;br /&gt;
Joomla now has its jabascript functions with Joomla. this means the functions are always unique and won&#039;t clash with other javascript function on your server/webpage. However you now need a different method to override the default joomla javascript. The Joomla 1.5 method was:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function submitbutton(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 for joomla 1.6 you need to copy your exisiting function but modify your top line to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Joomla.submitbutton = function(pressbutton) {&lt;br /&gt;
var form = document.adminForm;&lt;br /&gt;
    if (pressbutton == &#039;applyconfig&#039;) {&lt;br /&gt;
        //do something unique&lt;br /&gt;
        form.action.value = &#039;apply&#039;&lt;br /&gt;
        submitform(&#039;saveconfig&#039;);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    submitform(pressbutton);&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=32506</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=32506"/>
		<updated>2010-12-07T07:46:00Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse visit:&lt;br /&gt;
http://docs.joomla.org/Setting_up_your_workstation_for_Joomla!_development&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
The following article describes most changes of Joomla 1.6 and how this affect developers.&lt;br /&gt;
http://docs.joomla.org/What%27s_new_in_Joomla_1.6#Developers&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes,  add quotes to string values and update your comments&lt;br /&gt;
&lt;br /&gt;
#Double quotes are now not allowed and this can be easily bypassed by searching &amp;quot; and replace with &#039;&lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are now handled by adding a &#039;J&#039; in-front of them. You can include in your language file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=32505</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=32505"/>
		<updated>2010-12-07T07:44:10Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse visit:&lt;br /&gt;
http://docs.joomla.org/Setting_up_your_workstation_for_Joomla!_development&lt;br /&gt;
&lt;br /&gt;
== Background reading ==&lt;br /&gt;
The following article describes most changes of Joomla 1.6 and how this affect developers.&lt;br /&gt;
http://docs.joomla.org/What%27s_new_in_Joomla_1.6#Developers&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes,  add quotes to string values and update your comments&lt;br /&gt;
&lt;br /&gt;
#Double quotes are now not allowed and this can be easily bypassed by searching &amp;quot; and replace with &#039;&lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
The now &amp;quot;illegal&amp;quot; strings in the language file like NO, are now handled by adding a &#039;J&#039; in-front of them. You can include in your language file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
;forbidden words&lt;br /&gt;
JNULL=&amp;quot;Null&amp;quot;&lt;br /&gt;
JYES=&amp;quot;Yes&amp;quot;&lt;br /&gt;
JNO=&amp;quot;No&amp;quot;&lt;br /&gt;
JTRUE=&amp;quot;True&amp;quot;&lt;br /&gt;
JFALSE=&amp;quot;False&amp;quot;&lt;br /&gt;
JON=&amp;quot;On&amp;quot;&lt;br /&gt;
JOFF=&amp;quot;Off&amp;quot;&lt;br /&gt;
JNONE=&amp;quot;None&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=31533</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=31533"/>
		<updated>2010-10-24T14:09:45Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
This article is written to help developers upgrade their extensions from Joomla 1.5 to Joomla 1.6. If you have any further tips, feel free to add them onto this wiki article.&lt;br /&gt;
&lt;br /&gt;
== System setup ==&lt;br /&gt;
This document assumes that you are running the program eclipse for your development. This will allow you to automate most of the Joomla conversion process. For more instructions on how to setup eclipse visit:&lt;br /&gt;
http://docs.joomla.org/Setting_up_your_workstation_for_Joomla!_development&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes,  add quotes to string values and update your comments&lt;br /&gt;
&lt;br /&gt;
#Double quotes are now not allowed and this can be easily bypassed by searching &amp;quot; and replace with &#039;&lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=31532</id>
		<title>Archived:Adapting a Joomla 1.5 extension to Joomla 2.5</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Archived:Adapting_a_Joomla_1.5_extension_to_Joomla_2.5&amp;diff=31532"/>
		<updated>2010-10-24T13:37:16Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
== Updating your Joomla 1.5 language files to work on Joomla 1.6 ==  &lt;br /&gt;
Using the native php ini parser for language files has many benefits including much faster performace. Converting your exisiting Joomla 1.5 into the new format is very easy if you use a coding platform like eclipse. Search your file for *.ini in your project of choice. Then use the following search/replace values to automatically, replace exisiting quotes,  add quotes to string values and update your comments&lt;br /&gt;
&lt;br /&gt;
#Double quotes are now not allowed and this can be easily bypassed by searching &amp;quot; and replace with &#039;&lt;br /&gt;
#Put a closing double quote at end of line if not empty or a comment.  Find ^((?!#).+)\R  replace with $1&amp;quot;\R&lt;br /&gt;
#Put an opening quote at start of translated string if not empty or comment. Find ^((?!#).+?\=)(.+)\R replace with $1&amp;quot;$2\R&lt;br /&gt;
#Now replace the hash comments with the new semi colon. Find ^# and replace with ;&lt;br /&gt;
#Remove any illegal strings that can prevent files loading. Find ^(null|yes|no|true|false|on|off|none)=(.+)\R and replace with nothing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Joomla! 1.6]]&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Joomla!_Student_Outreach_Program_Project_Ideas&amp;diff=26556</id>
		<title>Joomla! Student Outreach Program Project Ideas</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Joomla!_Student_Outreach_Program_Project_Ideas&amp;diff=26556"/>
		<updated>2010-03-31T02:28:35Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: /* System Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Joomla! Student Outreach Program==&lt;br /&gt;
JSOP has been created to provide a structure to allow students to participate in and contribute to the Joomla! project. Students will work with experienced mentors on coding and other projects designed to improve the Joomla! CMS and the general Joomla! ecosystem. &lt;br /&gt;
&lt;br /&gt;
This program will include two separate ways that students can contribute to Joomla! in structured programs with experienced mentors. The first way will be working on larger projects as part of a team. The team will include one or more students and one or more mentors. &lt;br /&gt;
&lt;br /&gt;
===Large Team Projects===&lt;br /&gt;
&lt;br /&gt;
Here is a starting list for possible large team projects. The idea is that these will be larger projects that would be worked on by teams of students and mentors.&lt;br /&gt;
&lt;br /&gt;
If you are interested in participating in one of these projects, please add your name under Interested Mentors or Interested Students. This is not final and does not commit you to anything. It will just help us figure out who is interested in what. You can add your name to more than one project if you like and then we can decide later which project you will work on.&lt;br /&gt;
&lt;br /&gt;
====Improved, automated API documentation presentation====&lt;br /&gt;
Figure out a way to read the PHP code documentation into a database and use it to allow access to accurate, up-to-date documentation of the Joomla! API in a way that is usable to developers.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Interested Mentors:&#039;&#039;&#039; Louis Landry. Chris Davenport&lt;br /&gt;
:&#039;&#039;&#039;Interested Students:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
====Web-based translation of Joomla core language files and 3rd party components====&lt;br /&gt;
Currently the process of making translations for Joomla requires manual copying of files and subsequently using a text editor to manually translate. This is labour intensive, hard to keep up to date with the latest Joomla releases and does not promote collaborations. I am proposing to use an automated system to create and distribute translations for Joomla. The translations would be done using Narro a free GPL web-based translation software used by Mozilla. In addition an automation layer with a Joomla components needs to be developer to ensure the system does not need any manual updating and ensures that translations are community driven. Its an important project and will be lots of fun at the same time.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Interested Mentors:&#039;&#039;&#039; Marius van Rijnsoever&lt;br /&gt;
:&#039;&#039;&#039;Interested Students:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Internationalisation of the Joomla! help screens for 1.6====&lt;br /&gt;
Improve the process for creating and deploying the help screens in the many languages for which Joomla! is translated.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Interested Mentors:&#039;&#039;&#039; Jean-Marie Simonet&lt;br /&gt;
:&#039;&#039;&#039;Interested Students:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
====System Testing==== &lt;br /&gt;
Create automated system tests to allow testing of the CMS from a user perspective.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Interested Mentors:&#039;&#039;&#039; Mark Dexter&lt;br /&gt;
:&#039;&#039;&#039;Interested Students:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
====Version 1.5 to 1.6 migration script====&lt;br /&gt;
We need to allow 1.5 users to easily migrate their sites to version 1.6. Work on this has been started, but it is a big job. Also, this could include hooks to make it easier for third-party developers to build migration tools for their extensions.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Interested Mentors:&#039;&#039;&#039; Mark Dexter&lt;br /&gt;
:&#039;&#039;&#039;Interested Students:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
====Project Management Tools====&lt;br /&gt;
&lt;br /&gt;
This project could include:&lt;br /&gt;
&lt;br /&gt;
* Develop a component with project collaboration features (like BaseCamp: http://basecamphq.com/).&lt;br /&gt;
* ProgressBar views based on completed task based on sprints, milestones, project...&lt;br /&gt;
* Different front-end views for Clients, Team, Managers...&lt;br /&gt;
* A module to show the active projects and is respective ProgressBars.&lt;br /&gt;
* Allow Comments and discussions on tasks&lt;br /&gt;
* Allow manager/team to set the function points value of each task (eq: planing poker)&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Skills needed:&#039;&#039;&#039; Joomla CMS framework, MVC, PHP, MySQL, Javascript, MooTools&lt;br /&gt;
:&#039;&#039;&#039;Interested Mentors:&#039;&#039;&#039; Marcelo Eden&lt;br /&gt;
:&#039;&#039;&#039;Interested Students:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====Zen Joomla! template switcher====&lt;br /&gt;
This would be capable of efficiently allowing selection from a few hundred templates. Also maybe a component for submission and processing?&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Interested Mentors:&#039;&#039;&#039; &lt;br /&gt;
:&#039;&#039;&#039;Interested Students:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
====Usability testing====&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Interested Mentors:&#039;&#039;&#039; Elin Waring&lt;br /&gt;
:&#039;&#039;&#039;Interested Students:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Joomla Dev Tools  ====&lt;br /&gt;
This is a project which automatically generate codes for you to help when developing Extensions. This will help, &lt;br /&gt;
* New comers to decrease the learning curve of Joomla! Development&lt;br /&gt;
* Professionals to automate their Joomla! tasks&lt;br /&gt;
&lt;br /&gt;
more details: http://docs.google.com/View?id=dhdpnvnz_59g6n3rsc8 &lt;br /&gt;
&lt;br /&gt;
samples     : http://code.google.com/p/arunoda/source/browse/#svn/trunk/kadira%3Fstate%3Dclosed&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Interested Mentors:&#039;&#039;&#039; Oleg Nesterov&lt;br /&gt;
:&#039;&#039;&#039;Interested Students:&#039;&#039;&#039; Arunoda Susiripala&lt;br /&gt;
&lt;br /&gt;
===Small Task Projects===&lt;br /&gt;
&lt;br /&gt;
The other part of this is that we can also have a list of small&lt;br /&gt;
tasks that students could work on individually (like the GHOP model,&lt;br /&gt;
for those of you familiar with this). One or more mentors could help&lt;br /&gt;
students with these tasks. Example of tasks might be to create a unit&lt;br /&gt;
or system test, fix a bug, or write some documentation.&lt;br /&gt;
&lt;br /&gt;
===Program Structure===&lt;br /&gt;
&lt;br /&gt;
In both cases, students would be working on a volunteer basis.&lt;br /&gt;
However, we will figure out some fun rewards, like awarding t-shirts or other Joomla! stuff. Also, we will issue official certificates to students who successfully contribute to either program.&lt;br /&gt;
&lt;br /&gt;
As with GSoC, the primary benefits to students are (a) real-world experience; (b) working with world-class mentors; and (c) the satisfaction of contributing to a great project and being part of a&lt;br /&gt;
great community.&lt;br /&gt;
&lt;br /&gt;
====Application Process====&lt;br /&gt;
Since JSOP is a volunteer program, we do not have a fixed limit on the number of students who can participate. However, we need to make sure we have mentors for each project or task. Also, we still want students to formally apply to the program so that we have information about each student and can make sure they are assigned to projects. We will have more information about the details of the application process shortly.&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Joomla!_Student_Outreach_Program_Project_Ideas&amp;diff=26555</id>
		<title>Joomla! Student Outreach Program Project Ideas</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Joomla!_Student_Outreach_Program_Project_Ideas&amp;diff=26555"/>
		<updated>2010-03-31T02:28:03Z</updated>

		<summary type="html">&lt;p&gt;Mariusvr: /* Joomla! Student Outreach Program */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Joomla! Student Outreach Program==&lt;br /&gt;
JSOP has been created to provide a structure to allow students to participate in and contribute to the Joomla! project. Students will work with experienced mentors on coding and other projects designed to improve the Joomla! CMS and the general Joomla! ecosystem. &lt;br /&gt;
&lt;br /&gt;
This program will include two separate ways that students can contribute to Joomla! in structured programs with experienced mentors. The first way will be working on larger projects as part of a team. The team will include one or more students and one or more mentors. &lt;br /&gt;
&lt;br /&gt;
===Large Team Projects===&lt;br /&gt;
&lt;br /&gt;
Here is a starting list for possible large team projects. The idea is that these will be larger projects that would be worked on by teams of students and mentors.&lt;br /&gt;
&lt;br /&gt;
If you are interested in participating in one of these projects, please add your name under Interested Mentors or Interested Students. This is not final and does not commit you to anything. It will just help us figure out who is interested in what. You can add your name to more than one project if you like and then we can decide later which project you will work on.&lt;br /&gt;
&lt;br /&gt;
====Improved, automated API documentation presentation====&lt;br /&gt;
Figure out a way to read the PHP code documentation into a database and use it to allow access to accurate, up-to-date documentation of the Joomla! API in a way that is usable to developers.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Interested Mentors:&#039;&#039;&#039; Louis Landry. Chris Davenport&lt;br /&gt;
:&#039;&#039;&#039;Interested Students:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
====Web-based translation of Joomla core language files and 3rd party components====&lt;br /&gt;
Currently the process of making translations for Joomla requires manual copying of files and subsequently using a text editor to manually translate. This is labour intensive, hard to keep up to date with the latest Joomla releases and does not promote collaborations. I am proposing to use an automated system to create and distribute translations for Joomla. The translations would be done using Narro a free GPL web-based translation software used by Mozilla. In addition an automation layer with a Joomla components needs to be developer to ensure the system does not need any manual updating and ensures that translations are community driven. Its an important project and will be lots of fun at the same time.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Interested Mentors:&#039;&#039;&#039; Marius van Rijnsoever&lt;br /&gt;
:&#039;&#039;&#039;Interested Students:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
====System Testing==== &lt;br /&gt;
&lt;br /&gt;
====Internationalisation of the Joomla! help screens for 1.6====&lt;br /&gt;
Improve the process for creating and deploying the help screens in the many languages for which Joomla! is translated.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Interested Mentors:&#039;&#039;&#039; Jean-Marie Simonet&lt;br /&gt;
:&#039;&#039;&#039;Interested Students:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
====System Testing==== &lt;br /&gt;
Create automated system tests to allow testing of the CMS from a user perspective.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Interested Mentors:&#039;&#039;&#039; Mark Dexter&lt;br /&gt;
:&#039;&#039;&#039;Interested Students:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
====Version 1.5 to 1.6 migration script====&lt;br /&gt;
We need to allow 1.5 users to easily migrate their sites to version 1.6. Work on this has been started, but it is a big job. Also, this could include hooks to make it easier for third-party developers to build migration tools for their extensions.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Interested Mentors:&#039;&#039;&#039; Mark Dexter&lt;br /&gt;
:&#039;&#039;&#039;Interested Students:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
====Project Management Tools====&lt;br /&gt;
&lt;br /&gt;
This project could include:&lt;br /&gt;
&lt;br /&gt;
* Develop a component with project collaboration features (like BaseCamp: http://basecamphq.com/).&lt;br /&gt;
* ProgressBar views based on completed task based on sprints, milestones, project...&lt;br /&gt;
* Different front-end views for Clients, Team, Managers...&lt;br /&gt;
* A module to show the active projects and is respective ProgressBars.&lt;br /&gt;
* Allow Comments and discussions on tasks&lt;br /&gt;
* Allow manager/team to set the function points value of each task (eq: planing poker)&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Skills needed:&#039;&#039;&#039; Joomla CMS framework, MVC, PHP, MySQL, Javascript, MooTools&lt;br /&gt;
:&#039;&#039;&#039;Interested Mentors:&#039;&#039;&#039; Marcelo Eden&lt;br /&gt;
:&#039;&#039;&#039;Interested Students:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====Zen Joomla! template switcher====&lt;br /&gt;
This would be capable of efficiently allowing selection from a few hundred templates. Also maybe a component for submission and processing?&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Interested Mentors:&#039;&#039;&#039; &lt;br /&gt;
:&#039;&#039;&#039;Interested Students:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
====Usability testing====&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Interested Mentors:&#039;&#039;&#039; Elin Waring&lt;br /&gt;
:&#039;&#039;&#039;Interested Students:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== Joomla Dev Tools  ====&lt;br /&gt;
This is a project which automatically generate codes for you to help when developing Extensions. This will help, &lt;br /&gt;
* New comers to decrease the learning curve of Joomla! Development&lt;br /&gt;
* Professionals to automate their Joomla! tasks&lt;br /&gt;
&lt;br /&gt;
more details: http://docs.google.com/View?id=dhdpnvnz_59g6n3rsc8 &lt;br /&gt;
&lt;br /&gt;
samples     : http://code.google.com/p/arunoda/source/browse/#svn/trunk/kadira%3Fstate%3Dclosed&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;Interested Mentors:&#039;&#039;&#039; Oleg Nesterov&lt;br /&gt;
:&#039;&#039;&#039;Interested Students:&#039;&#039;&#039; Arunoda Susiripala&lt;br /&gt;
&lt;br /&gt;
===Small Task Projects===&lt;br /&gt;
&lt;br /&gt;
The other part of this is that we can also have a list of small&lt;br /&gt;
tasks that students could work on individually (like the GHOP model,&lt;br /&gt;
for those of you familiar with this). One or more mentors could help&lt;br /&gt;
students with these tasks. Example of tasks might be to create a unit&lt;br /&gt;
or system test, fix a bug, or write some documentation.&lt;br /&gt;
&lt;br /&gt;
===Program Structure===&lt;br /&gt;
&lt;br /&gt;
In both cases, students would be working on a volunteer basis.&lt;br /&gt;
However, we will figure out some fun rewards, like awarding t-shirts or other Joomla! stuff. Also, we will issue official certificates to students who successfully contribute to either program.&lt;br /&gt;
&lt;br /&gt;
As with GSoC, the primary benefits to students are (a) real-world experience; (b) working with world-class mentors; and (c) the satisfaction of contributing to a great project and being part of a&lt;br /&gt;
great community.&lt;br /&gt;
&lt;br /&gt;
====Application Process====&lt;br /&gt;
Since JSOP is a volunteer program, we do not have a fixed limit on the number of students who can participate. However, we need to make sure we have mentors for each project or task. Also, we still want students to formally apply to the program so that we have information about each student and can make sure they are assigned to projects. We will have more information about the details of the application process shortly.&lt;/div&gt;</summary>
		<author><name>Mariusvr</name></author>
	</entry>
</feed>