UPDATE : A download package is available here : http://ideamesh.com/file/11/Smarty-Debug-with-Collapsible-Variables.html UPDATE: ดาวน์โหลดแพคเกจสามารถใช้ได้ที่นี่: http://ideamesh.com/file/11/Smarty-Debug-with-Collapsible-Variables.html
Here is the modified code, working and ready to go.. ที่นี่รหัสการแก้ไขคือการทำงานและพร้อมที่จะไป ..
Here is the link where you can download the nanotree javascript… นี่คือลิงค์ที่คุณสามารถดาวน์โหลด nanotree จาวาสคริปต์เป็น ...
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. แทนที่ตัวแปร $ {} Site.framework_pub ของฉันอย่างเหมาะสมเพื่อให้จาวาสคริปต์และภาพที่สามารถโหลดได้อย่างถูกต้อง
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' ยังโปรดทราบฉันได้เพิ่มในส่วนที่จะจัดการกับตัวแปรการแก้ปัญหาที่ผู้ใช้กำหนด ... โครงสร้างการแก้ปัญหาของฉันคือที่ชื่อว่า '_user_debug' และ '_user_debug_key'
For more info on how to implement this look at this 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. มิฉะนั้นถ้าคุณไม่ได้สนใจจะปลอดภัยที่จะลบส่วนที่จากแม่แบบ You could also remove the {if} statement I used to wrap the template var section. นอกจากนี้คุณยังสามารถลบคำสั่ง {} ถ้าผมใช้ในการตัดส่วน var แม่
Another thing you might want to play with is how many characters are output as the value for debug. สิ่งที่คุณอาจต้องการที่จะเล่นกับอีกประการหนึ่งคือวิธีการหลายตัวอักษรออกเป็นความคุ้มค่าต่อการแก้ปัญหา Look for this and modify the second number to alter the max chars output :@debug_print_var:0:1000 มองหานี้และแก้ไขตัวเลขที่สองที่จะปรับเปลี่ยนการแสดงผลตัวอักษรสูงสุด: debug_print_var @: 0:1000
PS Can anyone figure out why I am getting a space above the <h3> in the right cell? พีเอสทุกคนสามารถคิดออกว่าทำไมฉันได้รับพื้นที่อากาศด้านบน <h3> ในเซลล์ที่เหมาะสมหรือไม่
Hope this helps, I know I like it หวังว่านี้จะช่วยให้ฉันรู้ว่าฉันชอบมัน ![]()
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. พีเอสเพื่อให้ได้ทั้งหมดจาวาสคริปต์ทำงานอย่างถูกต้องคุณจะต้องปรับเปลี่ยนบรรทัด "var mynanopath =" และให้แน่ใจว่ามันชี้ไปยังไดเรกทอรี nanopath สาธารณะของคุณ You can down the nanotree package from http://sourceforge.net/projects/nanotree/ คุณสามารถลงแพคเกจ nanotree จาก http://sourceforge.net/projects/nanotree/
Here is the updated code ที่นี่รหัสปรับปรุง
| Code: รหัสสินค้า: |
| {* {* Smarty Custom DHTML Debug Template แม่แบบที่กำหนดเอง Smarty Debug DHTML @author Hielke Hoeve @ ผู้เขียน Hoeve Hielke @author Owen Cole <owenc at ideamesh dot com> @ ผู้เขียนโอเว่นโคล <owenc ที่ ideamesh จุด com> @since 02/13/2006 Smarty 2.6.12 @ ตั้งแต่ 2006/02/13 Smarty 2.6.12 @package Smarty @ Smarty แพคเกจ @filename debug.tpl @ debug.tpl ชื่อไฟล์ *} *} {assign_debug_info} {} assign_debug_info <SCRIPT language=javascript> <SCRIPT language=javascript> if( self.name == ” ) {ldelim} ถ้า (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 ("ฟังก์ชั่น nodeEdited (ทำใจ) {} 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 *} {* สร้าง * โหนดฐาน} {* Create node for template includes *} {* สร้างโหนดสำหรับแม่แบบรวมถึง *} _smarty_console.document.write(” rootNode.addChild(node{$counter});\n”); _smarty_console.document.write ("rootNode.addChild (โหนด {$ เคาน์เตอร์}) \ n"); {* Create node for user debug variables *} {* สร้างโหนดสำหรับตัวแปรการแก้ปัญหาของผู้ใช้ *} {* Create child nodes for user debug variables *} {* สร้างโหนดลูกสำหรับตัวแปรการแก้ปัญหาของผู้ใช้ *} {* Create node for template variables *} {* สร้างโหนดสำหรับแม่แบบ * ตัวแปร} {* Create child nodes for template variables *} {* สร้างโหนดลูกแม่แบบสำหรับตัวแปร *} {* Create node for smarty config file variables *} {* สร้างโหนดสำหรับตัวแปรไฟล์ config Smarty *} {* Create child nodes for smarty config file variables *} {* สร้างโหนดลูกสำหรับตัวแปรไฟล์ config Smarty *} _smarty_console.document.write(”\/\/–>\n”); _smarty_console.document.write ("\ / \ / -> \ n"); |









































