+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:
* @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>';
}
/**
- * 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.
* @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="" />'),
// 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) {
// 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="" /> '.
$SOBE->init();
$SOBE->main();
$SOBE->printContent();
-?>
+?>
\ No newline at end of file