UPDATE : A download package is available here : http://ideamesh.com/file/11/Smarty-Debug-with-Collapsible-Variables.html UPDATE: Un pacchetto di download è disponibile qui: http://ideamesh.com/file/11/Smarty-Debug-with-Collapsible-Variables.html
Here is the modified code, working and ready to go.. Ecco il codice modificato, funzionante e pronto ad andare ..
Here is the link where you can download the nanotree javascript… Ecco il link dove è possibile scaricare il 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. Sostituire la mia variabile {$ Site.framework_pub} opportunamente in modo che il javascript e le immagini possono essere caricate correttamente.
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' Inoltre si ricorda, ho aggiunto in una sezione per gestire definiti dall'utente vars di debug ... La mia struttura di debug si chiama '_user_debug' e '_user_debug_key'
For more info on how to implement this look at this thread : Per ulteriori informazioni su come implementare questo un'occhiata a questo thread:
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. In caso contrario, se non siete interessati, è possibile rimuovere tale sezione dal modello. You could also remove the {if} statement I used to wrap the template var section. Si potrebbe anche togliere il {if} ho usato per avvolgere la sezione var modello.
Another thing you might want to play with is how many characters are output as the value for debug. Un'altra cosa che si potrebbe desiderare di giocare con è quanti caratteri sono uscita come valore per il debug. Look for this and modify the second number to alter the max chars output :@debug_print_var:0:1000 Cercare questo e modificare il secondo numero di modificare la caratteri di uscita max: @ debug_print_var: 0:1000
PS Can anyone figure out why I am getting a space above the <h3> in the right cell? PS Qualcuno può capire perché io sono sempre uno spazio al di sopra della <h3> nella cella di destra?
Hope this helps, I know I like it Spero che questo aiuti, so che mi piace! ![]()
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 per ottenere tutti i javascript funziona correttamente è sufficiente modificare la riga "var mynanopath =" e fare in modo che punti alla directory nanopath pubblico. You can down the nanotree package from http://sourceforge.net/projects/nanotree/ Puoi giù il pacchetto nanotree da http://sourceforge.net/projects/nanotree/
Here is the updated code Ecco il codice aggiornato
| Code: Codice: |
| {* {* Smarty Custom DHTML Debug Template Smarty personalizzata DHTML Debug Template @author Hielke Hoeve @ Autore Hielke Hoeve @author Owen Cole <owenc at ideamesh dot com> @ Autore Owen Cole <owenc a ideamesh dot com> @since 02/13/2006 Smarty 2.6.12 @ Dal 2006/02/13 Smarty 2.6.12 @package Smarty @ Pacchetto 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 ("funzione nodeEdited (TreeNode) {ldelim} \ n"); _smarty_console.document.write(” var closedGif = '” + mynanopath + “images\/folder_closed.gif';\n”); _smarty_console.document.write ("var closedGif = '" + mynanopath + "immagini \ / folder_closed.gif'; \ n"); {* Create base node *} {* Crea nodo di base *} {* Create node for template includes *} {* Crea nodo per modello include *} _smarty_console.document.write(” rootNode.addChild(node{$counter});\n”); _smarty_console.document.write ("rootNode.addChild (node {$ contatore}); \ n"); {* Create node for user debug variables *} {* Creazione di nodo per le variabili utente Debug *} {* Create child nodes for user debug variables *} {* Creazione di nodi figlio per le variabili utente Debug *} {* Create node for template variables *} {* Crea nodo per modello le variabili *} {* Create child nodes for template variables *} {* Creazione di nodi figlio per le variabili di template *} {* Create node for smarty config file variables *} {* Creazione di nodo per le variabili del file di configurazione smarty *} {* Create child nodes for smarty config file variables *} {* Creazione di nodi figlio per le variabili del file di configurazione smarty *} _smarty_console.document.write(”\/\/–>\n”); _smarty_console.document.write ("\ / \ / -> \ n"); |









































