diff -Nur typo3_src-4.0/typo3/sysext/cms/tslib/class.tslib_content.php typo3_src-4.0-captionSplit/typo3/sysext/cms/tslib/class.tslib_content.php --- typo3_src-4.0/typo3/sysext/cms/tslib/class.tslib_content.php 2006-04-07 02:18:29.000000000 +0200 +++ typo3_src-4.0-captionSplit/typo3/sysext/cms/tslib/class.tslib_content.php 2006-04-12 12:50:52.422439500 +0200 @@ -754,9 +754,19 @@ // initialisation $caption=''; + $captionArray = array(); if (!$conf['captionSplit'] && !$conf['imageTextSplit'] && is_array($conf['caption.'])) { $caption = $this->stdWrap($this->cObjGet($conf['caption.'], 'caption.'),$conf['caption.']); // global caption, no splitting } + if ($conf['captionSplit'] && $conf['captionSplit.']['cObject']) { + $legacyCaptionSplit = 1; + $capSplit = $this->stdWrap($conf['captionSplit.']['token'], $conf['captionSplit.']['token.']); + if (!$capSplit) {$capSplit=chr(10);} + $captionArray = explode($capSplit, $this->cObjGetSingle($conf['captionSplit.']['cObject'], $conf['captionSplit.']['cObject.'], 'captionSplit.cObject')); + while (list($ca_key, $ca_val) = each($captionArray)) { + $captionArray[$ca_key] = $this->stdWrap(trim($captionArray[$ca_key]), $conf['captionSplit.']['stdWrap.']); + } + } $tablecode=''; $position=$this->stdWrap($conf['textPos'],$conf['textPos.']); @@ -1044,7 +1054,9 @@ if ($rowspacing && $noRows && $a) { // Puts distance between the images IF "noRows" is set and this is the first iteration of the loop $tablecode.= '
'; } - if ($conf['captionSplit'] || $conf['imageTextSplit']) { + if ($legacyCaptionSplit) { + $thisCaption = $captionArray[$imgIndex]; + } else if ($conf['captionSplit'] || $conf['imageTextSplit']) { $thisCaption = $this->stdWrap($this->cObjGet($conf['caption.'], 'caption.'), $conf['caption.']); } $imageHTML = $imgsTag[$imgIndex].'
';