Feature #20168 » rtehtmlarea_feature_10670_trunk.patch
typo3/sysext/rtehtmlarea/pi3/class.tx_rtehtmlarea_pi3.php (copie de travail) | ||
---|---|---|
* @return string HTML output.
|
||
* @access private
|
||
*/
|
||
function render_clickenlarge($content,$conf) {
|
||
global $TYPO3_CONF_VARS;
|
||
function render_clickenlarge($content,$conf) {
|
||
$clickenlarge = isset($this->cObj->parameters['clickenlarge']) ? $this->cObj->parameters['clickenlarge'] : 0;
|
||
$path = $this->cObj->parameters['src'];
|
||
$pathPre = $TYPO3_CONF_VARS['BE']['RTE_imageStorageDir'].'RTEmagicC_';
|
||
$pathPre = $GLOBALS['TYPO3_CONF_VARS']['BE']['RTE_imageStorageDir'] . 'RTEmagicC_';
|
||
if (t3lib_div::isFirstPartOfStr($path,$pathPre)) {
|
||
// Find original file:
|
||
$pI=pathinfo(substr($path,strlen($pathPre)));
|
||
$pI = pathinfo(substr($path,strlen($pathPre)));
|
||
$filename = substr($pI['basename'],0,-strlen('.'.$pI['extension']));
|
||
$file = $TYPO3_CONF_VARS['BE']['RTE_imageStorageDir'].'RTEmagicP_'.$filename;
|
||
$file = $GLOBALS['TYPO3_CONF_VARS']['BE']['RTE_imageStorageDir'] . 'RTEmagicP_' . $filename;
|
||
} else {
|
||
$file = $this->cObj->parameters['src'];
|
||
}
|
||
... | ... | |
if ($clickenlarge && is_array($conf['imageLinkWrap.'])) {
|
||
$theImage = $file ? $GLOBALS['TSFE']->tmpl->getFileName($file) : '';
|
||
if ($theImage) {
|
||
if ($this->cObj->parameters['title']) $conf['imageLinkWrap.']['title'] = $this->cObj->parameters['title'];
|
||
if ($this->cObj->parameters['alt']) $conf['imageLinkWrap.']['alt'] = $this->cObj->parameters['alt'];
|
||
$this->cObj->parameters['origFile'] = $theImage;
|
||
if ($this->cObj->parameters['title']) {
|
||
$conf['imageLinkWrap.']['title'] = $this->cObj->parameters['title'];
|
||
}
|
||
if ($this->cObj->parameters['alt']) {
|
||
$conf['imageLinkWrap.']['alt'] = $this->cObj->parameters['alt'];
|
||
}
|
||
$content = $this->cObj->imageLinkWrap($content,$theImage,$conf['imageLinkWrap.']);
|
||
$content = $this->cObj->stdWrap($content,$conf['stdWrap.']);
|
||
}
|