|
Chris PeBenito |
696b41 |
{* Smarty *}
|
|
Chris PeBenito |
696b41 |
|
|
Chris PeBenito |
696b41 |
{* debug.tpl, last updated version 2.0.1 *}
|
|
Chris PeBenito |
696b41 |
|
|
Chris PeBenito |
696b41 |
{assign_debug_info}
|
|
Chris PeBenito |
696b41 |
|
|
Chris PeBenito |
696b41 |
{if isset($_smarty_debug_output) and $_smarty_debug_output eq "html"}
|
|
Chris PeBenito |
696b41 |
|
|
Chris PeBenito |
696b41 |
Smarty Debug Console
|
|
Chris PeBenito |
696b41 |
included templates & config files (load time in seconds):
|
|
Chris PeBenito |
696b41 |
{section name=templates loop=$_debug_tpls}
|
|
Chris PeBenito |
696b41 |
<tt>{section name=indent loop=$_debug_tpls[templates].depth} {/section}<font color={if $_debug_tpls[templates].type eq "template"}brown{elseif $_debug_tpls[templates].type eq "insert"}black{else}green{/if}>{$_debug_tpls[templates].filename|escape:html}</font>{if isset($_debug_tpls[templates].exec_time)} <font size=-1>({$_debug_tpls[templates].exec_time|string_format:"%.5f"}){if %templates.index% eq 0} (total){/if}</font>{/if}</tt>
|
|
Chris PeBenito |
696b41 |
{sectionelse}
|
|
Chris PeBenito |
696b41 |
<tt>no templates included</tt>
|
|
Chris PeBenito |
696b41 |
{/section}
|
|
Chris PeBenito |
696b41 |
assigned template variables:
|
|
Chris PeBenito |
696b41 |
{section name=vars loop=$_debug_keys}
|
|
Chris PeBenito |
696b41 |
<tt><font color=blue>{ldelim}${$_debug_keys[vars]}{rdelim}</font></tt><tt><font color=green>{$_debug_vals[vars]|@debug_print_var}</font></tt>
|
|
Chris PeBenito |
696b41 |
{sectionelse}
|
|
Chris PeBenito |
696b41 |
<tt>no template variables assigned</tt>
|
|
Chris PeBenito |
696b41 |
{/section}
|
|
Chris PeBenito |
696b41 |
assigned config file variables (outer template scope):
|
|
Chris PeBenito |
696b41 |
{section name=config_vars loop=$_debug_config_keys}
|
|
Chris PeBenito |
696b41 |
<tt><font color=maroon>{ldelim}#{$_debug_config_keys[config_vars]}#{rdelim}</font></tt><tt><font color=green>{$_debug_config_vals[config_vars]|@debug_print_var}</font></tt>
|
|
Chris PeBenito |
696b41 |
{sectionelse}
|
|
Chris PeBenito |
696b41 |
<tt>no config vars assigned</tt>
|
|
Chris PeBenito |
696b41 |
{/section}
|
|
Chris PeBenito |
696b41 |
|
|
Chris PeBenito |
696b41 |
</BODY></HTML>
|
|
Chris PeBenito |
696b41 |
{else}
|
|
Chris PeBenito |
696b41 |
<SCRIPT language=javascript>
|
|
Chris PeBenito |
696b41 |
if( self.name == '' ) {ldelim}
|
|
Chris PeBenito |
696b41 |
var title = 'Console';
|
|
Chris PeBenito |
696b41 |
{rdelim}
|
|
Chris PeBenito |
696b41 |
else {ldelim}
|
|
Chris PeBenito |
696b41 |
var title = 'Console_' + self.name;
|
|
Chris PeBenito |
696b41 |
{rdelim}
|
|
Chris PeBenito |
696b41 |
_smarty_console = window.open("",title.value,"width=680,height=600,resizable,scrollbars=yes");
|
|
Chris PeBenito |
696b41 |
_smarty_console.document.write("<HTML><HEAD><TITLE>Smarty Debug Console_"+self.name+"</TITLE></HEAD><BODY bgcolor=#ffffff>");
|
|
Chris PeBenito |
696b41 |
_smarty_console.document.write("");
|
|
Chris PeBenito |
696b41 |
_smarty_console.document.write("Smarty Debug Console");
|
|
Chris PeBenito |
696b41 |
_smarty_console.document.write("included templates & config files (load time in seconds):");
|
|
Chris PeBenito |
696b41 |
{section name=templates loop=$_debug_tpls}
|
|
Chris PeBenito |
696b41 |
_smarty_console.document.write("<tt>{section name=indent loop=$_debug_tpls[templates].depth} {/section}<font color={if $_debug_tpls[templates].type eq "template"}brown{elseif $_debug_tpls[templates].type eq "insert"}black{else}green{/if}>{$_debug_tpls[templates].filename|escape:html|escape:javascript}</font>{if isset($_debug_tpls[templates].exec_time)} <font size=-1>({$_debug_tpls[templates].exec_time|string_format:"%.5f"}){if %templates.index% eq 0} (total){/if}</font>{/if}</tt>");
|
|
Chris PeBenito |
696b41 |
{sectionelse}
|
|
Chris PeBenito |
696b41 |
_smarty_console.document.write("<tt>no templates included</tt>");
|
|
Chris PeBenito |
696b41 |
{/section}
|
|
Chris PeBenito |
696b41 |
_smarty_console.document.write("assigned template variables:");
|
|
Chris PeBenito |
696b41 |
{section name=vars loop=$_debug_keys}
|
|
Chris PeBenito |
696b41 |
_smarty_console.document.write("<tt><font color=blue>{ldelim}${$_debug_keys[vars]}{rdelim}</font></tt><tt><font color=green>{$_debug_vals[vars]|@debug_print_var|escape:javascript}</font></tt>");
|
|
Chris PeBenito |
696b41 |
{sectionelse}
|
|
Chris PeBenito |
696b41 |
_smarty_console.document.write("<tt>no template variables assigned</tt>");
|
|
Chris PeBenito |
696b41 |
{/section}
|
|
Chris PeBenito |
696b41 |
_smarty_console.document.write("assigned config file variables (outer template scope):");
|
|
Chris PeBenito |
696b41 |
{section name=config_vars loop=$_debug_config_keys}
|
|
Chris PeBenito |
696b41 |
_smarty_console.document.write("<tt><font color=maroon>{ldelim}#{$_debug_config_keys[config_vars]}#{rdelim}</font></tt><tt><font color=green>{$_debug_config_vals[config_vars]|@debug_print_var|escape:javascript}</font></tt>");
|
|
Chris PeBenito |
696b41 |
{sectionelse}
|
|
Chris PeBenito |
696b41 |
_smarty_console.document.write("<tt>no config vars assigned</tt>");
|
|
Chris PeBenito |
696b41 |
{/section}
|
|
Chris PeBenito |
696b41 |
_smarty_console.document.write("");
|
|
Chris PeBenito |
696b41 |
_smarty_console.document.write("</BODY></HTML>");
|
|
Chris PeBenito |
696b41 |
_smarty_console.document.close();
|
|
Chris PeBenito |
696b41 |
</SCRIPT>
|
|
Chris PeBenito |
696b41 |
{/if}
|