Index: sysext/cms/ext_localconf.php =================================================================== --- sysext/cms/ext_localconf.php (revision 8060) +++ sysext/cms/ext_localconf.php (working copy) @@ -171,6 +171,7 @@ $TYPO3_CONF_VARS['SYS']['contentTable'] = 'tt_content'; $TYPO3_CONF_VARS['FE']['eID_include']['tx_cms_showpic'] = 'EXT:cms/tslib/showpic.php'; +$TYPO3_CONF_VARS['EXTCONF']['tx_cms_showpic']['templateKeys']['DEFAULT'] = 'EXT:cms/tslib/templates/tx_cms_showpic.html'; $TYPO3_CONF_VARS['SC_OPTIONS']['ext/install']['compat_version']['cms'] = array( 'title' => 'CMS Frontend', Index: sysext/cms/tslib/templates/tx_cms_showpic.html =================================================================== --- sysext/cms/tslib/templates/tx_cms_showpic.html (revision 0) +++ sysext/cms/tslib/templates/tx_cms_showpic.html (revision 0) @@ -0,0 +1,10 @@ + + + + ###TITLE### + ###META### + + + ###IMAGE### + + \ No newline at end of file Property changes on: sysext/cms/tslib/templates/tx_cms_showpic.html ___________________________________________________________________ Added: svn:executable + * Index: sysext/cms/tslib/class.tslib_content.php =================================================================== --- sysext/cms/tslib/class.tslib_content.php (revision 8060) +++ sysext/cms/tslib/class.tslib_content.php (working copy) @@ -3173,6 +3173,7 @@ if ($conf['bodyTag']) {$params.='&bodyTag='.rawurlencode($conf['bodyTag']);} if ($conf['title']) {$params.='&title='.rawurlencode($conf['title']);} if ($conf['wrap']) {$params.='&wrap='.rawurlencode($conf['wrap']);} + if ($conf['windowTemplateKey']) {$params.='&windowTemplateKey='.rawurlencode($conf['windowTemplateKey']);} $md5_value = md5( $imageFile.'|'. @@ -3182,6 +3183,7 @@ $conf['bodyTag'].'|'. $conf['title'].'|'. $conf['wrap'].'|'. + $conf['windowTemplateKey'].'|'. $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'].'|'); $params.= '&md5='.$md5_value; Index: sysext/cms/tslib/showpic.php =================================================================== --- sysext/cms/tslib/showpic.php (revision 8060) +++ sysext/cms/tslib/showpic.php (working copy) @@ -127,7 +127,8 @@ var $bodyTag; var $title; var $wrap; - var $md5; + var $windowTemplateKey; + var $md5; /** * Init function, setting the input vars in the global space. @@ -146,7 +147,9 @@ $this->bodyTag = t3lib_div::_GP('bodyTag'); $this->title = t3lib_div::_GP('title'); $this->wrap = t3lib_div::_GP('wrap'); + $this->windowTemplateKey = t3lib_div::_GP('windowTemplateKey'); $this->md5 = t3lib_div::_GP('md5'); + // *********************** // Check parameters @@ -165,6 +168,7 @@ $this->bodyTag.'|'. $this->title.'|'. $this->wrap.'|'. + $this->windowTemplateKey.'|'. $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'].'|'); if ($md5_value!=$this->md5) { @@ -212,26 +216,51 @@ $this->width = t3lib_div::intInRange($this->width,0); if ($this->frame) {$this->frame = intval($this->frame);} $imgInfo = $img->imageMagickConvert($this->file,'web',$this->width.$max,$this->height,$img->IMparams($this->effects),$this->frame,''); - - // Create HTML output: - $this->content=''; - $this->content.=' - - - - - '.htmlspecialchars($this->title ? $this->title : "Image").' - ' . ($this->title ? '' : '') . ' - - '.($this->bodyTag ? $this->bodyTag : ''); - + + $imageHTML = ''; if (is_array($imgInfo)) { $wrapParts = explode('|',$this->wrap); - $this->content.=trim($wrapParts[0]).$img->imgTag($imgInfo).trim($wrapParts[1]); + $imageHTML = trim($wrapParts[0]).$img->imgTag($imgInfo).trim($wrapParts[1]); } - $this->content.=' - - '; + + $titleHTML = htmlspecialchars($this->title ? $this->title : "Image"); + $metaHTML = ($this->title ? '' : ''); + + if ($this->windowTemplateKey && !empty($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['tx_cms_showpic']['templateKeys'][$this->windowTemplateKey])) { + + $fullFileName = t3lib_div::getFileAbsFileName($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['tx_cms_showpic']['templateKeys'][$this->windowTemplateKey]); + + $this->content = file_get_contents($fullFileName); + + $search = array( + '###TITLE###', + '###META###', + '###IMAGE###' + ); + $replace = array( + $titleHTML, + $metaHTML, + $imageHTML + ); + + $this->content = str_replace($search,$replace,$this->content); + + } else { + // Create HTML output: + $this->content=''; + $this->content.=' + + + + + '.$titleHTML.' + ' . $metaHTML . ' + + '.($this->bodyTag ? $this->bodyTag : '').' + '.$imageHTML.' + + '; + } } /**