Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Another Debugger idea.. Collapsable variables..
Goto page Previous  1, 2
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Feature Requests
View previous topic :: View next topic  
Author Message
TGKnIght
Smarty Junkie


Joined: 07 Sep 2005
Posts: 580
Location: Philadelphia, PA

PostPosted: Tue Feb 21, 2006 2:53 pm    Post subject: Reply with quote

Hmm... my code seems to work fine in FireFox... anyone want to help me examine why it doesn't work in IE?
_________________
Smarty site with one index.php controller file
Working with MySQL and Smarty
SmartyColumnSort
Custom Smarty Javascript Debug Template
Back to top
View user's profile Send private message Visit poster's website
TGKnIght
Smarty Junkie


Joined: 07 Sep 2005
Posts: 580
Location: Philadelphia, PA

PostPosted: Tue Feb 21, 2006 3:12 pm    Post subject: Reply with quote

Updated to escape more slashes... and add more line breaks in code for readability.

Code:

{*
   Smarty Custom DHTML Debug Template
   @author Hielke Hoeve
   @author Owen Cole <owenc at totalsales dot com>
   @since 02/13/2006 Smarty 2.6.12
   @package Smarty
   @filename debug.tpl
*}

{assign_debug_info}

<SCRIPT language=javascript>
   if( self.name == '' ) {ldelim}
      var title = 'Console';
   {rdelim}
   else {ldelim}
      var title = 'Console_' + self.name;
   {rdelim}
   _smarty_console = window.open("",title.value,"width=800,height=600,resizable,scrollbars=yes");
   _smarty_console.document.write("<html><head><title>Smarty Debug Console_"+self.name+"<\/title>\n");
   _smarty_console.document.write("<style>\n");
   _smarty_console.document.write("h3 {ldelim}padding : 5px 5px 5px 5px; margin 0px 0px 0px 0px; background-color : #cccccc;{rdelim}\n");
   _smarty_console.document.write("#debugtreetable {ldelim}width : 100%;{rdelim} \n");
   _smarty_console.document.write("#debugtreetable td {ldelim}border : thin solid black;{rdelim} \n");
   _smarty_console.document.write("#debugtreetextdiv div {ldelim}padding-left : 10px;{rdelim} \n");
   _smarty_console.document.write("<\/style>\n");
   _smarty_console.document.write("<script language=\"Javascript\" src=\"{$Site.framework_pub}\/javascript\/nanotree\/nanotree.js\"><\/script>\n");
   _smarty_console.document.write("<script type=\"text\/javascript\" language=\"JavaScript\">\n");
   _smarty_console.document.write("<!--\n");
   _smarty_console.document.write("   showRootNode = true;\n");
   _smarty_console.document.write("   sortNodes = 0;\n");   
   _smarty_console.document.write("   dragable = false;\n");
   _smarty_console.document.write("   showAllNodesOnStartup = true;\n");

   _smarty_console.document.write("   \/**\n");
   _smarty_console.document.write("    * Needed to initialize the tree.\n");
   _smarty_console.document.write("    * And to call showTree(imagePath); to actually show the tree.\n");
   _smarty_console.document.write("    * Alternatively this can be done in a script block at the bottom of the page.\n");
   _smarty_console.document.write("    * Though this method is somewhat cleaner.\n");
   _smarty_console.document.write("    *\/\n");
   _smarty_console.document.write("   function init() {ldelim}\n");
   _smarty_console.document.write("      container = document.getElementById('debugtreediv');\n");
   _smarty_console.document.write("      showTree('{$Site.framework_pub}\/javascript\/nanotree\/');\n");
   _smarty_console.document.write("   {rdelim}\n");

   _smarty_console.document.write("   \/**\n");
   _smarty_console.document.write("    * Called when a user clicks on a node.\n");
   _smarty_console.document.write("    * @param treeNode the TreeNode object which have been clicked.\n");
   _smarty_console.document.write("    *\/\n");
   _smarty_console.document.write("   function standardClick(treeNode) {ldelim}\n");
   _smarty_console.document.write("      var mytext = document.getElementById('debugtreetextdiv');\n");
   _smarty_console.document.write("      var param = treeNode.getParam();\n");
   _smarty_console.document.write("      mytext.innerHTML = (param == '') ? treeNode.getName() : '<h3>' + treeNode.getName() + '<\/h3><div>' + param + '<\/div>';\n");
   _smarty_console.document.write("   {rdelim}\n");

   _smarty_console.document.write("   function nodeEdited(treeNode) {ldelim}\n");
   _smarty_console.document.write("   {rdelim}\n");

   _smarty_console.document.write("   var closedGif = '{$Site.framework_pub}\/javascript\/nanotree\/images\/folder_closed.gif';\n");
   _smarty_console.document.write("   var openGif   = '{$Site.framework_pub}\/javascript\/nanotree\/images\/folder_open.gif';\n");
   _smarty_console.document.write("   var pageIcon  = '{$Site.framework_pub}\/javascript\/nanotree\/images\/page16x16.gif';\n");
   _smarty_console.document.write("   var userIcon  = '{$Site.framework_pub}\/javascript\/nanotree\/images\/user_16x16.gif';\n");
   _smarty_console.document.write("   var helpIcon  = '{$Site.framework_pub}\/javascript\/nanotree\/images\/help_16x16.gif';\n");

