Commit 5038874f authored by Robert Lemke's avatar Robert Lemke
Browse files

* Added another TSconfig option for replacing the create new content wizard (-> templavoila). Only added a few lines.


git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@108 709f56b5-9817-0410-a4d7-c38de5d9e867
parent 2170061c
2003-12-23 Robert Lemke <rl@robertlemke.de>
* Added another TSconfig option for replacing the create new content wizard (-> templavoila). Only added a few lines.
20/12: Change the backend icon processing: Not, by default icons are NOT processed with overlay of hidden, start/endtime icons; The icons are found preprocessed with the source icon. This can be disabled so the old behaviour will apply, see TYPO3_CONF_VARS[GFX] - however group-numbers on icons have been permanently disabled.
Fixed all:
......
......@@ -535,11 +535,16 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth {
* @return string A string containing images wrapped in <a>-tags linking them to proper functions.
*/
function ext_makeToolBar() {
// If mod.web_list.newContentWiz.overrideWithExtension is set, use that extension's create new content wizard instead:
$tmpTSc = t3lib_BEfunc::getModTSconfig($this->pageinfo['uid'],'mod.web_list');
$tmpTSc = $tmpTSc ['properties']['newContentWiz.']['overrideWithExtension'];
$newContentWizScriptPath = t3lib_extMgm::isLoaded($tmpTSc) ? (t3lib_extMgm::extRelPath($tmpTSc).'mod1/db_new_content_el.php') : (TYPO3_mainDir.'sysext/cms/layout/db_new_content_el.php');
$toolBar='';
$id = $GLOBALS['TSFE']->id;
$toolBar.='<a href="'.htmlspecialchars(TYPO3_mainDir.'show_rechis.php?element='.rawurlencode('pages:'.$id).'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'#latest">'.
'<img src="t3lib/gfx/history2.gif" width="13" height="12" hspace="2" border="0" align="top" title="'.$this->extGetLL('edit_recordHistory').'" alt="" /></a>';
$toolBar.='<a href="'.htmlspecialchars(TYPO3_mainDir.'sysext/cms/layout/db_new_content_el.php?id='.$id.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
$toolBar.='<a href="'.htmlspecialchars($newContentWizScriptPath.'?id='.$id.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
'<img src="t3lib/gfx/new_record.gif" width="16" height="12" hspace="1" border="0" align="top" title="'.$this->extGetLL('edit_newContentElement').'" alt="" /></a>';
$toolBar.='<a href="'.htmlspecialchars(TYPO3_mainDir.'move_el.php?table=pages&uid='.$id.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))).'">'.
'<img src="t3lib/gfx/move_page.gif" width="11" height="12" hspace="2" border="0" align="top" title="'.$this->extGetLL('edit_move_page').'" alt="" /></a>';
......
......@@ -525,7 +525,7 @@ class clickMenu {
}
/**
* Adding CM element for Create new wizard (either db_new.php or sysext/cms/layout/db_new_content_el.php)
* Adding CM element for Create new wizard (either db_new.php or sysext/cms/layout/db_new_content_el.php or custom wizard)
*
* @param string Table name
* @param integer UID for the current record.
......@@ -534,7 +534,12 @@ class clickMenu {
* @internal
*/
function DB_newWizard($table,$uid,$rec) {
$url = ($table=='pages' || !t3lib_extMgm::isLoaded('cms')) ? 'db_new.php?id='.$uid.'&pagesOnly=1' : 'sysext/cms/layout/db_new_content_el.php?id='.$rec['pid'].'&sys_language_uid='.intval($rec['sys_language_uid']);
// If mod.web_list.newContentWiz.overrideWithExtension is set, use that extension's create new content wizard instead:
$tmpTSc = t3lib_BEfunc::getModTSconfig($this->pageinfo['uid'],'mod.web_list');
$tmpTSc = $tmpTSc ['properties']['newContentWiz.']['overrideWithExtension'];
$newContentWizScriptPath = t3lib_extMgm::isLoaded($tmpTSc) ? (t3lib_extMgm::extRelPath($tmpTSc).'mod1/db_new_content_el.php') : (TYPO3_mainDir.'sysext/cms/layout/db_new_content_el.php');
$url = ($table=='pages' || !t3lib_extMgm::isLoaded('cms')) ? 'db_new.php?id='.$uid.'&pagesOnly=1' : $newContentWizScriptPath.'?id='.$rec['pid'].'&sys_language_uid='.intval($rec['sys_language_uid']);
return $this->linkItem(
$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_newWizard')),
$this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->PH_backPath,'gfx/new_'.($table=='pages'?'page':'record').'.gif','width="'.($table=='pages'?'13':'16').'" height="12"').' alt="" />'),
......
......@@ -595,7 +595,12 @@ class localRecordList extends recordList {
// If new records can be created on this page, add links:
if ($this->calcPerms&($table=='pages'?8:16) && $this->showNewRecLink($table)) {
if ($table=="tt_content" && $this->newWizards) {
$theData[$fCol]='<a href="#" onclick="'.htmlspecialchars('return jumpExt(\'sysext/cms/layout/db_new_content_el.php?id='.$this->id.'\');').'">'.
// If mod.web_list.newContentWiz.overrideWithExtension is set, use that extension's create new content wizard instead:
$tmpTSc = t3lib_BEfunc::getModTSconfig($this->pageinfo['uid'],'mod.web_list');
$tmpTSc = $tmpTSc ['properties']['newContentWiz.']['overrideWithExtension'];
$newContentWizScriptPath = t3lib_extMgm::isLoaded($tmpTSc) ? (t3lib_extMgm::extRelPath($tmpTSc).'mod1/db_new_content_el.php') : (TYPO3_mainDir.'sysext/cms/layout/db_new_content_el.php');
$theData[$fCol]='<a href="#" onclick="'.htmlspecialchars('return jumpExt(\''.$newContentWizScriptPath.'?id='.$this->id.'\');').'">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/new_'.($table=='pages'?'page':'el').'.gif','width="'.($table=='pages'?13:11).'" height="12"').' title="'.$LANG->getLL('new',1).'" alt="" />'.
'</a>';
} elseif ($table=='pages' && $this->newWizards) {
......
......@@ -360,7 +360,12 @@ class SC_db_new {
// If the table is 'tt_content' (from "cms" extension), create link to wizard
if ($t=='tt_content') {
$href = 'sysext/cms/layout/db_new_content_el.php?id='.$this->id.'&returnUrl='.rawurlencode($this->R_URI);
// If mod.web_list.newContentWiz.overrideWithExtension is set, use that extension's wizard instead:
$overrideExt = $this->web_list_modTSconfig['properties']['newContentWiz.']['overrideWithExtension'];
$pathToWizard = (t3lib_extMgm::isLoaded($overrideExt)) ? (t3lib_extMgm::extRelPath($overrideExt).'mod1/db_new_content_el.php') : 'sysext/cms/layout/db_new_content_el.php';
$href = $pathToWizard.'?id='.$this->id.'&returnUrl='.rawurlencode($this->R_URI);
$this->code.='<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/ol/line.gif','width="18" height="16"').' alt="" />'.
'<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/ol/joinbottom.gif','width="18" height="16"').' alt="" />'.
'<a href="'.htmlspecialchars($href).'"><img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/new_record.gif','width="16" height="12"').' alt="" /> '.
......@@ -508,4 +513,4 @@ $SOBE = t3lib_div::makeInstance('SC_db_new');
$SOBE->init();
$SOBE->main();
$SOBE->printContent();
?>
?>
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment