|
Conversion
|
If you are looking to migrate to Joomla 1.5 instead of 1.0.x, then you are probably wondering how to convert the template you had on your Joomla 1.x site for your new website.
For developers who are working with Joomla 1.0.x technologies and want to improve their skills and to implement new Joomla 1.5 features it's a perfect fast learning tutorial. Easy to apply and well described step-by-step article for developers.
In this tutorial you will learn how to convert a Joomla 1.x to Joomla 1.5 template.
For First step to convert the Joomla 1.0.x temlate is to upgrade your index.php file.
First of all you must replace in the head content the _VALID_MOS function with _JEXEC.
After this the second step you have to do: you will replace $mosConfig_absolute_path with $this->baseUrl funcion.
The third step is replacing $mosConfig_live_site with $mainframe->getCfg( 'live_site' ).
Next step - you must replace all fixed strings from your source file with translatable strings. Here is an example for you: replace echo 'Hello' with echo JText::_( 'Hello' ).
The 5th step is to replace calls to mosGetParam to JRequest::getVar. For example, replace $id = mosGetParam( $_REQUEST, 'id', 0 ); with $id = JRequest::getVar( 'id', 0 ).
In the 6th you have to replace mosShowHead(); with ;
Now it’s the 7th step and you must replace mosMainBody() with .
The last step is replacing mosLoadModules( $position_name, $style ); with in the whole file source. But you have to know that the 1.0 template's PHP syntax may use single or double quotes. Jdoc expressions require double quotes, and won't work with single quotes.
|