Joomla Tutorials
Convert to Joomla 1.5
Written by Brian Duckett
Are your Joomla 1.0 templates useless for your Joomla 1.5 websites?
As the Joomla core team moves support from the 1.0 platform over to 1.5 you may be asking yourself if all of that work making and/or customizing your Joomla 1.0 templates has gone to waste. The answer is... "No". Converting to Joomla 1.5 is a thoughtful process, but it only requires a few edits to the way content is called. In order to convert to Joomla 1.5, you should begin with your index.php file. Before we begin with the new calls to convert to Joomla 1.5, take note that the security syntax has been modified.
These should be the first lines of code in your index file.
Your current 1.0 file will read:
<?php defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); ?>
In order to convert to Joomla 1.5 the new syntax will read:
<?php // direct access not allowed defined( '_JEXEC' ) or die( 'Restricted index access' ); ?>
Converting the template is rather easy, if you follow these simple rules. Beginning with the content calls, you can start to see how much easier it is to identify what each call is, simply by eying it.
The second step required to prep your file for conversion requires a change in the DOCTYPE.
Currently your DOCTYPE will read:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
While the new syntax for your Joomla 1.5 DOCTYPE will read:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language ?>" dir="<?php echo $this->direction; ?>">
Among the improvements are better integration with international languages and the direction variable allows for international languages to change the direction of the text.
Let's begin by locating the calls for the template:
Joomla 1.0
$mainframe->getTemplate() Update these with: Joomla 1.5
$this->template
While in the process of converting your template over to Joomla 1.5 notice that the calls for URL's have changed also. The variable in the configuration file is no longer absolute.
Find the Joomla 1.0 calls for URL's:
$mosConfig_live_site and replace with the new calls for Joomla 1.5:
$this->url
Update your module calls to support the Joomla 1.5 format easily by locating the
<?php mosLoadModules('banner',-2); ?> and changing this to <jdoc:include type="modules" name="banner" style="xhtml" />
Finally, change the main body syntax from:
<php mosMainBody(); ?> to the Joomla 1.5 equivalent of: <jdoc:include type="component" />This will finish out the index.php file.
Next, the templateDetails.xml file will need to be edited and converted to the the Joomla 1.5 syntax also. First locate the <mosinstall version="1.0" type="template">
Change this over to <install version="1.5" type="template">
Note: Don't forget to close out your tag at the end of the document. Between your <postions> tags, place your module positions between the <position> tags, save and you've just completed converting your template to Joomla 1.5.
If you have any questions on this tutorial, let me know so that I can continue to improve on the usefulness of this tutorial.

Latest Comments
-
Joomla Section
Hi Veronique,
An analogy I like to use for ... -
Joomla Section
Just to be clear, sections, categories and article...
-
Joomla Positions
Hi Sam, The easiest way to get the module to dis...
Site Search
SEO Goods
SEOPressFormula, Your Business In A Box System For Driving Massive Free Traffic From Google, Yahoo & Msn. 5 Hours Of How To Videos, Ebook, & 2 Fee SEO Optimized Wordpress Themes.
The Fastest, Easiest, Most Powerful Link Analysis Tool For Google At A Price That Will Drop Your Jaw!
Give The Search Engines What They Really Want - Uncover The Secret Words And Hidden On-page SEO Factors That Really Make A Difference To Your Rankings.
Sign up and receive the 6DW Report, as well as 2 other bonus reports and regular tips ($27 value)











