Page 1 of 1

how to upgrade a 1.0.x template to a 1.5 template - tute and resources

Posted: Wed Jan 02, 2008 5:37 pm
by rw1
hello,

i have a 1.0.x template template on a 1.0.x site and am wanting to upgrade to 1.5 - there is no 1.5 version of the template though. 

can anybody tell me what things need to be changed to make it compatible with 1.5?

thank you,

rw1 :)

Edit: Have upgraded my template successfully and documented my steps here.

Re: how to upgrade a 1.0.x template to a 1.5 template?

Posted: Wed Jan 02, 2008 6:58 pm
by Jenny
The best thing I can tell you is to look at the 1.5 template tutorials and blank template that are offered in this forum and do a comparison between the content calls that each makes.

Re: how to upgrade a 1.0.x template to a 1.5 template?

Posted: Wed Jan 02, 2008 7:37 pm
by rw1
Thanks for your reply,

New Joomla! 1.5 Template Tutorial Documentation

Relates to "1.5 BETA tutorial [that] has a lot of good information but has NOT been updated for 1.5 RC1".  So it doesn't appear there is documentation for RC4 yet. 

I am looking at 'blank template' now, and am not sure what 'content calls' are...

Correct me if i'm wrong, but, looking at this skeleton template, it looks like there is a lot of new 'stuff' in a joomla 1.5 template, and so what i hoped would be possible (add a few lines of code to make it compatible with 1.5) looks like it is not really possible.

If anyone finds a tutorial explaining the changes somewhere it would be great if you could paste the link to it here. 

Thanks,

rw1:)

Re: how to upgrade a 1.0.x template to a 1.5 template?

Posted: Wed Jan 02, 2008 7:41 pm
by Jenny
I replied to your question in the other thread.  Yes there has been updates.  Please take a look at it.

One thing to note is you don't have to update your template at all most likely.  Run 1.5 in legacy mode and your template should be just fine.

You can also check out HarryB's site and his 1.5 template primer. http://rc.hrpr.com/trunk/joomla-15-template-primer

Re: how to upgrade a 1.0.x template to a 1.5 template?

Posted: Wed Jan 02, 2008 10:59 pm
by rw1
thank you for your reply :)

the template primer really asks the question 'What Has Changed?' - which is great!

just a related question - if i switch on legacy mode, does that mean extensions specifically made for 1.5 won't work?

thank you,

rw1 :)

Re: how to upgrade a 1.0.x template to a 1.5 template?

Posted: Thu Jan 03, 2008 2:25 am
by Jenny
Yes it does most likely, at least in my experience if you enable legacy mode it affects the whole, not just parts.

Re: how to upgrade a 1.0.x template to a 1.5 template?

Posted: Thu Jan 03, 2008 2:30 am
by matthewhayashida
Here is a guide to template conversion in general that may help: http://tutorials.rockettheme.com/joomla ... ative.html

Re: how to upgrade a 1.0.x template to a 1.5 template?

Posted: Thu Jan 03, 2008 3:00 am
by Jenny
Awesome link Matt!  I knew there was something out there, I just couldn't remember where...  :-[

Re: how to upgrade a 1.0.x template to a 1.5 template?

Posted: Mon Jan 07, 2008 7:02 pm
by rw1
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.Generator

Joomla! 1.5 templatebuilder for Dreamweaver

What 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 :

Code: Select all

<?php defined( '_JEXEC' ) or die( 'Restricted index access' );?>
<!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; ?>" >
<head>
<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" />
</head>
RocketTheme points out:
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:

Code: Select all

<?php echo $mosConfig_live_site;?>
with

Code: Select all

<?php $this->url ?>
and

Code: Select all

'mosCount'
with

Code: Select all

'$this->count'
and anything like

Code: Select all

<?php mosLoadModules ( 'right',-2 ); ?> 
becomes

Code: Select all

<jdoc:include type="modules" name="right" style="xhtml" />
and

Code: Select all

<?php mosMainBody(); ?>
with

Code: Select all

<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


[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:


gallery
banner
left
right
user1
user2
user3
user5
user8
user11
user12
user13
user14
user15
user16
user17
user18



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,

rw1  :)


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 template

Joomla! 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:

Code: Select all

<?php } ?>
<?php <jdoc:include type="component" />; ?>
<jdoc:include type="modules" name="gallery" style="xhtml" />
and it should have been

Code: Select all

<?php } ?>
<jdoc:include type="component" />


Mod edit:  Harry B's Template Primer is offline currently.  Link has been removed at this time. - MMMedia

Re: how to upgrade a 1.0.x template to a 1.5 template - tute and resources

Posted: Mon Jan 07, 2008 8:27 pm
by Jenny
That is an awesome post!  Thank you so much for sharing your experience and new found knowledge with everyone.  I know this has been an often asked question on the both the 1.0 forums and the 1.5 forums.  I am going to bring that post to the attention of the documentation team, and tips and trick forum mods so they can take a look.

Thank you again!  Great work!  :)

Re: how to upgrade a 1.0.x template to a 1.5 template - tute and resources

Posted: Mon Jan 07, 2008 8:30 pm
by rw1
You're very welcome MMMedia. Thanks for the feedback :)

Re: how to upgrade a 1.0.x template to a 1.5 template - tute and resources

