PluginProbe
Smart Forms – when you need more than just a contact form / trunk
Smart Forms – when you need more than just a contact form vtrunk
trunk 0.5 0.5.5 0.6 0.7 0.8 0.8.5 0.9.1
smart-forms / php_classes / smarty / debug.tpl

debug.tpl in Smart Forms – when you need more than just a contact form trunk, at php_classes/smarty/debug.tpl

138 lines 4.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {capture name='_smarty_debug' assign=debug_output}
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4 <head>
5 <title>Smarty Debug Console</title>
6 <style type="text/css">
7 {literal}
8 body, h1, h2, td, th, p {
9 font-family: sans-serif;
10 font-weight: normal;
11 font-size: 0.9em;
12 margin: 1px;
13 padding: 0;
14 }
15
16 h1 {
17 margin: 0;
18 text-align: left;
19 padding: 2px;
20 background-color: #f0c040;
21 color: black;
22 font-weight: bold;
23 font-size: 1.2em;
24 }
25
26 h2 {
27 background-color: #9B410E;
28 color: white;
29 text-align: left;
30 font-weight: bold;
31 padding: 2px;
32 border-top: 1px solid black;
33 }
34
35 body {
36 background: black;
37 }
38
39 p, table, div {
40 background: #f0ead8;
41 }
42
43 p {
44 margin: 0;
45 font-style: italic;
46 text-align: center;
47 }
48
49 table {
50 width: 100%;
51 }
52
53 th, td {
54 font-family: monospace;
55 vertical-align: top;
56 text-align: left;
57 width: 50%;
58 }
59
60 td {
61 color: green;
62 }
63
64 .odd {
65 background-color: #eeeeee;
66 }
67
68 .even {
69 background-color: #fafafa;
70 }
71
72 .exectime {
73 font-size: 0.8em;
74 font-style: italic;
75 }
76
77 #table_assigned_vars th {
78 color: blue;
79 }
80
81 #table_config_vars th {
82 color: maroon;
83 }
84
85 {/literal}
86 </style>
87 </head>
88 <body>
89
90 <h1>Smarty Debug Console
91 - {if isset($template_name)}{$template_name|debug_print_var nofilter}{else}Total Time {$execution_time|string_format:"%.5f"}{/if}</h1>
92
93 {if !empty($template_data)}
94 <h2>included templates &amp; config files (load time in seconds)</h2>
95 <div>
96 {foreach $template_data as $template}
97 <font color=brown>{$template.name}</font>
98 <span class="exectime">
99 (compile {$template['compile_time']|string_format:"%.5f"}) (render {$template['render_time']|string_format:"%.5f"}) (cache {$template['cache_time']|string_format:"%.5f"}
100 )
101 </span>
102 <br>
103 {/foreach}
104 </div>
105 {/if}
106
107 <h2>assigned template variables</h2>
108
109 <table id="table_assigned_vars">
110 {foreach $assigned_vars as $vars}
111 <tr class="{if $vars@iteration % 2 eq 0}odd{else}even{/if}">
112 <th>${$vars@key|escape:'html'}</th>
113 <td>{$vars|debug_print_var nofilter}</td>
114 </tr>
115 {/foreach}
116 </table>
117
118 <h2>assigned config file variables (outer template scope)</h2>
119
120 <table id="table_config_vars">
121 {foreach $config_vars as $vars}
122 <tr class="{if $vars@iteration % 2 eq 0}odd{else}even{/if}">
123 <th>{$vars@key|escape:'html'}</th>
124 <td>{$vars|debug_print_var nofilter}</td>
125 </tr>
126 {/foreach}
127
128 </table>
129 </body>
130 </html>
131 {/capture}
132 <script type="text/javascript">
133 {$id = $template_name|default:''|md5}
134 _smarty_console = window.open("", "console{$id}", "width=680,height=600,resizable,scrollbars=yes");
135 _smarty_console.document.write("{$debug_output|escape:'javascript' nofilter}");
136 _smarty_console.document.close();
137 </script>
138