[prev in list] [next in list] [prev in thread] [next in thread]
List: smarty-dev
Subject: [SMARTY-DEV] very small contribution to debug
From: "Steve" <lists () iwsys ! com>
Date: 2003-02-21 22:18:52
[Download RAW message or body]
I thought it would be useful to know which smarty version I am using. So, I
added it to the debug function.
Please don't beat me up if the $_version was somehow available. I didn't
see it being easily accessable without assigning it as I did.
Hope this is useful....
Steve
Here are the appropriate diffs:
libs/plugins/function.assign_debug_info.php
28d27
< $smarty->assign("_version", $smarty->_version);
libs/debug.tpl
7a8
> <HTML><TITLE>Smarty {$_version} Debug Console "+self.name+"</TITLE><BODY
bgcolor=#ffffff>
9c10
< <tr bgcolor=#cccccc><th colspan=2>Smarty Debug Console</th></tr>
---
> <tr bgcolor=#cccccc><th colspan=2>Smarty {$_version} Debug
Console</th></tr>
12c13
< <tr bgcolor={if %templates.index% is even}#eeeeee{else}#fafafa{/if}><td
colspan=2><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}</font>{if
isset($_debug_tpls[templates].exec_time)} <font
size=-1><i>({$_debug_tpls[templates].exec_time|string_format:"%.5f"}){if
%templates.index% eq 0} (total){/if}</i></font>{/if}</tt></td></tr>
---
> <tr bgcolor={if %templates.index% is even}#eeeeee{else}#fafafa{/if}><td
colspan=2><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}</font>
<font
size=-1><i>({$_debug_tpls[templates].exec_time|string_format:"%.5f"}){if
%templates.index% eq 0} (total){/if}</i></font></tt></td></tr>
36c37
< var title = 'Console_' + self.name;
---
> var title = 'Console ' + self.name;
39c40
< _smarty_console.document.write("<HTML><TITLE>Smarty Debug
Console_"+self.name+"</TITLE><BODY bgcolor=#ffffff>");
---
> _smarty_console.document.write("<HTML><TITLE>Smarty {$_version} Debug
Console "+self.name+"</TITLE><BODY bgcolor=#ffffff>");
41c42
< _smarty_console.document.write("<tr bgcolor=#cccccc><th colspan=2>Smarty
Debug Console</th></tr>");
---
> _smarty_console.document.write("<tr bgcolor=#cccccc><th colspan=2>Smarty
{$_version} Debug Console</th></tr>");
44c45
< _smarty_console.document.write("<tr bgcolor={if %templates.index% is
even}#eeeeee{else}#fafafa{/if}><td colspan=2><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}</font>{if
isset($_debug_tpls[templates].exec_time)} <font
size=-1><i>({$_debug_tpls[templates].exec_time|string_format:"%.5f"}){if
%templates.index% eq 0} (total){/if}</i></font>{/if}</tt></td></tr>");
---
> _smarty_console.document.write("<tr bgcolor={if %templates.index% is
even}#eeeeee{else}#fafafa{/if}><td colspan=2><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}</font>
<font
size=-1><i>({$_debug_tpls[templates].exec_time|string_format:"%.5f"}){if
%templates.index% eq 0} (total){/if}</i></font></tt></td></tr>");
--
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic