Main Page | Directories | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages | Examples

tslib_cObj Class Reference

List of all members.

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()

Member Function Documentation

tslib_cObj::CASEFUNC conf  ) 
 

Rendering the cObject, CASE.

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=364&cHash=cffedd09e3

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    }

tslib_cObj::CLEARGIF conf  ) 
 

Rendering the cObject, CLEARGIF.

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=355&cHash=70c0f19915

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    }

tslib_cObj::COBJ_ARRAY conf,
ext = ''
 

Rendering the cObject, COBJ_ARRAY / COA and COBJ_ARRAY_INT.

Parameters:
array Array of TypoScript properties
string If "INT" then the cObject is a "COBJ_ARRAY_INT" (non-cached), otherwise just "COBJ_ARRAY" (cached)
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=351&cHash=a09db0329c

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    }

tslib_cObj::cObjGet setup,
addKey = ''
 

Rendering of a "numerical array" of cObjects from TypoScript Will call ->cObjGetSingle() for each cObject found and accumulate the output.

Parameters:
array $setup: Array with cObjects as values.
string $addKey: A prefix for the debugging information
Returns:
string Rendered output from the cObjects in the array.
See also:
cObjGetSingle()

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    }

tslib_cObj::cObjGetSingle name,
conf,
TSkey = '__'
 

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    }

tslib_cObj::COLUMNS conf  ) 
 

Rendering the cObject, COLUMNS.

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=361&cHash=7e4e228cad

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    }

tslib_cObj::CONTENT conf  ) 
 

Rendering the cObject, CONTENT.

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=356&cHash=9f3b5c6ba2

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    }

tslib_cObj::CTABLE conf  ) 
 

Rendering the cObject, CTABLE.

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=359&cHash=2e0065b4e7

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    }

tslib_cObj::FILE conf  ) 
 

Rendering the cObject, FILE.

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=352&cHash=379c60f8bc

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    }

tslib_cObj::FORM conf,
formData = ''
 

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....');

  • corresponds to the $conf['data'] value being : Name:|name=input, 25 |Default value....||Email:|email=input, 25 |Default value for email....

If $formData is an array the value of $conf['data'] is ignored.

Parameters:
array Array of TypoScript properties
array Alternative formdata overriding whatever comes from TypoScript
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=367&cHash=bbc518d930

Definition at line 1524 of file class.tslib_content.php.

References $a, $content, $data, $hiddenfields, $val, getFieldDefaultValue(), IMAGE(), setCurrentVal(), and stdWrap().

Referenced by cObjGetSingle().

tslib_cObj::getCurrentVal  ) 
 

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.

Returns:
mixed The "current" value

Definition at line 388 of file class.tslib_content.php.

00388                               {
00389       return $this->data[$this->currentValKey];
00390    }

tslib_cObj::HMENU conf  ) 
 

Rendering the cObject, HMENU.

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=358&cHash=5400c1c06a

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    }

tslib_cObj::HRULER conf  ) 
 

Rendering the cObject, HRULER.

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=362&cHash=2a462aa084

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    }

tslib_cObj::HTML conf  ) 
 

Rendering the cObject, HTML.

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=349&cHash=d3fd0c70b4

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    }

tslib_cObj::IMAGE conf  ) 
 

Rendering the cObject, IMAGE.

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=353&cHash=440681ea56 cImage()

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    }

tslib_cObj::IMG_RESOURCE conf  ) 
 

Rendering the cObject, IMG_RESOURCE.

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=354&cHash=46f9299706 getImgResource()

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    }

tslib_cObj::IMGTEXT conf  ) 
 

Rendering the cObject, IMGTEXT.

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=363&cHash=cf2969bce1

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    }

tslib_cObj::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.

Parameters:
array Array of TypoScript properties
string If "RESTORE_REGISTER" then the cObject rendered is "RESTORE_REGISTER", otherwise "LOAD_REGISTER"
Returns:
string Empty string (the cObject only sets internal data!) &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=365&cHash=4935524e2e http://typo3.org/doc.0.html?&tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=366&cHash=4f9485e8cc

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    }

tslib_cObj::OTABLE conf  ) 
 

Rendering the cObject, OTABLE.

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=360&cHash=02c9552d38

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    }

tslib_cObj::RECORDS conf  ) 
 

Rendering the cObject, RECORDS.

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=357&cHash=303e959472

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    }

tslib_cObj::setCurrentVal value  ) 
 

Sets the "current" value.

Parameters:
mixed The variable that you want to set as "current"
Returns:
void
See also:
getCurrentVal()

Definition at line 399 of file class.tslib_content.php.

Referenced by FORM(), and TEMPLATE().

