Upgrading your template index file: Difference between revisions
From Joomla! Documentation
New page: ===Upgrading your index.php file=== # Replace '''_VALID_MOS''' with '''_JEXEC''' # Replace '''$mosConfig_absolute_path''' with '''$this->baseUrl''' # Replace '''$mosConfig_live_site''' wi... |
Louis.landry (talk | contribs) |
||
| Line 9: | Line 9: | ||
# Replace '''mosMainBody()''' with '''<jdoc:include type="component" />''' | # Replace '''mosMainBody()''' with '''<jdoc:include type="component" />''' | ||
# Replace '''mosLoadModules( $position_name, $style );''' with '''<jdoc:include type="modules" name=$position_name style=$style />''' | # Replace '''mosLoadModules( $position_name, $style );''' with '''<jdoc:include type="modules" name=$position_name style=$style />''' | ||
====Module Chrome/Style Conversion Chart==== | |||
<table border="1"> | |||
<tr> | |||
<th>Joomla! 1.0</th> | |||
<th>Joomla! 1.5</th> | |||
</tr> | |||
<tr> | |||
<td>-3</td> | |||
<td>rounded</td> | |||
</tr> | |||
<tr> | |||
<td>-2</td> | |||
<td>xhtml</td> | |||
</tr> | |||
<tr> | |||
<td>-1</td> | |||
<td>raw</td> | |||
</tr> | |||
<tr> | |||
<td>0 or empty</td> | |||
<td>table</td> | |||
</tr> | |||
</table> | |||
<noinclude>[[Category:Reference]][[Category:Templates]][[Category:Topics]]</noinclude> | <noinclude>[[Category:Reference]][[Category:Templates]][[Category:Topics]]</noinclude> | ||
Revision as of 18:09, 17 October 2008
Upgrading your index.php file
- Replace _VALID_MOS with _JEXEC
- Replace $mosConfig_absolute_path with $this->baseUrl
- Replace $mosConfig_live_site with $mainframe->getCfg( 'live_site' )
- Replace fixed strings with translatable strings. For example, replace echo 'Hello' with echo JText::_( 'Hello' )
- Replace calls to mosGetParam with calls to JRequest::getVar. For example, replace $id = mosGetParam( $_REQUEST, 'id', 0 ); with $id = JRequest::getVar( 'id', 0 );
- Replace mosShowHead(); with <jdoc:include type="head" />
- Replace mosMainBody() with <jdoc:include type="component" />
- Replace mosLoadModules( $position_name, $style ); with <jdoc:include type="modules" name=$position_name style=$style />
Module Chrome/Style Conversion Chart
| Joomla! 1.0 | Joomla! 1.5 |
|---|---|
| -3 | rounded |
| -2 | xhtml |
| -1 | raw |
| 0 or empty | table |