Public Member Functions | |
| start ($data, $table='') | |
| Class constructor. | |
| setParent ($data, $currentRecord) | |
| Sets the internal variable parentRecord with information about current record. | |
| getCurrentVal () | |
| Returns the "current" value. | |
| setCurrentVal ($value) | |
| Sets the "current" value. | |
| cObjGet ($setup, $addKey='') | |
| Rendering of a "numerical array" of cObjects from TypoScript Will call ->cObjGetSingle() for each cObject found and accumulate the output. | |
| cObjGetSingle ($name, $conf, $TSkey='__') | |
| HTML ($conf) | |
| Rendering the cObject, HTML. | |
| TEXT ($conf) | |
| Rendering the cObject, TEXT. | |
| CLEARGIF ($conf) | |
| Rendering the cObject, CLEARGIF. | |
| COBJ_ARRAY ($conf, $ext='') | |
| Rendering the cObject, COBJ_ARRAY / COA and COBJ_ARRAY_INT. | |
| USER ($conf, $ext='') | |
| Rendering the cObject, USER and USER_INT. | |
| FILE ($conf) | |
| Rendering the cObject, FILE. | |
| IMAGE ($conf) | |
| Rendering the cObject, IMAGE. | |
| IMG_RESOURCE ($conf) | |
| Rendering the cObject, IMG_RESOURCE. | |
| IMGTEXT ($conf) | |
| Rendering the cObject, IMGTEXT. | |
| CONTENT ($conf) | |
| Rendering the cObject, CONTENT. | |
| RECORDS ($conf) | |
| Rendering the cObject, RECORDS. | |
| HMENU ($conf) | |
| Rendering the cObject, HMENU. | |
| CTABLE ($conf) | |
| Rendering the cObject, CTABLE. | |
| OTABLE ($conf) | |
| Rendering the cObject, OTABLE. | |
| COLUMNS ($conf) | |
| Rendering the cObject, COLUMNS. | |
| HRULER ($conf) | |
| Rendering the cObject, HRULER. | |
| CASEFUNC ($conf) | |
| Rendering the cObject, CASE. | |
| LOAD_REGISTER ($conf, $name) | |
| Rendering the cObject, LOAD_REGISTER and RESTORE_REGISTER NOTICE: This cObject does NOT return any content since it just sets internal data based on the TypoScript properties. | |
| FORM ($conf, $formData='') | |
| Rendering the cObject, FORM. | |
Public Attributes | |
| $align = Array ('center', 'right', 'left') | |
| $caseConvStrings | |
| $image_compression | |
| Holds ImageMagick parameters and extensions used for compression. | |
| $image_effects | |
| ImageMagick parameters for image effects. | |
| $data = Array() | |
| Loaded with the current data-record. | |
| $oldData = Array() | |
| $alternativeData = '' | |
| $parameters = Array() | |
| $currentValKey = 'currentValue_kidjls9dksoje' | |
| $currentRecord = '' | |
| $currentRecordTotal = 0 | |
| $currentRecordNumber = 0 | |
| $parentRecordNumber = 0 | |
| $parentRecord = array() | |
| $regObj | |
| $INT_include = 0 | |
| $checkPid_cache = Array() | |
| $checkPid_badDoktypeList = '255' | |
| $lastTypoLinkUrl = '' | |
| $lastTypoLinkTarget = '' | |
| $substMarkerCache = array() | |
| $recordRegister = array() | |
|
|
Rendering the cObject, CASE.
Definition at line 1459 of file class.tslib_content.php. References $content, $key, checkIf(), cObjGetSingle(), and stdWrap(). Referenced by cObjGetSingle(). 01459 {
01460 $content='';
01461 if ($this->checkIf($conf['if.'])) {
01462 if ($conf['setCurrent'] || $conf['setCurrent.']){$this->data[$this->currentValKey] = $this->stdWrap($conf['setCurrent'], $conf['setCurrent.']);}
01463 $key = $this->stdWrap($conf['key'],$conf['key.']);
01464 $key = $conf[$key] ? $key : 'default';
01465 $name = $conf[$key];
01466 $theValue = $this->cObjGetSingle($name,$conf[$key.'.'], $key);
01467 if ($conf['stdWrap.']) {
01468 $theValue = $this->stdWrap($theValue,$conf['stdWrap.']);
01469 }
01470 return $theValue;
01471 }
01472 }
|
|
|
Rendering the cObject, CLEARGIF.
Definition at line 604 of file class.tslib_content.php. References stdWrap(). Referenced by cObjGetSingle(). 00604 {
00605 $w = $this->stdWrap($conf['width'],$conf['width.']);
00606 $h = $this->stdWrap($conf['height'],$conf['height.']);
00607 $w = $w ? $w : 1;
00608 $h = $h ? $h : 1;
00609 $wrap = $conf['wrap'] ? $conf['wrap'] : '|<br />';
00610 $theValue = $this->wrap('<img src="'.$GLOBALS['TSFE']->absRefPrefix.'clear.gif" width="'.$w.'" height="'.$h.'" border="0" alt="" title="" />', $wrap);
00611
00612 return $this->stdWrap($theValue,$conf['stdWrap.']);
00613 }
|
|
||||||||||||
|
Rendering the cObject, COBJ_ARRAY / COA and COBJ_ARRAY_INT.
Definition at line 623 of file class.tslib_content.php. References $content, checkIf(), cObjGet(), and stdWrap(). Referenced by cObjGetSingle(). 00623 {
00624 $content='';
00625 switch($ext) {
00626 case 'INT':
00627 $substKey = $ext.'_SCRIPT.'.$GLOBALS['TSFE']->uniqueHash();
00628 $content.='<!--'.$substKey.'-->';
00629 $GLOBALS['TSFE']->config[$ext.'incScript'][$substKey] = array(
00630 'file'=>$incFile,
00631 'conf'=>$conf,
00632 'cObj'=>serialize($this),
00633 'type'=>'COA'
00634 );
00635 break;
00636 default:
00637 if ($this->checkIf($conf['if.'])) {
00638 $content=$this->cObjGet($conf);
00639 if ($conf['wrap']) {
00640 $content=$this->wrap($content, $conf['wrap']);
00641 }
00642 if ($conf['stdWrap.']) {
00643 $content=$this->stdWrap($content, $conf['stdWrap.']);
00644 }
00645 }
00646 break;
00647 }
00648 return $content;
00649 }
|
|
||||||||||||
|
Rendering of a "numerical array" of cObjects from TypoScript Will call ->cObjGetSingle() for each cObject found and accumulate the output.
Definition at line 412 of file class.tslib_content.php. References $content, and cObjGetSingle(). Referenced by COBJ_ARRAY(), and CTABLE(). 00412 {
00413 if (is_array($setup)) {
00414 $sKeyArray=t3lib_TStemplate::sortedKeyList($setup);
00415 $content ='';
00416 foreach($sKeyArray as $theKey) {
00417 $theValue=$setup[$theKey];
00418 if (intval($theKey) && !strstr($theKey,'.')) {
00419 $conf=$setup[$theKey.'.'];
00420 $content.=$this->cObjGetSingle($theValue,$conf,$addKey.$theKey); // Get the contentObject
00421 }
00422 }
00423 return $content;
00424 }
00425 }
|
|
||||||||||||||||
|
Definition at line 436 of file class.tslib_content.php. References $content, $key, CASEFUNC(), CLEARGIF(), COBJ_ARRAY(), COLUMNS(), CONTENT(), CTABLE(), FILE(), FORM(), HMENU(), HRULER(), HTML(), IMAGE(), IMG_RESOURCE(), IMGTEXT(), t3lib_extMgm::isLoaded(), LOAD_REGISTER(), MULTIMEDIA(), OTABLE(), PHP_SCRIPT(), RECORDS(), SEARCHRESULT(), TEMPLATE(), TEXT(), and USER(). Referenced by CASEFUNC(), cObjGet(), COLUMNS(), IMGTEXT(), netprintApplication_offsiteLinkWrap(), SEARCHRESULT(), stdWrap(), and TEMPLATE(). 00436 {
00437 $content='';
00438 // Checking that the function is not called eternally. This is done by interrupting at a depth of 100
00439 $GLOBALS['TSFE']->cObjectDepthCounter--;
00440 if ($GLOBALS['TSFE']->cObjectDepthCounter>0) {
00441 $name = trim($name);
00442 if ($GLOBALS['TT']->LR) $GLOBALS['TT']->push($TSkey, $name);
00443
00444 // Checking if the COBJ is a reference to another object. (eg. name of 'blabla.blabla = < styles.something')
00445 if (substr($name,0,1)=='<') {
00446 $key = trim(substr($name,1));
00447 $cF = t3lib_div::makeInstance('t3lib_TSparser');
00448 // $name and $conf is loaded with the referenced values.
00449 $old_conf=$conf;
00450 list($name, $conf) = $cF->getVal($key,$GLOBALS['TSFE']->tmpl->setup);
00451 if (is_array($old_conf) && count($old_conf)) {
00452 $conf = $this->joinTSarrays($conf,$old_conf);
00453 // debug($conf);
00454 }
00455 // Getting the cObject
00456 $GLOBALS['TT']->incStackPointer();
00457 $content.=$this->cObjGetSingle($name,$conf,$key);
00458 $GLOBALS['TT']->decStackPointer();
00459 } else {
00460
00461 // Object TypoScript hook:
00462 if(t3lib_extMgm::isLoaded('obts') && isset($GLOBALS['OBTS']['tso_list'][$name])) {
00463 $content.= obts_dtutil::renderDatatypeContent($name, $GLOBALS['OBTS']['tso_list'][$name], $conf, $this);
00464 } else {
00465 // Traditional Content Object branching:
00466 switch($name) {
00467 case 'COBJ_ARRAY':
00468 case 'COA':
00469 $content.=$this->COBJ_ARRAY($conf);
00470 break;
00471 case 'COA_INT':
00472 $content.=$this->COBJ_ARRAY($conf,'INT');
00473 break;
00474 case 'HTML':
00475 $content.=$this->HTML($conf);
00476 break;
00477 case 'TEXT':
00478 $content.=$this->TEXT($conf);
00479 break;
00480 case 'CLEARGIF':
00481 $content.=$this->CLEARGIF($conf);
00482 break;
00483 case 'FILE':
00484 $content.=$this->FILE($conf);
00485 break;
00486 case 'IMAGE':
00487 $content.=$this->IMAGE($conf);
00488 break;
00489 case 'IMG_RESOURCE':
00490 $content.=$this->IMG_RESOURCE($conf);
00491 break;
00492 case 'IMGTEXT':
00493 $content.=$this->IMGTEXT($conf);
00494 break;
00495 case 'CONTENT':
00496 $content.=$this->CONTENT($conf);
00497 break;
00498 case 'RECORDS':
00499 $content.=$this->RECORDS($conf);
00500 break;
00501 case 'HMENU':
00502 $content.=$this->HMENU($conf);
00503 break;
00504 case 'CTABLE':
00505 $content.=$this->CTABLE($conf);
00506 break;
00507 case 'OTABLE':
00508 $content.=$this->OTABLE($conf);
00509 break;
00510 case 'COLUMNS':
00511 $content.=$this->COLUMNS($conf);
00512 break;
00513 case 'HRULER':
00514 $content.=$this->HRULER($conf);
00515 break;
00516 case 'CASE':
00517 $content.=$this->CASEFUNC($conf);
00518 break;
00519 case 'LOAD_REGISTER':
00520 case 'RESTORE_REGISTER':
00521 $this->LOAD_REGISTER($conf,$name);
00522 break;
00523 case 'FORM':
00524 $content.=$this->FORM($conf);
00525 break;
00526 case 'SEARCHRESULT':
00527 $content.=$this->SEARCHRESULT($conf);
00528 break;
00529 case 'PHP_SCRIPT':
00530 $content.=$this->PHP_SCRIPT($conf);
00531 break;
00532 case 'PHP_SCRIPT_EXT':
00533 $content.=$this->PHP_SCRIPT($conf,'EXT');
00534 break;
00535 case 'PHP_SCRIPT_INT':
00536 $content.=$this->PHP_SCRIPT($conf,'INT');
00537 break;
00538 case 'USER':
00539 $content.=$this->USER($conf);
00540 break;
00541 case 'USER_INT':
00542 $content.=$this->USER($conf,'INT');
00543 break;
00544 case 'TEMPLATE':
00545 $content.=$this->TEMPLATE($conf);
00546 break;
00547 case 'EDITPANEL':
00548 if ($GLOBALS['TSFE']->beUserLogin) {$content.=$this->editPanel($content, $conf);}
00549 break;
00550 case 'MULTIMEDIA':
00551 $content.=$this->MULTIMEDIA($conf);
00552 break;
00553 }
00554 }
00555 }
00556 if ($GLOBALS['TT']->LR) $GLOBALS['TT']->pull($content);
00557 }
00558 // Increasing on exit...
00559 $GLOBALS['TSFE']->cObjectDepthCounter++;
00560 return $content;
00561 }
|
|
|
Rendering the cObject, COLUMNS.
Definition at line 1355 of file class.tslib_content.php. References $a, $content, checkIf(), cObjGetSingle(), stdWrap(), and table(). Referenced by cObjGetSingle(). 01355 {
01356 $content='';
01357 if (is_array($conf) && $this->checkIf($conf['if.'])) {
01358 $tdRowCount=0;
01359 $tableParams = $conf['tableParams'] ? ' '.$conf['tableParams'] : ' border="0" cellspacing="0" cellpadding="0"';
01360 $TDparams = $conf['TDparams'] ? ' '.$conf['TDparams']:' valign="top"';
01361 $rows = t3lib_div::intInRange($conf['rows'],2,20);
01362 $totalWidth = intval($conf['totalWidth']);
01363 $columnWidth=0;
01364
01365 $totalGapWidth=0;
01366 $gapData = Array(
01367 'gapWidth' => $this->stdWrap($conf['gapWidth'],$conf['gapWidth.']),
01368 'gapBgCol' => $this->stdWrap($conf['gapBgCol'],$conf['gapBgCol.']),
01369 'gapLineThickness' => $this->stdWrap($conf['gapLineThickness'],$conf['gapLineThickness.']),
01370 'gapLineCol' => $this->stdWrap($conf['gapLineCol'],$conf['gapLineCol.'])
01371 );
01372 $gapData = $GLOBALS['TSFE']->tmpl->splitConfArray($gapData,$rows-1);
01373 reset($gapData);
01374 while(list(,$val)=each($gapData)) {
01375 $totalGapWidth+=intval($val['gapWidth']);
01376 }
01377
01378 if ($totalWidth) {
01379 $columnWidth = ceil(($totalWidth-$totalGapWidth)/$rows);
01380 $TDparams.=' width="'.$columnWidth.'"';
01381 $tableParams.=' width="'.$totalWidth.'"';
01382 } else {
01383 $TDparams.=' width="'.floor(100/$rows).'%"';
01384 $tableParams.=' width="100%"';
01385 }
01386
01387 for ($a=1;$a<=$rows;$a++) {
01388 $tdRowCount++;
01389 $content.='<td'.$TDparams.'>';
01390 $content.=$this->cObjGetSingle($conf[$a],$conf[$a.'.'], $a);
01391 $content.='</td>';
01392 if ($a < $rows) {
01393 $gapConf = $gapData[($a-1)];
01394 $gapWidth = intval($gapConf['gapWidth']);
01395 if ($gapWidth) {
01396 $tdPar = $gapConf['gapBgCol'] ? ' bgcolor="'.$gapConf['gapBgCol'].'"' : '';
01397 $gapLine = intval($gapConf['gapLineThickness']);
01398 if ($gapLine) {
01399 $gapSurround = t3lib_div::intInRange(($gapWidth-$gapLine)/2, 1, 1000);
01400 // right gap
01401 $content.='<td'.$tdPar.'><img src="'.$GLOBALS['TSFE']->absRefPrefix.'clear.gif" width="'.$gapSurround.'" height="1" alt="" title="" /></td>';
01402 $tdRowCount++;
01403 // line:
01404 $GtdPar = $gapConf['gapLineCol'] ? ' bgcolor="'.$gapConf['gapLineCol'].'"' : ' bgcolor="black"';
01405 $content.='<td'.$GtdPar.'><img src="'.$GLOBALS['TSFE']->absRefPrefix.'clear.gif" width="'.$gapLine.'" height="1" alt="" title="" /></td>';
01406 $tdRowCount++;
01407 // left gap
01408 $content.='<td'.$tdPar.'><img src="'.$GLOBALS['TSFE']->absRefPrefix.'clear.gif" width="'.$gapSurround.'" height="1" alt="" title="" /></td>';
01409 $tdRowCount++;
01410 } else {
01411 $content.='<td'.$tdPar.'><img src="'.$GLOBALS['TSFE']->absRefPrefix.'clear.gif" width="'.$gapWidth.'" height="1" alt="" title="" /></td>';
01412 $tdRowCount++;
01413 }
01414 }
01415 }
01416 }
01417 $content='<tr>'.$content.'</tr>';
01418 $content='<table'.$tableParams.'>'.$content.'</table>';
01419 $content.=$this->cObjGetSingle($conf['after'],$conf['after.'], 'after');
01420 if ($conf['stdWrap.']) {
01421 $content = $this->stdWrap($content,$conf['stdWrap.']);
01422 }
01423 }
01424 return $content;
01425 }
|
|
|
Rendering the cObject, CONTENT.
Definition at line 1129 of file class.tslib_content.php. References CONTENT(), debug(), error(), lastChanged(), stdWrap(), and table(). Referenced by cObjGetSingle(), and CONTENT(). 01129 {
01130 $theValue='';
01131
01132 $originalRec = $GLOBALS['TSFE']->currentRecord;
01133 if ($originalRec) { // If the currentRecord is set, we register, that this record has invoked this function. It's should not be allowed to do this again then!!
01134 $GLOBALS['TSFE']->recordRegister[$originalRec]++;
01135 }
01136
01137 if ($conf['table']=='pages' || substr($conf['table'],0,3)=='tt_' || substr($conf['table'],0,3)=='fe_' || substr($conf['table'],0,3)=='tx_' || substr($conf['table'],0,4)=='ttx_' || substr($conf['table'],0,5)=='user_') {
01138
01139 $renderObjName = $conf['renderObj'] ? $conf['renderObj'] : '<'.$conf['table'];
01140 $renderObjKey = $conf['renderObj'] ? 'renderObj' : '';
01141 $renderObjConf = $conf['renderObj.'];
01142
01143 $res = $this->exec_getQuery($conf['table'],$conf['select.']);
01144 if ($error = $GLOBALS['TYPO3_DB']->sql_error()) {
01145 $GLOBALS['TT']->setTSlogMessage($error,3);
01146 } else {
01147 $this->currentRecordTotal = $GLOBALS['TYPO3_DB']->sql_num_rows($res);
01148 $GLOBALS['TT']->setTSlogMessage('NUMROWS: '.$GLOBALS['TYPO3_DB']->sql_num_rows($res));
01149 $cObj =t3lib_div::makeInstance('tslib_cObj');
01150 $cObj->setParent($this->data,$this->currentRecord);
01151 $this->currentRecordNumber=0;
01152 while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
01153
01154 // Versioning preview:
01155 $GLOBALS['TSFE']->sys_page->versionOL($conf['table'],$row);
01156
01157 // Language Overlay:
01158 if ($GLOBALS['TSFE']->sys_language_contentOL) {
01159 $row = $GLOBALS['TSFE']->sys_page->getRecordOverlay($conf['table'],$row,$GLOBALS['TSFE']->sys_language_content,$GLOBALS['TSFE']->sys_language_contentOL);
01160 }
01161
01162 if (is_array($row)) { // Might be unset in the sys_language_contentOL
01163 if (!$GLOBALS['TSFE']->recordRegister[$conf['table'].':'.$row['uid']]) {
01164 $this->currentRecordNumber++;
01165 $cObj->parentRecordNumber = $this->currentRecordNumber;
01166 $GLOBALS['TSFE']->currentRecord = $conf['table'].':'.$row['uid'];
01167 $this->lastChanged($row['tstamp']);
01168 $cObj->start($row,$conf['table']);
01169 if ($GLOBALS['TSFE']->config['config']['insertDmailerBoundaries']) { $theValue.='<!--DMAILER_SECTION_BOUNDARY_'.intval($row['module_sys_dmail_category']).'-->'; }
01170 $theValue.= $cObj->cObjGetSingle($renderObjName, $renderObjConf, $renderObjKey);
01171 }# else debug($GLOBALS['TSFE']->recordRegister,'CONTENT');
01172 }
01173 }
01174 if ($GLOBALS['TSFE']->config['config']['insertDmailerBoundaries']) { $theValue.='<!--DMAILER_SECTION_BOUNDARY_END-->'; }
01175 }
01176 }
01177
01178 $theValue = $this->wrap($theValue,$conf['wrap']);
01179 if ($conf['stdWrap.']) $theValue = $this->stdWrap($theValue,$conf['stdWrap.']);
01180
01181 $GLOBALS['TSFE']->currentRecord = $originalRec; // Restore
01182 return $theValue;
01183 }
|
|
|
Rendering the cObject, CTABLE.
Definition at line 1302 of file class.tslib_content.php. References cObjGet(). Referenced by cObjGetSingle(). 01302 {
01303 $controlTable = t3lib_div::makeInstance('tslib_controlTable');
01304 if ($conf['tableParams']) {
01305 $controlTable->tableParams = $conf['tableParams'];
01306 }
01307 // loads the pagecontent
01308 $controlTable->contentW = $conf['cWidth'];
01309 // loads the menues if any
01310 if (is_array($conf['c.'])) {
01311 $controlTable->content = $this->cObjGet($conf['c.'],'c.');
01312 $controlTable->contentTDparams = isset($conf['c.']['TDParams']) ? $conf['c.']['TDParams'] : 'valign="top"';
01313 }
01314 if (is_array($conf['lm.'])) {
01315 $controlTable->lm = $this->cObjGet($conf['lm.'],'lm.');
01316 $controlTable->lmTDparams = isset($conf['lm.']['TDParams']) ? $conf['lm.']['TDParams'] : 'valign="top"';
01317 }
01318 if (is_array($conf['tm.'])) {
01319 $controlTable->tm = $this->cObjGet($conf['tm.'],'tm.');
01320 $controlTable->tmTDparams = isset($conf['tm.']['TDParams']) ? $conf['tm.']['TDParams'] : 'valign="top"';
01321 }
01322 if (is_array($conf['rm.'])) {
01323 $controlTable->rm = $this->cObjGet($conf['rm.'],'rm.');
01324 $controlTable->rmTDparams = isset($conf['rm.']['TDParams']) ? $conf['rm.']['TDParams'] : 'valign="top"';
01325 }
01326 if (is_array($conf['bm.'])) {
01327 $controlTable->bm = $this->cObjGet($conf['bm.'],'bm.');
01328 $controlTable->bmTDparams = isset($conf['bm.']['TDParams']) ? $conf['bm.']['TDParams'] : 'valign="top"';
01329 }
01330 return $controlTable->start($conf['offset'],$conf['cMargins']);
01331 }
|
|
|
Rendering the cObject, FILE.
Definition at line 686 of file class.tslib_content.php. References fileResource(), and linkWrap(). Referenced by cObjGetSingle(). 00686 {
00687 $theValue = $this->fileResource($this->stdWrap($conf['file'],$conf['file.']), trim($this->getAltParam($conf)));
00688 if ($conf['linkWrap']) {
00689 $theValue = $this->linkWrap($theValue,$conf['linkWrap']);
00690 }
00691 return $this->wrap($theValue,$conf['wrap']);
00692 }
|
|
||||||||||||
|
Rendering the cObject, FORM. Note on $formData: In the optional $formData array each entry represents a line in the ordinary setup. In those entries each entry (0,1,2...) represents a space normally divided by the '|' line. $formData [] = array('Name:', 'name=input, 25 ', 'Default value....'); $formData [] = array('Email:', 'email=input, 25 ', 'Default value for email....');
If $formData is an array the value of $conf['data'] is ignored.
Definition at line 1524 of file class.tslib_content.php. References $a, $content, $data, $hiddenfields, $val, getFieldDefaultValue(), IMAGE(), setCurrentVal(), and stdWrap(). Referenced by cObjGetSingle(). |
|
|
Returns the "current" value. The "current" value is just an internal variable that can be used by functions to pass a single value on to another function later in the TypoScript processing. It's like "load accumulator" in the good old C64 days... basically a "register" you can use as you like. The TSref will tell if functions are setting this value before calling some other object so that you know if it holds any special information.
Definition at line 388 of file class.tslib_content.php. 00388 {
00389 return $this->data[$this->currentValKey];
00390 }
|
|
|
Rendering the cObject, HMENU.
Definition at line 1270 of file class.tslib_content.php. References $content, checkIf(), and stdWrap(). Referenced by cObjGetSingle(). 01270 {
01271 $content='';
01272 if ($this->checkIf($conf['if.'])) {
01273 $cls = strtolower($conf[1]);
01274 if (t3lib_div::inList($GLOBALS['TSFE']->tmpl->menuclasses,$cls)) {
01275 if ($conf['special.']['value.']) {
01276 $conf['special.']['value'] = $this->stdWrap($conf['special.']['value'], $conf['special.']['value.']);
01277 }
01278 $GLOBALS['TSFE']->register['count_HMENU']++;
01279 $GLOBALS['TSFE']->register['count_HMENU_MENUOBJ']=0;
01280 $GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMid']=array();
01281 $GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMparentId']=array();
01282
01283 $menu = t3lib_div::makeInstance('tslib_'.$cls);
01284 $menu->parent_cObj = $this;
01285 $menu->start($GLOBALS['TSFE']->tmpl, $GLOBALS['TSFE']->sys_page, '', $conf, 1);
01286 $menu->makeMenu();
01287 $content.=$menu->writeMenu();
01288 }
01289 if ($conf['wrap']) $content=$this->wrap($content, $conf['wrap']);
01290 if ($conf['stdWrap.']) $content = $this->stdWrap($content, $conf['stdWrap.']);
01291 }
01292 return $content;
01293 }
|
|
|
Rendering the cObject, HRULER.
Definition at line 1434 of file class.tslib_content.php. References $content, stdWrap(), and table(). Referenced by cObjGetSingle(). 01434 {
01435 $lineThickness = t3lib_div::intInRange($this->stdWrap($conf['lineThickness'],$conf['lineThickness.']),1,50);
01436 $lineColor = $conf['lineColor'] ? $conf['lineColor'] : 'black';
01437 $spaceBefore = intval($conf['spaceLeft']);
01438 $spaceAfter = intval($conf['spaceRight']);
01439 $tableWidth = $conf['tableWidth'] ? $conf['tableWidth'] : '99%';
01440 $content='';
01441
01442 $content.='<table border="0" cellspacing="0" cellpadding="0" width="'.htmlspecialchars($tableWidth).'"><tr>';
01443 if ($spaceBefore) {$content.='<td width="1"><img src="'.$GLOBALS['TSFE']->absRefPrefix.'clear.gif" width="'.$spaceBefore.'" height="1" alt="" title="" /></td>'; }
01444 $content.='<td bgcolor="'.$lineColor.'"><img src="'.$GLOBALS['TSFE']->absRefPrefix.'clear.gif" width="1" height="'.$lineThickness.'" alt="" title="" /></td>';
01445 if ($spaceAfter) {$content.='<td width="1"><img src="'.$GLOBALS['TSFE']->absRefPrefix.'clear.gif" width="'.$spaceAfter.'" height="1" alt="" title="" /></td>'; }
01446 $content.='</tr></table>';
01447
01448 $content = $this->stdWrap($content, $conf['stdWrap.']);
01449 return $content;
01450 }
|
|
|
Rendering the cObject, HTML.
Definition at line 582 of file class.tslib_content.php. References stdWrap(). Referenced by cObjGetSingle(). 00582 {
00583 return $this->stdWrap($conf['value'],$conf['value.']);
00584 }
|
|
|
Rendering the cObject, IMAGE.
Definition at line 702 of file class.tslib_content.php. References $content, checkIf(), cImage(), and stdWrap(). Referenced by cObjGetSingle(), FORM(), and IMGTEXT(). 00702 {
00703 $content='';
00704 if ($this->checkIf($conf['if.'])) {
00705 $theValue = $this->cImage($conf['file'],$conf);
00706 if ($conf['stdWrap.']) {
00707 $theValue = $this->stdWrap($theValue,$conf['stdWrap.']);
00708 }
00709 return $theValue;
00710 }
00711 }
|
|
|
Rendering the cObject, IMG_RESOURCE.
Definition at line 721 of file class.tslib_content.php. References stdWrap(). Referenced by cObjGetSingle(). 00721 {
00722 $imgArray = $this->getImgResource($conf['file'],$conf['file.']);
00723 return $this->stdWrap($imgArray[3],$conf['stdWrap.']);
00724 }
|
|
|
Rendering the cObject, IMGTEXT.
Definition at line 733 of file class.tslib_content.php. References $a, $align, $content, $image_compression, $image_effects, cObjGetSingle(), IMAGE(), netprintApplication_offsiteLinkWrap(), stdWrap(), and table(). Referenced by cObjGetSingle(). 00733 {
00734 $content='';
00735 if (is_array($conf['text.'])) {
00736 $content.= $this->stdWrap($this->cObjGet($conf['text.'],'text.'),$conf['text.']); // this gets the surrounding content
00737 }
00738 $imgList=trim($this->stdWrap($conf['imgList'],$conf['imgList.'])); // gets images
00739 if ($imgList) {
00740 $imgs = t3lib_div::trimExplode(',',$imgList);
00741 $imgStart = intval($this->stdWrap($conf['imgStart'],$conf['imgStart.']));
00742
00743 $imgCount= count($imgs)-$imgStart;
00744
00745 $imgMax = intval($this->stdWrap($conf['imgMax'],$conf['imgMax.']));
00746 if ($imgMax) {
00747 $imgCount = t3lib_div::intInRange($imgCount,0,$conf['imgMax']); // reduces the number of images.
00748 }
00749
00750 $imgPath = $this->stdWrap($conf['imgPath'],$conf['imgPath.']);
00751
00752 // initialisation
00753 $caption='';
00754 if (is_array($conf['caption.'])) {
00755 $caption= $this->stdWrap($this->cObjGet($conf['caption.'], 'caption.'),$conf['caption.']);
00756 }
00757 $captionArray=array();
00758 if ($conf['captionSplit']) {
00759 $capSplit = $this->stdWrap($conf['captionSplit.']['token'],$conf['captionSplit.']['token.']);
00760 if (!$capSplit) {$capSplit=chr(10);}
00761 $caption2= $this->cObjGetSingle($conf['captionSplit.']['cObject'],$conf['captionSplit.']['cObject.'],'captionSplit.cObject');
00762 $captionArray=explode($capSplit,$caption2);
00763 while(list($ca_key,$ca_val)=each($captionArray)) {
00764 $captionArray[$ca_key] = $this->stdWrap(trim($captionArray[$ca_key]), $conf['captionSplit.']['stdWrap.']);
00765 }
00766 }
00767
00768 $tablecode='';
00769 $position=$this->stdWrap($conf['textPos'],$conf['textPos.']);
00770
00771 $tmppos = $position&7;
00772 $contentPosition = $position&24;
00773 $align = $this->align[$tmppos];
00774 $cap = ($caption)?1:0;
00775 $txtMarg = intval($this->stdWrap($conf['textMargin'],$conf['textMargin.']));
00776 if (!$conf['textMargin_outOfText'] && $contentPosition<16) {
00777 $txtMarg=0;
00778 }
00779
00780 $cols = intval($this->stdWrap($conf['cols'],$conf['cols.']));
00781 $rows = intval($this->stdWrap($conf['rows'],$conf['rows.']));
00782 $colspacing = intval($this->stdWrap($conf['colSpace'],$conf['colSpace.']));
00783 $rowspacing = intval($this->stdWrap($conf['rowSpace'],$conf['rowSpace.']));
00784
00785 $border = intval($this->stdWrap($conf['border'],$conf['border.'])) ? 1:0;
00786 $borderColor = $this->stdWrap($conf['borderCol'],$conf['borderCol.']);
00787 $borderThickness = intval($this->stdWrap($conf['borderThick'],$conf['borderThick.']));
00788
00789 $borderColor=$borderColor?$borderColor:'black';
00790 $borderThickness=$borderThickness?$borderThickness:1;
00791
00792 $caption_align = $this->stdWrap($conf['captionAlign'],$conf['captionAlign.']);
00793 if (!$caption_align) {
00794 $caption_align = $align;
00795 }
00796 // generate cols
00797 $colCount = ($cols > 1) ? $cols : 1;
00798 if ($colCount > $imgCount) {$colCount = $imgCount;}
00799 $rowCount = ($colCount > 1) ? ceil($imgCount / $colCount) : $imgCount;
00800 // generate rows
00801 if ($rows>1) {
00802 $rowCount = $rows;
00803 if ($rowCount > $imgCount) {$rowCount = $imgCount;}
00804 $colCount = ($rowCount>1) ? ceil($imgCount / $rowCount) : $imgCount;
00805 }
00806
00807 // max Width
00808 $colRelations = trim($this->stdWrap($conf['colRelations'],$conf['colRelations.']));
00809 $maxW = intval($this->stdWrap($conf['maxW'],$conf['maxW.']));
00810
00811 $maxWInText = intval($this->stdWrap($conf['maxWInText'],$conf['maxWInText.']));
00812 if (!$maxWInText) { // If maxWInText is not set, it's calculated to the 70 % of the max...
00813 $maxWInText = round($maxW/100*50);
00814 }
00815
00816 if ($maxWInText && $contentPosition>=16) { // inText
00817 $maxW = $maxWInText;
00818 }
00819
00820 if ($maxW && $colCount > 0) { // If there is a max width and if colCount is greater than column
00821 /* debug($border*$borderThickness*2);
00822 debug($maxW);
00823 debug($colspacing);
00824 debug(($maxW-$colspacing*($colCount-1)-$colCount*$border*$borderThickness*2));
00825 */
00826 $maxW = ceil(($maxW-$colspacing*($colCount-1)-$colCount*$border*$borderThickness*2)/$colCount);
00827 }
00828 // create the relation between rows
00829 $colMaxW = Array();
00830 if ($colRelations) {
00831 $rel_parts = explode(':',$colRelations);
00832 $rel_total = 0;
00833 for ($a=0;$a<$colCount;$a++) {
00834 $rel_parts[$a] = intval($rel_parts[$a]);
00835 $rel_total+= $rel_parts[$a];
00836 }
00837 if ($rel_total) {
00838 for ($a=0;$a<$colCount;$a++) {
00839 $colMaxW[$a] = round(($maxW*$colCount)/$rel_total*$rel_parts[$a]);
00840 }
00841 if (min($colMaxW)<=0 || max($rel_parts)/min($rel_parts)>10) { // The difference in size between the largest and smalles must be within a factor of ten.
00842 $colMaxW = Array();
00843 }
00844 }
00845 }
00846 $image_compression = intval($this->stdWrap($conf['image_compression'],$conf['image_compression.']));
00847 $image_effects = intval($this->stdWrap($conf['image_effects'],$conf['image_effects.']));
00848 $image_frames = intval($this->stdWrap($conf['image_frames.']['key'],$conf['image_frames.']['key.']));
00849
00850 // fetches pictures
00851 $splitArr=array();
00852 $splitArr['imgObjNum']=$conf['imgObjNum'];
00853 $splitArr = $GLOBALS['TSFE']->tmpl->splitConfArray($splitArr,$imgCount);
00854
00855 // EqualHeight
00856 $equalHeight = intval($this->stdWrap($conf['equalH'],$conf['equalH.']));
00857 if ($equalHeight) { // Initiate gifbuilder object in order to get dimensions AND calculate the imageWidth's
00858 $gifCreator = t3lib_div::makeInstance('tslib_gifbuilder');
00859 $gifCreator->init();
00860 $relations = Array();
00861 $relations_cols = Array();
00862 $totalMaxW = $maxW*$colCount;
00863 for($a=0;$a<$imgCount;$a++) {
00864 $imgKey = $a+$imgStart;
00865 $imgInfo = $gifCreator->getImageDimensions($imgPath.$imgs[$imgKey]);
00866 $relations[$a] = $imgInfo[1] / $equalHeight; // relationship between the original height and the wished height
00867 if ($relations[$a]) { // if relations is zero, then the addition of this value is omitted as the image is not expected to display because of some error.
00868 $relations_cols[floor($a/$colCount)] += $imgInfo[0]/$relations[$a]; // counts the total width of the row with the new height taken into consideration.
00869 }
00870 }
00871 }
00872
00873 $imageRowsFinalWidths = Array(); // contains the width of every image row
00874 $imageRowsMaxHeights = Array();
00875 $imgsTag=array();
00876 $origImages=array();
00877 for($a=0;$a<$imgCount;$a++) {
00878 $GLOBALS['TSFE']->register['IMAGE_NUM'] = $a;
00879
00880 $imgKey = $a+$imgStart;
00881 $totalImagePath = $imgPath.$imgs[$imgKey];
00882 $this->data[$this->currentValKey] = $totalImagePath;
00883 $imgObjNum = intval($splitArr[$a]['imgObjNum']);
00884 $imgConf = $conf[$imgObjNum.'.'];
00885
00886 if ($equalHeight) {
00887 $scale = 1;
00888 if ($totalMaxW) {
00889 $rowTotalMaxW = $relations_cols[floor($a/$colCount)];
00890 if ($rowTotalMaxW > $totalMaxW) {
00891 $scale = $rowTotalMaxW / $totalMaxW;
00892 }
00893 }
00894 // transfer info to the imageObject. Please note, that
00895 $imgConf['file.']['height'] = round($equalHeight/$scale);
00896
00897 unset($imgConf['file.']['width']);
00898 unset($imgConf['file.']['maxW']);
00899 unset($imgConf['file.']['maxH']);
00900 unset($imgConf['file.']['minW']);
00901 unset($imgConf['file.']['minH']);
00902 unset($imgConf['file.']['width.']);
00903 unset($imgConf['file.']['maxW.']);
00904 unset($imgConf['file.']['maxH.']);
00905 unset($imgConf['file.']['minW.']);
00906 unset($imgConf['file.']['minH.']);
00907 $maxW = 0; // setting this to zero, so that it doesn't disturb
00908 }
00909
00910 if ($maxW) {
00911 if (count($colMaxW)) {
00912 $imgConf['file.']['maxW'] = $colMaxW[($a%$colCount)];
00913 } else {
00914 $imgConf['file.']['maxW'] = $maxW;
00915 }
00916 }
00917
00918 // Image Object supplied:
00919 if (is_array($imgConf) || $imgConf['file']) {
00920 if ($this->image_effects[$image_effects]) {
00921 $imgConf['file.']['params'].= ' '.$this->image_effects[$image_effects];
00922 }
00923 if ($image_frames) {
00924 if (is_array($conf['image_frames.'][$image_frames.'.'])) {
00925 $imgConf['file.']['m.'] = $conf['image_frames.'][$image_frames.'.'];
00926 }
00927 }
00928 if ($image_compression && $imgConf['file']!='GIFBUILDER') {
00929 if ($image_compression==1) {
00930 $tempImport = $imgConf['file.']['import'];
00931 $tempImport_dot = $imgConf['file.']['import.'];
00932 unset($imgConf['file.']);
00933 $imgConf['file.']['import'] = $tempImport;
00934 $imgConf['file.']['import.'] = $tempImport_dot;
00935 } elseif (isset($this->image_compression[$image_compression])) {
00936 $imgConf['file.']['params'].= ' '.$this->image_compression[$image_compression]['params'];
00937 $imgConf['file.']['ext'] = $this->image_compression[$image_compression]['ext'];
00938 unset($imgConf['file.']['ext.']);
00939 }
00940 }
00941
00942 // "alt", "title" and "longdesc" attributes:
00943 if (!strlen($imgConf['altText']) && !is_array($imgConf['altText.'])) {
00944 $imgConf['altText'] = $conf['altText'];
00945 $imgConf['altText.'] = $conf['altText.'];
00946 }
00947 if (!strlen($imgConf['titleText']) && !is_array($imgConf['titleText.'])) {
00948 $imgConf['titleText'] = $conf['titleText'];
00949 $imgConf['titleText.'] = $conf['titleText.'];
00950 }
00951 if (!strlen($imgConf['longdescURL']) && !is_array($imgConf['longdescURL.'])) {
00952 $imgConf['longdescURL'] = $conf['longdescURL'];
00953 $imgConf['longdescURL.'] = $conf['longdescURL.'];
00954 }
00955 } else {
00956 $imgConf = array(
00957 'altText' => $conf['altText'],
00958 'titleText' => $conf['titleText'],
00959 'longdescURL' => $conf['longdescURL'],
00960 'file' => $totalImagePath
00961 );
00962 }
00963
00964 $imgsTag[$imgKey] = $this->IMAGE($imgConf);
00965
00966 // Store the original filepath
00967 $origImages[$imgKey]=$GLOBALS['TSFE']->lastImageInfo;
00968
00969 $imageRowsFinalWidths[floor($a/$colCount)] += $GLOBALS['TSFE']->lastImageInfo[0];
00970 if ($GLOBALS['TSFE']->lastImageInfo[1]>$imageRowsMaxHeights[floor($a/$colCount)]) {
00971 $imageRowsMaxHeights[floor($a/$colCount)] = $GLOBALS['TSFE']->lastImageInfo[1];
00972 }
00973 }
00974 // calculating the tableWidth:
00975 // TableWidth problems: It creates problems if the pictures are NOT as wide as the tableWidth.
00976 $tableWidth = max($imageRowsFinalWidths)+ $colspacing*($colCount-1) + $colCount*$border*$borderThickness*2;
00977
00978 // make table for pictures
00979 $index=$imgStart;
00980
00981 $noRows = $this->stdWrap($conf['noRows'],$conf['noRows.']);
00982 $noCols = $this->stdWrap($conf['noCols'],$conf['noCols.']);
00983 if ($noRows) {$noCols=0;} // noRows overrides noCols. They cannot exist at the same time.
00984 if ($equalHeight) {
00985 $noCols=1;
00986 $noRows=0;
00987 }
00988
00989 $rowCount_temp=1;
00990 $colCount_temp=$colCount;
00991 if ($noRows) {
00992 $rowCount_temp = $rowCount;
00993 $rowCount=1;
00994 }
00995 if ($noCols) {
00996 $colCount=1;
00997 }
00998 // col- and rowspans calculated
00999 $colspan = (($colspacing) ? $colCount*2-1 : $colCount);
01000 $rowspan = (($rowspacing) ? $rowCount*2-1 : $rowCount) + $cap;
01001
01002
01003 // Edit icons:
01004 $editIconsHTML = $conf['editIcons']&&$GLOBALS['TSFE']->beUserLogin ? $this->editIcons('',$conf['editIcons'],$conf['editIcons.']) : '';
01005
01006 // strech out table:
01007 $tablecode='';
01008 $flag=0;
01009 if ($conf['noStretchAndMarginCells']!=1) {
01010 $tablecode.='<tr>';
01011 if ($txtMarg && $align=='right') { // If right aligned, the textborder is added on the right side
01012 $tablecode.='<td rowspan="'.($rowspan+1).'" valign="top"><img src="'.$GLOBALS['TSFE']->absRefPrefix.'clear.gif" width="'.$txtMarg.'" height="1" alt="" title="" />'.($editIconsHTML?'<br />'.$editIconsHTML:'').'</td>';
01013 $editIconsHTML='';
01014 $flag=1;
01015 }
01016 $tablecode.='<td colspan="'.$colspan.'"><img src="'.$GLOBALS['TSFE']->absRefPrefix.'clear.gif" width="'.$tableWidth.'" height="1" alt="" /></td>';
01017 if ($txtMarg && $align=='left') { // If left aligned, the textborder is added on the left side
01018 $tablecode.='<td rowspan="'.($rowspan+1).'" valign="top"><img src="'.$GLOBALS['TSFE']->absRefPrefix.'clear.gif" width="'.$txtMarg.'" height="1" alt="" title="" />'.($editIconsHTML?'<br />'.$editIconsHTML:'').'</td>';
01019 $editIconsHTML='';
01020 $flag=1;
01021 }
01022 if ($flag) $tableWidth+=$txtMarg+1;
01023 // $tableWidth=0;
01024 $tablecode.='</tr>';
01025 }
01026
01027 // draw table
01028 for ($c=0;$c<$rowCount;$c++) { // Looping through rows. If 'noRows' is set, this is '1 time', but $rowCount_temp will hold the actual number of rows!
01029 if ($c && $rowspacing) { // If this is NOT the first time in the loop AND if space is required, a row-spacer is added. In case of "noRows" rowspacing is done further down.
01030 $tablecode.='<tr><td colspan="'.$colspan.'"><img src="'.$GLOBALS['TSFE']->absRefPrefix.'clear.gif" width="1" height="'.$rowspacing.'" border="0" alt="" title="" /></td></tr>';
01031 }
01032 $tablecode.='<tr>'; // starting row
01033 for ($b=0; $b<$colCount_temp; $b++) { // Looping through the columns
01034 if ($b && $colspacing) { // If this is NOT the first iteration AND if column space is required. In case of "noCols", the space is done without a separate cell.
01035 if (!$noCols) {
01036 $tablecode.='<td><img src="'.$GLOBALS['TSFE']->absRefPrefix.'clear.gif" width="'.$colspacing.'" height="1" border="0" alt="" title="" /></td>';
01037 } else {
01038 $colSpacer='<img src="'.$GLOBALS['TSFE']->absRefPrefix.'clear.gif" width="'.($border?$colspacing-6:$colspacing).'" height="'.($imageRowsMaxHeights[$c]+($border?$borderThickness*2:0)).'" border="0" align="'.($border?'left':'top').'" alt="" title="" />';
01039 $colSpacer='<td valign="top">'.$colSpacer.'</td>'; // added 160301, needed for the new "noCols"-table...
01040 $tablecode.=$colSpacer;
01041 }
01042 }
01043 if (!$noCols || ($noCols && !$b)) {
01044 $tablecode.='<td valign="top">'; // starting the cell. If "noCols" this cell will hold all images in the row, otherwise only a single image.
01045 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.
01046 }
01047 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.
01048 $imgIndex = $index+$a*$colCount_temp;
01049 if ($imgsTag[$imgIndex]) {
01050 if ($rowspacing && $noRows && $a) { // Puts distance between the images IF "noRows" is set and this is the first iteration of the loop
01051 $tablecode.= '<img src="'.$GLOBALS['TSFE']->absRefPrefix.'clear.gif" width="1" height="'.$rowspacing.'" alt="" title="" /><br />';
01052 }
01053
01054 $imageHTML = $imgsTag[$imgIndex].'<br />';
01055 $Talign = (!trim($captionArray[$imgIndex]) && !$noRows && !$conf['netprintApplicationLink']) ? ' align="left"' : ''; // this is necessary if the tablerows are supposed to space properly together! "noRows" is excluded because else the images "layer" together.
01056 if ($border) {$imageHTML='<table border="0" cellpadding="'.$borderThickness.'" cellspacing="0" bgcolor="'.$borderColor.'"'.$Talign.'><tr><td>'.$imageHTML.'</td></tr></table>';} // break-tag added 160301 , ($noRows?'':' align="left"') removed 160301, break tag removed 160301 (later...)
01057 $imageHTML.=$editIconsHTML; $editIconsHTML='';
01058 if ($conf['netprintApplicationLink']) {$imageHTML = $this->netprintApplication_offsiteLinkWrap($imageHTML,$origImages[$imgIndex],$conf['netprintApplicationLink.']);}
01059 $imageHTML.=$captionArray[$imgIndex]; // Adds caption.
01060 if ($noCols) {$imageHTML='<td valign="top">'.$imageHTML.'</td>';} // If noCols, put in table cell.
01061 $tablecode.=$imageHTML;
01062 }
01063 }
01064 $index++;
01065 if (!$noCols || ($noCols && $b+1==$colCount_temp)) {
01066 if ($noCols) {$tablecode.='</tr></table>';} // In case of "noCols" we must finish the table that surrounds the images in the row.
01067 $tablecode.='</td>'; // Ending the cell. In case of "noCols" the cell holds all pictures!
01068 }
01069 }
01070 $tablecode.='</tr>'; // ending row
01071 }
01072 if ($c) {
01073 // Table-tag is inserted
01074 $i=$contentPosition;
01075 $table_align = (($i==16) ? 'align="'.$align.'"' : '');
01076 $tablecode = '<table'.($tableWidth?' width="'.$tableWidth.'"':'').' border="0" cellspacing="0" cellpadding="0" '.$table_align.' class="imgtext-table">'.$tablecode;
01077 if ($editIconsHTML) { // IF this value is not long since reset.
01078 $tablecode.='<tr><td colspan="'.$colspan.'">'.$editIconsHTML.'</td></tr>';
01079 $editIconsHTML='';
01080 }
01081 if ($cap) {
01082 $tablecode.='<tr><td colspan="'.$colspan.'" align="'.$caption_align.'">'.$caption.'</td></tr>';
01083 }
01084 $tablecode.='</table>';
01085 if ($conf['tableStdWrap.']) {$tablecode=$this->stdWrap($tablecode,$conf['tableStdWrap.']);}
01086 }
01087
01088 $spaceBelowAbove = intval($this->stdWrap($conf['spaceBelowAbove'],$conf['spaceBelowAbove.']));
01089 switch ($contentPosition) {
01090 case '0': // above
01091 $output= '<div align="'.$align.'">'.$tablecode.'</div>'.$this->wrapSpace($content, $spaceBelowAbove.'|0');
01092 break;
01093 case '8': // below
01094 $output= $this->wrapSpace($content, '0|'.$spaceBelowAbove).'<div align="'.$align.'">'.$tablecode.'</div>';
01095 break;
01096 case '16': // in text
01097 $output= $tablecode.$content;
01098 break;
01099 case '24': // in text, no wrap
01100 $theResult = '';
01101 $theResult.= '<table border="0" cellspacing="0" cellpadding="0" class="imgtext-nowrap"><tr>';
01102 if ($align=='right') {
01103 $theResult.= '<td valign="top">'.$content.'</td><td valign="top">'.$tablecode.'</td>';
01104 } else {
01105 $theResult.= '<td valign="top">'.$tablecode.'</td><td valign="top">'.$content.'</td>';
01106 }
01107 $theResult.= '</tr></table>';
01108 $output= $theResult;
01109 break;
01110 }
01111 } else {
01112 $output= $content;
01113 }
01114
01115 if ($conf['stdWrap.']) {
01116 $output = $this->stdWrap($output, $conf['stdWrap.']);
01117 }
01118
01119 return $output;
01120 }
|
|
||||||||||||
|
Rendering the cObject, LOAD_REGISTER and RESTORE_REGISTER NOTICE: This cObject does NOT return any content since it just sets internal data based on the TypoScript properties.
Definition at line 1484 of file class.tslib_content.php. References stdWrap(). Referenced by cObjGetSingle(). 01484 {
01485 if ($name=='RESTORE_REGISTER') {
01486 $GLOBALS['TSFE']->register = array_pop($GLOBALS['TSFE']->registerStack);
01487 } else {
01488 array_push($GLOBALS['TSFE']->registerStack,$GLOBALS['TSFE']->register);
01489 if (is_array($conf)) {
01490 reset($conf);
01491 while(list($theKey,$theValue)=each($conf)) {
01492 if (!strstr($theKey,'.') || !isset($conf[substr($theKey,0,-1)])) { // Only if 1) the property is set but not the value itself, 2) the value and/or any property
01493 if (strstr($theKey,'.')) {
01494 $theKey = substr($theKey,0,-1);
01495 }
01496 $GLOBALS['TSFE']->register[$theKey] = $this->stdWrap($conf[$theKey],$conf[$theKey.'.']);
01497 }
01498 }
01499 }
01500 }
01501 return '';
01502 }
|
|
|
Rendering the cObject, OTABLE.
Definition at line 1340 of file class.tslib_content.php. Referenced by cObjGetSingle(). 01340 {
01341 $controlTable = t3lib_div::makeInstance('tslib_tableOffset');
01342 if ($conf['tableParams']) {
01343 $controlTable->tableParams = $conf['tableParams'];
01344 }
01345 return $controlTable->start($this->cObjGet($conf),$conf['offset']);
01346 }
|
|
|
Rendering the cObject, RECORDS.
Definition at line 1192 of file class.tslib_content.php. References $data, $val, debug(), lastChanged(), RECORDS(), stdWrap(), and table(). Referenced by cObjGetSingle(), and RECORDS(). 01192 {
01193 $theValue='';
01194
01195 $originalRec = $GLOBALS['TSFE']->currentRecord;
01196 if ($originalRec) { // If the currentRecord is set, we register, that this record has invoked this function. It's should not be allowed to do this again then!!
01197 $GLOBALS['TSFE']->recordRegister[$originalRec]++;
01198 }
01199
01200 $conf['source'] = $this->stdWrap($conf['source'],$conf['source.']);
01201 if ($conf['tables'] && $conf['source']) {
01202 $allowedTables = $conf['tables'];
01203 if (is_array($conf['conf.'])) {
01204 reset($conf['conf.']);
01205 while(list($k)=each($conf['conf.'])) {
01206 if (substr($k,-1)!='.') $allowedTables.=','.$k;
01207 }
01208 }
01209
01210 $loadDB = t3lib_div::makeInstance('FE_loadDBGroup');
01211 $loadDB->start($conf['source'], $allowedTables);
01212 reset($loadDB->tableArray);
01213 while(list($table,)=each($loadDB->tableArray)) {
01214 if (is_array($GLOBALS['TCA'][$table])) {
01215 $loadDB->additionalWhere[$table]=$this->enableFields($table);
01216 }
01217 }
01218 $loadDB->getFromDB();
01219
01220 reset($loadDB->itemArray);
01221 $data = $loadDB->results;
01222
01223 $cObj =t3lib_div::makeInstance('tslib_cObj');
01224 $cObj->setParent($this->data,$this->currentRecord);
01225 $this->currentRecordNumber=0;
01226 $this->currentRecordTotal = count($loadDB->itemArray);
01227 reset($loadDB->itemArray);
01228 while(list(,$val)=each($loadDB->itemArray)) {
01229 $row = $data[$val['table']][$val['id']];
01230
01231 // Versioning preview:
01232 $GLOBALS['TSFE']->sys_page->versionOL($val['table'],$row);
01233
01234 // Language Overlay:
01235 if ($GLOBALS['TSFE']->sys_language_contentOL) {
01236 $row = $GLOBALS['TSFE']->sys_page->getRecordOverlay($val['table'],$row,$GLOBALS['TSFE']->sys_language_content,$GLOBALS['TSFE']->sys_language_contentOL);
01237 }
01238
01239 if (is_array($row)) { // Might be unset in the content overlay things...
01240 if (!$conf['dontCheckPid']) {
01241 $row = $this->checkPid($row['pid']) ? $row : '';
01242 }
01243 if ($row && !$GLOBALS['TSFE']->recordRegister[$val['table'].':'.$val['id']]) {
01244 $renderObjName = $conf['conf.'][$val['table']] ? $conf['conf.'][$val['table']] : '<'.$val['table'];
01245 $renderObjKey = $conf['conf.'][$val['table']] ? 'conf.'.$val['table'] : '';
01246 $renderObjConf = $conf['conf.'][$val['table'].'.'];
01247 $this->currentRecordNumber++;
01248 $cObj->parentRecordNumber=$this->currentRecordNumber;
01249 $GLOBALS['TSFE']->currentRecord = $val['table'].':'.$val['id'];
01250 $this->lastChanged($row['tstamp']);
01251 $cObj->start($row,$val['table']);
01252 if ($GLOBALS['TSFE']->config['config']['insertDmailerBoundaries']) {$theValue.='<!--DMAILER_SECTION_BOUNDARY_'.intval($row['module_sys_dmail_category']).'-->';}
01253 $theValue.=$cObj->cObjGetSingle($renderObjName, $renderObjConf, $renderObjKey);
01254 if ($GLOBALS['TSFE']->config['config']['insertDmailerBoundaries']) {$theValue.='<!--DMAILER_SECTION_BOUNDARY_END-->';}
01255 }# else debug($GLOBALS['TSFE']->recordRegister,'RECORDS');
01256 }
01257 }
01258 }
01259 $GLOBALS['TSFE']->currentRecord = $originalRec; // Restore
01260 return $this->wrap($theValue,$conf['wrap']);
01261 }
|
|
|
Sets the "current" value.
Definition at line 399 of file class.tslib_content.php. Referenced by FORM(), and TEMPLATE(). 00399 {
00400 $this->data[$this->currentValKey] = $value;
00401 }
|
|
||||||||||||
|
Sets the internal variable parentRecord with information about current record. If the tslib_cObj was started from CONTENT, RECORD or SEARCHRESULT cObject's this array has two keys, 'data' and 'currentRecord' which indicates the record and data for the parent cObj.
Definition at line 363 of file class.tslib_content.php. 00363 {
00364 $this->parentRecord=array('data'=>$data, 'currentRecord'=>$currentRecord);
00365 }
|
|
||||||||||||
|
Class constructor. Well, it has to be called manually since it is not a real constructor function. So after making an instance of the class, call this function and pass to it a database record and the tablename from where the record is from. That will then become the "current" record loaded into memory and accessed by the .fields property found in eg. stdWrap.
Definition at line 348 of file class.tslib_content.php. 00348 {
00349 $this->data = $data;
00350 $this->currentRecord = $table ? $table.':'.$this->data['uid'] : '';
00351 $this->parameters = Array();
00352 }
|
|
|
Rendering the cObject, TEXT.
Definition at line 593 of file class.tslib_content.php. References stdWrap(). Referenced by cObjGetSingle(). 00593 {
00594 return $this->stdWrap($conf['value'],$conf);
00595 }
|
|
||||||||||||
|
Rendering the cObject, USER and USER_INT.
Definition at line 659 of file class.tslib_content.php. References $content. Referenced by cObjGetSingle(). 00659 {
00660 $content='';
00661 switch($ext) {
00662 case 'INT':
00663 $substKey = $ext.'_SCRIPT.'.$GLOBALS['TSFE']->uniqueHash();
00664 $content.='<!--'.$substKey.'-->';
00665 $GLOBALS['TSFE']->config[$ext.'incScript'][$substKey] = array(
00666 'file' => $incFile,
00667 'conf' => $conf,
00668 'cObj' => serialize($this),
00669 'type' => 'FUNC'
00670 );
00671 break;
00672 default:
00673 $content.=$this->callUserFunction($conf['userFunc'],$conf,'');
00674 break;
00675 }
00676 return $content;
00677 }
|
|
|
Definition at line 251 of file class.tslib_content.php. Referenced by IMGTEXT(). |
|
|
Definition at line 320 of file class.tslib_content.php. |
|
|
Initial value: array(
'áéúíâêûôîæøåäöü',
'ÁÉÚÍÄËÜÖÏÆØÅÄÖÜ'
)
Definition at line 252 of file class.tslib_content.php. |
|
|
Definition at line 333 of file class.tslib_content.php. |
|
|
Definition at line 332 of file class.tslib_content.php. |
|
|
Definition at line 323 of file class.tslib_content.php. |
|
|
Definition at line 325 of file class.tslib_content.php. |
|
|
Definition at line 324 of file class.tslib_content.php. |
|
|
Definition at line 322 of file class.tslib_content.php. |
|
|
Loaded with the current data-record. If the instance of this class is used to render records from the database those records are found in this array. The function stdWrap has TypoScript properties that fetch field-data from this array.
Definition at line 318 of file class.tslib_content.php. |
|
|
Initial value: Array(
10 => Array('params'=>'', 'ext'=>'gif'),
11 => Array('params'=>'-colors 128', 'ext'=>'gif'),
12 => Array('params'=>'-colors 64', 'ext'=>'gif'),
13 => Array('params'=>'-colors 32', 'ext'=>'gif'),
14 => Array('params'=>'-colors 16', 'ext'=>'gif'),
15 => Array('params'=>'-colors 8', 'ext'=>'gif'),
30 => Array('params'=>'-colors 256', 'ext'=>'png'),
31 => Array('params'=>'-colors 128', 'ext'=>'png'),
32 => Array('params'=>'-colors 64', 'ext'=>'png'),
33 => Array('params'=>'-colors 32', 'ext'=>'png'),
34 => Array('params'=>'-colors 16', 'ext'=>'png'),
35 => Array('params'=>'-colors 8', 'ext'=>'png'),
39 => Array('params'=>'', 'ext'=>'png'),
20 => Array('params'=>'-quality 100', 'ext'=>'jpg'),
21 => Array('params'=>'-quality 90', 'ext'=>'jpg'),
22 => Array('params'=>'-quality 80', 'ext'=>'jpg'),
23 => Array('params'=>'-quality 70', 'ext'=>'jpg'),
24 => Array('params'=>'-quality 60', 'ext'=>'jpg'),
25 => Array('params'=>'-quality 50', 'ext'=>'jpg'),
26 => Array('params'=>'-quality 40', 'ext'=>'jpg'),
27 => Array('params'=>'-quality 30', 'ext'=>'jpg'),
28 => Array('params'=>'-quality 20', 'ext'=>'jpg')
)
Definition at line 267 of file class.tslib_content.php. Referenced by IMGTEXT(). |
|
|
Initial value: Array(
1 => '-rotate 90',
2 => '-rotate 270',
3 => '-rotate 180',
10 => '-colorspace GRAY',
11 => '-sharpen 70',
20 => '-normalize',
23 => '-contrast',
25 => '-gamma 1.3',
26 => '-gamma 0.8'
)
Definition at line 299 of file class.tslib_content.php. Referenced by IMGTEXT(). |
|
|
Definition at line 331 of file class.tslib_content.php. |
|
|
Definition at line 335 of file class.tslib_content.php. |
|
|
Definition at line 334 of file class.tslib_content.php. |
|
|
Definition at line 319 of file class.tslib_content.php. |
|
|
Definition at line 321 of file class.tslib_content.php. |
|
|
Definition at line 327 of file class.tslib_content.php. |
|
|
Definition at line 326 of file class.tslib_content.php. |
|
|
Definition at line 337 of file class.tslib_content.php. |
|
|
Definition at line 328 of file class.tslib_content.php. |
|
|
Definition at line 336 of file class.tslib_content.php. |
1.3.8-20040913