00399                                     {
00400       $this->data[$this->currentValKey] = $value;
00401    }

tslib_cObj::setParent data,
currentRecord
 

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.

Parameters:
array $data: The record array
string 
currentRecord
This is set to the [table]:[uid] of the record delivered in the
data-array, if the cObjects CONTENT or RECORD is in operation. Note that $GLOBALS['TSFE']->currentRecord is set to an equal value but always indicating the latest record rendered.
Returns:
void private

Definition at line 363 of file class.tslib_content.php.

00363                                              {
00364       $this->parentRecord=array('data'=>$data, 'currentRecord'=>$currentRecord);
00365    }

tslib_cObj::start data,
table = ''
 

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.

Parameters:
array $data the record data that is rendered.
string $table the table that the data record is from.
Returns:
void

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    }

tslib_cObj::TEXT conf  ) 
 

Rendering the cObject, TEXT.

Parameters:
array Array of TypoScript properties
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=350&cHash=b49de28f83

Definition at line 593 of file class.tslib_content.php.

References stdWrap().

Referenced by cObjGetSingle().

00593                         {
00594       return $this->stdWrap($conf['value'],$conf);
00595    }

tslib_cObj::USER conf,
ext = ''
 

Rendering the cObject, USER and USER_INT.

Parameters:
array Array of TypoScript properties
string If "INT" then the cObject is a "USER_INT" (non-cached), otherwise just "USER" (cached)
Returns:
string Output &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=369&cHash=b623aca0a9

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    }


Member Data Documentation

tslib_cObj::$align = Array ('center', 'right', 'left')
 

Definition at line 251 of file class.tslib_content.php.

Referenced by IMGTEXT().

tslib_cObj::$alternativeData = ''
 

Definition at line 320 of file class.tslib_content.php.

tslib_cObj::$caseConvStrings
 

Initial value:

 array(
         'áéúíâêûôîæøåäöü',
         'ÁÉÚÍÄËÜÖÏÆØÅÄÖÜ'
      )

Definition at line 252 of file class.tslib_content.php.

tslib_cObj::$checkPid_badDoktypeList = '255'
 

Definition at line 333 of file class.tslib_content.php.

tslib_cObj::$checkPid_cache = Array()
 

Definition at line 332 of file class.tslib_content.php.

tslib_cObj::$currentRecord = ''
 

Definition at line 323 of file class.tslib_content.php.

tslib_cObj::$currentRecordNumber = 0
 

Definition at line 325 of file class.tslib_content.php.

tslib_cObj::$currentRecordTotal = 0
 

Definition at line 324 of file class.tslib_content.php.

tslib_cObj::$currentValKey = 'currentValue_kidjls9dksoje'
 

Definition at line 322 of file class.tslib_content.php.

tslib_cObj::$data = Array()
 

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.

See also:
init()

Definition at line 318 of file class.tslib_content.php.

Referenced by FORM(), and RECORDS().

tslib_cObj::$image_compression
 

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')
   )
Holds ImageMagick parameters and extensions used for compression.

See also:
IMGTEXT()
0= Default 1= Dont change! (removes all parameters for the image_object!!) 1x = GIFs 2x = JPGs

Definition at line 267 of file class.tslib_content.php.

Referenced by IMGTEXT().

tslib_cObj::$image_effects
 

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'
   )
ImageMagick parameters for image effects.

See also:
IMGTEXT()

Definition at line 299 of file class.tslib_content.php.

Referenced by IMGTEXT().

tslib_cObj::$INT_include = 0
 

Definition at line 331 of file class.tslib_content.php.

tslib_cObj::$lastTypoLinkTarget = ''
 

Definition at line 335 of file class.tslib_content.php.

tslib_cObj::$lastTypoLinkUrl = ''
 

Definition at line 334 of file class.tslib_content.php.

tslib_cObj::$oldData = Array()
 

Definition at line 319 of file class.tslib_content.php.

tslib_cObj::$parameters = Array()
 

Definition at line 321 of file class.tslib_content.php.

tslib_cObj::$parentRecord = array()
 

Definition at line 327 of file class.tslib_content.php.

tslib_cObj::$parentRecordNumber = 0
 

Definition at line 326 of file class.tslib_content.php.

tslib_cObj::$recordRegister = array()
 

Definition at line 337 of file class.tslib_content.php.

tslib_cObj::$regObj
 

Definition at line 328 of file class.tslib_content.php.

tslib_cObj::$substMarkerCache = array()
 

Definition at line 336 of file class.tslib_content.php.


The documentation for this class was generated from the following file:
Generated on Sun Oct 3 01:07:34 2004 for TYPO3core 3.7.0 dev by  doxygen 1.3.8-20040913