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

template.php File Reference

Go to the source code of this file.

Namespaces

namespace  TYPO3

Classes

class  template
class  bigDoc
 Extension class for "template" - used for backend pages which are wide. More...
class  noDoc
 Extension class for "template" - used for backend pages without the "document" background image The class were more significant in the past than today. More...
class  smallDoc
 Extension class for "template" - used for backend pages which were narrow (like the Web>List modules list frame. More...
class  mediumDoc
 Extension class for "template" - used for backend pages which were medium wide. More...

Functions

 fw ($str)
 Depreciated fontwrap function.
 viewPageIcon ($id, $backPath, $addParams='hspace="3"')
 Makes link to page $id in frontend (view page) Returns an magnifier-glass icon which links to the frontend index.php document for viewing the page with id $id $id must be a page-uid If the BE_USER has access to Web>List then a link to that module is shown as well (with return-url).
 issueCommand ($params, $rUrl='')
 Returns a URL with a command to TYPO3 Core Engine (tce_db.php) See description of the API elsewhere.
 isCMlayers ()
 Returns true if click-menu layers can be displayed for the current user/browser Use this to test if click-menus (context sensitive menus) can and should be displayed in the backend.
 thisBlur ()
 Returns 'this.blur();' if the client supports CSS styles Use this in links to remove the underlining after being clicked.
 helpStyle ()
 Returns ' style='cursor:help;'' if the client supports CSS styles Use for -links to help texts.
 getHeader ($table, $row, $path, $noViewPageIcon=0, $tWrap=array('',''))
 Makes the header (icon+title) for a page (or other record).
 getFileheader ($title, $path, $iconfile)
 Like ->getHeader() but for files in the File>* main module/submodules Returns the file-icon with the path of the file set in the alt/title attribute.
 makeShortcutIcon ($gvList, $setList, $modName, $motherModName="")
 Returns a linked shortcut-icon which will call the shortcut frame and set a shortcut there back to the calling page/module.
 makeShortcutUrl ($gvList, $setList)
 MAKE url for storing Internal func.
 formWidth ($size=48, $textarea=0, $styleOverride='')
 Returns <input> attributes to set the width of an text-type input field.
 formWidthText ($size=48, $styleOverride='', $wrap='')
 This function is dedicated to textareas, which has the wrapping on/off option to observe.
 redirectUrls ($thisLocation='')
 Returns JavaScript variables setting the returnUrl and thisScript location for use by JavaScript on the page.
 formatTime ($tstamp, $type)
 Returns a formatted string of $tstamp Uses $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'] and $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] to format date and time.
 parseTime ()
 Returns script parsetime IF ->parseTimeFlag is set and user is "admin" Automatically outputted in page end.
 startPage ($title)
 Returns page start This includes the proper header with charset, title, meta tag and beginning body-tag.
 endPage ()
 Returns page end; This includes finishing form, div, body and html tags.
 header ($text)
 Returns the header-bar in the top of most backend modules Closes section if open.
 section ($label, $text, $nostrtoupper=FALSE, $sH=FALSE, $type=0, $allowHTMLinHeader=FALSE)
 Begins an output section and sets header and content.
 divider ($dist)
 Inserts a divider image Ends a section (if open) before inserting the image.
 spacer ($dist)
 Returns a blank
-section with a height.

 sectionHeader ($label, $sH=FALSE, $addAttrib='')
 Make a section header.
 sectionBegin ()
 Begins an output section.
 sectionEnd ()
 Ends and output section Returns the -end tag AND clears the ->sectionFlag (but does so only IF the sectionFlag is set - that is a section is 'open') See sectionBegin() also.
 middle ()
 Originally it printed a kind of divider.
 endPageJS ()
 If a form-tag is defined in ->form then and end-tag for that <form> element is outputted Further a JavaScript section is outputted which will update the top.busy session-expiry object (unless $this->endJS is set to false).
 docBodyTagBegin ()
 Creates the bodyTag.
 docStyle ()
 Outputting document style.
 insertStylesAndJS ($content)
 Insert post rendering document style into already rendered content This is needed for extobjbase.
 initCharset ()
 Initialize the charset.
 generator ()
 Returns generator meta tag.
 icons ($type, $styleAttribValue='')
 Returns an image-tag with an 18x16 icon of the following types:.
 t3Button ($onClick, $label)
 Returns an <input> button with the $onClick action and $label.
 dfw ($string)
 dimmed-fontwrap.
 rfw ($string)
 red-fontwrap.
 wrapInCData ($string)
 Returns string wrapped in CDATA "tags" for XML / XHTML (wrap content of <script> and <style> sections in those!).
 wrapScriptTags ($string, $linebreak=TRUE)
 Wraps the input string in script tags.
 table ($arr, $layout='')
 Returns a table based on the input $arr.
 menuTable ($arr1, $arr2=array(), $arr3=array())
 Constructs a table with content from the $arr1, $arr2 and $arr3.
 funcMenu ($content, $menu)
 Returns a one-row/two-celled table with $content and $menu side by side.
 clearCacheMenu ($id, $addSaveOptions=0)
 Creates a selector box with clear-cache items.
 getContextMenuCode ()
 Returns an array with parts (JavaScript, init-functions,
-layers) for use on pages which displays the clickmenu layers (context sensitive menus).

 getTabMenu ($mainParams, $elementName, $currentValue, $menuItems, $script='', $addparams='')
 Creates a tab menu from an array definition.
 getTabMenuRaw ($menuItems)
 Creates the HTML content for the tab menu.
 getDynTabMenu ($menuItems, $identString, $toggle=0, $foldout=FALSE, $newRowCharLimit=50, $noWrap=1, $fullWidth=FALSE, $defaultTabIndex=1)
 Creates a DYNAMIC tab-menu where the tabs are switched between with DHTML.
 getDynTabMenuJScode ()
 Returns dynamic tab menu header JS code.
 getVersionSelector ($id, $noAction=FALSE)
 Creates the version selector for the page id inputted.

Variables

 $tableLayout
 $table_TR = '<tr>'
 $table_TABLE = '<table border="0" cellspacing="0" cellpadding="0" id="typo3-tmpltable">'
 $LANG = t3lib_div::makeInstance('language')
 $TBE_TEMPLATE = t3lib_div::makeInstance('template')


Function Documentation

clearCacheMenu id,
addSaveOptions = 0
 

Creates a selector box with clear-cache items.

Rather specialized functions - at least don't use it with $addSaveOptions unless you know what you do...

Parameters:
integer The page uid of the "current page" - the one that will be cleared as "clear cache for this page".
boolean If $addSaveOptions is set, then also the array of save-options for TCE_FORMS will appear.
Returns:
string <select> tag with content - a selector box for clearing the cache

Definition at line 1185 of file template.php.

01185                                                    {
01186       global $BE_USER;
01187       $opt=$addOptions;
01188       if ($addSaveOptions) {
01189          $opt[]='<option value="">'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.menu',1).'</option>';
01190          $opt[]='<option value="TBE_EDITOR_checkAndDoSubmit(1);">'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc',1).'</option>';
01191          $opt[]='<option value="document.editform.closeDoc.value=-2; TBE_EDITOR_checkAndDoSubmit(1);">'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveCloseDoc',1).'</option>';
01192          if ($BE_USER->uc['allSaveFunctions'])  $opt[]='<option value="document.editform.closeDoc.value=-3; TBE_EDITOR_checkAndDoSubmit(1);">'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.saveCloseAllDocs',1).'</option>';
01193          $opt[]='<option value="document.editform.closeDoc.value=2; document.editform.submit();">'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc',1).'</option>';
01194          $opt[]='<option value="document.editform.closeDoc.value=3; document.editform.submit();">'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.closeAllDocs',1).'</option>';
01195          $opt[]='<option value=""></option>';
01196       }
01197       $opt[]='<option value="">[ '.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.clearCache_clearCache',1).' ]</option>';
01198       if ($id) $opt[]='<option value="'.$id.'">'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.clearCache_thisPage',1).'</option>';
01199       if ($BE_USER->isAdmin() || $BE_USER->getTSConfigVal('options.clearCache.pages')) $opt[]='<option value="pages">'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.clearCache_pages',1).'</option>';
01200       if ($BE_USER->isAdmin() || $BE_USER->getTSConfigVal('options.clearCache.all')) $opt[]='<option value="all">'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:rm.clearCache_all',1).'</option>';
01201 
01202       $onChange = 'if (!this.options[this.selectedIndex].value) {
01203             this.selectedIndex=0;
01204          } else if (this.options[this.selectedIndex].value.indexOf(\';\')!=-1) {
01205             eval(this.options[this.selectedIndex].value);
01206          }else{
01207             document.location=\''.$this->backPath.'tce_db.php?vC='.$BE_USER->veriCode().'&redirect='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')).'&cacheCmd=\'+this.options[this.selectedIndex].value;
01208          }';
01209       $af_content = '<select name="cacheCmd" onchange="'.htmlspecialchars($onChange).'">'.implode('',$opt).'</select>';
01210 
01211       if (count($opt)>2)   {
01212          return $af_content;
01213       }
01214    }

dfw string  ) 
 

dimmed-fontwrap.

Returns the string wrapped in a -tag defining the color to be gray/dimmed

Parameters:
string Input string
Returns:
string Output string

Definition at line 1017 of file template.php.

01017                            {
01018       return '<span class="typo3-dimmed">'.$string.'</span>';
01019    }

divider dist  ) 
 

Inserts a divider image Ends a section (if open) before inserting the image.

Parameters:
integer The margin-top/-bottom of the
ruler.
Returns:
string HTML content

Definition at line 741 of file template.php.

References sectionEnd().

00741                            {
00742       $dist = intval($dist);
00743       $str='
00744 
00745    <!-- DIVIDER -->
00746    <hr style="margin-top: '.$dist.'px; margin-bottom: '.$dist.'px;" />
00747 ';
00748       return $this->sectionEnd().$str;
00749    }

docBodyTagBegin  ) 
 

Creates the bodyTag.

You can add to the bodyTag by $this->bodyTagAdditions

Returns:
string HTML body tag

Definition at line 860 of file template.php.

Referenced by startPage().

00860                               {
00861       $bodyContent = 'body '.trim($this->bodyTagAdditions.($this->bodyTagId ? ' id="'.$this->bodyTagId.'"' : ''));
00862       return '<'.trim($bodyContent).'>';
00863    }

docStyle  ) 
 

Outputting document style.

Returns:
string HTML style section/link tags

Definition at line 870 of file template.php.

00870                         {
00871 
00872          // Request background image:
00873       if ($this->backGroundImage)   {
00874          $this->inDocStylesArray[]=' BODY { background-image: url('.$this->backPath.$this->backGroundImage.'); }';
00875       }
00876 
00877          // Add inDoc styles variables as well:
00878       $this->inDocStylesArray[] = $this->inDocStyles;
00879       $this->inDocStylesArray[] = $this->inDocStyles_TBEstyle;
00880 
00881          // Implode it all:
00882       $inDocStyles = implode('
00883                ',$this->inDocStylesArray);
00884 
00885          // The default color scheme should also in full be represented in the stylesheet.
00886       $style=trim('
00887          '.($this->styleSheetFile?'<link rel="stylesheet" type="text/css" href="'.$this->backPath.$this->styleSheetFile.'" />':'').'
00888          '.($this->styleSheetFile2?'<link rel="stylesheet" type="text/css" href="'.$this->backPath.$this->styleSheetFile2.'" />':'').'
00889          <style type="text/css" id="internalStyle">
00890             /*<![CDATA[*/
00891                '.trim($inDocStyles).'
00892                /*###POSTCSSMARKER###*/
00893             /*]]>*/
00894          </style>
00895          '.($this->styleSheetFile_post?'<link rel="stylesheet" type="text/css" href="'.$this->backPath.$this->styleSheetFile_post.'" />':'')
00896       )
00897       ;
00898       $this->inDocStyles='';
00899       $this->inDocStylesArray=array();
00900 
00901       return '
00902          '.$style;
00903    }

endPage  ) 
 