Posted: Tue Jan 08, 2008 1:51 am
by mcsmom
rw1,

would you want to make a new copy of your post and post it over in Tips & Tricks?
I think we will be getting a lot of people looking for information like this.

Re: how to upgrade a 1.0.x template to a 1.5 template - tute and resources

Posted: Sun Jan 13, 2008 1:11 pm
by Chris Davenport
What I'd really like is if you could put it into the 1.5 Template Tutorials page here: http://www.developer.joomla.org/wiki/Tu ... x_template

I'm planning to move this stuff to the new docs.joomla.org wiki soon, but if you'd like to update it before then I'll get write access for you.

Thanks,
Chris.

Re: how to upgrade a 1.0.x template to a 1.5 template - tute and resources

Posted: Sun Jan 13, 2008 8:02 pm
by rw1
hey guys, sorry for the delay in responding, i've been busy in getting other extensions working in my new 1.5 site, please feel free to use the document as you wish - if u need me to place it somewhere specifically, please let me know.  all the best, rw1 :)

Re: how to upgrade a 1.0.x template to a 1.5 template - tute and resources

Posted: Fri Jan 25, 2008 7:07 pm
by milka
hi everyone,

does anyone have another link to the joomla 1.5 template primer... the site is down (or a personal site with a webserver disconnected) can't access it :( anyone for a pdf of it ?)

cheers,

thanks for the tutorial and explanation btw :)

Re: how to upgrade a 1.0.x template to a 1.5 template - tute and resources

Posted: Fri Jan 25, 2008 7:17 pm
by Jenny
I think HarryB has moved it, as it was for testing of the RCs.  I don't think a pdf of it was ever available.  The other resources listed should have most all of the information contained in Harry's Primer.  I will remove the link to the primer for now.

Re: how to upgrade a 1.0.x template to a 1.5 template - tute and resources

Posted: Tue Jan 29, 2008 12:57 am
by bokonon
The how-tos (both the one given here and the one on the external link) lack one important step:



should be changed to


Re: how to upgrade a 1.0.x template to a 1.5 template - tute and resources

Posted: Sun Feb 10, 2008 11:56 pm
by mihu
:-[ ... this is my step by step tutorial ... http://forum.joomla.org/index.php/topic,180145.0.html
Once I verify the new version from my site, I will update this one.

Re: how to upgrade a 1.0.x template to a 1.5 template - tute and resources

Posted: Mon Feb 11, 2008 10:07 pm
by HarryB
MMMedia wrote: I think HarryB has moved it, as it was for testing of the RCs.  I don't think a pdf of it was ever available.  The other resources listed should have most all of the information contained in Harry's Primer.  I will remove the link to the primer for now.
Harry's Primer has been moved to http://prophead.halfvast.com/2008/01/24 ... ate-primer

The site it was on was an unstable test site, so it was moved to a site that is stable and has much higher availability...and has also been updated a bit.

Re: how to upgrade a 1.0.x template to a 1.5 template - tute and

Posted: Fri Apr 25, 2008 12:24 pm
by WayneSmallman
I really appreciate all the work you guys are putting into the documentation, but this one post typifies what I've experienced over the past two years when working with the Joomla! CMS. For example:
... function and replace:

Big blank space, which should presumably contain something but actually doesn't!

with

Yet another big blank space!

[with a space under it]

And that will add spaces so it is easier to read
I've been onto the actual Wiki and found crucial pages with: "hhfhfhffhfffhhhhhhffhhffhh" in the description with no details whatsoever.

I've been searching for over 4 hours — most of the time just going around in a vast circle — searching for a guide to upgrading a 1.0.x template to 1.5.x.

Sadly, this thread has only left me even more confused than I was when I started out.

Is it not possible for someone, or a group of people to centralize all of the documentation for template migrations / upgrades?

Re: how to upgrade a 1.0.x template to a 1.5 template - tute and

Posted: Tue May 19, 2009 7:17 pm
by konczal
I tried to download the Joomla.Template.XML.Generator from the link specified about and would up on a foreign language page (German?). I wound up downloading something called "Artisteer 2" - not Joomla.Template.XML.Generator.

Does anyone have a correct link to Joomla.Template.XML.Generator?

Re: how to upgrade a 1.0.x template to a 1.5 template - tute and

Posted: Tue May 19, 2009 10:26 pm
by vjtemplates
konczal wrote:I tried to download the Joomla.Template.XML.Generator from the link specified about and would up on a foreign language page (German?). I wound up downloading something called "Artisteer 2" - not Joomla.Template.XML.Generator.

Does anyone have a correct link to Joomla.Template.XML.Generator?
Rather than using the generator which finally end up with more editing that creating, better just copy the templateDetails.xml from the default templates, then edit as necessary.

Re: how to upgrade a 1.0.x template to a 1.5 template - tute and

Posted: Sat May 23, 2009 12:42 pm
by HarryB
MMMedia wrote: I think HarryB has moved it, as it was for testing of the RCs.  I don't think a pdf of it was ever available.  The other resources listed should have most all of the information contained in Harry's Primer.  I will remove the link to the primer for now.
Harry's Primer is available at http://portal.hrpr.com/2009/02/16/how-c ... -joomla-15