title: Joomla template 1.5 to 2.5 / 3.x upgrade
body: <p>How difficult should it be to convert the below code from 1.5 to 2.5 / 3.x? I have tried multiple guides to convert it to 2.5 but was unsuccessful. One thing that I noticed with the majority of this code is that it lacks much of what the guides ask you to change.  Obviously, the end result is that it does not work when I uploaded it to a fresh install of Joomla 2.5.</p>
  
  <pre><code>&lt;?php
  /**
   * @copyright   Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
   * @license     GNU/GPL, see LICENSE.php
   * Joomla! is free software. This version may have been modified pursuant
   * to the GNU General Public License, and as distributed it includes or
   * is derivative of works licensed under the GNU General Public License or
   * other free or open source software licenses.
   * See COPYRIGHT.php for copyright notices and details.
   */
  // no direct access
  defined( '_JEXEC' ) or die( 'Restricted access' );
  ?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="&lt;?php echo $this-&gt;language; ?&gt;" lang="&lt;?php echo $this-&gt;language; ?&gt;" &gt;
  &lt;head&gt;
  &lt;jdoc:include type="head" /&gt;
  
  &lt;?php
      global $templateurl ;
      $templateurl = $this -&gt; baseurl . '/templates/1989_dog_store' ;
      $js = $templateurl.'/js/';
      $css = $templateurl.'/css/';
  ?&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; &lt;?php echo _ISO; ?&gt;" /&gt;
  &lt;link rel="stylesheet" href="&lt;?php echo $this-&gt;baseurl ?&gt;/templates/system/css/system.css" type="text/css" /&gt;
  &lt;link rel="stylesheet" href="&lt;?php echo $this-&gt;baseurl ?&gt;/templates/system/css/general.css" type="text/css" /&gt;
  &lt;link rel="stylesheet" href="&lt;?php echo $templateurl; ?&gt;/css/template.css" type="text/css" /&gt;
  &lt;link rel="stylesheet" href="&lt;?php echo $templateurl; ?&gt;/css/gallery.css" type="text/css" /&gt;
  &lt;link rel="stylesheet" href="&lt;?php echo $templateurl; ?&gt;/css/style.css" type="text/css" /&gt;
  &lt;script src="&lt;?php echo $templateurl; ?&gt;/js/jquery-1.3.2.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="&lt;?php echo $templateurl; ?&gt;/js/jquery-slide.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="&lt;?php echo $templateurl; ?&gt;/js/ie.js" type="text/javascript"&gt;&lt;/script&gt;
  
          &lt;!-- Header_gallery --&gt;
  &lt;script type="text/javascript"&gt;
  var $j = jQuery.noConflict();
  $j('&lt;img /&gt;')[0].src = '&lt;?php echo $templateurl; ?&gt;/images/header/1.jpg';
  $j('&lt;img /&gt;')[0].src = '&lt;?php echo $templateurl; ?&gt;/images/header/2.jpg';
  $j('&lt;img /&gt;')[0].src = '&lt;?php echo $templateurl; ?&gt;/images/header/3.jpg';
  $j('&lt;img /&gt;')[0].src = '&lt;?php echo $templateurl; ?&gt;/images/header/4.jpg';
  $j('&lt;img /&gt;')[0].src = '&lt;?php echo $templateurl; ?&gt;/images/header/19.jpg';
  
  $j(function() {
      var fx, cbox = 1;//$('input:checkbox').click(start)[0];
      //cbox.checked = true;
  
      var markup = '&lt;div id="slideshow"&gt;'
          + '&lt;img src="&lt;?php echo $templateurl; ?&gt;/images/header/1.jpg"&gt;&lt;img src="&lt;?php echo $templateurl; ?&gt;/images/header/2.jpg"&gt;&lt;img src="&lt;?php echo $templateurl; ?&gt;/images/header/3.jpg"&gt;&lt;img src="&lt;?php echo $templateurl; ?&gt;/images/header/4.jpg"&gt;&lt;a href="../index.php/wholesale"&gt;&lt;img src="&lt;?php echo $templateurl; ?&gt;/images/header/19.jpg"&gt;&lt;/a&gt;'
          + '&lt;/div&gt;';
  
      function start() {
          $j('#slideshow').cycle('stop').remove();
          $j('#show').append(markup);
          $j('#effect').html(fx);
          $j('#slideshow').cycle({
              fx: fx,
              timeout: 8000,
              delay:  -1000,
              after: onAfter,
              sync: 1
          });
      }
  
      function onAfter(curr,next,opts) {
          var msg = 'Slide ' + (opts.currSlide + 1) + ' of ' + opts.slideCount;
          $j('#caption').html(msg);
      };
  
      fx = $j.trim("fade");
      start();
  });
  &lt;/script&gt;
                              &lt;!-- Header_gallery_end --&gt;
  &lt;!--[if IE]&gt;
      &lt;link href="&lt;?php echo $templateurl; ?&gt;/css/ieonly.css" rel="stylesheet" type="text/css" /&gt;
  &lt;![endif]--&gt;
  
  &lt;/head&gt;
  &lt;body dir="ltr"&gt;
  &lt;div id="body"&gt;
      &lt;div class="outer"&gt;
          &lt;div class="topright"&gt;
              &lt;?php if ( $this -&gt; countModules ( 'user7' ) ) : ?&gt;
              &lt;div id="menu_top"&gt;
                  &lt;jdoc:include type="modules" name="user7" /&gt;
                  &lt;script type="text/javascript"&gt;
                      var z_menu = document . getElementById ( 'menu_top' ) ;
                      z_menu = z_menu . getElementsByTagName ( 'li' ) ;
                      z_menu [ z_menu . length - 1 ] . style . backgroundImage = 'none' ;
                      z_menu [ z_menu . length - 1 ] . style . paddingRight = '0' ;
                  &lt;/script&gt;&lt;br&gt;
              &lt;/div&gt;
              &lt;?php endif; ?&gt;
              &lt;div class="clear"&gt;&lt;/div&gt;
              &lt;?php if ( $this -&gt; countModules ( 'user2' ) ) : ?&gt;
              &lt;div id="shopcart"&gt;
                  &lt;jdoc:include type="modules" name="user2" /&gt;
              &lt;/div&gt;
              &lt;?php endif; ?&gt;
              &lt;?php if ( $this -&gt; countModules ( 'user1' ) ) : ?&gt;
              &lt;div id="currency"&gt;&lt;jdoc:include type="modules" name="user1"  style="top" /&gt;&lt;div class="clear"&gt;&lt;/div&gt;&lt;/div&gt;
              &lt;?php endif; ?&gt;
              &lt;/div&gt;
          &lt;div id="logo"&gt;
              &lt;a href="&lt;?php echo $mainframe -&gt; getCfg ( 'live_site' ) ; ?&gt;"&gt;
                  &lt;img src="&lt;?php echo $templateurl; ?&gt;/images/logo.jpg" alt="&lt;?php echo $mainframe-&gt;getCfg('sitename') ; ?&gt;" /&gt;
              &lt;/a&gt;
          &lt;/div&gt;
          &lt;div class="clear"&gt;&lt;/div&gt;
          &lt;?php if ( $this -&gt; countModules ( 'user3 or user4' ) ) : ?&gt;
          &lt;div id="topmenu"&gt;
              &lt;div class="inner"&gt;
                  &lt;jdoc:include type="modules" name="user3" /&gt;
                  &lt;script type="text/javascript"&gt;
                      var z_menu = document . getElementById ( 'topmenu' ) ;
                      z_menu = z_menu . getElementsByTagName ( 'li' ) ;
                      z_menu [ z_menu . length - 1 ] . style . backgroundImage = 'none' ;
                  &lt;/script&gt;
                  &lt;div id="search"&gt;&lt;jdoc:include type="modules" name="user4" /&gt;&lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;?php endif; ?&gt;
          &lt;div class="clear"&gt;&lt;/div&gt;
          &lt;div id="header" class="outer"&gt;
              &lt;div class="inner"&gt;
                  &lt;div id="shop_now"&gt;
                      &lt;div id="show"&gt;
                          &lt;div style="overflow: hidden; position: relative;" id="slideshow"&gt;
                              &lt;img style="position: absolute; top: 0px; left: 0px; display: none; z-index: 9; opacity: 1; width: 915px; height: 334px;" src="&lt;?php echo $templateurl; ?&gt;/images/header/1.jpg"&gt;
                              &lt;img style="position: absolute; top: 0px; left: 0px; display: none; z-index: 9; opacity: 1; width: 915px; height: 334px;" src="&lt;?php echo $templateurl; ?&gt;/images/header/2.jpg"&gt;
                              &lt;img style="position: absolute; top: 0px; left: 0px; display: none; z-index: 9; opacity: 1; width: 915px; height: 334px;" src="&lt;?php echo $templateurl; ?&gt;/images/header/3.jpg"&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;?php if ( $this -&gt; countModules ( 'banner' ) ) : ?&gt;
          &lt;div id="banner"&gt;
              &lt;jdoc:include type="modules" name="banner" /&gt;
          &lt;/div&gt;
          &lt;?php endif; ?&gt;
          &lt;div class="clear"&gt;&lt;/div&gt;
          &lt;?php if ( $this -&gt; countModules ( 'top' ) ) : ?&gt;
          &lt;div id="ps"&gt;
              &lt;jdoc:include type="modules" name="top" style="side" /&gt;
              &lt;div class="clear"&gt;&lt;/div&gt;
          &lt;/div&gt;
          &lt;?php endif; ?&gt;
          &lt;table id="content" width="100%" border="0" cellspacing="0" cellpadding="0"&gt;
              &lt;tr&gt;
              &lt;?php if ( $this -&gt; countModules ( 'left' ) ) : ?&gt;
                  &lt;td width="238"&gt;
                      &lt;div id="left"&gt;&lt;jdoc:include type="modules" name="left" style="side" /&gt;&lt;/div&gt;
                  &lt;/td&gt;
              &lt;?php endif; ?&gt;
                  &lt;td&gt;
                      &lt;div id="center"&gt;
                      &lt;div id="message"&gt;&lt;jdoc:include type="message" /&gt;&lt;/div&gt;
  
                      &lt;?php if ( ( $_GET [ 'view' ] == 'frontpage' ) &amp;&amp; ( $_POST [ 'option' ] == '' ) || empty($_GET) ) { ?&gt;
                          &lt;div id="fp"&gt;&lt;jdoc:include type="modules" name="content" style="side" /&gt;&lt;/div&gt;
                          &lt;script type="text/javascript"&gt;
                              var z_menu = document . getElementById ( 'fp' ) ;
                              z_menu = z_menu . getElementsByTagName ( 'tr' ) ;
                              z_menu [ z_menu . length - 2 ] . style . backgroundImage = 'none' ;
  
                              var z_menu = document . getElementById ( 'fp' ) ;
                              z_menu = z_menu . getElementsByTagName ( 'td' ) ;
                              for(i=1;i&lt;z_menu.length;i=i+2)z_menu [ i ] . style . backgroundImage = 'none' ;
                          &lt;/script&gt;
                          &lt;table cellpadding="0" cellspacing="0" border="0"&gt;
                              &lt;tr&gt;
                                  &lt;?php if ( $this -&gt; countModules ( 'user5' ) ) : ?&gt;
                                      &lt;td&gt;&lt;jdoc:include type="modules" name="user5" /&gt;&lt;/td&gt;
                                  &lt;?php endif; ?&gt;
                                  &lt;?php if ( $this -&gt; countModules ( 'user6' ) ) : ?&gt;
                                      &lt;td&gt;&lt;jdoc:include type="modules" name="user6" /&gt;&lt;/td&gt;
                                  &lt;?php endif; ?&gt;
                              &lt;/tr&gt;
                          &lt;/table&gt;
                      &lt;?php } else { ?&gt;
                          &lt;div id="path"&gt;&lt;div class="left"&gt;&lt;div class="right"&gt;&lt;div class="inner"&gt;
                              &lt;jdoc:include type="modules" name="breadcrumb" /&gt;
                          &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
                          &lt;div
                              id="component"
                              &lt;?php if ( ( $option == 'com_virtuemart' ) &amp;&amp; ( ( !isset ( $_REQUEST [ 'page' ] ) ) || ( $_REQUEST [ 'page' ] == 'shop.browse' ) ) &amp;&amp; ( !isset ( $_REQUEST [ 'category_id' ] ) ) ) { ?&gt;
                                  class="firstShopPage"
                              &lt;?php } ?&gt;
                          &gt;
                                  &lt;div class="inner"&gt;
                                      &lt;jdoc:include type="component" /&gt;
                                  &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;?php } ?&gt;
                      &lt;/div&gt;
                  &lt;/td&gt;
              &lt;?php if ( ( $this -&gt; countModules ( 'right' ) ) ) : ?&gt;
                  &lt;td width="238"&gt;
                      &lt;div id="right"&gt;&lt;jdoc:include type="modules" name="right" style="side" /&gt;&lt;/div&gt;
                  &lt;/td&gt;
              &lt;?php endif; ?&gt;
                &lt;/tr&gt;
              &lt;/table&gt;
      &lt;/div&gt;
      &lt;div id="footer" class="outer"&gt;
          &lt;div class="top"&gt;
              &lt;div class="left"&gt;
                  &lt;div class="right"&gt;
                      &lt;div class="tl"&gt;
                          &lt;div class="tr"&gt;
                              &lt;div class="outer"&gt;
                                  &lt;div class="inner" &gt;
                                      &lt;div id="foot_bg"&gt;
                                          &lt;div id="footmenu"&gt;
                                              &lt;jdoc:include type="modules" name="user3" /&gt;
                                          &lt;/div&gt;
                                          &lt;div style="float:left"&gt;
                                              &lt;img src="&lt;?php echo $templateurl; ?&gt;/images/cart.gif" alt="cart" /&gt;
                                          &lt;/div&gt;
                                          &lt;div class="clear"&gt;&lt;/div&gt;
                                      &lt;/div&gt;
                                      &lt;div class="clear"&gt;&lt;/div&gt;
                                      &lt;div style="float:left;"&gt;&amp;copy; All rights reserved. &lt;?php echo  Date( 'Y' ) ;?&gt;.&lt;/div&gt;
  
  
                                      &lt;div class="clear"&gt;&lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;jdoc:include type="modules" name="debug" /&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>