Difference between revisions of "Upgrading your template index file"
From Joomla! Documentation
m (Reverted edits by Dragmen (Talk); changed back to last version by Chris Davenport) |
|||
Line 1: | Line 1: | ||
− | === | + | ===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==== | ====Module Chrome/Style Conversion Chart==== | ||
Line 25: | Line 25: | ||
|raw | |raw | ||
|- | |- | ||
− | |0 or | + | |0 or empty |
|table | |table | ||
|} | |} | ||
<noinclude>[[Category:Reference]][[Category:Templates]][[Category:Topics]]</noinclude> | <noinclude>[[Category:Reference]][[Category:Templates]][[Category:Topics]]</noinclude> |
Revision as of 23:35, 17 November 2008
The "J1.5" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Upgrading your index.php file[edit]
- 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[edit]
Joomla! 1.0 | Joomla! 1.5 |
---|---|
-3 | rounded |
-2 | xhtml |
-1 | raw |
0 or empty | table |