From: Robert Lemke Date: Tue, 16 Dec 2003 20:38:30 +0000 (+0000) Subject: Added TSconfig option (options.overridePageModule) for replacing the default Page... X-Git-Tag: TYPO3_3-7-0RC1~344 X-Git-Url: http://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff_plain/0b45ca90e2fcf0b9afa9301bde36d2015d69cc82 Added TSconfig option (options.overridePageModule) for replacing the default Page module with a different one. git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@73 709f56b5-9817-0410-a4d7-c38de5d9e867 --- diff --git a/t3lib/class.t3lib_tsfebeuserauth.php b/t3lib/class.t3lib_tsfebeuserauth.php index 46e266e8ba35..2577479d3a6e 100755 --- a/t3lib/class.t3lib_tsfebeuserauth.php +++ b/t3lib/class.t3lib_tsfebeuserauth.php @@ -331,6 +331,10 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth { function extGetCategory_edit($out='') { $out.=$this->extGetHead('edit'); if ($this->uc['TSFE_adminConfig']['display_edit']) { + // If another page module was specified, replace the default Page module with the new one + $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule')); + $pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout'; + $this->extNeedUpdate=1; $out.=$this->extGetItem('edit_displayFieldIcons', 'uc['TSFE_adminConfig']['edit_displayFieldIcons']?' checked="checked"':'').' />'); $out.=$this->extGetItem('edit_displayIcons', 'uc['TSFE_adminConfig']['edit_displayIcons']?' checked="checked"':'').' />'); @@ -346,7 +350,7 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth { if (parent.opener.top.content && parent.opener.top.content.nav_frame && parent.opener.top.content.nav_frame.refresh_nav) { parent.opener.top.content.nav_frame.refresh_nav(); } - parent.opener.top.goToModule("web_layout"); + parent.opener.top.goToModule("'.$pageModule.'"); parent.opener.top.focus(); } else { vHWin=window.open(\''.TYPO3_mainDir.'alt_main.php\',\''.md5('Typo3Backend-'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']).'\',\'status=1,menubar=1,scrollbars=1,resizable=1\'); diff --git a/typo3/alt_clickmenu.php b/typo3/alt_clickmenu.php index 0c77d4edb224..2d13b9e9bd73 100755 --- a/typo3/alt_clickmenu.php +++ b/typo3/alt_clickmenu.php @@ -585,6 +585,9 @@ class clickMenu { */ function DB_edit($table,$uid) { global $BE_USER; + // If another module was specified, replace the default Page module with the new one + $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule')); + $pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout'; $editOnClick=''; $loc='top.content'.($this->listFrame && !$this->alwaysContentFrame ?'.list_frame':''); @@ -593,14 +596,14 @@ class clickMenu { if ( $this->iParts[0]=='pages' && $this->iParts[1] && - $GLOBALS['BE_USER']->check('modules','web_layout') + $GLOBALS['BE_USER']->check('modules', $pageModule) ) { $theIcon = t3lib_iconWorks::skinImg($this->backPath,'gfx/edit_page.gif','width="12" height="12"'); $this->editPageIconSet=1; if ($BE_USER->uc['classicPageEditMode'] || !t3lib_extMgm::isLoaded('cms')) { $addParam='&editRegularContentFromId='.intval($this->iParts[1]); } else { - $editOnClick="top.fsMod.recentIds['web']=".intval($this->iParts[1]).";top.goToModule('web_layout',1);"; + $editOnClick="top.fsMod.recentIds['web']=".intval($this->iParts[1]).";top.goToModule('".$pageModule."',1);"; } } if (!$editOnClick) { diff --git a/typo3/alt_doc_nodoc.php b/typo3/alt_doc_nodoc.php index b9cd3d6efdcb..aef192ad9bed 100755 --- a/typo3/alt_doc_nodoc.php +++ b/typo3/alt_doc_nodoc.php @@ -112,10 +112,14 @@ class SC_alt_doc_nodoc { // Add a message, telling that no documents were open... $msg[]='

'.$LANG->getLL('noDocuments_msg',1).'


'; + + // If another page module was specified, replace the default Page module with the new one + $newPageModule = trim($BE_USER->getTSConfigVal('options.overridePageModule')); + $pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout'; // Perform some acccess checks: $a_wl = $BE_USER->check('modules','web_list'); - $a_wp = t3lib_extMgm::isLoaded('cms') && $BE_USER->check('modules','web_layout'); + $a_wp = t3lib_extMgm::isLoaded('cms') && $BE_USER->check('modules',$pageModule); // Finding module images: PAGE @@ -133,7 +137,7 @@ class SC_alt_doc_nodoc { if ($a_wl || $a_wp) { $msg_2 = array(); if ($a_wp) { // Web>Page: - $msg_2[]=''.$LANG->getLL('noDocuments_pagemodule',1).$img_web_layout.''; + $msg_2[]=''.$LANG->getLL('noDocuments_pagemodule',1).$img_web_layout.''; if ($a_wl) $msg_2[]=$LANG->getLL('noDocuments_OR'); } if ($a_wl) { // Web>List diff --git a/typo3/alt_shortcut.php b/typo3/alt_shortcut.php index af6f99801a30..8209e1bf92b1 100755 --- a/typo3/alt_shortcut.php +++ b/typo3/alt_shortcut.php @@ -202,6 +202,10 @@ class SC_alt_shortcut { function init() { global $BACK_PATH; + // If another page module was specified, replace the default Page module with the new one + $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule')); + $pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout'; + $this->doc = t3lib_div::makeInstance('template'); $this->doc->backPath = $BACK_PATH; $this->doc->form='
'; @@ -232,7 +236,7 @@ class SC_alt_shortcut { top.content.nav_frame.refresh_nav(); } - top.goToModule("web_layout"); + top.goToModule("'.$pageModule.'"); } '); $this->content.=$this->doc->startPage('Shortcut frame');