Showing posts with label upgrading. Show all posts
Showing posts with label upgrading. Show all posts

Monday, 2 April 2012

Upgrading Joomla! 1.5 TO 2.5 Templates

Following along from my last post, I decided to re-use all my hard work in creating an awesome template for my site. However, you can't use it 'out-of-the-box', you need to make a few changes. Also, Joomla! 2.5 is a bit weird in that it doesn't seem to update itself with the new template files. Don't ask me why but I had to zip it up and install it. Do that and not what I did (which is go around in circles) or you'll end up with loads of installations of the same thing listed - urgh!

Take a look at this article and follow the last bit (copy the Atomic Template and gut it, then add your own stuff)

http://docs.joomla.org/Upgrading_a_Joomla_1.5_template_to_Joomla_1.6

These are the changes to be made:

1. Copy the entire /templates/atomic folder to a new folder in the /templates directory. Rename this new folder. For instance, you might call it mysitename-atomic to designate it as the custom template for this site and adding the reminder that it was derived from the atomic template.


2. In the new template's index.php file, add your header-specific information for styles from your version 1.5 template and javascript, module positions etc. into the <head> and remove all the other stuff that's not needed.

3. In the new template's index.php file, delete everything between the <body> </body> tags. Copy and paste everything within the <body> </body> tags from your version 1.5 template to the body of the new template's index.php file.

4. Replace the CSS file with yours and make sure that you've referenced it in the index.php file in Step 2.

5. Update the templateDetails.xml file in the revised template.

    5.1. Add the new doctype bit, and notice how we've changed from <install> to <extension>

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE install PUBLIC "-//Joomla! 2.5//DTD template 1.0//EN" "http://www.joomla.org/xml/dtd/1.6/template-install.dtd">
<extension version="2.5" type="template" client="site">

    5.2. Change the <name> entry to match the name of the template folder. It is case-sensitive. If the folder is /templates/mysitename-atomic, the entry in the templateDetails.xml file will be:

<name>mysitename-atomic</name>.

    5.3. Replace the <positions> section of the file so that they match the positions used in the index.php file.

    5.4. Change the other elements as necessary. For instance, you might want to modify the creation date and version number.

    5.5. Delete images in the /template/image file and add your images. If you keep the images folder, make sure there's something in it like the default index.html file. If not, when you try to install the template from a zip file you'll create, it'll complain with an installation error because of a missing file.


6. Zip up your folder and use the Extensions manager to upload it. If you navigate to the Template Manager now, it'll appear under Styles (for selection) and Templates (well... I don't know what that's about yet!)


I tried to just add the folders into the templates directory as I've always done in Joomla! 1.5 but nothing appeared under the Template Manager. So after Googling I found out that I could go to Extensions > Extension Manager > Discover and then click the Discover icon. There I found my templates, but after selecting one of them and clicking Install, I was told that it had already been installed. The other one just went to a blank page. Looking back at my Templates Manager I found all of them under Templates, but not under Styles (so I couldn't do anything with them). That's when I Googled some more and found that people were zipping up their template files and uploading them via the Extensions Manager > Install.


Good luck people! :)

Installing Joomla 2.5 in Pictures

I've decided that my new site needs loads of cool extensions, like Community Builder and Kunena, but I'm concerned that I'm not going to get the full potential out of it if I'm stuck in the past on Joomla 1.5. They may not play nicely at all! So I've decided to upgrade to Joomla 2.5, and take you all along for the ride :)

Download the new Joomla installation (I'm using Joomla_2.5.3-Stable-Full_Package.zip that I downloaded this morning), un-zip it and put it under XAMPP (or whatever you're using)

Open in your browser: http://localhost/your-website/installation/index.php




Check that the Recommended settings are correct. My Output Buffering should be Off, but is On. I think I can change this in the php.ini file later, but it doesn't matter. As long as all the top settings are the same!



Accept the license:



Now add your database settings. If you are using a hosting package like 1and1 or something then you'll have to create a new database on there and they will give you the connection details. I will be creating my one on my local machine and then FTPing up to my remote host. I use Akeeba Backup which will automatically ask me for my new database connection details on my remote host. But here, I put my local details:


As I already started building my website in Joomla! 1.5, I had to rename my old database and create a new one. I used phpMyAdmin to do this by selecting the database, then clicking the Operations tab and renaming the database. It CREATEs a database in the new name, copies over all the data and then DROPs the old one.

My details were:

Database Type: Mysql
Host Name: localhost
Username: joomla_user
Password: *******
Database name: myfunkywebsite
Table Prefix: [the auto-generated one] p0y2_
Old Database Process: Remove




Click next through the FTP details, we won't be using them.

Now add in your website name (and Meta Description / Meta Keywords), your admin deatils.





You will also be strongly urged to add Sample Data if you are a beginner. Do this if you're a beginner so that you have something to look at and browse through. Otherwise if all you're going to do is delete everything straight away, don't bother :)

Next you'll be asked to completely remove the installation directory:




This is necessary for Joomla! to work and is a security feature. The two icons above will take you to your site or the backed Administrator area.



Congratulations on your installation of Joomla! 2.5 :)