Returns page end; This includes finishing form, div, body and html tags.

Returns:
string The HTML end of a page
See also:
startPage()

Definition at line 667 of file template.php.

References endPageJS(), t3lib_BEfunc::getSetUpdateSignal(), parseTime(), section(), and sectionEnd().

00667                         {
00668       $str = $this->sectionEnd().
00669             $this->postCode.
00670             $this->endPageJS().
00671             t3lib_BEfunc::getSetUpdateSignal().
00672             $this->parseTime().
00673             ($this->form?'
00674 </form>':'').
00675             ($this->divClass?'
00676 
00677 <!-- Wrapping DIV-section for whole page END -->
00678 </div>':'').
00679             '
00680 </body>
00681 </html>  ';
00682 
00683          // Logging: Can't find better place to put it:
00684       if (TYPO3_DLOG)   t3lib_div::devLog('END of BACKEND session','',0,array('_FLUSH'=>TRUE));
00685 
00686       return $str;
00687    }

endPageJS  ) 
 

If a form-tag is defined in ->form then and end-tag for that <form> element is outputted Further a JavaScript section is outputted which will update the top.busy session-expiry object (unless $this->endJS is set to false).

Returns:
string HTML content (<script> tag section)

Definition at line 843 of file template.php.

Referenced by endPage().

00843                         {
00844       return ($this->endJS?'
00845    <script type="text/javascript">
00846         /*<![CDATA[*/
00847       if (top.busy && top.busy.loginRefreshed) {
00848          top.busy.loginRefreshed();
00849       }
00850        /*]]>*/
00851    </script>':'');
00852    }

formatTime tstamp,
type
 

Returns a formatted string of $tstamp Uses $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'] and $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] to format date and time.

Parameters:
integer UNIX timestamp, seconds since 1970
integer How much data to show: $type = 1: hhmm, $type = 10: ddmmmyy
Returns:
string Formatted timestamp

Definition at line 546 of file template.php.

00546                                        {
00547       switch($type)  {
00548          case 1: return date($GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'],$tstamp); break;
00549          case 10: return date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'],$tstamp); break;
00550       }
00551    }

formWidth size = 48,
textarea = 0,
styleOverride = ''
 

Returns <input> attributes to set the width of an text-type input field.

For client browsers with no CSS support the cols/size attribute is returned. For CSS compliant browsers (recommended) a ' style="width: ...px;"' is returned.

Parameters:
integer A relative number which multiplied with approx. 10 will lead to the width in pixels
boolean A flag you can set for textareas - DEPRECIATED, use ->formWidthText() for textareas!!!
string A string which will be returned as attribute-value for style="" instead of the calculated width (if CSS is enabled)
Returns:
string Tag attributes for an <input> tag (regarding width)
See also:
formWidthText()

Definition at line 480 of file template.php.

Referenced by formWidthText(), and getSingleField_typeFlex_sheetMenu().

00480                                                               {
00481       $wAttrib = $textarea?'cols':'size';
00482       if (!$GLOBALS['CLIENT']['FORMSTYLE'])  {  // If not setting the width by style-attribute
00483          $size = $size;
00484          $retVal = ' '.$wAttrib.'="'.$size.'"';
00485       } else { // Setting width by style-attribute. 'cols' MUST be avoided with NN6+
00486          $pixels = ceil($size*$this->form_rowsToStylewidth);
00487          $retVal = $styleOverride ? ' style="'.$styleOverride.'"' : ' style="width:'.$pixels.'px;"';
00488       }
00489       return $retVal;
00490    }

formWidthText size = 48,
styleOverride = '',
wrap = ''
 

This function is dedicated to textareas, which has the wrapping on/off option to observe.

EXAMPLE: <textarea rows="10" wrap="off" '.$GLOBALS["TBE_TEMPLATE"]->formWidthText(48,"","off").'> or <textarea rows="10" wrap="virtual" '.$GLOBALS["TBE_TEMPLATE"]->formWidthText(48,"","virtual").'>

Parameters:
integer A relative number which multiplied with approx. 10 will lead to the width in pixels
string A string which will be returned as attribute-value for style="" instead of the calculated width (if CSS is enabled)
string Pass on the wrap-attribute value you use in your <textarea>! This will be used to make sure that some browsers will detect wrapping alright.
Returns:
string Tag attributes for an <input> tag (regarding width)
See also:
formWidth()

Definition at line 505 of file template.php.

References formWidth().

Referenced by getSingleField_typeFlex_sheetMenu().

00505                                                                {
00506       $wTags = $this->formWidth($size,1,$styleOverride);
00507          // Netscape 6+/Mozilla seems to have this ODD problem where there WILL ALWAYS be wrapping with the cols-attribute set and NEVER without the col-attribute...
00508       if (strtolower(trim($wrap))!='off' && $GLOBALS['CLIENT']['BROWSER']=='net' && $GLOBALS['CLIENT']['VERSION']>=5)   {
00509          $wTags.=' cols="'.$size.'"';
00510       }
00511       return $wTags;
00512    }

funcMenu content,
menu
 

Returns a one-row/two-celled table with $content and $menu side by side.

The table is a 100% width table and each cell is aligned left / right

Parameters:
string Content cell content (left)
string Menu cell content (right)
Returns:
string HTML output

Definition at line 1167 of file template.php.

References table().

01167                                        {
01168       return '
01169          <table border="0" cellpadding="0" cellspacing="0" width="100%" id="typo3-funcmenu">
01170             <tr>
01171                <td valign="top" nowrap="nowrap">'.$content.'</td>
01172                <td valign="top" align="right" nowrap="nowrap">'.$menu.'</td>
01173             </tr>
01174          </table>';
01175    }

fw str  ) 
 

Depreciated fontwrap function.

Is just transparent now.

Parameters:
string Input string
Returns:
string Output string (in the old days this was wrapped in <font> tags)

Definition at line 137 of file template.php.

Referenced by tx_install::checkTheDatabase(), tx_install::displayFieldComp(), tx_install::displayFields(), tx_install::displaySuggestions(), endNotes(), and tx_install::typo3conf_edit().

00137                   {
00138    return $str;
00139 }

generator  ) 
 

Returns generator meta tag.

Returns:
string <meta> tag with name "GENERATOR"

Definition at line 944 of file template.php.

Referenced by startPage().

00944                         {
00945       $str = 'TYPO3 '.$GLOBALS['TYPO_VERSION'].', http://typo3.com, &#169; Kasper Sk&#229;rh&#248;j 1998-2004, extensions are copyright of their respective owners.';
00946       return '<meta name="GENERATOR" content="'.$str .'" />';
00947    }

getContextMenuCode  ) 
 

Returns an array with parts (JavaScript, init-functions,

-layers) for use on pages which displays the clickmenu layers (context sensitive menus).

Returns:
array If values are present: [0] = A <script> section for the HTML page header, [1] = onmousemove/onload handler for HTML tag or alike, [2] = Two empty
layers for the context menu

Definition at line 1221 of file template.php.

References $content, and isCMlayers().

