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.

Subscribe


Share this page with your favorite Social Bookmarking websites
Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! StumbleUpon! TwitThis Joomla Free PHP
Trackback(0)
Comments (0)Add Comment

Write comment

busy

Latest Comments

Site Search

join our mailing list
* indicates required field

SEO Goods

Free Website Traffic System
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.
SEO Link Analysis Pure and Simple
The Fastest, Easiest, Most Powerful Link Analysis Tool For Google At A Price That Will Drop Your Jaw!
Keyword Spy
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.
The Six Day Weekend
Sign up and receive the 6DW Report, as well as 2 other bonus reports and regular tips ($27 value)

Joomla Support

Joomla Support

Get some help with your Joomla website

Revision Technology offers a wide variety of Affordable Joomla Support services that solve problems, and relieve frustration.

Follow Us Follow Revision Technology on Twitter
Hours of Operation Monday - Friday
10am - 6pm (est)
Saturday Noon - 4pm (est)
Live Support
Contact Information Phone: 800.518.6298
Fax: 877.597.8675
support@revision-technology.com
www.revision-technology.com