{* Create base node *}
                              {assign var=counter value=0}
   _smarty_console.document.write("   rootNode = new TreeNode({$counter},'Smarty Debug', helpIcon, 'This is the Debug Tree. It replaces the classical version of the Smarty Debug Console');\n");
                              {$counter++}

{* Create node for template includes *}
   _smarty_console.document.write("   var node{$counter} = new TreeNode({$counter}, 'included templates & config files (load time in seconds):', pageIcon, '");
      _smarty_console.document.write("<table width=\"100%\">");
   {section name=templates loop=$_debug_tpls}
      _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|escape:html|escape:javascript}<\\/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>");
   {sectionelse}
      _smarty_console.document.write("<tr bgcolor=#eeeeee><td colspan=2><tt><i>no templates included<\\/i><\\/tt><\\/td><\\/tr>");   
   {/section}
      _smarty_console.document.write("<\\/table>");
   _smarty_console.document.write("');\n");

   _smarty_console.document.write("   rootNode.addChild(node{$counter});\n");
                              {$counter++}

{* Create node for user debug variables *}
   _smarty_console.document.write("   var node{$counter} = new TreeNode({$counter}, 'user debug variables:', new Array(closedGif,openGif) );\n");
   _smarty_console.document.write("   rootNode.addChild(node{$counter});\n");
   _smarty_console.document.write("   parent = node{$counter};\n");
                              {$counter++}

{* Create child nodes for user debug variables *}
                              {section name=vars loop=$_user_debug}
   _smarty_console.document.write("      var node{$counter} = new TreeNode( {$counter}, '{ldelim}${$_user_debug_key[vars]}{rdelim}', pageIcon, '{$_user_debug[vars]|@debug_print_var:0:1000|escape:javascript|escape:javascript}' );\n");
   _smarty_console.document.write("      parent.addChild(node{$counter});\n");
                                 {$counter++}
                              {sectionelse}
   _smarty_console.document.write("      var node{$counter} = new TreeNode(   {$counter}, 'No User Debug Information assigned', HelpIcon );\n");
   _smarty_console.document.write("      parent.addChild(node{$counter});\n");
                                         {$counter++}
                              {/section}

{* Create node for template variables *}
   _smarty_console.document.write("   var node{$counter} = new TreeNode({$counter}, 'assigned template variables:', new Array(closedGif,openGif) );\n");
   _smarty_console.document.write("   rootNode.addChild(node{$counter});\n");
   _smarty_console.document.write("   parent = node{$counter};\n");
                              {$counter++}

{* Create child nodes for template variables *}
                              {section name=vars loop=$_debug_keys}
                                    { if $_debug_keys[vars] != '_user_debug' && $_debug_keys[vars] != '_user_debug_key' }
   _smarty_console.document.write("      var node{$counter} = new TreeNode( {$counter}, '{ldelim}${$_debug_keys[vars]}{rdelim}', pageIcon, '{$_debug_vals[vars]|@debug_print_var:0:1000|escape:javascript|escape:javascript}' );\n");
   _smarty_console.document.write("      parent.addChild(node{$counter});\n");
                                 {$counter++}
                                     {/if}
                              {sectionelse}
   _smarty_console.document.write("      var node{$counter} = new TreeNode(   {$counter}, 'No template variables assigned', HelpIcon );\n");
   _smarty_console.document.write("      parent.addChild(node{$counter});\n");
                                         {$counter++}
                              {/section}