01221                                  {
01222       if ($this->isCMlayers())   {
01223          $content='
01224          <script type="text/javascript">
01225          /*<![CDATA[*/
01226             var GLV_gap=10;
01227             var GLV_curLayerX=new Array(0,0);
01228             var GLV_curLayerY=new Array(0,0);
01229             var GLV_curLayerWidth=new Array(0,0);
01230             var GLV_curLayerHeight=new Array(0,0);
01231             var GLV_isVisible=new Array(0,0);
01232             var GLV_x=0;
01233             var GLV_y=0;
01234             var GLV_xRel=0;
01235             var GLV_yRel=0;
01236             var layerObj=new Array();
01237             var layerObjCss=new Array();
01238 
01239                //browsercheck...
01240             function GL_checkBrowser(){   //
01241                this.dom= (document.getElementById);
01242                this.op=  (navigator.userAgent.indexOf("Opera")>-1);
01243                this.op7=  this.op && (navigator.appVersion.indexOf("7")>-1);  // check for Opera version 7
01244                this.konq=  (navigator.userAgent.indexOf("Konq")>-1);
01245                this.ie4= (document.all && !this.dom && !this.op && !this.konq);
01246                this.ie5= (document.all && this.dom && !this.op && !this.konq);
01247                this.ns4= (document.layers && !this.dom && !this.konq);
01248                this.ns5= (!document.all && this.dom && !this.op && !this.konq);
01249                this.ns6= (this.ns5);
01250                this.bw=  (this.ie4 || this.ie5 || this.ns4 || this.ns6 || this.op || this.konq);
01251                return this;
01252             }
01253             bw= new GL_checkBrowser();
01254 
01255                // GL_getObj(obj)
01256             function GL_getObj(obj){   //
01257                nest="";
01258                this.el= (bw.ie4||bw.op7)?document.all[obj]:bw.ns4?eval(nest+"document."+obj):document.getElementById(obj);
01259                   this.css= bw.ns4?this.el:this.el.style;
01260                this.ref= bw.ns4?this.el.document:document;
01261                this.x= (bw.ns4||bw.op)?this.css.left:this.el.offsetLeft;
01262                this.y= (bw.ns4||bw.op)?this.css.top:this.el.offsetTop;
01263                this.height= (bw.ie4||bw.ie5||bw.ns6||this.konq||bw.op7)?this.el.offsetHeight:bw.ns4?this.ref.height:bw.op?this.css.pixelHeight:0;
01264                this.width= (bw.ie4||bw.ie5||bw.ns6||this.konq||bw.op7)?this.el.offsetWidth:bw.ns4?this.ref.width:bw.op?this.css.pixelWidth:0;
01265                return this;
01266             }
01267                // GL_getObjCss(obj)
01268             function GL_getObjCss(obj){   //
01269                return bw.dom? document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?document.layers[obj]:0;
01270             }
01271                // GL_getMouse(event)
01272             function GL_getMouse(event) { //
01273                if (layerObj)  {
01274 //                GLV_x= (bw.ns4||bw.ns5)?event.pageX:(bw.ie4||bw.op)?event.clientX:(event.clientX-2)+document.body.scrollLeft;
01275 //                GLV_y= (bw.ns4||bw.ns5)?event.pageY:(bw.ie4||bw.op)?event.clientY:(event.clientY-2)+document.body.scrollTop;
01276                      // 17/12 2003: When documents run in XHTML standard compliance mode, the old scrollLeft/Top properties of document.body is gone - and for Opera/MSIE we have to use document.documentElement:
01277 
01278                   GLV_xRel = event.clientX-2;
01279                   GLV_yRel = event.clientY-2;
01280                   GLV_x = GLV_xRel + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);
01281                   GLV_y = GLV_yRel + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
01282 
01283                // status = (GLV_x+GLV_gap-GLV_curLayerX[0]) + " | " + (GLV_y+GLV_gap-GLV_curLayerY[0]);
01284                   if (GLV_isVisible[1])   {
01285                      if (outsideLayer(1)) hideSpecific(1);
01286                   } else if (GLV_isVisible[0])  {
01287                      if (outsideLayer(0)) hideSpecific(0);
01288                   }
01289                }
01290             }
01291                // outsideLayer(level)
01292             function outsideLayer(level)  {  //
01293                return GLV_x+GLV_gap-GLV_curLayerX[level] <0 ||
01294                      GLV_y+GLV_gap-GLV_curLayerY[level] <0 ||
01295                      GLV_curLayerX[level]+GLV_curLayerWidth[level]+GLV_gap-GLV_x <0 ||
01296                      GLV_curLayerY[level]+GLV_curLayerHeight[level]+GLV_gap-GLV_y <0;
01297             }
01298                // setLayerObj(html,level)
01299             function setLayerObj(html,level) {  //
01300                var winHeight = document.documentElement.clientHeight && !bw.op7 ? document.documentElement.clientHeight : document.body.clientHeight;
01301                var winWidth = document.documentElement.clientWidth && !bw.op7 ? document.documentElement.clientWidth : document.body.clientWidth;
01302                var tempLayerObj = GL_getObj("contentMenu"+level);
01303                var tempLayerObjCss = GL_getObjCss("contentMenu"+level);
01304 
01305                if (tempLayerObj && (level==0 || GLV_isVisible[level-1]))   {
01306                   tempLayerObj.el.innerHTML = html;
01307                   tempLayerObj.width= (bw.ie4||bw.ie5||bw.ns6||bw.konq||bw.op7)?this.el.offsetWidth:bw.ns4?this.ref.width:bw.op?this.css.pixelWidth:0;
01308                   tempLayerObj.height= (bw.ie4||bw.ie5||bw.ns6||bw.konq||bw.op7)?this.el.offsetHeight:bw.ns4?this.ref.height:bw.op?this.css.pixelHeight:0;
01309 
01310                      // konqueror (3.2.2) workaround
01311                   winHeight = (bw.konq)?window.innerHeight:winHeight;
01312                   winWidth = (bw.konq)?window.innerWidth:winWidth;
01313 
01314                      // Adjusting the Y-height of the layer to fit it into the window frame if it goes under the window frame in the bottom:
01315                   if (winHeight-tempLayerObj.height < GLV_yRel)   {
01316                      if (GLV_yRel < tempLayerObj.height) {
01317                         GLV_y+= (winHeight-tempLayerObj.height-GLV_yRel);     // Setting it so bottom is just above window height.
01318                      } else {
01319                         GLV_y-= tempLayerObj.height-8;      // Showing the menu upwards
01320                      }
01321                   }
01322                      // Adjusting the X position like Y above
01323                   if (winWidth-tempLayerObj.width < GLV_xRel)  {
01324                      if (GLV_xRel < tempLayerObj.width) {
01325                         GLV_x+= (winWidth-tempLayerObj.width-GLV_xRel);
01326                      } else {
01327                         GLV_x-= tempLayerObj.width-8;
01328                      }
01329                   }
01330                   GLV_x = Math.max(GLV_x,1);
01331                   GLV_y = Math.max(GLV_y,1);
01332 
01333                   GLV_curLayerX[level] = GLV_x;
01334                   GLV_curLayerY[level] = GLV_y;
01335                   tempLayerObjCss.left = GLV_x+"px";
01336                   tempLayerObjCss.top = GLV_y+"px";
01337                   tempLayerObjCss.visibility = "visible";
01338                   if (bw.ie5) showHideSelectorBoxes("hidden");
01339 
01340                   GLV_isVisible[level]=1;
01341                   GLV_curLayerWidth[level] = tempLayerObj.width;
01342                   GLV_curLayerHeight[level] = tempLayerObj.height;
01343                }
01344             }
01345                // hideEmpty()
01346             function hideEmpty() {  //
01347                hideSpecific(0);
01348                hideSpecific(1);
01349                return false;
01350             }
01351                // hideSpecific(level)
01352             function hideSpecific(level)  {  //
01353                GL_getObjCss("contentMenu"+level).visibility = "hidden";
01354                GL_getObj("contentMenu"+level).el.innerHTML = "";
01355                GLV_isVisible[level]=0;
01356 
01357                if (bw.ie5 && level==0) showHideSelectorBoxes("visible");
01358             }
01359                // debugObj(obj,name)
01360             function debugObj(obj,name)   {  //
01361                var acc;
01362                for (i in obj) {if (obj[i])   {acc+=i+":  "+obj[i]+"\n";}}
01363                alert("Object: "+name+"\n\n"+acc);
01364             }
01365                // initLayer()
01366             function initLayer(){   //
01367                if (document.all)   {
01368                   window.onmousemove=GL_getMouse;
01369                }
01370                layerObj = GL_getObj("contentMenu1");
01371                layerObjCss = GL_getObjCss("contentMenu1");
01372             }
01373             function showHideSelectorBoxes(action) {  // This function by Michiel van Leening
01374                for (i=0;i<document.forms.length;i++) {
01375                   for (j=0;j<document.forms[i].elements.length;j++) {
01376                      if(document.forms[i].elements[j].type=="select-one") {
01377                         document.forms[i].elements[j].style.visibility=action;
01378                      }
01379                   }
01380                }
01381             }
01382          /*]]>*/
01383          </script>
01384          ';
01385          return array(
01386             $content,
01387             ' onmousemove="GL_getMouse(event);" onload="initLayer();"',
01388             '<div id="contentMenu0" style="z-index:1; position:absolute;visibility:hidden"></div><div id="contentMenu1" style="z-index:2; position:absolute;visibility:hidden"></div>'
01389          );
01390       } else return array('','','');
01391    }

getDynTabMenu menuItems,
identString,
toggle = 0,
foldout = FALSE,
newRowCharLimit = 50,
noWrap = 1,
fullWidth = FALSE,
defaultTabIndex = 1
 

Creates a DYNAMIC tab-menu where the tabs are switched between with DHTML.

Should work in MSIE, Mozilla, Opera and Konqueror. On Konqueror I did find a serious problem: <textarea> fields loose their content when you switch tabs!

Parameters:
array Numeric array where each entry is an array in itself with associative keys: "label" contains the label for the TAB, "content" contains the HTML content that goes into the div-layer of the tabs content. "description" contains description text to be shown in the layer. "linkTitle" is short text for the title attribute of the tab-menu link (mouse-over text of tab). "stateIcon" indicates a standard status icon (see ->icon(), values: -1, 1, 2, 3). "icon" is an image tag placed before the text.
string Identification string. This should be unique for every instance of a dynamic menu!
integer If "1", then enabling one tab does not hide the others - they simply toggles each sheet on/off. This makes most sense together with the $foldout option. If "-1" then it acts normally where only one tab can be active at a time BUT you can click a tab and it will close so you have no active tabs.
boolean If set, the tabs are rendered as headers instead over each sheet. Effectively this means there is no tab menu, but rather a foldout/foldin menu. Make sure to set $toggle as well for this option.
integer Character limit for a new row.
boolean If set, tab table cells are not allowed to wrap their content
boolean If set, the tabs will span the full width of their position
integer Default tab to open (for toggle <=0). Value corresponds to integer-array index + 1 (index zero is "1", index "1" is 2 etc.). A value of zero (or something non-existing) will result in no default tab open.
Returns:
string JavaScript section for the HTML header.

Definition at line 1507 of file template.php.

References $a, $content, icons(), menu(), and table().

Referenced by getSingleField_typeFlex(), and getSingleField_typeFlex_sheetMenu().

01507                                                                                                                                                 {
01508       $content = '';
01509 
01510       if (is_array($menuItems))  {
01511 
01512             // Init:
01513          $options = array(array());
01514          $divs = array();
01515          $JSinit = array();
01516          $id = 'DTM-'.t3lib_div::shortMD5($identString);
01517          $noWrap = $noWrap ? ' nowrap="nowrap"' : '';
01518 
01519             // Traverse menu items
01520          $c=0;
01521          $tabRows=0;
01522          $titleLenCount = 0;
01523          foreach($menuItems as $index => $def) {
01524             $index+=1;  // Need to add one so checking for first index in JavaScript is different than if it is not set at all.
01525 
01526                // Switch to next tab row if needed
01527             if (!$foldout && $titleLenCount>$newRowCharLimit)  {  // 50 characters is probably a reasonable count of characters before switching to next row of tabs.
01528                $titleLenCount=0;
01529                $tabRows++;
01530                $options[$tabRows] = array();
01531             }
01532 
01533             if ($toggle==1)   {
01534                $onclick = 'this.blur(); DTM_toggle("'.$id.'","'.$index.'"); return false;';
01535             } else {
01536                $onclick = 'this.blur(); DTM_activate("'.$id.'","'.$index.'", '.($toggle<0?1:0).'); return false;';
01537             }
01538 
01539             $isActive = strcmp($def['content'],'');
01540 
01541             if (!$foldout) {
01542                   // Create TAB cell:
01543                $options[$tabRows][] = '
01544                      <td class="'.($isActive ? 'tab' : 'disabled').'" id="'.$id.'-'.$index.'-MENU"'.$noWrap.'>'.
01545                      ($isActive ? '<a href="#" onclick="'.htmlspecialchars($onclick).'"'.($def['linkTitle'] ? ' title="'.htmlspecialchars($def['linkTitle']).'"':'').'>' : '').
01546                      $def['icon'].
01547                      ($def['label'] ? htmlspecialchars($def['label']) : '&nbsp;').
01548                      $this->icons($def['stateIcon'],'margin-left: 10px;').
01549                      ($isActive ? '</a>' :'').
01550                      '</td>';
01551                $titleLenCount+= strlen($def['label']);
01552             } else {
01553                   // Create DIV layer for content:
01554                $divs[] = '
01555                   <div class="'.($isActive ? 'tab' : 'disabled').'" id="'.$id.'-'.$index.'-MENU">'.
01556                      ($isActive ? '<a href="#" onclick="'.htmlspecialchars($onclick).'"'.($def['linkTitle'] ? ' title="'.htmlspecialchars($def['linkTitle']).'"':'').'>' : '').
01557                      ($def['label'] ? htmlspecialchars($def['label']) : '&nbsp;').
01558                      ($isActive ? '</a>' : '').
01559                      '</div>';
01560             }
01561 
01562             if ($isActive) {
01563                   // Create DIV layer for content:
01564                $divs[] = '
01565                      <div style="display: none;" id="'.$id.'-'.$index.'-DIV" class="c-tablayer">'.
01566                         ($def['description'] ? '<p class="c-descr">'.nl2br(htmlspecialchars($def['description'])).'</p>' : '').
01567                         $def['content'].
01568                         '</div>';
01569                   // Create initialization string:
01570                $JSinit[] = '
01571                      DTM_array["'.$id.'"]['.$c.'] = "'.$id.'-'.$index.'";
01572                ';
01573                if ($toggle==1)   {
01574                   $JSinit[] = '
01575                      if (top.DTM_currentTabs["'.$id.'-'.$index.'"]) { DTM_toggle("'.$id.'","'.$index.'"); }
01576                   ';
01577                }
01578 
01579                $c++;
01580             }
01581          }
01582 
01583             // Render menu:
01584          if (count($options)) {
01585 
01586                // Tab menu is compiled:
01587             if (!$foldout) {
01588                $tabContent = '';
01589                for($a=0;$a<=$tabRows;$a++)   {
01590                   $tabContent.= '
01591 
01592                <!-- Tab menu -->
01593                <table cellpadding="0" cellspacing="0" border="0"'.($fullWidth ? ' width="100%"' : '').' class="typo3-dyntabmenu">
01594                   <tr>
01595                         '.implode('',$options[$a]).'
01596                   </tr>
01597                </table>';
01598                }
01599                $content.= '<div class="typo3-dyntabmenu-tabs">'.$tabContent.'</div>';
01600             }
01601 
01602                // Div layers are added:
01603             $content.= '
01604             <!-- Div layers for tab menu: -->
01605             <div class="typo3-dyntabmenu-divs'.($foldout?'-foldout':'').'">
01606             '.implode('',$divs).'</div>';
01607 
01608                // Java Script section added:
01609             $content.= '
01610             <!-- Initialization JavaScript for the menu -->
01611             <script type="text/javascript">
01612                DTM_array["'.$id.'"] = new Array();
01613                '.implode('',$JSinit).'
01614 
01615                '.($toggle<=0 ? 'DTM_activate("'.$id.'", top.DTM_currentTabs["'.$id.'"]?top.DTM_currentTabs["'.$id.'"]:'.intval($defaultTabIndex).', 0);' : '').'
01616             </script>
01617 
01618             ';
01619          }
01620 
01621       }
01622       return $content;
01623    }

