UPDATE : A download package is available here : http://ideamesh.com/file/11/Smarty-Debug-with-Collapsible-Variables.html UPDATE: Lae alla pakett on saadaval siin: http://ideamesh.com/file/11/Smarty-Debug-with-Collapsible-Variables.html
Here is the modified code, working and ready to go.. Siin on muudetud kood, töö ja valmis minema ..
Here is the link where you can download the nanotree javascript… Siin on link, kus saab alla laadida 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. Asenda minu muutuja {$ Site.framework_pub} asjakohaselt nii, et JavaScript ja pilte saab asetatud.
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' Samuti pange tähele, ma olen lisatud lõik käsitseda kasutaja määratud silumise vars ... Minu silumise struktuuri nimega "_user_debug" ja "_user_debug_key"
For more info on how to implement this look at this thread : Täpsemat infot selle kohta, kuidas rakendada seda pilk seda teemat:
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. Vastasel juhul, kui sa ei ole huvitatud, et see on ohutu eemaldada, et osa mallist. You could also remove the {if} statement I used to wrap the template var section. Sa võid ka eemaldada {if} avalduse Ma kasutasin wrap malli var osa.
Another thing you might want to play with is how many characters are output as the value for debug. Teine asi, mida sa tahad mängida on, kui palju märke on väljundi väärtust siluda. Look for this and modify the second number to alter the max chars output :@debug_print_var:0:1000 Vaata seda ja muuta teine number muuta max tähemärki väljund: @ debug_print_var: 0:1000
PS Can anyone figure out why I am getting a space above the <h3> in the right cell? PS Kas keegi selgitada, miks ma saan ruumi üle <h3> õiges lahtris?
Hope this helps, I know I like it Loodan, et see aitab, ma tean, et see meeldib ![]()
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 Et saada kõik javascript töötab korralikult pead ainult muutma rida "var mynanopath =" ja veenduge, et see on suunatud oma avaliku nanopath kataloog. You can down the nanotree package from http://sourceforge.net/projects/nanotree/ Võite alla nanotree pakett http://sourceforge.net/projects/nanotree/
Here is the updated code Siin on uuendatud kood
| Code: Kood: |
| {* {* Smarty Custom DHTML Debug Template Smarty Custom DHTML Debug Mall @author Hielke Hoeve @ Author Hielke Hoeve @author Owen Cole <owenc at ideamesh dot com> @ Author Owen Cole <owenc kell ideamesh dot com> @since 02/13/2006 Smarty 2.6.12 @ Alates 2006/02/13 Smarty 2.6.12 @package Smarty @ Pakett Smarty @filename debug.tpl @ Filename 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 ("funktsioon nodeEdited (treeNode) {ldelim} \ n"); _smarty_console.document.write(” var closedGif = '” + mynanopath + “images\/folder_closed.gif';\n”); _smarty_console.document.write ("var closedGif = '" + mynanopath + "images \ / folder_closed.gif" \ n "); {* Create base node *} {* Loo baasi node *} {* Create node for template includes *} {* Loo sõlm mall sisaldab *} _smarty_console.document.write(” rootNode.addChild(node{$counter});\n”); _smarty_console.document.write ("rootNode.addChild (node {$ counter}) \ n"); {* Create node for user debug variables *} {* Loo sõlm kasutaja silumise muutujad *} {* Create child nodes for user debug variables *} {* Loo tütartippu kasutaja silumise muutujad *} {* Create node for template variables *} {* Loo sõlm malli muutujad *} {* Create child nodes for template variables *} {* Loo tütartippu malli muutujad *} {* Create node for smarty config file variables *} {* Loo sõlm smarty konfiguratsioonifaili muutujad *} {* Create child nodes for smarty config file variables *} {* Registreeru lapse sõlmpunktid smarty konfiguratsioonifaili muutujad *} _smarty_console.document.write(”\/\/–>\n”); _smarty_console.document.write ("\ / \ / -> \ n"); |









































