Project

General

Profile

Feature #18593 » 8070_4.2.patch

Administrator Admin, 2008-04-09 15:58

View differences:

typo3/sysext/cms/tslib/class.tslib_content.php (working copy)
$conf['altText.'] = $conf['alttext.'];
}
$altParam = $this->getAltParam($conf);
$theValue = '<img src="'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.t3lib_div::rawUrlEncodeFP($info[3])).'" width="'.$info[0].'" height="'.$info[1].'"'.$this->getBorderAttr(' border="'.intval($conf['border']).'"').(($conf['params'] || is_array($conf['params.']))?' '.$this->stdwrap($conf['params'],$conf['params.']):'').($altParam).' />';
if ($conf['useEM'] == 1) {
if ($conf['useEM.']['scaleFactor']) {
$emWidth = $info[0] * $conf['useEM.']['scaleFactor'];
$emHeight = $info[1] * $conf['useEM.']['scaleFactor'];
} else {
$emWidth = $info[0];
$emHeight = $info[1];
}
$widthHeightImgParams = 'style="width:'.$emWidth.'em;height:'.$emHeight.'em;"';
} else {
$widthHeightImgParams = 'width="'.$info[0].'" height="'.$info[1].'"';
}
$theValue = '<img '.
'src="'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.t3lib_div::rawUrlEncodeFP($info[3])).' '.
$widthHeightImgParams.
$this->getBorderAttr(' border="'.intval($conf['border']).'"').
(($conf['params'] || is_array($conf['params.'])) ? ' '.$this->stdwrap($conf['params'],$conf['params.']) : '').
($altParam).
' />';
if ($conf['linkWrap']) {
$theValue = $this->linkWrap($theValue,$conf['linkWrap']);
} elseif ($conf['imageLinkWrap']) {
typo3/sysext/css_styled_content/static/setup.txt (working copy)
}
#
imageStdWrap.dataWrap = <div class="csc-textpic-imagewrap" style="width:{register:totalwidth}px;"> | </div>
imageStdWrap.dataWrap = <div class="csc-textpic-imagewrap" style="width:{register:totalwidth}{register:widthunit};"> | </div>
imageStdWrapNoWidth.wrap = <div class="csc-textpic-imagewrap"> | </div>
# if noRows is set, wrap around each column:
imageColumnStdWrap.dataWrap = <div class="csc-textpic-imagecolumn" style="width:{register:columnwidth}px;"> | </div>
imageColumnStdWrap.dataWrap = <div class="csc-textpic-imagecolumn" style="width:{register:columnwidth}{register:widthunit};"> | </div>
layout = CASE
layout {
......
18.value = <div class="csc-textpic csc-textpic-intext-left###CLASSES###">###IMAGES######TEXT###</div>
# intext-right-nowrap
25 = TEXT
25.value = <div class="csc-textpic csc-textpic-intext-right-nowrap###CLASSES###">###IMAGES###<div style="margin-right:{register:rowWidthPlusTextMargin}px;">###TEXT###</div></div><div class="csc-textpic-clear"><!-- --></div>
25.value = <div class="csc-textpic csc-textpic-intext-right-nowrap###CLASSES###">###IMAGES###<div style="margin-right:{register:rowWidthPlusTextMargin}{register:widthunit};">###TEXT###</div></div><div class="csc-textpic-clear"><!-- --></div>
25.insertData = 1
# intext-left-nowrap
26 = TEXT
26.value = <div class="csc-textpic csc-textpic-intext-left-nowrap###CLASSES###">###IMAGES###<div style="margin-left:{register:rowWidthPlusTextMargin}px;">###TEXT###</div></div><div class="csc-textpic-clear"><!-- --></div>
26.value = <div class="csc-textpic csc-textpic-intext-left-nowrap###CLASSES###">###IMAGES###<div style="margin-left:{register:rowWidthPlusTextMargin}{register:widthunit};">###TEXT###</div></div><div class="csc-textpic-clear"><!-- --></div>
26.insertData = 1
}
rendering {
dl {
imageRowStdWrap.dataWrap = <div class="csc-textpic-imagerow" style="width:{register:rowwidth}px;"> | </div>
imageRowStdWrap.dataWrap = <div class="csc-textpic-imagerow" style="width:{register:rowwidth}{register:widthunit};"> | </div>
noRowsStdWrap.wrap =
oneImageStdWrap.dataWrap = <dl class="csc-textpic-image###CLASSES###" style="width:{register:imagespace}px;"> | </dl>
oneImageStdWrap.dataWrap = <dl class="csc-textpic-image###CLASSES###" style="width:{register:imagespace}{register:widthunit};"> | </dl>
imgTagStdWrap.wrap = <dt> | </dt>
editIconsStdWrap.wrap = <dd> | </dd>
caption {
......
}
}
ul {
imageRowStdWrap.dataWrap = <div class="csc-textpic-imagerow" style="width:{register:rowwidth}px;"><ul> | </ul></div>
imageRowStdWrap.dataWrap = <div class="csc-textpic-imagerow" style="width:{register:rowwidth}{register:widthunit};"><ul> | </ul></div>
noRowsStdWrap.wrap = <ul> | </ul>
oneImageStdWrap.dataWrap = <li class="csc-textpic-image###CLASSES###" style="width:{register:imagespace}px;"> | </li>
oneImageStdWrap.dataWrap = <li class="csc-textpic-image###CLASSES###" style="width:{register:imagespace}{register:widthunit};"> | </li>
imgTagStdWrap.wrap =
editIconsStdWrap.wrap = <div> | </div>
caption.wrap = <div class="csc-textpic-caption"> | </div>
}
div {
imageRowStdWrap.dataWrap = <div class="csc-textpic-imagerow" style="width:{register:rowwidth}px;"> | </div>
imageRowStdWrap.dataWrap = <div class="csc-textpic-imagerow" style="width:{register:rowwidth}{register:widthunit};"> | </div>
noRowsStdWrap.wrap =
oneImageStdWrap.dataWrap = <div class="csc-textpic-image###CLASSES###" style="width:{register:imagespace}px;"> | </div>
oneImageStdWrap.dataWrap = <div class="csc-textpic-image###CLASSES###" style="width:{register:imagespace}{register:widthunit};"> | </div>
imgTagStdWrap.wrap = <div> | </div>
editIconsStdWrap.wrap = <div> | </div>
caption.wrap = <div class="csc-textpic-caption"> | </div>
}
}
renderMethod = dl
# property to switch to relative unit em instead of px
useEM = 0
# scale factor, if used with relative unit em
useEM.scaleFactor = 0.1
}
# cObject: Text with image
......
plugin.tx_cssstyledcontent._CSS_DEFAULT_STYLE := appendString(\nDIV.csc-textpic DIV.csc-textpic-imagerow-last { margin-bottom: 0; })
tt_content.image.20.rendering {
dl.imageLastRowStdWrap.dataWrap = <div class="csc-textpic-imagerow csc-textpic-imagerow-last" style="width:{register:rowwidth}px;"> | </div>
ul.imageLastRowStdWrap.dataWrap = <div class="csc-textpic-imagerow csc-textpic-imagerow-last" style="width:{register:rowwidth}px;"><ul> | </ul></div>
div.imageLastRowStdWrap.dataWrap = <div class="csc-textpic-imagerow csc-textpic-imagerow-last" style="width:{register:rowwidth}px;"> | </div>
dl.imageLastRowStdWrap.dataWrap = <div class="csc-textpic-imagerow csc-textpic-imagerow-last" style="width:{register:rowwidth}{register:widthunit};"> | </div>
ul.imageLastRowStdWrap.dataWrap = <div class="csc-textpic-imagerow csc-textpic-imagerow-last" style="width:{register:rowwidth}{register:widthunit};"><ul> | </ul></div>
div.imageLastRowStdWrap.dataWrap = <div class="csc-textpic-imagerow csc-textpic-imagerow-last" style="width:{register:rowwidth}{register:widthunit};"> | </div>
}
[END]
typo3/sysext/css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php (working copy)
$renderMethod = $this->cObj->stdWrap($conf['renderMethod'], $conf['renderMethod.']);
if ($conf['useEM'] == '1') {
$GLOBALS['TSFE']->register['widthunit'] = 'em';
$imgSF = ($conf['useEM.']['scaleFactor']) ? $conf['useEM.']['scaleFactor'] : 1;
} else {
$GLOBALS['TSFE']->register['widthunit'] = 'px';
$imgSF = 1;
}
// Render using the default IMGTEXT code (table-based)
if (!$renderMethod || $renderMethod == 'table') {
return $this->cObj->IMGTEXT($conf);
......
$imgConf['emptyTitleHandling'] = 'removeAttr';
}
}
if ($conf['useEM'] == '1') {
$imgConf['useEM'] = 1;
$imgConf['useEM.']['scaleFactor'] = $imgSF;
}
$imgsTag[$imgKey] = $this->cObj->IMAGE($imgConf);
} else {
if ($conf['useEM'] == '1') {
$imgConf['useEM'] = 1;
$imgConf['useEM.']['scaleFactor'] = $imgSF;
}
$imgsTag[$imgKey] = $this->cObj->IMAGE(Array('file' => $totalImagePath)); // currentValKey !!!
}
// Restore our ATagParams
......
}
// How much space will the image-block occupy?
$imageBlockWidth = max($imageRowsFinalWidths)+ $colspacing*($colCount-1) + $colCount*$border*($borderSpace+$borderThickness)*2;
$GLOBALS['TSFE']->register['rowwidth'] = $imageBlockWidth;
$GLOBALS['TSFE']->register['rowWidthPlusTextMargin'] = $imageBlockWidth + $textMargin;
$imageBlockWidth = max($imageRowsFinalWidths) + $colspacing*($colCount-1) + $colCount*$border*($borderSpace+$borderThickness)*2;
$GLOBALS['TSFE']->register['rowwidth'] = $imageBlockWidth*$imgSF;
$GLOBALS['TSFE']->register['rowWidthPlusTextMargin'] = ($imageBlockWidth + $textMargin)*$imgSF;
// noRows is in fact just one ROW, with the amount of columns specified, where the images are placed in.
// noCols is just one COLUMN, each images placed side by side on each row
......
$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[$imgKey][1];
$GLOBALS['TSFE']->register['imagewidth'] = $origImages[$imgKey][0] * $imgSF;
$GLOBALS['TSFE']->register['imagespace'] = $imageSpace * $imgSF;
$GLOBALS['TSFE']->register['imageheight'] = $origImages[$imgKey][1] * $imgSF;
if ($imageSpace > $maxImageSpace) {
$maxImageSpace = $imageSpace;
}
......
} else {
$allRows .= $thisImage;
}
$GLOBALS['TSFE']->register['columnwidth'] = $maxImageSpace + $tmpColspacing;
$GLOBALS['TSFE']->register['columnwidth'] = ($maxImageSpace + $tmpColspacing)*$imgSF;
// Close this row at the end (colCount), or the last row at the final end
......
}
// Wrap around the whole image block
$GLOBALS['TSFE']->register['totalwidth'] = $imgWrapWidth;
$GLOBALS['TSFE']->register['totalwidth'] = $imgWrapWidth * $imgSF;
if ($imgWrapWidth) {
$images = $this->cObj->stdWrap($images, $conf['imageStdWrap.']);
} else {
(1-1/4)