getDynTabMenuJScode  ) 
 

Returns dynamic tab menu header JS code.

Returns:
string JavaScript section for the HTML header.

Definition at line 1630 of file template.php.

01630                                     {
01631       return '
01632          <script type="text/javascript">
01633          /*<![CDATA[*/
01634             var DTM_array = new Array();
01635 
01636             function DTM_activate(idBase,index,doToogle) {  //
01637                   // Hiding all:
01638                if (DTM_array[idBase])  {
01639                   for(cnt = 0; cnt < DTM_array[idBase].length ; cnt++)  {
01640                      if (DTM_array[idBase][cnt] != idBase+"-"+index) {
01641                         document.getElementById(DTM_array[idBase][cnt]+"-DIV").style.display = "none";
01642                         document.getElementById(DTM_array[idBase][cnt]+"-MENU").attributes.getNamedItem("class").nodeValue = "tab";
01643                      }
01644                   }
01645                }
01646 
01647                   // Showing one:
01648                if (document.getElementById(idBase+"-"+index+"-DIV")) {
01649                   if (doToogle && document.getElementById(idBase+"-"+index+"-DIV").style.display == "block")   {
01650                      document.getElementById(idBase+"-"+index+"-DIV").style.display = "none";
01651                      document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tab";
01652                      top.DTM_currentTabs[idBase] = -1;
01653                   } else {
01654                      document.getElementById(idBase+"-"+index+"-DIV").style.display = "block";
01655                      document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tabact";
01656                      top.DTM_currentTabs[idBase] = index;
01657                   }
01658                }
01659             }
01660             function DTM_toggle(idBase,index)   {  //
01661                   // Showing one:
01662                if (document.getElementById(idBase+"-"+index+"-DIV")) {
01663                   if (document.getElementById(idBase+"-"+index+"-DIV").style.display == "block")   {
01664                      document.getElementById(idBase+"-"+index+"-DIV").style.display = "none";
01665                      document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tab";
01666                      top.DTM_currentTabs[idBase+"-"+index] = 0;
01667                   } else {
01668                      document.getElementById(idBase+"-"+index+"-DIV").style.display = "block";
01669                      document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tabact";
01670                      top.DTM_currentTabs[idBase+"-"+index] = 1;
01671                   }
01672                }
01673             }
01674          /*]]>*/
01675          </script>
01676       ';
01677    }

getFileheader title,
path,
iconfile
 

Like ->getHeader() but for files in the File>* main module/submodules Returns the file-icon with the path of the file set in the alt/title attribute.

Shows the file-name after the icon.

Parameters:
string Title string, expected to be the filepath
string Alt text
string The icon file (relative to TYPO3 dir)
Returns:
string HTML content

Definition at line 411 of file template.php.

00411                                                    {
00412       $fileInfo = t3lib_div::split_fileref($title);
00413       $title = htmlspecialchars(t3lib_div::fixed_lgd_cs($fileInfo['path'],-35)).'<b>'.htmlspecialchars($fileInfo['file']).'</b>';
00414       return '<span class="typo3-moduleHeader"><img'.t3lib_iconWorks::skinImg($this->backPath,$iconfile,'width="18" height="16"').' title="'.htmlspecialchars($path).'" alt="" />'.$title.'</span>';
00415    }

getHeader table,
row,
path,
noViewPageIcon = 0,
tWrap = array('','')
 

Makes the header (icon+title) for a page (or other record).

Used in most modules under Web>* $table and $row must be a tablename/record from that table $path will be shown as alt-text for the icon. The title will be truncated to 45 chars.

Parameters:
string Table name
array Record row
string Alt text
boolean Set $noViewPageIcon true if you don't want a magnifier-icon for viewing the page in the frontend
array $tWrap is an array with indexes 0 and 1 each representing HTML-tags (start/end) which will wrap the title
Returns:
string HTML content

Definition at line 385 of file template.php.

References t3lib_iconWorks::getIconImage(), table(), and viewPageIcon().

00385                                                                                  {
00386       global $TCA;
00387       if (is_array($row) && $row['uid'])  {
00388          $iconImgTag=t3lib_iconWorks::getIconImage($table,$row,$this->backPath,'title="'.htmlspecialchars($path).'"');
00389          $title= strip_tags($row[$TCA[$table]['ctrl']['label']]);
00390          $viewPage = $noViewPageIcon ? '' : $this->viewPageIcon($row['uid'],$this->backPath,'');
00391          if ($table=='pages') $path.=' - '.t3lib_BEfunc::titleAttribForPages($row,'',0);
00392       } else {
00393          $iconImgTag='<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/i/_icon_website.gif',$wHattribs='width="18" height="16"').' title="'.htmlspecialchars($path).'" alt="" />';
00394          $title=$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'];
00395       }
00396 
00397       return '<span class="typo3-moduleHeader">'.$this->wrapClickMenuOnIcon($iconImgTag,$table,$row['uid']).
00398             $viewPage.
00399             $tWrap[0].htmlspecialchars(t3lib_div::fixed_lgd_cs($title,45)).$tWrap[1].'</span>';
00400    }

getTabMenu mainParams,
elementName,
currentValue,
menuItems,
script = '',
addparams = ''
 

Creates a tab menu from an array definition.

Returns a tab menu for a module Requires the JS function jumpToUrl() to be available

Parameters:
mixed $id is the "&id=" parameter value to be sent to the module, but it can be also a parameter array which will be passed instead of the &id=...
string $elementName it the form elements name, probably something like "SET[...]"
string $currentValue is the value to be selected currently.
array $menuItems is an array with the menu items for the selector box
string $script is the script to send the &id to, if empty it's automatically found
string $addParams is additional parameters to pass to the script.
Returns:
string HTML code for tab menu
Author:
René Fritz <r.fritz@colorcube.de>

Definition at line 1408 of file template.php.

References $content, getTabMenuRaw(), and PATH_thisScript.

01408                                                                                                    {
01409       $content='';
01410 
01411       if (is_array($menuItems))  {
01412          if (!is_array($mainParams)) {
01413             $mainParams = array('id' => $mainParams);
01414          }
01415          $mainParams = t3lib_div::implodeArrayForUrl('',$mainParams);
01416 
01417          if (!$script) {$script=basename(PATH_thisScript);}
01418 
01419          $menuDef = array();
01420          foreach($menuItems as $value => $label) {
01421             $menuDef[$value]['isActive'] = !strcmp($currentValue,$value);
01422             $menuDef[$value]['label'] = t3lib_div::deHSCentities(htmlspecialchars($label));
01423             $menuDef[$value]['url'] = htmlspecialchars($script.'?'.$mainParams.$addparams.'&'.$elementName.'='.$value);
01424          }
01425          $content = $this->getTabMenuRaw($menuDef);
01426 
01427       }
01428       return $content;
01429    }

getTabMenuRaw menuItems  ) 
 

Creates the HTML content for the tab menu.

Parameters:
array Menu items for tabs
Returns:
string Table HTML private

Definition at line 1438 of file template.php.

References $content, menu(), and table().

Referenced by getTabMenu().

01438                                        {
01439       $content='';
01440 
01441       if (is_array($menuItems))  {
01442          $options='';
01443 
01444          $count = count($menuItems);
01445          $widthLeft = 1;
01446          $addToAct = 5;
01447 
01448          $widthRight = max (1,floor(30-pow($count,1.72)));
01449          $widthTabs = 100 - $widthRight - $widthLeft;
01450          $widthNo = floor(($widthTabs - $addToAct)/$count);
01451          $addToAct = max ($addToAct,$widthTabs-($widthNo*$count));
01452          $widthAct = $widthNo + $addToAct;
01453          $widthRight = 100 - ($widthLeft + ($count*$widthNo) + $addToAct);
01454 
01455          $first=true;
01456          foreach($menuItems as $id => $def) {
01457             $isActive = $def['isActive'];
01458             $class = $isActive ? 'tabact' : 'tab';
01459             $width = $isActive ? $widthAct : $widthNo;
01460 
01461                // @rene: Here you should probably wrap $label and $url in htmlspecialchars() in order to make sure its XHTML compatible! I did it for $url already since that is VERY likely to break.
01462             $label = $def['label'];
01463             $url = htmlspecialchars($def['url']);
01464             $params = $def['addParams'];
01465 
01466             if($first) {
01467                $options.= '
01468                      <td width="'.$width.'%" class="'.$class.'" style="border-left: solid #000 1px;"><a href="'.$url.'" style="padding-left:5px;padding-right:2px;" '.$params.'>'.$label.'</a></td>';
01469             } else {
01470                $options.='
01471                      <td width="'.$width.'%" class="'.$class.'"><a href="'.$url.'" '.$params.'>'.$label.'</a></td>';
01472             }
01473             $first=false;
01474          }
01475 
01476          if ($options)  {
01477             $content .= '
01478             <!-- Tab menu -->
01479             <table cellpadding="0" cellspacing="0" border="0" width="100%" id="typo3-tabmenu">
01480                <tr>
01481                      <td width="'.$widthLeft.'%">&nbsp;</td>
01482                      '.$options.'
01483                   <td width="'.$widthRight.'%">&nbsp;</td>
01484                </tr>
01485             </table>
01486             <div class="hr" style="margin:0px"></div>';
01487          }
01488 
01489       }
01490       return $content;
01491    }

getVersionSelector id,
noAction = FALSE
 

Creates the version selector for the page id inputted.

Requires the core version management extension, "version" to be loaded.

Parameters:
integer Page id to create selector for.
boolean If set, there will be no button for swapping page.
Returns:
void

Definition at line 1687 of file template.php.

References t3lib_BEfunc::getRecord(), t3lib_extMgm::isLoaded(), selectVersionsOfRecord(), and table().

