Project

General

Profile

Bug #16122 ยป typo3-4.0-captionSplit_v2.diff

Administrator Admin, 2006-05-05 10:55

View differences:

typo3_src-4.0-captionSplit/typo3/sysext/cms/tslib/class.tslib_content.php 2006-05-05 10:44:36.002713436 +0200
// 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.']);
......
if ($noCols) {$tablecode.='<table width="'.$imageRowsFinalWidths[$c].'" border="0" cellpadding="0" cellspacing="0"><tr>';} // 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.= '<img src="'.$GLOBALS['TSFE']->absRefPrefix.'clear.gif" width="1" height="'.$rowspacing.'" alt="" title="" /><br />';
}
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].'<br />';
    (1-1/1)