For templates built for Joomla 1.0.x, you must change a few things for them to work under Joomla 1.5. This is a non-exhaustive list of things to change:
//include_once($mosConfig_absolute_path . '/mylib.php'); include_once(JURI::base() . '/mylib.php');
<a href="<?php /*echo $mosConfig_live_site;*/ ?>">My Site</a> <a href="<?php echo $mainframe->getCfg( 'live_site' ); ?>">My Site</a>
//echo 'Welcome'; echo JText::_( 'Welcome' );
//$id = mosGetParam( $_REQUEST, 'id', 0 ); $id = JRequest::getVar( 'id', 0 );
<?php /* mosShowHead();*/ ?> <jdoc:include type="head" />
<?php /*mosMainBody();*/ ?> <?php /*include ("mainbody.php");*/ ?> <jdoc:include type="component" />
<?php /*mosLoadModules ( 'left' );*/ ?> <?php /*mosLoadModules ( 'right' );*/ ?> <jdoc:include type="modules" name="left" /> <jdoc:include type="modules" name="right" /> //or <jdoc:include type="modules" name="left" style="mycssstyle" headerLevel="3" /> <jdoc:include type="modules" name="right" style="mycssstyle" headerLevel="3" />
$cur_template = JRequest::getVar( 'template', $mainframe->getTemplate(), 'default', 'string' );
Object/Method | Joomla 1.0.x | Joomla 1.5 | Note |
---|---|---|---|
Access restriction | <?php defined( '_VALID_MOS' ) or die( 'Restricted access.' ); ?> | <?php defined( '_JEXEC' ) or die( 'Restricted access' ); ?> | |
Header | <?php mosShowHead(); ?>; | <jdoc:include type=“head” /> | |
Main body | <?php mosMainBody(); ?> or <?php include (“mainbody.php”); ?> | <jdoc:include type=“component” /> | |
Module | <?php mosLoadModules ( 'left' ); ?> | <jdoc:include type=“modules” name=“left” /> or <jdoc:include type=“modules” name=“left” style=“mycssstyle” headerLevel=“3” /> | |
Site name | <?php echo $mosConfig_sitename; ?> | <?php echo $mainframe→getCfg('sitename');?> | This new method works for all configuration.php parameters |
Base URL | <?php echo $mosConfig_live_site; ?> | <?php echo JURI::base(); ?> or <?php echo $mainframe→getCfg( 'live_site' ); ?> | |
Base path | <?php echo $mosConfig_absolute_path; ?> | <?php echo JPATH_SITE; ?> | |
Base path | <?php echo $mosConfig_absolute_path.'/administrator'; ?> | <?php echo JPATH_ADMINISTRATOR; ?> | |
Base path | <?php echo $mosConfig_absolute_path.'/installation'; ?> | <?php echo JPATH_INSTALLATION; ?> | |
Root path | <?php echo $mosConfig_absolute_path; ?> | <?php echo JPATH_ROOT; ?> | Base path, irrespective of site, administrator, or installation. |
Link to Home | <a href='<?php echo “index.php?option=com_frontpage&Itemid=1”; ?>'>Home</a> | <a href=“<?php echo JURI::base(); ?>index.php?option=com_content&view=frontpage”>Home</a> |