01687                                                       {
01688 
01689       if ($id>0 && t3lib_extMgm::isLoaded('version')) {
01690 
01691             // Get Current page record:
01692          $curPage = t3lib_BEfunc::getRecord('pages',$id);
01693             // If the selected page is not online, find the right ID
01694          $onlineId = ($curPage['pid']==-1 ? $curPage['t3ver_oid'] : $id);
01695             // Select all versions of online version:
01696          $versions = t3lib_BEfunc::selectVersionsOfRecord('pages', $onlineId, 'uid,pid,t3ver_label,t3ver_oid,t3ver_id');
01697 
01698             // If more than one was found...:
01699          if (count($versions)>1) {
01700 
01701                // Create selector box entries:
01702             $opt = array();
01703             foreach($versions as $vRow)   {
01704                $opt[] = '<option value="'.htmlspecialchars(t3lib_div::linkThisScript(array('id'=>$vRow['uid']))).'"'.($id==$vRow['uid']?' selected="selected"':'').'>'.
01705                      htmlspecialchars($vRow['t3ver_label'].' [v#'.$vRow['t3ver_id'].']'.($vRow['uid']==$onlineId ? ' =>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.online').'<=':'')).
01706                      '</option>';
01707             }
01708 
01709                // Add management link:
01710             $opt[] = '<option value="'.htmlspecialchars(t3lib_div::linkThisScript(array('id'=>$id))).'">---</option>';
01711             $opt[] = '<option value="'.htmlspecialchars($this->backPath.t3lib_extMgm::extRelPath('version').'cm1/index.php?table=pages&uid='.$onlineId).'">'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.mgm',1).'</option>';
01712 
01713                // Create onchange handler:
01714             $onChange = "document.location=this.options[this.selectedIndex].value;";
01715 
01716                // Controls:
01717             if ($id==$onlineId)  {
01718                $controls = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/blinkarrow_left.gif','width="5" height="9"').' class="absmiddle" alt="" /> <b>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.online',1).'</b>';
01719             } elseif (!$noAction) {
01720                $controls = '<a href="'.$this->issueCommand('&cmd[pages]['.$onlineId.'][version][swapWith]='.$id.'&cmd[pages]['.$onlineId.'][version][action]=swap&cmd[pages]['.$onlineId.'][version][swapContent]=1',t3lib_div::linkThisScript(array('id'=>$onlineId))).'">'.
01721                      '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/insert2.gif','width="14" height="14"').' style="margin-right: 2px;" class="absmiddle" alt="" title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.swapPage',1).'" />'.
01722                      '<b>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.swap',1).'</b></a>';
01723             }
01724 
01725                // Write out HTML code:
01726             return '
01727 
01728                <!--
01729                   Version selector:
01730                -->
01731                <table border="0" cellpadding="0" cellspacing="0" id="typo3-versionSelector">
01732                   <tr>
01733                      <td>'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.selVer',1).'</td>
01734                      <td>
01735                         <select onchange="'.htmlspecialchars($onChange).'">
01736                            '.implode('',$opt).'
01737                         </select></td>
01738                      <td>'.$controls.'</td>
01739                   </tr>
01740                </table>
01741             ';
01742          }
01743       }
01744    }

header text  ) 
 

Returns the header-bar in the top of most backend modules Closes section if open.

Parameters:
string The text string for the header
Returns:
string HTML content

Definition at line 696 of file template.php.

References sectionEnd().

Referenced by t3lib_readmail::analyseReturnError(), t3lib_TCEmain::checkRecordInsertAccess(), SC_index::checkRedirect(), t3lib_TCEmain::checkValue(), localFolderTree::createFolder(), localFolderTree::SC_browse_links::expandPage(), tslib_fe::getConfigArray(), SC_wizard_table::getConfigCode(), SC_wizard_forms::getConfigCode(), getPaletteFields(), t3lib_TCEmain::getRecordPropertiesFromRow(), getSingleField_typeFlex_sheetMenu(), t3lib_TCEmain::getSortNumber(), tx_cms_layout::getTable_tt_content(), SC_wizard_add::init(), SC_index::init(), t3lib_TCEmain::insertDB(), tslib_fe::INTincScript(), user_various::listContentRecordsOnPage(), SC_logout::logout(), SC_wizard_list::main(), SC_wizard_edit::main(), main(), SC_db_new_content_el::main(), SC_index::makeLoginNews(), tslib_menu::makeMenu(), t3lib_TCEmain::moveRecord(), tslib_fe::pageNotFoundHandler(), tslib_pibase::pi_list_header(), printAll(), tslib_fe::printError(), t3lib_TCEmain::process_datamap(), tslib_fe::processOutput(), SC_db_layout::renderQuickEdit(), sectionHeader(), user_various::selectThem(), tslib_fe::sendRedirect(), SC_mod_tools_em_index::showExtDetails(), t3lib_userAuth::start(), startPage(), tx_cms_layout::tt_content_drawItem(), tx_install::tx_install(), typo3PrintError(), t3lib_TCEmain::updateDB(), localFolderTree::uploadForm(), and SC_db_new_content_el::wizardArray().

00696                            {
00697       $str='
00698 
00699    <!-- MAIN Header in page top -->
00700    <h2>'.htmlspecialchars($text).'</h2>
00701 ';
00702       return $this->sectionEnd().$str;
00703    }

helpStyle  ) 
 

Returns ' style='cursor:help;'' if the client supports CSS styles Use for -links to help texts.

Returns:
string

Definition at line 368 of file template.php.

00368                         {
00369       return $GLOBALS['CLIENT']['FORMSTYLE'] ? ' style="cursor:help;"':'';
00370    }

icons type,
styleAttribValue = ''
 

Returns an image-tag with an 18x16 icon of the following types:.

$type: -1: OK icon (Check-mark) 1: Notice (Speach-bubble) 2: Warning (Yellow triangle) 3: Fatal error (Red stop sign)

Parameters:
integer See description
string Value for style attribute
Returns:
string HTML image tag (if applicable)

Definition at line 977 of file template.php.

Referenced by getDynTabMenu(), getSingleField_typeFlex_sheetMenu(), SC_mod_user_setup_index::main(), SC_alt_topmenu_dummy::main(), and SC_alt_main::main().

00977                                                 {
00978       switch($type)  {
00979          case '3':
00980             $icon = 'gfx/icon_fatalerror.gif';
00981          break;
00982          case '2':
00983             $icon = 'gfx/icon_warning.gif';
00984          break;
00985          case '1':
00986             $icon = 'gfx/icon_note.gif';
00987          break;
00988          case '-1':
00989             $icon = 'gfx/icon_ok.gif';
00990          break;
00991          default:
00992          break;
00993       }
00994       if ($icon)  {
00995          return '<img'.t3lib_iconWorks::skinImg($this->backPath,$icon,'width="18" height="16"').' class="absmiddle"'.($styleAttribValue ? ' style="'.htmlspecialchars($styleAttribValue).'"' : '').' alt="" />';
00996       }
00997    }

initCharset  ) 
 

Initialize the charset.

Sets the internal $this->charset variable to the charset defined in $GLOBALS["LANG"] (or the default as set in this class) Returns the meta-tag for the document header

Returns:
string <meta> tag with charset from $this->charset or $GLOBALS['LANG']->charSet

Definition at line 932 of file template.php.

Referenced by startPage().

00932                            {
00933          // Set charset to the charset provided by the current backend users language selection:
00934       $this->charset = $GLOBALS['LANG']->charSet ? $GLOBALS['LANG']->charSet : $this->charset;
00935          // Return meta tag:
00936       return '<meta http-equiv="Content-Type" content="text/html; charset='.$this->charset.'" />';
00937    }

insertStylesAndJS content  ) 
 

Insert post rendering document style into already rendered content This is needed for extobjbase.

Parameters:
string style-content to insert.
Returns:
string content with inserted styles

Definition at line 912 of file template.php.

References $content, and wrapScriptTags().

00912                                           {
00913          // insert accumulated CSS
00914       $this->inDocStylesArray[] = $this->inDocStyles;
00915       $styles = "\n".implode("\n", $this->inDocStylesArray);
00916       $content = str_replace('/*###POSTCSSMARKER###*/',$styles,$content);
00917 
00918          // insert accumulated JS
00919       $jscode = $this->JScode."\n".$this->wrapScriptTags(implode("\n", $this->JScodeArray));
00920       $content = str_replace('<!--###POSTJSMARKER###-->',$jscode,$content);
00921 
00922       return $content;
00923    }

isCMlayers  ) 
 

Returns true if click-menu layers can be displayed for the current user/browser Use this to test if click-menus (context sensitive menus) can and should be displayed in the backend.

Returns:
boolean

Definition at line 348 of file template.php.

Referenced by getContextMenuCode().

00348                            {
00349       return !$GLOBALS['BE_USER']->uc['disableCMlayers'] && $GLOBALS['CLIENT']['FORMSTYLE'] && $GLOBALS['CLIENT']['SYSTEM']!='mac';
00350    }

issueCommand params,
rUrl = ''
 

Returns a URL with a command to TYPO3 Core Engine (tce_db.php) See description of the API elsewhere.

Parameters:
string $params is a set of GET params to send to tce_db.php. Example: "&cmd[tt_content][123][move]=456" or "&data[tt_content][123][hidden]=1&data[tt_content][123][title]=Hello%20World"
string Redirect URL if any other that t3lib_div::getIndpEnv('REQUEST_URI') is wished
Returns:
string URL to tce_db.php + parameters (backpath is taken from $this->backPath)
See also:
t3lib_BEfunc::editOnClick()

Definition at line 333 of file template.php.

00333                                              {
00334       $rUrl = $rUrl ? $rUrl : t3lib_div::getIndpEnv('REQUEST_URI');
00335       return $this->backPath.'tce_db.php?'.
00336             $params.
00337             '&redirect='.($rUrl==-1?"'+T3_THIS_LOCATION+'":rawurlencode($rUrl)).
00338             '&vC='.rawurlencode($GLOBALS['BE_USER']->veriCode()).
00339             '&prErr=1&uPT=1';
00340    }

makeShortcutIcon gvList,
setList,
modName,
motherModName = ""
 

Returns a linked shortcut-icon which will call the shortcut frame and set a shortcut there back to the calling page/module.

Parameters:
string Is the list of GET variables to store (if any)
string Is the list of SET[] variables to store (if any) - SET[] variables a stored in $GLOBALS["SOBE"]->MOD_SETTINGS for backend modules
string Module name string
string Is used to enter the "parent module name" if the module is a submodule under eg. Web>* or File>*. You can also set this value to "1" in which case the currentLoadedModule is sent to the shortcut script (so - not a fixed value!) - that is used in file_edit.php and wizard_rte.php scripts where those scripts are really running as a part of another module.
Returns:
string HTML content

Definition at line 426 of file template.php.

References makeShortcutUrl().

