Переход программиста с Joomla 1.0.x на Joomla 1.5.x
Многие программисты задаются вопросами, какие функции и константы заменили в Joomla 1.5, и как они назывались в Joomla 1.0 Константы:
1.0 | 1.5 |
---|---|
_ISO | удалена, так как везде UTF8 |
_VALID_MOS _MOS_MAMBO_INCLUDED |
_JEXEC |
_DATE_FORMAT_LC | _DATE_FORMAT_LC |
_DATE_FORMAT_LC2 | _DATE_FORMAT_LC2 |
_JLEGACY | 1.0 если включен режим Legacy |
Переменные:
1.0 | 1.5 |
---|---|
$_VERSION | JVersion::getLongVersion() |
$database | $database = &JFactory::getDBO() |
$my | $user = &JFactory::getUser() |
$mosConfig_live_site | фронт: JURI::base() бак-енд: $mainframe->getSiteURL() |
$mosConfig_absolute_path | JPATH_SITE |
$acl | $acl = &JFactory::getACL() |
$task | JRequest::getString('task') |
$_MAMBOTS | $mainframe->registerEvent() и $mainframe->triggerEvent() |
$cur_template | $mainframe->getTemplate() |
Классы
1.0 | 1.5 |
---|---|
mosMainFrame | JApplication |
mosDBTable | JTable |
mosCategory | JTableCategory |
mosComponent | JTableComponent |
mosContent | JTableContent |
mosMambot | JTablePlugin |
mosMenu | JTableMenu |
mosModule | JTableModule |
mosPageNav | JPagination |
mosSection | JTableSection |
mosSession | JTableSession |
mosUser | JTableUser |
database | JDatabase |
mosCache | &JFactory::getCache() |
mosProfiler | JProfiler |
mosParameters | JParameter |
mosAbstractTasker | JController |
mosMambotHandler | JEventDispatcher |
mosEmpty | нет аналога. |
mosHTML | JHTML |
mosInstaller | JInstaller |
mosCommonHTML | JHTML::_() |
mosAdminMenus | нет |
MENU_Default | нет |
mosTabs | JPanel |
patFactory | JTemplate::getInstance() |
mosMenuBar | JToolBarHelper |
Функции
1.0 | 1.5 |
---|---|
mosCountModules( $position = 'left') | <jdoc:exists type="modules" condition="{POSITION}" /> |
mosMainBody() mosMainBody_Admin() |
<jdoc:include type="component" /> |
mosLoadModules() mosLoadAdminModules() |
<jdoc:include type="modules" name="{POSITION}" style="{STYLE}" /> |
mosLoadModule() mosLoadAdminModule() |
<jdoc:include type="module" name="{NAME}" style="{STYLE}" /> |
mosShowHead() mosShowHead_Admin() |
<jdoc:include type="head" /> |
mosCountAdminModules() | <jdoc:exists /> |
mosCountAdminModules() | <jdoc:exists /> |
mosStripslashes() | JRequest::getVar() |
mosBindArrayToObject() | JObject::bind() |
mosHash() | JUtility::getHash() |
mosNotAuth() | JError::raiseError( 403, JText::_("ALERTNOTAUTH") ); |
mosErrorAlert() | JError (class) |
mosPathName() | JPath::clean() |
mosReadDirectory() | JFolder::files() и JFolder::folders() |
mosCreateMail() | $mail = &JFactory::getMailer() |
mosMail() | JUtility::sendMail() |
mosSendAdminMail() | JUtility::sendAdminMail() |
mosMakePassword() | JUserHelper::genRandomPassword() |
mosRedirect() | $mainframe->redirect() |
mosMakePath() | JFolder::create() |
mosArrayToInts() | JArrayHelper::toInteger() |
mosBackTrace() | JError::getBackTrace() |
mosChmod() mosChmodRecursive() |
JPath::setPermissions() |
mosIsChmodable() | JPath::canChmod() |
mosShowSource() | нет аналога |
mosPathWay() | <jdoc:include type="module" name="breadcrumb" /> |
mosGetBrowser() | $browser = &JBrowser::getInstance() |
mosGetOS() | $browser = &JBrowser::getInstance(); $browser->getPlatform(); |
mosGetParam() | JArrayHelper::getValue() |
mosGetOrderingList() | JHTML::_('list.genericordering', ... ) |
mosParseParams() | JRegistry |
mosLoadComponent() | нет аналога |
initEditor() | JEditor::init() |
getEditorContents() | JEditor::save() |
editorArea() | JEditor::display() |
mosMenuCheck() | JMenu::authorize() |
mosObjectToArray() | JArrayHelper::fromObject() |
mosFormatDate() | JHTML::_('date', ... ) |
mosCurrentDate() | JHTML::_('date', 'now', ... ) |
mosMakeHtmlSafe() | JOutputFilter::objectHTMLSafe() |
initGzip() doGzip() |
вложено в JDocument |
SortArrayObjects() | JArrayHelper::sortObjects() |
josSpoofCheck() | реализовано через JSession |
josSpoofValue() | JUtility::getToken() |
loadOverlib() | JHTML::_('behavior.tooltip') |
mosToolTip() | JHTML::_('tooltip', ... ) |
sefRelToAbs() ampReplace() |
JRoute::_() |
mosTreeRecurse() | JHTML::_('menu.treerecurse', ... ) |