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-27 19:16:55.000000000 +0200 +++ typo3_src-4.0-captionSplit/typo3/sysext/cms/tslib/class.tslib_content.php 2006-05-05 10:44:36.002713436 +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.']); @@ -1038,13 +1048,15 @@ if ($noCols) {$tablecode.='';} // In case of "noCols" we must set the table-tag that surrounds the images in the row. } for ($a=0;$a<$rowCount_temp;$a++) { // Looping through the rows IF "noRows" is set. "noRows" means that the rows of images is not rendered by physical table rows but images are all in one column and spaced apart with clear-gifs. This loop is only one time if "noRows" is not set. - $GLOBALS['TSFE']->register['IMAGE_NUM'] = $imgIndex; // register previous imgIndex $imgIndex = $index+$a*$colCount_temp; + $GLOBALS['TSFE']->register['IMAGE_NUM'] = $imgIndex; // register previous imgIndex if ($imgsTag[$imgIndex]) { 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].'
';