Project

General

Profile

Bug #17708 » bug_6561-revised-4_1_3.diff

Administrator Admin, 2007-10-31 11:38

View differences:

typo3/sysext/css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php 2007-10-31 11:36:25.000000000 +0100
/**
* Plugin 'Content rendering' for the 'css_styled_content' extension.
*
* $Id: class.tx_cssstyledcontent_pi1.php 2597 2007-10-20 20:16:48Z ingmars $
* $Id: class.tx_cssstyledcontent_pi1.php 2624 2007-10-27 18:24:05Z ingmars $
*
* @author Kasper Skaarhoj <kasperYYYY@typo3.com>
*/
......
$splitArr = $GLOBALS['TSFE']->tmpl->splitConfArray($splitArr, $imgCount);
$imageRowsFinalWidths = Array(); // contains the width of every image row
$imgsTag = array();
$imgsTag = array(); // array index of $imgsTag will be the same as in $imgs, but $imgsTag only contains the images that are actually shown
$origImages = array();
for ($a=0; $a<$imgCount; $a++) {
$imgKey = $a+$imgStart;
$totalImagePath = $imgPath.$imgs[$imgKey];
$GLOBALS['TSFE']->register['IMAGE_NUM'] = $a;
$GLOBALS['TSFE']->register['IMAGE_NUM_CURRENT'] = $a;
$GLOBALS['TSFE']->register['IMAGE_NUM'] = $imgKey; // register IMG_NUM is kept for backwards compatibility
$GLOBALS['TSFE']->register['IMAGE_NUM_CURRENT'] = $imgKey;
$GLOBALS['TSFE']->register['ORIG_FILENAME'] = $totalImagePath;
$this->cObj->data[$this->cObj->currentValKey] = $totalImagePath;
......
$allRows = '';
$maxImageSpace = 0;
for ($i = $c; $i<count($imgsTag); $i=$i+$imageWrapCols) {
$imgKey = $i+$imgStart;
$colPos = $i%$colCount;
if ($separateRows && $colPos == 0) {
$thisRow = '';
}
// Render one image
$imageSpace = $origImages[$i][0] + $border*($borderSpace+$borderThickness)*2;
$GLOBALS['TSFE']->register['IMAGE_NUM'] = $i;
$GLOBALS['TSFE']->register['IMAGE_NUM_CURRENT'] = $i;
$GLOBALS['TSFE']->register['ORIG_FILENAME'] = $origImages[$i]['origFile'];
$GLOBALS['TSFE']->register['imagewidth'] = $origImages[$i][0];
$imageSpace = $origImages[$imgKey][0] + $border*($borderSpace+$borderThickness)*2;
$GLOBALS['TSFE']->register['IMAGE_NUM'] = $imgKey;
$GLOBALS['TSFE']->register['IMAGE_NUM_CURRENT'] = $imgKey;
$GLOBALS['TSFE']->register['ORIG_FILENAME'] = $origImages[$imgKey]['origFile'];
$GLOBALS['TSFE']->register['imagewidth'] = $origImages[$imgKey][0];
$GLOBALS['TSFE']->register['imagespace'] = $imageSpace;
$GLOBALS['TSFE']->register['imageheight'] = $origImages[$i][1];
$GLOBALS['TSFE']->register['imageheight'] = $origImages[$imgKey][1];
if ($imageSpace > $maxImageSpace) {
$maxImageSpace = $imageSpace;
}
$thisImage = '';
$thisImage .= $this->cObj->stdWrap($imgsTag[$i], $conf['imgTagStdWrap.']);
$thisImage .= $this->cObj->stdWrap($imgsTag[$imgKey], $conf['imgTagStdWrap.']);
if ($conf['captionSplit'] || $conf['imageTextSplit']) {
$thisImage .= $this->cObj->stdWrap($this->cObj->cObjGet($conf['caption.'], 'caption.'), $conf['caption.']);
(5-5/5)