{* Create node for smarty config file variables *}
   _smarty_console.document.write("   var node{$counter} = new TreeNode({$counter}, 'assigned config file variables (outer template scope):', new Array(closedGif,openGif) );\n");
   _smarty_console.document.write("   rootNode.addChild(node{$counter});\n");
   _smarty_console.document.write("   parent = node{$counter};\n");
                                  {$counter++}

{* Create child nodes for smarty config file variables *}
                                    {section name=config_vars loop=$_debug_config_keys}
    _smarty_console.document.write("       var node{$counter} = new TreeNode( {$counter}, '{ldelim}${$_debug_config_keys[config_vars]}{rdelim}', pageIcon,  '{$_debug_config_vals[config_vars]|@debug_print_var:0:1000|escape:javascript|escape:javascript}' );\n");
    _smarty_console.document.write("        parent.addChild(node{$counter});\n");
                                         {$counter++}
                                    {sectionelse}
    _smarty_console.document.write("      var node{$counter} = new TreeNode( {$counter}, 'No config variables assigned', HelpIcon );\n");
   _smarty_console.document.write("      parent.addChild(node{$counter});\n");
                                         {$counter++}
                                    {/section}

   _smarty_console.document.write("\/\/-->\n");
   _smarty_console.document.write("<\/script>\n\n");
   _smarty_console.document.write("<\/head><body onload=\"init()\">\n");
   _smarty_console.document.write("<h3>Smarty & User Debug Console<\/h3>");
   _smarty_console.document.write("<h4>Click on variables in the tree to have their contents displayed in the right side panel.<\/h4>");
   _smarty_console.document.write("<table border='0' id='debugtreetable'><tr>");
   _smarty_console.document.write("<td valign='top' style='width: 250px;'><div id='debugtreediv'>&<\/div><\/td>");
   _smarty_console.document.write("<td valign='top'><div id='debugtreetextdiv'>&<\/td>");
   _smarty_console.document.write("<\/tr><\/table>");
   _smarty_console.document.write("<\/body><\/html>");
   _smarty_console.document.close();
</SCRIPT>

_________________
Smarty site with one index.php controller file
Working with MySQL and Smarty
SmartyColumnSort
Custom Smarty Javascript Debug Template
Back to top
View user's profile Send private message Visit poster's website
Hielke Hoeve
Smarty Elite


Joined: 06 Jan 2006
Posts: 406
Location: Netherlands

PostPosted: Tue Feb 21, 2006 10:43 pm    Post subject: Reply with quote

I don't use either Wink I haven't had the chance to look at it, sorry, but will do it soon and make some addon.
_________________
Debug XHTML Compliance
SmartyPaginate
Smarty License Questions
---
(About Unix) The learning curve is full of aha! moments, such as that glorious day that the full beauty of grep and, later, find is revealed in all its majesty. --- Robert Uhl <ruhl@4dv.net>
Back to top
View user's profile Send private message
TGKnIght
Smarty Junkie


Joined: 07 Sep 2005
Posts: 580
Location: Philadelphia, PA

PostPosted: Thu Mar 02, 2006 10:21 pm    Post subject: Reply with quote

Line 22 -- Replace with this :

Code:

_smarty_console.document.write("h3 {ldelim}padding : 5px 5px 5px 5px; margin : 0px 0px 0px 0px; background-color : #cccccc;{rdelim}\n");


I had missed the colon after the margin style...

I am still unable to get this to successfully load with IE.. It only loads the first node, then when trying to add the second node to the parent, it gives me :

Code:

Line : 45
Error : Not Implemented


Here is the code on line 45 of the template output

Code:

rootNode.addChild(node2);


Any successes with other browsers? I only use FireFox and IE
_________________
Smarty site with one index.php controller file
Working with MySQL and Smarty
SmartyColumnSort
Custom Smarty Javascript Debug Template
Back to top
View user's profile Send private message Visit poster's website
TGKnIght
Smarty Junkie


Joined: 07 Sep 2005
Posts: 580
Location: Philadelphia, PA

PostPosted: Wed May 31, 2006 3:52 pm    Post subject: Reply with quote

