Project

General

Profile

Bug #14760 » bug_1115_solution2.diff

Administrator Admin, 2005-09-30 16:43

View differences:

typo3/sysext/cms/tslib/class.tslib_content.php 2005-06-30 10:15:23.000000000 +0200
// Table-tag is inserted
$i=$contentPosition;
$table_align = (($i==16) ? 'align="'.$align.'"' : '');
$tablecode = '<table'.($tableWidth?' width="'.$tableWidth.'"':'').' border="0" cellspacing="0" cellpadding="0" '.$table_align.' class="imgtext-table">'.$tablecode;
// Add some inline styles for having proper alignment
$style = '';
if($align=='center') {
$style=' style="margin: 0 auto;"';
} elseif($align=='right') {
$style=' style="float: right; width: auto;"';
}
$tablecode = '<table'.($tableWidth?' width="'.$tableWidth.'"':'').' border="0" cellspacing="0" cellpadding="0" '.$table_align.' class="imgtext-table"'.$style.'>'.$tablecode;
if ($editIconsHTML) { // IF this value is not long since reset.
$tablecode.='<tr><td colspan="'.$colspan.'">'.$editIconsHTML.'</td></tr>';
$editIconsHTML='';
......
}
$spaceBelowAbove = intval($this->stdWrap($conf['spaceBelowAbove'],$conf['spaceBelowAbove.']));
// depending on the alignment for above/below, three different variants of the enclosing div are needed with position specific classes
$classParam='';
switch ($contentPosition) {
case '0': // above
$output= '<div style="text-align:'.$align.';">'.$tablecode.'</div>'.$this->wrapSpace($content, $spaceBelowAbove.'|0');
if ($align=='center') {
$classParam=' class="imageblock imageorient-0"';
} elseif ($align=='right') {
$classParam=' class="imageblock imageorient-1"';
$tableCode.='<div style="clear: right;"></div>';
} elseif ($align=='left') {
$classParam=' class="imageblock imageorient-2"';
}
$output= '<div'.$classParam.' style="text-align:'.$align.';">'.$tablecode.'</div>'.$this->wrapSpace($content, $spaceBelowAbove.'|0');
break;
case '8': // below
$output= $this->wrapSpace($content, '0|'.$spaceBelowAbove).'<div style="text-align:'.$align.';">'.$tablecode.'</div>';
if ($align=='center') {
$classParam=' class="imageblock imageorient-0"';
} elseif ($align=='right') {
$classParam=' class="imageblock imageorient-1"';
$tablecode.='<div style="clear: right;"></div>';
} elseif ($align=='left') {
$classParam=' class="imageblock imageorient-2"';
}
$output= $this->wrapSpace($content, $spaceBelowAbove.'|0').'<div'.$classParam.' style="text-align:'.$align.';">'.$tablecode.'</div>';
break;
case '16': // in text
$output= $tablecode.$content;
(4-4/5)