UPDATE : A download package is available here : http://ideamesh.com/file/11/Smarty-Debug-with-Collapsible-Variables.html UPPDATERING: En hämtade paketet finns här: http://ideamesh.com/file/11/Smarty-Debug-with-Collapsible-Variables.html
Here is the modified code, working and ready to go.. Här är den modifierade koden, arbeta och redo att gå ..
Here is the link where you can download the nanotree javascript… Här är länken där du kan hämta nanotree javascript ...
http://nanotree.sourceforge.net/ http://nanotree.sourceforge.net/
Replace my variable {$Site.framework_pub} appropriately so that the javascript and images can be loaded correctly. Ersätt min variabel {$ Site.framework_pub} lämpligt sätt så att javascript och bilder kan laddas korrekt.
Also please note, I have added in a section to handle user defined debug vars… My debug structure is named '_user_debug' and '_user_debug_key' Också behaga notera, har jag lagt till i en avsnitt för att hantera användarnas definierad debug Vars ... My debug struktur är uppkallad '_user_debug' och '_user_debug_key'
For more info on how to implement this look at this thread : För mer information om hur man genomför detta titt på denna tråd:
http://www.smarty.net/forums/viewtopic.php?p=31241#31241 http://www.smarty.net/forums/viewtopic.php?p=31241 # 31241
Otherwise if you aren't interested, it is safe to remove that section from the template. Annars om du inte är intresserad, är det säkert att ta bort den delen från mallen. You could also remove the {if} statement I used to wrap the template var section. Du kan också ta bort {if} uttalande jag brukade linda avsnittet mallen var.
Another thing you might want to play with is how many characters are output as the value for debug. En annan sak du kanske vill spela med är hur många tecken matas ut som värdet för debug. Look for this and modify the second number to alter the max chars output :@debug_print_var:0:1000 Leta efter detta och ändra det andra numret att ändra Max tecken utgång: @ debug_print_var: 0:1000
PS Can anyone figure out why I am getting a space above the <h3> in the right cell? PS Kan någon räkna ut varför jag får ett utrymme ovanför <h3> i rätt cell?
Hope this helps, I know I like it Hoppas att detta hjälper, jag vet att jag gillar det ![]()
PS 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. PS För att få all javascript fungerar korrekt behöver du bara ändra raden "var mynanopath =" och se till att den pekar till din offentliga nanopath katalogen. You can down the nanotree package from http://sourceforge.net/projects/nanotree/ Du kan ner den nanotree paket från http://sourceforge.net/projects/nanotree/
Here is the updated code Här är den uppdaterade koden
| Code: Kod: |
| {* {* Smarty Custom DHTML Debug Template Smarty Custom DHTML Debug mall @author Hielke Hoeve @ Författare Hielke Hoeve @author Owen Cole <owenc at ideamesh dot com> @ Författare Owen Cole <owenc vid ideamesh dot com> @since 02/13/2006 Smarty 2.6.12 @ Sedan 2006/02/13 Smarty 2.6.12 @package Smarty @ Paketet Smarty @filename debug.tpl @ Filnamn debug.tpl *} *} {assign_debug_info} {Assign_debug_info} <SCRIPT language=javascript> <SCRIPT Language=javascript> if( self.name == ” ) {ldelim} if (self.name == ") {ldelim} _smarty_console.document.write(” \/**\n”); _smarty_console.document.write ("\ / ** \ n"); _smarty_console.document.write(” \/**\n”); _smarty_console.document.write ("\ / ** \ n"); _smarty_console.document.write(” function nodeEdited(treeNode) {ldelim}\n”); _smarty_console.document.write ("funktionen nodeEdited (treeNode) {ldelim} \ n"); _smarty_console.document.write(” var closedGif = '” + mynanopath + “images\/folder_closed.gif';\n”); _smarty_console.document.write ("var closedGif = '" + mynanopath + "bilder \ / folder_closed.gif', \ n"); {* Create base node *} {* Skapa * base node} {* Create node for template includes *} {* Skapa nod för mall innehåller *} _smarty_console.document.write(” rootNode.addChild(node{$counter});\n”); _smarty_console.document.write ("rootNode.addChild (nod {$ räknare}); \ n"); {* Create node for user debug variables *} {* Skapa nod för variabler användargrupper debug *} {* Create child nodes for user debug variables *} {* Skapa underordnade noder för variabler användargrupper debug *} {* Create node for template variables *} {* Skapa nod för mall variabler *} {* Create child nodes for template variables *} {* Skapa underordnade noder för mallvariabler *} {* Create node for smarty config file variables *} {* Skapa nod för smarty variabler konfigurationsfil *} {* Create child nodes for smarty config file variables *} {* Skapa underordnade noder för smarty variabler konfigurationsfil *} _smarty_console.document.write(”\/\/–>\n”); _smarty_console.document.write ("\ / \ / -> \ n"); |









