Ahhh... after months of torture, I have figured out what the problem with IE with the custom template!!! Sometimes the simplest problems are the hardest to find..

Basically on line 87 the parent variable needs to be initialized with "var".

To get all the javascript working correctly you only need to modify the line "var mynanopath = " and make sure it points to your public nanopath directory. You can down the nanotree package from http://sourceforge.net/projects/nanotree/

Here is the updated code
Code:

{*
   Smarty Custom DHTML Debug Template
   @author Hielke Hoeve
   @author Owen Cole <owenc at totalsales dot com>
   @since 02/13/2006 Smarty 2.6.12
   @package Smarty
   @filename debug.tpl
*}

{assign_debug_info}

<SCRIPT language=javascript>
   var mynanopath =  "{$Site.javascript_path}\/nanotree\/";

   if( self.name == '' ) {ldelim}
      var title = 'Console';
   {rdelim}
   else {ldelim}
      var title = 'Console_' + self.name;
   {rdelim}
   _smarty_console = window.open("",title.value,"width=800,height=600,resizable,scrollbars=yes");
   _smarty_console.document.write("<html><head><title>Smarty Debug Console_"+self.name+"<\/title>\n");
   _smarty_console.document.write("<style>\n");
   _smarty_console.document.write("h3 {ldelim}padding : 5px 5px 5px 5px; margin : 0px 0px 0px 0px; background-color : #cccccc;{rdelim}\n");
   _smarty_console.document.write("#debugtreetable {ldelim}width : 100%;{rdelim} \n");
   _smarty_console.document.write("#debugtreetable td {ldelim}border : thin solid black;{rdelim} \n");
   _smarty_console.document.write("#debugtreetextdiv div {ldelim}padding-left : 10px;{rdelim} \n");
   _smarty_console.document.write("<\/style>\n");
   _smarty_console.document.write("<script language=\"Javascript\" src=\"" + mynanopath + "nanotree.js\"><\/script>\n");
   _smarty_console.document.write("<script type=\"text\/javascript\" language=\"JavaScript\">\n");
   _smarty_console.document.write("<!--\n");
   _smarty_console.document.write("   showRootNode = true;\n");
   _smarty_console.document.write("   sortNodes = 0;\n");   
   _smarty_console.document.write("   dragable = false;\n");
   _smarty_console.document.write("   showAllNodesOnStartup = true;\n");

   _smarty_console.document.write("   \/**\n");
   _smarty_console.document.write("    * Needed to initialize the tree.\n");
   _smarty_console.document.write("    * And to call showTree(imagePath); to actually show the tree.\n");
   _smarty_console.document.write("    * Alternatively this can be done in a script block at the bottom of the page.\n");
   _smarty_console.document.write("    * Though this method is somewhat cleaner.\n");
   _smarty_console.document.write("    *\/\n");
   _smarty_console.document.write("   function init() {ldelim}\n");
   _smarty_console.document.write("      container = document.getElementById('debugtreediv');\n");
   _smarty_console.document.write("      showTree('" + mynanopath + "');\n");
   _smarty_console.document.write("   {rdelim}\n");

   _smarty_console.document.write("   \/**\n");
   _smarty_console.document.write("    * Called when a user clicks on a node.\n");
   _smarty_console.document.write("    * @param treeNode the TreeNode object which have been clicked.\n");
   _smarty_console.document.write("    *\/\n");
   _smarty_console.document.write("   function standardClick(treeNode) {ldelim}\n");
   _smarty_console.document.write("      var mytext = document.getElementById('debugtreetextdiv');\n");
   _smarty_console.document.write("      var param = treeNode.getParam();\n");
   _smarty_console.document.write("      mytext.innerHTML = (param == '') ? treeNode.getName() : '<h3>' + treeNode.getName() + '<\/h3><div>' + param + '<\/div>';\n");
   _smarty_console.document.write("   {rdelim}\n");

   _smarty_console.document.write("   function nodeEdited(treeNode) {ldelim}\n");
   _smarty_console.document.write("   {rdelim}\n");

   _smarty_console.document.write("   var closedGif = '" + mynanopath + "images\/folder_closed.gif';\n");
   _smarty_console.document.write("   var openGif   = '" + mynanopath + "images\/folder_open.gif';\n");
   _smarty_console.document.write("   var pageIcon  = '" + mynanopath + "images\/page16x16.gif';\n");
   _smarty_console.document.write("   var userIcon  = '" + mynanopath + "images\/user_16x16.gif';\n");
   _smarty_console.document.write("   var helpIcon  = '" + mynanopath + "images\/help_16x16.gif';\n");