00426                                                                            {
00427       $backPath=$this->backPath;
00428       $storeUrl=$this->makeShortcutUrl($gvList,$setList);
00429       $pathInfo = parse_url(t3lib_div::getIndpEnv('REQUEST_URI'));
00430 
00431       if (!strcmp($motherModName,'1')) {
00432          $mMN="&motherModName='+top.currentModuleLoaded+'";
00433       } elseif ($motherModName)  {
00434          $mMN='&motherModName='.rawurlencode($motherModName);
00435       } else $mMN="";
00436 
00437       $onClick = 'if (top.shortcutFrame && confirm('.
00438                $GLOBALS['LANG']->JScharCode($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.makeShortcut')).
00439                ')){top.shortcutFrame.document.location=\''.$backPath.'alt_shortcut.php?modName='.rawurlencode($modName).
00440                '&URL='.rawurlencode($pathInfo['path']."?".$storeUrl).
00441                $mMN.
00442                '\';}return false;';
00443 
00444       $sIcon = '<a href="#" onclick="'.htmlspecialchars($onClick).'">
00445             <img'.t3lib_iconWorks::skinImg($backPath,'gfx/shortcut.gif','width="14" height="14"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.makeShortcut',1).'" alt="" /></a>';
00446       return $sIcon;
00447    }

makeShortcutUrl gvList,
setList
 

MAKE url for storing Internal func.

Parameters:
string Is the list of GET variables to store (if any)
string Is the list of SET[] variables to store (if any) - SET[] variables a stored in $GLOBALS["SOBE"]->MOD_SETTINGS for backend modules
Returns:
string private
See also:
makeShortcutIcon()

Definition at line 459 of file template.php.

Referenced by makeShortcutIcon().

00459                                                 {
00460       $GET = t3lib_div::_GET();
00461       $storeArray = array_merge(
00462          t3lib_div::compileSelectedGetVarsFromArray($gvList,$GET),
00463          array('SET'=>t3lib_div::compileSelectedGetVarsFromArray($setList,$GLOBALS['SOBE']->MOD_SETTINGS))
00464       );
00465       $storeUrl = t3lib_div::implodeArrayForUrl('',$storeArray);
00466       return $storeUrl;
00467    }

menuTable arr1,
arr2 = array(),
arr3 = array()
 

Constructs a table with content from the $arr1, $arr2 and $arr3.

Used in eg. ext/belog/mod/index.php - refer to that for examples

Parameters:
array Menu elements on first level
array Secondary items
array Third-level items
Returns:
string HTML content,
..

Definition at line 1134 of file template.php.

References $a, middle(), and table().

01134                                                             {
01135       $rows = max(array(count($arr1),count($arr2),count($arr3)));
01136 
01137       $menu='
01138       <table border="0" cellpadding="0" cellspacing="0" id="typo3-tablemenu">';
01139       for($a=0;$a<$rows;$a++) {
01140          $menu.='<tr>';
01141          $cls=array();
01142          $valign='middle';
01143          $cls[]='<td valign="'.$valign.'">'.$arr1[$a][0].'</td><td>'.$arr1[$a][1].'</td>';
01144          if (count($arr2)) {
01145             $cls[]='<td valign="'.$valign.'">'.$arr2[$a][0].'</td><td>'.$arr2[$a][1].'</td>';
01146             if (count($arr3)) {
01147                $cls[]='<td valign="'.$valign.'">'.$arr3[$a][0].'</td><td>'.$arr3[$a][1].'</td>';
01148             }
01149          }
01150          $menu.=implode($cls,'<td>&nbsp;&nbsp;</td>');
01151          $menu.='</tr>';
01152       }
01153       $menu.='
01154       </table>
01155       ';
01156       return $menu;
01157    }

middle  ) 
 

Originally it printed a kind of divider.

Depreciated. Just remove function calls to it or call the divider() function instead.

Returns:
void

Definition at line 834 of file template.php.

Referenced by menuTable().

00834                      {
00835    }

parseTime  ) 
 

Returns script parsetime IF ->parseTimeFlag is set and user is "admin" Automatically outputted in page end.

Returns:
string

Definition at line 559 of file template.php.

Referenced by endPage().

00559                         {
00560       if ($this->parseTimeFlag && $GLOBALS['BE_USER']->isAdmin()) {
00561          return '<p>(ParseTime: '.(t3lib_div::milliseconds()-$GLOBALS['PARSETIME_START']).' ms</p>
00562                <p>REQUEST_URI-length: '.strlen(t3lib_div::getIndpEnv('REQUEST_URI')).')</p>';
00563       }
00564    }

redirectUrls thisLocation = ''  ) 
 

Returns JavaScript variables setting the returnUrl and thisScript location for use by JavaScript on the page.

Used in fx. db_list.php (Web>List)

Parameters:
string URL to "this location" / current script
Returns:
string
See also:
typo3/db_list.php

Definition at line 522 of file template.php.

References $out.

00522                                              {
00523       $thisLocation = $thisLocation?$thisLocation:t3lib_div::linkThisScript(
00524       array(
00525          'CB'=>'',
00526          'SET'=>'',
00527          'cmd' => '',
00528          'popViewId'=>''
00529       ));
00530 
00531       $out ="
00532    var T3_RETURN_URL = '".str_replace('%20','',rawurlencode(t3lib_div::_GP('returnUrl')))."';
00533    var T3_THIS_LOCATION = '".str_replace('%20','',rawurlencode($thisLocation))."';
00534       ";
00535       return $out;
00536    }

rfw string  ) 
 

red-fontwrap.

Returns the string wrapped in a -tag defining the color to be red

Parameters:
string Input string
Returns:
string Output string

Definition at line 1027 of file template.php.

Referenced by SC_mod_tools_em_index::getRepositoryUploadForm(), and SC_mod_tools_em_index::main().

01027                            {
01028       return '<span class="typo3-red">'.$string.'</span>';
01029    }

section label,
text,
nostrtoupper = FALSE,
sH = FALSE,
type = 0,
allowHTMLinHeader = FALSE
 

Begins an output section and sets header and content.

Parameters:
string The header
string The HTML-content
boolean A flag that will prevent the header from being converted to uppercase
boolean Defines the type of header (if set, "<h3>" rather than the default "h4")
integer The number of an icon to show with the header (see the icon-function). -1,1,2,3
boolean If set, HTML tags are allowed in $label (otherwise this value is by default htmlspecialchars()'ed)
Returns:
string HTML content
See also:
icons(), sectionHeader()

Definition at line 717 of file template.php.

References sectionBegin(), and sectionHeader().

Referenced by t3lib_userAuth::check_authentication(), t3lib_TCEmain::checkValue_flex_procInData_travDS(), endPage(), getSingleField_typeFlex_sheetMenu(), tslib_fe::INTincScript(), t3lib_TSparser::parse(), t3lib_transferData::renderRecord_flexProc_procInData_travDS(), sectionBegin(), sectionEnd(), startPage(), and typoLink().

00717                                                                                                    {
00718       $str='';
00719 
00720          // Setting header
00721       if ($label) {
00722          if (!$allowHTMLinHeader)   $label = htmlspecialchars($label);
00723          $str.=$this->sectionHeader($this->icons($type).$label, $sH, $nostrtoupper ? '' : ' class="uppercase"');
00724       }
00725          // Setting content
00726       $str.='
00727 
00728    <!-- Section content -->
00729 '.$text;
00730 
00731       return $this->sectionBegin().$str;
00732    }

sectionBegin  ) 
 

Begins an output section.

Returns the

-begin tag AND sets the ->sectionFlag true (if the ->sectionFlag is not already set!) You can call this function even if a section is already begun since the function will only return something if the sectionFlag is not already set!

Returns:
string HTML content

Definition at line 793 of file template.php.

References section().

Referenced by section(), and sectionHeader().

00793                            {
00794       if (!$this->sectionFlag)   {
00795          $this->sectionFlag=1;
00796          $str='
00797 
00798    <!-- ***********************
00799          Begin output section.
00800         *********************** -->
00801    <div>
00802 ';
00803          return $str;
00804       } else return '';
00805    }

sectionEnd  ) 
 

Ends and output section Returns the -end tag AND clears the ->sectionFlag (but does so only IF the sectionFlag is set - that is a section is 'open') See sectionBegin() also.

Returns:
string HTML content

Definition at line 814 of file template.php.

References section().

Referenced by divider(), endPage(), and header().

00814                            {
00815       if ($this->sectionFlag) {
00816          $this->sectionFlag=0;
00817          return '
00818    </div>
00819    <!-- *********************
00820          End output section.
00821         ********************* -->
00822 ';
00823       } else return '';
00824    }

sectionHeader label,
sH = FALSE,
addAttrib = ''
 

Make a section header.

Begins a section if not already open.

Parameters:
string The label between the

or tags. (Allows HTML) boolean If set, is used, otherwise string Additional attributes to h-tag, eg. ' class=""' string HTML content

Definition at line 776 of file template.php.

References header(), and sectionBegin().

Referenced by section().

00776                                                             {
00777       $tag = ($sH?'h3':'h4');
00778       $str='
00779 
00780    <!-- Section header -->
00781    <'.$tag.$addAttrib.'>'.$label.'</'.$tag.'>
00782 ';
00783       return $this->sectionBegin().$str;
00784    }

spacer dist  ) 
 

Returns a blank

-section with a height.

Parameters:
integer Padding-top for the div-section (should be margin-top but konquorer (3.1) don't like it :-(
Returns:
string HTML content

Definition at line 757 of file template.php.

Referenced by tslib_tmenu_layers::extProc_afterLinking(), tslib_gmenu_layers::extProc_afterLinking(), tslib_gmenu::extProc_afterLinking(), tslib_tmenu::getBeforeAfter(), tx_extrapagecmoptions::main(), tslib_menu::makeMenu(), and tslib_tmenu::writeMenu().

00757                            {
00758       if ($dist>0)   {
00759          return '
00760 
00761    <!-- Spacer element -->
00762    <div style="padding-top: '.intval($dist).'px;"></div>
00763 ';
00764       }
00765    }

startPage title  ) 
 

Returns page start This includes the proper header with charset, title, meta tag and beginning body-tag.

Parameters:
string HTML Page title for the header
Returns:
string Returns the whole header section of a HTML-document based on settings in internal variables (like styles, javascript code, charset, generator and docType)
See also:
endPage()

Definition at line 592 of file template.php.

References docBodyTagBegin(), generator(), header(), initCharset(), and section().

00592                               {
00593          // Get META tag containing the currently selected charset for backend output. The function sets $this->charSet.
00594       $charSet = $this->initCharset();
00595       $generator = $this->generator();
00596 
00597          // For debugging: If this outputs "QuirksMode"/"BackCompat" (IE) the browser runs in quirks-mode. Otherwise the value is "CSS1Compat"
00598 #     $this->JScodeArray[]='alert(document.compatMode);';
00599 
00600          // Send HTTP header for selected charset. Added by Robert Lemke 23.10.2003
00601       header ('Content-Type:text/html;charset='.$this->charset);
00602 
00603       switch($this->docType)  {
00604          case 'xhtml_strict':
00605             $headerStart= '<!DOCTYPE html
00606    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
00607    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
00608 <?xml version="1.0" encoding="'.$this->charset.'"?>
00609 <?xml-stylesheet href="#internalStyle" type="text/css"?>
00610 ';
00611          break;
00612          case 'xhtml_trans':
00613             $headerStart= '<!DOCTYPE html
00614      PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
00615      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
00616 <?xml version="1.0" encoding="'.$this->charset.'"?>
00617 <?xml-stylesheet href="#internalStyle" type="text/css"?>
00618 ';
00619          break;
00620          case 'xhtml_frames':
00621             $headerStart= '<!DOCTYPE html
00622      PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
00623      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
00624 <?xml version="1.0" encoding="'.$this->charset.'"?>
00625 ';
00626          break;
00627          default:
00628             $headerStart='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">';
00629          break;
00630       }
00631 
00632          // Construct page header.
00633       $str = $headerStart.'
00634 <html>
00635 <head>
00636    <!-- TYPO3 Script ID: '.htmlspecialchars($this->scriptID).' -->
00637    '.$charSet.'
00638    '.$generator.'
00639    <title>'.htmlspecialchars($title).'</title>
00640    '.$this->docStyle().'
00641    '.$this->JScode.'
00642    '.$this->wrapScriptTags(implode("\n", $this->JScodeArray)).'
00643    <!--###POSTJSMARKER###-->
00644 </head>
00645 ';
00646       $this->JScode='';
00647       $this->JScodeArray=array();
00648 
00649       if ($this->docType=='xhtml_frames') {
00650          return $str;
00651       } else
00652 $str.=$this->docBodyTagBegin().
00653 ($this->divClass?'
00654 
00655 <!-- Wrapping DIV-section for whole page BEGIN -->
00656 <div class="'.$this->divClass.'">
00657 ':'').trim($this->form);
00658       return $str;
00659    }

t3Button onClick,
label
 

Returns an <input> button with the $onClick action and $label.

Parameters:
string The value of the onclick attribute of the input tag (submit type)
string The label for the button (which will be htmlspecialchar'ed)
Returns:
string A <input> tag of the type "submit"

Definition at line 1006 of file template.php.

01006                                        {
01007       $button = '<input type="submit" onclick="'.htmlspecialchars($onClick).'; return false;" value="'.htmlspecialchars($label).'" />';
01008       return $button;
01009    }

table arr,
layout = ''
 

Returns a table based on the input $arr.

Parameters:
array Multidim array with first levels = rows, second levels = cells
array If set, then this provides an alternative layout array instead of $this->tableLayout
Returns:
string The HTML table.

Definition at line 1092 of file template.php.

References $tableLayout, and table().

Referenced by t3lib_xml::addRecord(), t3lib_extMgm::addTCAcolumns(), t3lib_extMgm::addToAllTCAtypes(), SC_mod_tools_em_index::alterSettings(), SC_wizard_tsconfig::browseTSprop(), t3lib_userAuthGroup::checkAuthMode(), tslib_feTCE::checkDoublePostExist(), SC_wizard_rte::checkEditAccess(), tx_install::checkImageMagick(), t3lib_TCEmain::checkModifyAccessList(), t3lib_TCEmain::checkRecordUpdateAccess(), t3lib_TCEmain::checkStoredRecord(), tx_install::checkTheDatabase(), t3lib_TCEmain::checkValue(), t3lib_TCEmain::checkValue_check(), t3lib_TCEmain::checkValue_flex(), t3lib_TCEmain::checkValue_group_select(), t3lib_TCEmain::checkValue_group_select_file(), t3lib_TCEmain::checkValue_input(), t3lib_TCEmain::checkValue_radio(), t3lib_TCEmain::checkValue_SW(), t3lib_TCEmain::clear_cache(), t3lib_TCEmain::clear_cacheCmd(), t3lib_TCEmain::clearPrefixFromValue(), SC_wizard_colorpicker::colorMatrix(), tslib_cObj::COLUMNS(), tx_install::compareDatabaseAndTCA(), t3lib_TCEmain::compareFieldArrayWithCurrentAndUnset(), tx_install::compareTCAandDatabase(), t3lib_TCEmain::compileAdminTables(), SC_alt_doc::compileForm(), tslib_cObj::CONTENT(), t3lib_TCEmain::copyPages(), t3lib_TCEmain::copyRecord(), t3lib_TCEmain::copyRecord_flexFormCallBack(), t3lib_TCEmain::copyRecord_localize(), t3lib_TCEmain::copyRecord_procBasedOnFieldType(), t3lib_TCEmain::copyRecord_raw(), t3lib_TCEmain::copySpecificPage(), localFolderTree::createFolder(), t3lib_BEfunc::cshItem(), tx_cms_layout::dataFields(), t3lib_BEfunc::DBcompileInsert(), t3lib_BEfunc::DBcompileUpdate(), t3lib_sqlengine::debug_printResultSet(), t3lib_TCEmain::deleteRecord(), t3lib_TCEmain::deleteSpecificPage(), tx_install::displayFieldComp(), tx_install::displayFields(), tx_install::displaySuggestions(), tx_install::displayTwinImage(), t3lib_dmailer::dmailer_masssend(), t3lib_dmailer::dmailer_masssend_list(), SC_mod_web_perm_index::doEdit(), t3lib_TCEmain::doesPageHaveUnallowedTables(), t3lib_TCEmain::doesRecordExist(), t3lib_rteapi::drawRTE(), SC_alt_shortcut::editLoadedFunc(), t3lib_sqlengine::exec_DELETEquery(), t3lib_DB::exec_DELETEquery(), t3lib_sqlengine::exec_INSERTquery(), t3lib_DB::exec_INSERTquery(), t3lib_sqlengine::exec_SELECTquery(), t3lib_sqlengine::exec_UPDATEquery(), t3lib_DB::exec_UPDATEquery(), localFolderTree::SC_browse_links::expandPage(), SC_mod_tools_em_index::extBackup(), SC_mod_tools_em_index::extBackup_dumpDataTablesLine(), SC_mod_tools_em_index::extDumpTables(), SC_mod_tools_em_index::extensionList_import(), SC_mod_tools_em_index::extensionList_installed(), SC_mod_tools_em_index::extensionList_loaded(), SC_mod_tools_em_index::extensionListRow(), t3lib_TCEmain::extFileFields(), t3lib_TCEmain::extFileFunctions(), SC_mod_tools_em_index::extInformationArray(), tslib_gmenu_foldout::extProc_afterLinking(), t3lib_transferData::fetchRecord(), t3lib_TCEmain::fillInFieldArray(), t3lib_TCEmain::fixCopyAfterDuplFields(), t3lib_TCEmain::fixUniqueInPid(), t3lib_BEfunc::fixVersioningPid(), formatCells(), SC_wizard_forms::formsWizard(), funcMenu(), t3lib_recordList::fwd_rwd_HTML(), t3lib_recordList::fwd_rwd_nav(), SC_alt_main::generateJScode(), t3lib_BEfunc::getCommonSelectFields(), SC_wizard_table::getConfigCode(), SC_wizard_forms::getConfigCode(), t3lib_TCEmain::getCopyHeader(), t3lib_pageSelect::getDomainStartPage(), getDynTabMenu(), t3lib_BEfunc::getExcludeFields(), t3lib_TCEmain::getExcludeListArray(), t3lib_BEfunc::getExplicitAuthFieldValues(), SC_mod_tools_em_index::getFileListOfExtension(), t3lib_BEfunc::getFlexFormDS(), SC_wizard_forms::getFormHTML(), tx_sv_auth::getGroups(), getHeader(), tx_cms_layout::getIcon(), t3lib_iconWorks::getIconImage(), t3lib_BEfunc::getItemLabel(), t3lib_BEfunc::getLabelFromItemlist(), t3lib_TCEforms::getListedFields(), t3lib_TCEforms::getMainFields(), SC_alt_doc::getNewIconMode(), tx_cms_layout::getPageInfoBox(), getPaletteFields(), t3lib_TCEmain::getPID(), tx_cms_layout::getProcessedValue(), t3lib_BEfunc::getProcessedValue(), t3lib_BEfunc::getProcessedValueExtra(), t3lib_fullsearch::getQueryResultCode(), t3lib_queryGenerator::getQuerySingle(), t3lib_BEfunc::getRecord(), t3lib_pageSelect::getRecordOverlay(), t3lib_TCEmain::getRecordProperties(), t3lib_TCEmain::getRecordPropertiesFromRow(), t3lib_BEfunc::getRecordRaw(), t3lib_BEfunc::getRecordTitle(), SC_mod_tools_em_index::getRepositoryUploadForm(), t3lib_xml::getRowInXML(), getSingleField(), getSingleField_SW(), getSingleField_typeCheck(), getSingleField_typeFlex(), getSingleField_typeFlex_sheetMenu(), getSingleField_typeGroup(), getSingleField_typeInput(), getSingleField_typeRadio(), getSingleField_typeSelect(), getSingleField_typeSelect_checkbox(), getSingleField_typeSelect_multiple(), getSingleField_typeSelect_single(), getSingleField_typeSelect_singlebox(), getSingleField_typeText(), t3lib_TCEforms::getSoloField(), t3lib_TCEmain::getSortNumber(), tx_cms_layout::getSpecConfForField(), t3lib_modSettings::getStoreControl(), tx_cms_layout::getTable(), tx_cms_layout::getTable_pages(), tx_cms_layout::getTable_sys_note(), tx_cms_layout::getTable_tt_board(), tx_cms_layout::getTable_tt_content(), t3lib_TCEmain::getTableEntries(), tx_cms_layout::getTableMenu(), getTabMenuRaw(), t3lib_BEfunc::getTCAtypes(), t3lib_BEfunc::getTCAtypeValue(), getTCEFORM_TSconfig(), getTSconfig_pidValue(), getTSCpid(), t3lib_TCEmain::getUnique(), tx_sv_auth::getUser(), t3lib_loadDBGroup::getValueArray(), getVersionSelector(), tx_cms_layout::headerFields(), t3lib_BEfunc::helpText(), t3lib_BEfunc::helpTextIcon(), tslib_cObj::HRULER(), tx_install::imagemenu(), tslib_cObj::IMGTEXT(), SC_wizard_list::init(), SC_wizard_add::init(), SC_show_item::init(), SC_move_el::init(), SC_mod_user_setup_index::init(), SC_file_list::init(), SC_db_list::init(), localFolderTree::SC_browse_links::init(), t3lib_queryGenerator::init(), t3lib_pageTree::init(), t3lib_browseTree::init(), t3lib_TCEmain::insertDB(), t3lib_TCEmain::insertNewCopyVersion(), t3lib_DB::INSERTquery(), t3lib_TCEmain::isRecordInWebMount(), tx_cms_layout::isRTEforField(), tx_cms_layout::linkRTEbutton(), TBE_browser_recordList::linkWrapItems(), t3lib_DB::listQuery(), TBE_browser_recordList::listURL(), language::loadSingleTableDescription(), t3lib_superadmin::localExtensions(), t3lib_transferData::lockRecord(), t3lib_BEfunc::lockRecords(), t3lib_TCEmain::log(), t3lib_admin::lostRecords(), SC_wizard_table::main(), SC_wizard_rte::main(), SC_wizard_list::main(), SC_wizard_forms::main(), SC_wizard_edit::main(), SC_wizard_colorpicker::main(), main(), tx_wizardsortpages_webfunc_2::main(), tx_infopagetsconfig_webinfo::main(), tx_extrapagecmoptions::main(), SC_db_new_content_el::main(), SC_db_layout::main(), SC_move_el::main(), SC_db_list::main(), SC_alt_topmenu_dummy::main(), SC_alt_shortcut::main(), SC_alt_palette::main(), SC_alt_menu::main(), localFolderTree::SC_browse_links::main_db(), localFolderTree::SC_browse_links::main_file(), localFolderTree::SC_browse_links::main_rte(), t3lib_superadmin::makeAdminLogin(), SC_alt_doc::makeButtonPanel(), SC_mod_tools_em_index::makeDetailedExtensionAnalysis(), SC_alt_doc::makeEditForm(), SC_index::makeLoginForm(), SC_index::makeLoginNews(), SC_index::makeLogoutForm(), tx_cms_layout::makeOrdinaryList(), t3lib_queryGenerator::makeSelectorTable(), t3lib_fullsearch::makeStoreControl(), t3lib_superadmin::makeTable(), menu(), menuTable(), t3lib_TCEmain::moveRecord(), t3lib_TCEmain::newFieldArray(), t3lib_TCEmain::noRecordsFromUnallowedTables(), note123(), SC_mod_web_perm_index::notEdit(), tx_cms_layout::numberOfRecords(), numRows(), outputWrapper(), t3lib_TCEmain::overrideFieldArray(), tslib_pibase::pi_exec_query(), tslib_pibase::pi_getCategoryTableContents(), tslib_pibase::pi_getEditPanel(), tslib_pibase::pi_getRecord(), tslib_pibase::pi_list_browseresults(), tslib_pibase::pi_list_makelist(), tslib_pibase::pi_list_modeSelector(), tslib_pibase::pi_list_query(), tslib_pibase::pi_list_searchBox(), t3lib_TCEmain::prependLabel(), printAll(), t3lib_queryGenerator::printCodeArray(), t3lib_TCEmain::printLogErrorMessages(), t3lib_extFileFunctions::printLogErrorMessages(), formRender_vert::printPalette(), formRender::printPalette(), t3lib_TCEforms_FE::printPalette(), t3lib_positionMap::printRecordMap(), SC_wizard_tsconfig::printTable(), localFolderTree::printTree(), t3lib_transferData::procesItemArray(), t3lib_TCEmain::process_cmdmap(), t3lib_TCEmain::process_datamap(), t3lib_transferData::procItems(), t3lib_TCEmain::rawCopyPageContent(), t3lib_loadDBGroup::readList(), t3lib_loadDBGroup::readMM(), t3lib_loadDBGroup::readyForInterface(), tslib_feUserAuth::record_registration(), t3lib_userAuthGroup::recordEditAccessInternals(), t3lib_TCEmain::recordInfo(), tslib_cObj::RECORDS(), transferData::regItem(), SC_db_new::regularNew(), t3lib_TCEmain::remapListedDBRecords(), t3lib_TCEmain::remapListedDBRecords_flexFormCallBack(), t3lib_TCEmain::remapListedDBRecords_procDBRefs(), removeTables(), SC_show_item::renderDBInfo(), tx_cms_webinfo_lang::renderL10nTable(), SC_db_layout::renderListContent(), SC_db_layout::renderQuickEdit(), t3lib_transferData::renderRecord(), t3lib_transferData::renderRecord_flexProc(), t3lib_transferData::renderRecord_selectProc(), t3lib_transferData::renderRecord_SW(), t3lib_transferData::renderRecordRaw(), t3lib_xml::renderRecords(), t3lib_TCEmain::resolvePid(), t3lib_TCEmain::resorting(), RTEsetup(), t3lib_sqlengine::saveDataSource(), t3lib_BEfunc::searchQuery(), t3lib_sqlengine::select_evalSingle(), t3lib_sqlengine::selectFromData(), selectVersionsOfRecord(), t3lib_TCEforms_FE::setFancyDesign(), t3lib_TCEmain::setHistory(), t3lib_TCEmain::setMirror(), SC_mod_tools_em_index::showExtDetails(), SC_db_new::showNewRecLink(), t3lib_BEfunc::splitTable_Uid(), tslib_feTCE::start(), t3lib_formmail::start(), tx_install::stepOutput(), table(), SC_wizard_table::tableWizard(), t3lib_admin::testDBRefs(), t3lib_admin::testFileRefs(), t3lib_BEfunc::thumbCode(), t3lib_rteapi::transformContent(), TS_transform_db(), tx_cms_layout::tt_board_drawItem(), tx_cms_layout::tt_content_drawColHeader(), tx_cms_layout::tt_content_drawHeader(), tx_cms_layout::tt_content_drawItem(), tx_install::typo3conf_edit(), typo3PrintError(), typoLink(), t3lib_TCEmain::updateDB(), localFolderTree::uploadForm(), t3lib_TCEmain::version_swap(), t3lib_TCEmain::versionizePages(), t3lib_TCEmain::versionizeRecord(), t3lib_admin::whereIsFileReferenced(), t3lib_admin::whereIsRecordReferenced(), SC_db_new_content_el::wizardArray(), template::wrapClickMenuOnIcon(), SC_index::wrapLoginForm(), t3lib_recordList::writeBottom(), and t3lib_loadDBGroup::writeMM().

01092                                     {
01093       if (is_array($arr))  {
01094          $tableLayout = (is_array($layout)) ? $layout : $this->tableLayout;
01095 
01096          reset($arr);
01097          $code='';
01098          $rc=0;
01099          while(list(,$val)=each($arr)) {
01100             if ($rc % 2) {
01101                $layout = is_array($tableLayout['defRowOdd']) ? $tableLayout['defRowOdd'] : $tableLayout['defRow'];
01102             } else {
01103                $layout = is_array($tableLayout['defRowEven']) ? $tableLayout['defRowEven'] : $tableLayout['defRow'];
01104             }
01105             $layoutRow = is_array($tableLayout[$rc]) ? $tableLayout[$rc] : $layout;
01106             $code_td='';
01107             if (is_array($val))  {
01108                $cc=0;
01109                while(list(,$content)=each($val))   {
01110                   $wrap= is_array($layoutRow[$cc]) ? $layoutRow[$cc] : (is_array($layoutRow['defCol']) ? $layoutRow['defCol'] : (is_array($layout[$cc]) ? $layout[$cc] : $layout['defCol']));
01111                   $code_td.=$wrap[0].$content.$wrap[1];
01112                   $cc++;
01113                }
01114             }
01115             $trWrap = is_array($layoutRow['tr']) ? $layoutRow['tr'] : (is_array($layout['tr']) ? $layout['tr'] : array($this->table_TR, '</tr>'));
01116             $code.=$trWrap[0].$code_td.$trWrap[1];
01117             $rc++;
01118          }
01119          $tableWrap = is_array($tableLayout['table']) ? $tableLayout['table'] : array($this->table_TABLE, '</table>');
01120          $code=$tableWrap[0].$code.$tableWrap[1];
01121       }
01122       return $code;
01123    }

thisBlur  ) 
 

Returns 'this.blur();' if the client supports CSS styles Use this in links to remove the underlining after being clicked.

Returns:
string

Definition at line 358 of file template.php.

00358                         {
00359       return ($GLOBALS['CLIENT']['FORMSTYLE']?'this.blur();':'');
00360    }

viewPageIcon id,
backPath,
addParams = 'hspace="3"'
 

Makes link to page $id in frontend (view page) Returns an magnifier-glass icon which links to the frontend index.php document for viewing the page with id $id $id must be a page-uid If the BE_USER has access to Web>List then a link to that module is shown as well (with return-url).

Parameters:
integer The page id
string The current "BACK_PATH" (the back relative to the typo3/ directory)
string Additional parameters for the image tag(s)
Returns:
string HTML string with linked icon(s)

Definition at line 307 of file template.php.

Referenced by getHeader().

00307                                                                   {
00308       global $BE_USER;
00309       $str = '';
00310          // If access to Web>List for user, then link to that module.
00311       if ($BE_USER->check('modules','web_list'))   {
00312          $href=$backPath.'db_list.php?id='.$id.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
00313          $str.= '<a href="'.htmlspecialchars($href).'">'.
00314                '<img'.t3lib_iconWorks::skinImg($backPath,'gfx/list.gif','width="11" height="11"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList',1).'"'.($addParams?' '.trim($addParams):'').' alt="" />'.
00315                '</a>';
00316       }
00317          // Make link to view page
00318       $str.= '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::viewOnClick($id,$backPath,t3lib_BEfunc::BEgetRootLine($id))).'">'.
00319             '<img'.t3lib_iconWorks::skinImg($backPath,'gfx/zoom.gif','width="12" height="12"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage',1).'"'.($addParams?' '.trim($addParams):"").' hspace="3" alt="" />'.
00320             '</a>';
00321       return $str;
00322    }

wrapInCData string  ) 
 

Returns string wrapped in CDATA "tags" for XML / XHTML (wrap content of <script> and <style> sections in those!).

Parameters:
string Input string
Returns:
string Output string

Definition at line 1037 of file template.php.

01037                                  {
01038       $string = '/*<![CDATA[*/'.
01039          $string.
01040          '/*]]>*/';
01041 
01042       return $string;
01043    }

wrapScriptTags string,
linebreak = TRUE
 

Wraps the input string in script tags.

Automatic re-identing of the JS code is done by using the first line as ident reference. This is nice for identing JS code with PHP code on the same level.

Parameters:
string Input string
boolean Wrap script element in linebreaks? Default is TRUE.
Returns:
string Output string

Definition at line 1054 of file template.php.

Referenced by insertStylesAndJS().

01054                                                       {
01055       if(trim($string)) {
01056             // <script wrapped in nl?
01057          $cr = $linebreak? "\n" : '';
01058 
01059             // remove nl from the beginning
01060          $string = preg_replace ('/^\n+/', '', $string);
01061             // re-ident to one tab using the first line as reference
01062          if(preg_match('/^(\t+)/',$string,$match)) {
01063             $string = str_replace($match[1],"\t", $string);
01064          }
01065          $string = $cr.'<script type="text/javascript">
01066 /*<![CDATA[*/
01067 '.$string.'
01068 /*]]>*/
01069 </script>'.$cr;
01070       }
01071       return trim($string);
01072    }


Variable Documentation

$LANG = t3lib_div::makeInstance('language')
 

Definition at line 1805 of file template.php.

Referenced by t3lib_BEfunc::cshItem(), SC_alt_shortcut::editLoadedFunc(), SC_alt_shortcut::editPageIdFunc(), localFolderTree::SC_browse_links::expandPage(), SC_wizard_forms::getFormHTML(), SC_alt_shortcut::getIcon(), t3lib_extobjbase::incLocalLang(), tx_extrapagecmoptions::includeLL(), t3lib_recordList::initializeLanguages(), t3lib_positionMap::insertlabel(), SC_alt_shortcut::itemLabel(), tx_wizardcrpages_webfunc_2::main(), tx_funcwizards_webfunc::main(), tx_cms_webinfo_page::main(), SC_db_new_content_el::main(), SC_db_layout::main(), SC_move_el::main(), SC_mod_user_setup_index::main(), SC_mod_web_perm_index::main(), SC_mod_web_info_index::main(), SC_mod_web_func_index::main(), SC_mod_tools_em_index::main(), SC_file_upload::main(), SC_file_newfolder::main(), SC_db_new::main(), SC_alt_intro::main(), SC_alt_file_navframe::main(), SC_alt_doc_nodoc::main(), SC_alt_db_navframe::main(), localFolderTree::SC_browse_links::main_rte(), SC_alt_doc::makeEditForm(), SC_db_layout::menuConfig(), SC_mod_web_perm_index::menuConfig(), tx_infopagetsconfig_webinfo::modMenu(), tx_cms_webinfo_lang::modMenu(), tx_cms_webinfo_page::modMenu(), SC_mod_web_perm_index::notEdit(), SC_show_item::renderDBInfo(), tx_cms_webinfo_lang::renderL10nTable(), SC_db_layout::renderListContent(), SC_db_layout::renderQuickEdit(), t3lib_BEfunc::titleAttribForPages(), and SC_db_new_content_el::wizardArray().

$table_TABLE = '<table border="0" cellspacing="0" cellpadding="0" id="typo3-tmpltable">'
 

Definition at line 1082 of file template.php.

$table_TR = '<tr>'
 

Definition at line 1081 of file template.php.

$tableLayout
 

Initial value:

 Array (
      'defRow' => Array (
         'defCol' => Array('<td valign="top">','</td>')
      )
   )

Definition at line 1076 of file template.php.

Referenced by table().

$TBE_TEMPLATE = t3lib_div::makeInstance('template')
 

Definition at line 1813 of file template.php.

Referenced by SC_index::checkRedirect(), SC_alt_topmenu_dummy::dummyContent(), SC_listframe_loader::main(), SC_mod_help_about_index::main(), SC_index::main(), SC_dummy::main(), SC_alt_topmenu_dummy::main(), SC_alt_toplogo::main(), SC_alt_mod_frameset::main(), SC_alt_menu_sel::main(), SC_alt_menu::main(), and SC_alt_intro::main().


Generated on Sun Oct 3 01:06:22 2004 for TYPO3core 3.7.0 dev by  doxygen 1.3.8-20040913