I did it - woo hoo!! ;D
Here are the steps i took, and the resources i used, to successfully upgrade my template. Target Audience
For people with:
- Some experience in making Joomla 1.0.x templates who want to upgrade one of their templates to be compatible with 1.5RC4 +.
- Dreamweaver (optional - if u dont have it you can improvise with what u do have)
- Windows .NET 2.0 Framework. (optional - ditto above)Like a Samurai!
Lets do this as quickly and painlessly as possible, don't start surfing tangents, checking facebook, researching or anything, just do as instructed and it will be over quicker!What are we doing?
According to this very helpful document
by RocketTheme, there are two ways to convert a 1.0.x template to a 1.5 template:
1. Full conversion:
Convert a Joomla! template for the 1.0x series and make it compatible with Joomla! 1.5 and also take advantage of all the new features available with Joomla! 1.5.
2. Native conversion:
Convert a Joomla! template for the 1.0x series and make it compatible with Joomla! 1.5 but not take an advantage of the new features of Joomla! 1.5
We are going to do number 2.
Download these:Joomla.Template.XML.GeneratorJoomla! 1.5 templatebuilder for DreamweaverWhat has changed in 1.5 templating?
" Just about everything!"
[url=http://]Joomla 1.5 Template Primer[/url]Let's go:
Make a copy on your computer of your existing template including all files and folders and then:
- Open the Joomla Template XML Generator.
- Fill in the info
- Leave 'Parameters' blank (for now)
- Set compatibility to 1.5
- 'Open Directory' of your copied template
- Create XML-file.You have your xml file - don't rest on your laurels yet, let's keep going:
- Open Dreamweaver
- Install Joomla! 1.5 templatebuilder for Dreamweaver like so:
-Commands>Manage Extensions>Click 'Install New Extension' icon.
- Restart Dreamweaver
- Open your copy of your templates index.php
- Insert this right at the top replacing everything before :
<?php defined( '_JEXEC' ) or die( 'Restricted index access' );?>RocketTheme
<!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; ?>" >
<jdoc:include type="head" />
<link rel="stylesheet" href="templates/_system/css/general.css" type="text/css" />
<link rel="stylesheet" href="templates/<?php echo $this->template ?>/css/template.css" type="text/css" />
Observe how becomes redundant and is dropped and getTemplate(); ?> is replaced with template ?> which is shorter and cleaner.
Still in Dreamweaver, use the Find and Replace function and change:
<?php echo $mosConfig_live_site;?>
<?php $this->url ?>
and anything like
<?php mosLoadModules ( 'right',-2 ); ?>
<jdoc:include type="modules" name="right" style="xhtml" />
<?php mosMainBody(); ?>
<jdoc:include type="component" />Now this is interesting...
The module syntax change is probably the most dramatic. The normal loader for a module in the Joomla! 1.0x series is with the name of the module between the ' ' tags followed by a number which is either -3,-2,-1,0 or 1. Joomla! 1.5 takes a differnt approach with using again, there are 5 default options, rounded(-3), xhtml(-2), raw(-1), table(0) and horiz(1). Therefore, we need to change all instances of to the Joomla! 1.5 syntax.RocketTheme
Save your index.php. Open your new templateDetails.xml file
For some reason the xml generator doesn't put line spaces or formatting to the xml file, so for the first bit (author details etc) you will have to add spaces by hand but for the file lists use the 'Find and Replace' function and replace:
[with a space under it]
And that will add spaces so it is easier to read
Also, the xml generator does not output case sensitive file names, which the template installer needs, so u manually have to change any letters that should be capital in the file names within the templateDetails.xml file.Nearly There
Still in the xml file, remove
which was automatically created by the xml generator.
Search for name= in your index.php and where it refers to a module position, make sure that the module position name is included in your xml file right before like this:
And that should be it!
Zip your new folder and install it as per usuual.
Please PM me with corrections or suggestions on ways to improve this tutorial.
All the best,
Disclaimer - This is what i did to upgrade my 1.0.x template to a 1.5RC4 compatible one and it worked, it might not work in all cases in which case the forum is here to help. Also, here is also a list of other 1.5 template upgrading tutes and resources:
[url=http://]Joomla! 1.5 Template Primer[/url]Joomla! 1.5 Native?Tutorial: Upgrading a Joomla! 1.0.x templateJoomla! 1.5 Template Tutorials
Also if things aren't working out i found this php checker:http://www.meandeviation.com/tutorials/ ... tax-check/
it helped me when i had:
<?php } ?>
<?php <jdoc:include type="component" />; ?>
<jdoc:include type="modules" name="gallery" style="xhtml" />
and it should have been
<?php } ?>Mod edit: Harry B's Template Primer is offline currently. Link has been removed at this time. - MMMedia
<jdoc:include type="component" />