From 688363bb54755461a63c219df69b2cd8838ee4ea Mon Sep 17 00:00:00 2001 From: boots Date: Tue, 7 Nov 2006 20:57:34 +0000 Subject: [PATCH] update debug.tpl to xhtml 1.1 compliance, fix javascript escaping in debug output and apply a Smarty based color scheme see: http://www.phpinsider.com/smarty-forum/viewtopic.php?t=7178 thanks to cybot from the forums! --- NEWS | 2 + libs/debug.tpl | 211 +++++++++++++++++++++++++++++++++++-------------- 2 files changed, 154 insertions(+), 59 deletions(-) diff --git a/NEWS b/NEWS index 317b5656..5a5dd14d 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +- update debug.tpl to xhtml 1.1 compliance, fix javascript escaping in debug + output and apply a Smarty based color scheme (cybot, boots) - enhance reporting precision of debug_print_var modifier (cybot, boots) - make html_select_date work consistently with 0000-00-00 00:00:00 and 0000-00-00 inputs (cybot, boots) diff --git a/libs/debug.tpl b/libs/debug.tpl index 7f1c9d42..c05ef5d0 100644 --- a/libs/debug.tpl +++ b/libs/debug.tpl @@ -1,64 +1,157 @@ {* Smarty *} - -{* debug.tpl, last updated version 2.0.1 *} - +{* debug.tpl, last updated version 2.1.0 *} {assign_debug_info} +{capture assign=debug_output} + + + + Smarty Debug Console +{literal} + +{/literal} + + + +

Smarty Debug Console

+ +

included templates & config files (load time in seconds)

+ +
+{section name=templates loop=$_debug_tpls} + {section name=indent loop=$_debug_tpls[templates].depth}   {/section} + + {$_debug_tpls[templates].filename|escape:html} + {if isset($_debug_tpls[templates].exec_time)} + + ({$_debug_tpls[templates].exec_time|string_format:"%.5f"}) + {if %templates.index% eq 0}(total){/if} + + {/if} +
+{sectionelse} +

no templates included

+{/section} +
+ +

assigned template variables

+ + + {section name=vars loop=$_debug_keys} + + + + {sectionelse} + + {/section} +
{ldelim}${$_debug_keys[vars]|escape:'html'}{rdelim}{$_debug_vals[vars]|@debug_print_var}

no template variables assigned

+ +

assigned config file variables (outer template scope)

+ + + {section name=config_vars loop=$_debug_config_keys} + + + + {sectionelse} + + {/section} +
{ldelim}#{$_debug_config_keys[config_vars]|escape:'html'}#{rdelim}{$_debug_config_vals[config_vars]|@debug_print_var}

no config vars assigned

+ + +{/capture} {if isset($_smarty_debug_output) and $_smarty_debug_output eq "html"} - - - - {section name=templates loop=$_debug_tpls} - - {sectionelse} - - {/section} - - {section name=vars loop=$_debug_keys} - - {sectionelse} - - {/section} - - {section name=config_vars loop=$_debug_config_keys} - - {sectionelse} - - {/section} -
Smarty Debug Console
included templates & config files (load time in seconds):
{section name=indent loop=$_debug_tpls[templates].depth}   {/section}{$_debug_tpls[templates].filename|escape:html}{if isset($_debug_tpls[templates].exec_time)} ({$_debug_tpls[templates].exec_time|string_format:"%.5f"}){if %templates.index% eq 0} (total){/if}{/if}
no templates included
assigned template variables:
{ldelim}${$_debug_keys[vars]}{rdelim}{$_debug_vals[vars]|@debug_print_var}
no template variables assigned
assigned config file variables (outer template scope):
{ldelim}#{$_debug_config_keys[config_vars]}#{rdelim}{$_debug_config_vals[config_vars]|@debug_print_var}
no config vars assigned
- + {$debug_output} {else} - -{/if} + +{/if} \ No newline at end of file