[ Tutorial ] - Upgrade your Joomla 1.5 Template to Joomla 2.5!

Posted by on in Joomla General
  • Font size: Larger Smaller
  • Hits: 4842
  • 0 Comments
  • Subscribe to this entry
  • Print

Occasionally it is possible, that the author of a Joomla 1.5 template do not evolve this template for Joomla 2.5. If you want to use your template in Joomla 2.5, you have to make the following easy changes in the template files.

1. Step: index.php


Change and add the following lines in the index.php of your Template:


Change:

defined( '_JEXEC' ) or die( 'Restricted access' );

to:

defined( '_JEXEC' ) or die;

Change:

$mainframe->getCfg( 'live_site' );

to:

$app->getCfg( 'live_site' );

Add following line in your index.php:

$app = JFactory::getApplication();

 

2. Step: template.css


Change and add the following lines in the template.css of your Template:


Change:

.blog_more

to:

.items-more

Change:

.article_separator

to:

.item-separator

Change:

#current

to:

.current

Add and set following lines in your templates.css, if you use the component smart search in your Joomla 2.5 CMS:

#finder-search {}
form .finder label {}
dl.search-resultsdd.result-url {}
.finder .inputbox {}.
#header form .finder {}

Add and set following lines in your template.css, if you use intro images or/and articel images in your Joomla 2.5 CMS:

.img-fulltext-left {}
.img-intro-left {}
.img-fulltext-right {}
.img-intro-right {}

 

3. Step: error.php

Change and add the following lines in the error.php of your Template:


Change:

$this->error->code;

to:

$this->error->getCode();

Change:

$this->error->message;

to:

$this->error->getMessage();

Add following commands in line 14-17 of your error.php:

//get language and direction
$doc = JFactory::getDocument();
$this->language = $doc->language;
$this->direction = $doc->direction;

Add following commands in line 24-26 of your error.php:

<?php if ($this->direction == 'rtl') : ?>
<link rel="stylesheet" href="/<?php echo $this->baseurl;
?>/templates/system/css/error_rtl.css" type="text/css" />
<?php endif; ?>

 

4. Step: templateDetails.xml


Change and add the following lines in the templateDetails.xml of your Template:


Change:

<!DOCTYPE install PUBLIC "-//Joomla! 1.5//DTD template 1.0//EN" 
"http://dev.joomla.org/xml/1.5/template-install.dtd">

to:

<!DOCTYPE install PUBLIC "-//Joomla! 1.6//DTD template 1.0//EN" 
"http://www.joomla.org/xml/dtd/1.6/template-install.dtd">

Change:

<install version="1.5" type="template">

</install>

to:

<extension version="2.5" type="template" client="site">

</extension>

 Change:

<params>
<param name=""
    type=""
    default=""
    label=""
    description="">
<option value="0">yes</option>
<option value="1">no</option>
</param>
</params>

to:

<config>
<fields name="params">
    <fieldset name="advanced">
    <field name=""
        default=""
        label=""
        description="">
    <option value="0">yes</option>
    <option value="!">NO</option>
    </field>
    </fieldset>
    </fields>
</config>

Add your favorite language-folder to the templateDetails.xml:

<languages folder="languages">
        <language tag="en-GB">en-GB.tpl_templatename.ini</language>
        <language tag="en-GB">en-GB.tpl_templatename.sys.ini</language>
</languages>

 

5. Step: language files

Apply a "en-EN.tpl_namedestemplates.sys.ini", which you have added in the templateDetails.xml to the template-directory "languages".

Last modified on
Rate this blog entry:

Comments

  • No comments made yet. Be the first to submit a comment

Leave your comment

Guest Saturday, 20 July 2019

Shortcuts

Wohnung Löbau Auf wohnen-in-loebau.de finden Sie bestimmt Ihre neue Wohnung in Löbau.