Index: t3lib/class.t3lib_tsparser_ext.php =================================================================== --- t3lib/class.t3lib_tsparser_ext.php (revision 4055) +++ t3lib/class.t3lib_tsparser_ext.php (working copy) @@ -589,41 +589,49 @@ reset($keyArr); $a=0; $c=count($keyArr); + static $i; while (list($key,)=each($keyArr)) { - $HTML=''; + $HTML = ''; $a++; - $deeper = is_array($arr[$key.'.']); - $row=$arr[$key]; + $deeper = is_array($arr[$key . '.']); + $row = $arr[$key]; $PM = 'join'; - $LN = ($a==$c)?'blank':'line'; - $BTM = ($a==$c)?'top':''; + $LN = ($a==$c) ? 'blank' : 'line'; + $BTM = ($a==$c) ? 'top' : ''; $PM = 'join'; - $HTML.=$depthData; - $icon = substr($row['templateID'],0,3)=='sys' ? t3lib_iconWorks::getIcon('sys_template',array('root'=>$row['root'])) : - (substr($row['templateID'],0,6)=='static' ? t3lib_iconWorks::getIcon('static_template',array()) : 'gfx/i/default.gif'); - $alttext= '['.$row['templateID'].']'; - $alttext.= $row['pid'] ? ' - '.t3lib_BEfunc::getRecordPath($row['pid'],$GLOBALS['SOBE']->perms_clause,20) : ''; - if (in_array($row['templateID'],$this->clearList_const) || in_array($row['templateID'],$this->clearList_setup)) { - $A_B=''; - $A_E=''; + $HTML .= $depthData; + $icon = substr($row['templateID'],0,3) == 'sys' ? t3lib_iconWorks::getIcon('sys_template', array('root' => $row['root'])) : + (substr($row['templateID'], 0, 6) == 'static' ? t3lib_iconWorks::getIcon('static_template', array()) : 'gfx/i/default.gif'); + $alttext = '[' . $row['templateID'] . ']'; + $alttext .= $row['pid'] ? ' - ' . t3lib_BEfunc::getRecordPath($row['pid'], $GLOBALS['SOBE']->perms_clause, 20) : ''; + if (in_array($row['templateID'], $this->clearList_const) || in_array($row['templateID'], $this->clearList_setup)) { + $A_B = ''; + $A_E = ''; + if (t3lib_div::_GP('template') == $row['templateID']) { + $A_B = '' . $A_B; + $A_E .= ''; + } } else { - $A_B=''; - $A_E=''; + $A_B = ''; + $A_E = ''; } - $HTML.=($first?'':'').' '.$A_B.t3lib_div::fixed_lgd_cs($row['title'],$GLOBALS['BE_USER']->uc['titleLen']).$A_E.'  '; + $HTML .= ($first ? '' : '') . + ' ' . + $A_B . t3lib_div::fixed_lgd_cs($row['title'], $GLOBALS['BE_USER']->uc['titleLen']) . $A_E . '  '; $RL = $this->ext_getRootlineNumber($row['pid']); - $keyArray[] = ' - '.$HTML.' - '.($row['root']?'X':'').'   - '.fw(($row['clConf']?'X':'').'  ').' - '.fw(($row['clConst']?'X':'').'  ').' - '.($row['pid']?' '.$row['pid'].(strcmp($RL,'')?' ('.$RL.')':'').'  ':'').' - '.($row['next']?' '.$row['next'].'  ':'').' + $keyArray[] = ' + ' . $HTML . ' + ' . ($row['root'] ? '' : '') . '   + ' . fw(($row['clConf'] ? '' :'') . '  ') . ' + ' . fw(($row['clConst'] ? '' : '') . '  ') . ' + ' . ($row['pid'] ? $row['pid'] : '') . ' + ' . (strcmp($RL, '') ? $RL : '') . ' + ' . ($row['next'] ? ' ' . $row['next'] . '  ' : '') . ' '; if ($deeper) { - $keyArray = $this->ext_getTemplateHierarchyArr($arr[$key.'.'], $depthData.($first?'':''), $keyArray); + $keyArray = $this->ext_getTemplateHierarchyArr($arr[$key . '.'], $depthData . ($first ? '' : ''), $keyArray); } } return $keyArray; Index: typo3/sysext/tstemplate_analyzer/class.tx_tstemplateanalyzer.php =================================================================== --- typo3/sysext/tstemplate_analyzer/class.tx_tstemplateanalyzer.php (revision 4055) +++ typo3/sysext/tstemplate_analyzer/class.tx_tstemplateanalyzer.php (working copy) @@ -107,105 +107,118 @@ $tmpl->procesIncludes(); $hierarArr = array(); - $head= ''; - $head.= 'Title  '; - $head.= 'Rootlevel  '; - $head.= 'C. Setup  '; - $head.= 'C. Const  '; - $head.= 'PID/RL  '; - $head.= 'NL  '; + $head = ''; + $head.= 'Title'; + $head.= 'Rootlevel'; + $head.= 'Clear Setup'; + $head.= 'Clear Constants'; + $head.= 'PID'; + $head.= 'Rootline'; + $head.= 'Next Level'; $head.= ''; - $hierar = implode(array_reverse($tmpl->ext_getTemplateHierarchyArr($tmpl->hierarchyInfoArr, "",array(),1)),""); - $hierar= ''.$head.$hierar.'
'; + $hierar = implode(array_reverse($tmpl->ext_getTemplateHierarchyArr($tmpl->hierarchyInfoArr, "", array(), 1)), ""); + $hierar= '' . $head . $hierar . '
'; $theOutput.=$this->pObj->doc->spacer(5); - $theOutput.=$this->pObj->doc->section("Template hierarchy:",$hierar,0,1); + $theOutput.=$this->pObj->doc->section("Template hierarchy:", $hierar, 0, 1); - // Output constants + // Output options $theOutput.=$this->pObj->doc->spacer(25); $theOutput.=$this->pObj->doc->divider(0); - $theOutput.=$this->pObj->doc->section("", - ' '.t3lib_BEfunc::getFuncCheck($this->pObj->id,"SET[ts_analyzer_checkLinenum]",$this->pObj->MOD_SETTINGS["ts_analyzer_checkLinenum"],'','','id="checkTs_analyzer_checkLinenum"'). - '    '.t3lib_BEfunc::getFuncCheck($this->pObj->id,"SET[ts_analyzer_checkSyntax]",$this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntax"],'','','id="checkTs_analyzer_checkSyntax"'). + $theOutput.=$this->pObj->doc->section("Display Options", '', 1, 1); + $addParams = t3lib_div::_GET('template') ? '&template=' . t3lib_div::_GET('template') : ''; + $theOutput .= '
' . + t3lib_BEfunc::getFuncCheck($this->pObj->id, "SET[ts_analyzer_checkLinenum]", $this->pObj->MOD_SETTINGS["ts_analyzer_checkLinenum"], '', $addParams, 'id="checkTs_analyzer_checkLinenum"') . + ' ' . + t3lib_BEfunc::getFuncCheck($this->pObj->id, "SET[ts_analyzer_checkSyntax]", $this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntax"], '', $addParams, 'id="checkTs_analyzer_checkSyntax"') . + ' ' . (!$this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntax"] ? - '    '.t3lib_BEfunc::getFuncCheck($this->pObj->id,"SET[ts_analyzer_checkComments]",$this->pObj->MOD_SETTINGS["ts_analyzer_checkComments"],'','','id="checkTs_analyzer_checkComments"'). - '    '.t3lib_BEfunc::getFuncCheck($this->pObj->id,"SET[ts_analyzer_checkCrop]",$this->pObj->MOD_SETTINGS["ts_analyzer_checkCrop"],'','','id="checkTs_analyzer_checkCrop"') + t3lib_BEfunc::getFuncCheck($this->pObj->id, "SET[ts_analyzer_checkComments]", $this->pObj->MOD_SETTINGS["ts_analyzer_checkComments"], '', $addParams, 'id="checkTs_analyzer_checkComments"') . + ' ' . + t3lib_BEfunc::getFuncCheck($this->pObj->id, "SET[ts_analyzer_checkCrop]", $this->pObj->MOD_SETTINGS["ts_analyzer_checkCrop"], '', $addParams, 'id="checkTs_analyzer_checkCrop"') . + ' ' : - '    '.t3lib_BEfunc::getFuncCheck($this->pObj->id,"SET[ts_analyzer_checkSyntaxBlockmode]",$this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntaxBlockmode"],'','','id="checkTs_analyzer_checkSyntaxBlockmode"') - ) - ); - $theOutput.=$this->pObj->doc->divider(2); - //$theOutput.=$this->pObj->doc->section("Constants:",t3lib_BEfunc::getFuncCheck($this->pObj->id,"SET[ts_analyzer_checkConst]",$this->pObj->MOD_SETTINGS["ts_analyzer_checkConst"]).fw("Enable")); - $theOutput.=$this->pObj->doc->section("Constants:","",0,1); - $theOutput.=$this->pObj->doc->sectionEnd(); - if (1==1 || $this->pObj->MOD_SETTINGS["ts_analyzer_checkConst"]) { - $theOutput.=' - - '; - $tmpl->ext_lineNumberOffset=-2; // Don't know why -2 and not 0... :-) But works. - $tmpl->ext_lineNumberOffset_mode="const"; - $tmpl->ext_lineNumberOffset+=count(explode(chr(10),t3lib_TSparser::checkIncludeLines("".$GLOBALS["TYPO3_CONF_VARS"]["FE"]["defaultTypoScript_constants"])))+1; + t3lib_BEfunc::getFuncCheck($this->pObj->id, "SET[ts_analyzer_checkSyntaxBlockmode]", $this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntaxBlockmode"], '', $addParams, 'id="checkTs_analyzer_checkSyntaxBlockmode"') . + ' ' + ) . ''; + + - reset($tmpl->constants); - reset($tmpl->clearList_const); - while(list($key,$val)=each($tmpl->constants)) { - $cVal = current($tmpl->clearList_const); - if ($cVal==t3lib_div::_GET('template') || t3lib_div::_GET('template')=="all") { - $theOutput.=' - - - - - - - '; - if (t3lib_div::_GET('template')!="all") break; + // Output Constants + if (t3lib_div::_GET('template')) { + $theOutput .= $this->pObj->doc->section("Constants:", "", 0, 1); + $theOutput .= $this->pObj->doc->sectionEnd(); + $theOutput .= ' +
'.$tmpl->templateTitles[$cVal].'
'.$tmpl->ext_outputTS(array($val),$this->pObj->MOD_SETTINGS["ts_analyzer_checkLinenum"],$this->pObj->MOD_SETTINGS["ts_analyzer_checkComments"],$this->pObj->MOD_SETTINGS["ts_analyzer_checkCrop"],$this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntax"],$this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntaxBlockmode"]).'
-
+ '; + $tmpl->ext_lineNumberOffset = -2; // Don't know why -2 and not 0... :-) But works. + $tmpl->ext_lineNumberOffset_mode = "const"; + $tmpl->ext_lineNumberOffset += count(explode(chr(10), t3lib_TSparser::checkIncludeLines("" . $GLOBALS["TYPO3_CONF_VARS"]["FE"]["defaultTypoScript_constants"]))) + 1; + + reset($tmpl->clearList_const); + foreach ($tmpl->constants as $key => $val) { + $cVal = current($tmpl->clearList_const); + if ($cVal == t3lib_div::_GET('template') || t3lib_div::_GET('template') == "all") { + $theOutput .= ' + + + + + + + '; + if (t3lib_div::_GET('template') != "all") { + break; + } + } + $tmpl->ext_lineNumberOffset += count(explode(chr(10), $val)) + 1; + next($tmpl->clearList_const); } - $tmpl->ext_lineNumberOffset+=count(explode(chr(10),$val))+1; - next($tmpl->clearList_const); + $theOutput .= ' +
' . $tmpl->templateTitles[$cVal] . '
' . + $tmpl->ext_outputTS(array($val), $this->pObj->MOD_SETTINGS["ts_analyzer_checkLinenum"], $this->pObj->MOD_SETTINGS["ts_analyzer_checkComments"], $this->pObj->MOD_SETTINGS["ts_analyzer_checkCrop"], $this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntax"], $this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntaxBlockmode"]) . + '
+
+ '; } - $theOutput.=' - - '; - } // Output setup - $theOutput.=$this->pObj->doc->spacer(15); - //$theOutput.=$this->pObj->doc->section("SETUP:",t3lib_BEfunc::getFuncCheck($this->pObj->id,"SET[ts_analyzer_checkSetup]",$this->pObj->MOD_SETTINGS["ts_analyzer_checkSetup"]).fw("Enable")); - $theOutput.=$this->pObj->doc->section("SETUP:","",0,1); - $theOutput.=$this->pObj->doc->sectionEnd(); - if (1==1 || $this->pObj->MOD_SETTINGS["ts_analyzer_checkSetup"]) { - $theOutput.=' - - '; - $tmpl->ext_lineNumberOffset=0; - $tmpl->ext_lineNumberOffset_mode="setup"; - $tmpl->ext_lineNumberOffset+=count(explode(chr(10),t3lib_TSparser::checkIncludeLines("".$GLOBALS["TYPO3_CONF_VARS"]["FE"]["defaultTypoScript_setup"])))+1; + if (t3lib_div::_GET('template')) { + $theOutput .= $this->pObj->doc->spacer(15); + $theOutput .= $this->pObj->doc->section("SETUP:", "", 0, 1); + $theOutput .= $this->pObj->doc->sectionEnd(); + $theOutput .= ' +
+ '; + $tmpl->ext_lineNumberOffset = 0; + $tmpl->ext_lineNumberOffset_mode = "setup"; + $tmpl->ext_lineNumberOffset += count(explode(chr(10), t3lib_TSparser::checkIncludeLines("" . $GLOBALS["TYPO3_CONF_VARS"]["FE"]["defaultTypoScript_setup"]))) + 1; - reset($tmpl->config); - reset($tmpl->clearList_setup); - while(list($key,$val)=each($tmpl->config)) { - if (current($tmpl->clearList_setup)==t3lib_div::_GET('template') || t3lib_div::_GET('template')=="all") { - $theOutput.=' - - - - - - - '; - if (t3lib_div::_GET('template')!="all") break; + reset($tmpl->clearList_setup); + foreach ($tmpl->config as $key => $val) { + if (current($tmpl->clearList_setup) == t3lib_div::_GET('template') || t3lib_div::_GET('template') == "all") { + $theOutput .= ' + + + + + + + '; + if (t3lib_div::_GET('template') != "all") { + break; + } + } + $tmpl->ext_lineNumberOffset += count(explode(chr(10), $val)) + 1; + next($tmpl->clearList_setup); } - $tmpl->ext_lineNumberOffset+=count(explode(chr(10),$val))+1; - next($tmpl->clearList_setup); + $theOutput .= ' +
'.$tmpl->templateTitles[current($tmpl->clearList_setup)].'
'.$tmpl->ext_outputTS(array($val),$this->pObj->MOD_SETTINGS["ts_analyzer_checkLinenum"],$this->pObj->MOD_SETTINGS["ts_analyzer_checkComments"],$this->pObj->MOD_SETTINGS["ts_analyzer_checkCrop"],$this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntax"],$this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntaxBlockmode"]).'
-
' . $tmpl->templateTitles[current($tmpl->clearList_setup)] . '
'.$tmpl->ext_outputTS(array($val),$this->pObj->MOD_SETTINGS["ts_analyzer_checkLinenum"],$this->pObj->MOD_SETTINGS["ts_analyzer_checkComments"],$this->pObj->MOD_SETTINGS["ts_analyzer_checkCrop"],$this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntax"],$this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntaxBlockmode"]).'
+
+ '; } - $theOutput.=' - - '; - } + return $theOutput; } } Index: typo3/sysext/tstemplate/ts/index.php =================================================================== --- typo3/sysext/tstemplate/ts/index.php (revision 4055) +++ typo3/sysext/tstemplate/ts/index.php (working copy) @@ -139,7 +139,12 @@ $this->doc->inDocStylesArray[] = ' TABLE#typo3-objectBrowser A { text-decoration: none; } TABLE#typo3-objectBrowser .comment { color: maroon; font-weight: bold; } - + TABLE#ts-analyzer tr.c-headLineTable {background-color: #A2AAB8;} + TABLE#ts-analyzer tr td {padding: 0 2px;} + TABLE#ts-analyzer tr.c-headLineTable td {padding: 2px 4px; font-weight:bold; color: #fff;} + .tst-analyzer-options { margin:5px 0; } + .tst-analyzer-options label {padding-left:5px; vertical-align:text-top; } + .bgColor0 {background-color:#fff;} ';