{* Create base node *}
                              {assign var=counter value=0}
   _smarty_console.document.write("   rootNode = new TreeNode({$counter},'Smarty Debug', helpIcon, 'This is the Debug Tree. It replaces the classical version of the Smarty Debug Console');\n");
                              {$counter++}

{* Create node for template includes *}
   _smarty_console.document.write("   var node{$counter} = new TreeNode({$counter}, 'included templates & config files (load time in seconds):', pageIcon, '");
      _smarty_console.document.write("<table width=\"100%\">");
   {section name=templates loop=$_debug_tpls}
      _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|escape:html|escape:javascript}<\\/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>");
   {sectionelse}
      _smarty_console.document.write("<tr bgcolor=#eeeeee><td colspan=2><tt><i>no templates included<\\/i><\\/tt><\\/td><\\/tr>");   
   {/section}
      _smarty_console.document.write("<\\/table>");
   _smarty_console.document.write("');\n");

   _smarty_console.document.write("   rootNode.addChild(node{$counter});\n");
                              {$counter++}

{* Create node for user debug variables *}
   _smarty_console.document.write("   var node{$counter} = new TreeNode({$counter}, 'user debug variables:', new Array(closedGif,openGif) );\n");
   _smarty_console.document.write("   rootNode.addChild(node{$counter});\n");
   _smarty_console.document.write("   var parent = node{$counter};\n");
                              {$counter++}

{* Create child nodes for user debug variables *}
                              {section name=vars loop=$_user_debug}
   _smarty_console.document.write("      var node{$counter} = new TreeNode( {$counter}, '{ldelim}${$_user_debug_key[vars]}{rdelim}', pageIcon, '{$_user_debug[vars]|@debug_print_var:0:1000|escape:javascript|escape:javascript}' );\n");
   _smarty_console.document.write("      parent.addChild(node{$counter});\n");
                                 {$counter++}
                              {sectionelse}
   _smarty_console.document.write("      var node{$counter} = new TreeNode(   {$counter}, 'No User Debug Information assigned', HelpIcon );\n");
   _smarty_console.document.write("      parent.addChild(node{$counter});\n");
                                         {$counter++}
                              {/section}

{* Create node for template variables *}
   _smarty_console.document.write("   var node{$counter} = new TreeNode({$counter}, 'assigned template variables:', new Array(closedGif,openGif) );\n");
   _smarty_console.document.write("   rootNode.addChild(node{$counter});\n");
   _smarty_console.document.write("   var parent = node{$counter};\n");
                              {$counter++}

{* Create child nodes for template variables *}
                              {section name=vars loop=$_debug_keys}
                                    { if $_debug_keys[vars] != '_user_debug' && $_debug_keys[vars] != '_user_debug_key' }
   _smarty_console.document.write("      var node{$counter} = new TreeNode( {$counter}, '{ldelim}${$_debug_keys[vars]}{rdelim}', pageIcon, '{$_debug_vals[vars]|@debug_print_var:0:1000|escape:javascript|escape:javascript}' );\n");
   _smarty_console.document.write("      parent.addChild(node{$counter});\n");
                                 {$counter++}
                                     {/if}
                              {sectionelse}
   _smarty_console.document.write("      var node{$counter} = new TreeNode(   {$counter}, 'No template variables assigned', HelpIcon );\n");
   _smarty_console.document.write("      parent.addChild(node{$counter});\n");
                                         {$counter++}
                              {/section}

{* Create node for smarty config file variables *}
   _smarty_console.document.write("   var node{$counter} = new TreeNode({$counter}, 'assigned config file variables (outer template scope):', new Array(closedGif,openGif) );\n");
   _smarty_console.document.write("   rootNode.addChild(node{$counter});\n");
   _smarty_console.document.write("   var parent = node{$counter};\n");
                                  {$counter++}

{* Create child nodes for smarty config file variables *}
                                    {section name=config_vars loop=$_debug_config_keys}
    _smarty_console.document.write("       var node{$counter} = new TreeNode( {$counter}, '{ldelim}${$_debug_config_keys[config_vars]}{rdelim}', pageIcon,  '{$_debug_config_vals[config_vars]|@debug_print_var:0:1000|escape:javascript|escape:javascript}' );\n");
    _smarty_console.document.write("        parent.addChild(node{$counter});\n");
                                         {$counter++}
                                    {sectionelse}
    _smarty_console.document.write("      var node{$counter} = new TreeNode( {$counter}, 'No config variables assigned', HelpIcon );\n");
   _smarty_console.document.write("      parent.addChild(node{$counter});\n");
                                         {$counter++}
                                    {/section}

   _smarty_console.document.write("\/\/-->\n");
   _smarty_console.document.write("<\/script>\n\n");
   _smarty_console.document.write("<\/head><body onload=\"init()\">\n");
   _smarty_console.document.write("<h3>Smarty & User Debug Console<\/h3>");
   _smarty_console.document.write("<h4>Click on variables in the tree to have their contents displayed in the right side panel.<\/h4>");
   _smarty_console.document.write("<table border='0' id='debugtreetable'><tr>");
   _smarty_console.document.write("<td valign='top' style='width: 250px;'><div id='debugtreediv'>&<\/div><\/td>");
   _smarty_console.document.write("<td valign='top'><div id='debugtreetextdiv'>&<\/td>");
   _smarty_console.document.write("<\/tr><\/table>");
   _smarty_console.document.write("<\/body><\/html>");
   _smarty_console.document.close();
</SCRIPT>

_________________
Smarty site with one index.php controller file
Working with MySQL and Smarty
SmartyColumnSort
Custom Smarty Javascript Debug Template
Back to top
View user's profile Send private message Visit poster's website
acosonic
Smarty n00b


Joined: 24 Feb 2009
Posts: 1

PostPosted: Tue Feb 24, 2009 4:35 pm    Post subject: hi Reply with quote

I've created update based on your code, to use firebug's debug console...

Here is the code:

Code:

{*
   Smarty Custom Firefox console log Debug Template
   @author Aleksandar Pavic
   @since 02/13/2006 Smarty 2.6.12
   @package Smarty
   @filename debug.tpl
*}

{assign_debug_info}

<SCRIPT language="javascript">
{* Create node for template includes *}
   console.log("included templates & config files (load time in seconds):");
   {section name=templates loop=$_debug_tpls}
      console.log("{section name=indent loop=$_debug_tpls[templates].depth}  {/section}{$_debug_tpls[templates].filename|escape:html|escape:javascript} {if isset($_debug_tpls[templates].exec_time)}({$_debug_tpls[templates].exec_time|string_format:"%.5f"}){if %templates.index% eq 0} (total){/if}{/if}");
   {sectionelse}
      console.log("no templates included");   
   {/section}
      console.log("---------------------------------------------------------------------------");

   console.log(" user debug variables:");
{* Create child nodes for user debug variables *}
   {section name=vars loop=$_user_debug}
   console.log("{ldelim}${$_user_debug_key[vars]}{rdelim} {$_user_debug[vars]|@debug_print_var:0:1000|escape:javascript|escape:javascript}' );");
   {sectionelse}
   console.log("No User Debug Information assigned");
    {/section}

    console.log("---------------------------------------------------------------------------");

{* Create node for template variables *}
   console.log("assigned template variables:");
{* Create child nodes for template variables *}
    {section name=vars loop=$_debug_keys}
        {if $_debug_keys[vars] != '_user_debug' && $_debug_keys[vars] != '_user_debug_key' }
   console.log(" ${$_debug_keys[vars]} {$_debug_vals[vars]|@debug_print_var:0:1000|escape:javascript|escape:javascript} );");
        {/if}
    {sectionelse}
   console.log("No template variables assigned");
    {/section}
   
console.log("---------------------------------------------------------------------------");
{* Create node for smarty config file variables *}
   console.log("assigned config file variables (outer template scope):");

{* Create child nodes for smarty config file variables *}
    {section name=config_vars loop=$_debug_config_keys}
    console.log("{ldelim}${$_debug_config_keys[config_vars]}{rdelim} {$_debug_config_vals[config_vars]|@debug_print_var:0:1000|escape:javascript|escape:javascript}' );");
    {sectionelse}
    console.log("No config variables assigned");
    {/section}
</SCRIPT>
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Feature Requests All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP