![]() |
[Debug Console] Switching easy between showing variables or files
Hi Guys,
By default in smarty.php $smarty->debug_tpl = "file:debug_templates.tpl";. Setting up this value means showing the template files in the Debugging Console. I would like to insert a check box in Admin before activating the Webmaster mode. When this box is checked to set up $smarty->debug_tpl = "file:debug.tpl";. This means to switch showing smarty variables instead of template files. Could anyone help? |
Re: [Debug Console] Switching easy between showing variables or files
That's a great idea... instead of having to edit the file before every variable search - a checkbox! I am subscribing to this thread. Hope someone knows how to do this.
|
Re: [Debug Console] Switching easy between showing variables or files
3 Attachment(s)
Download the attached debug_templates.tpl template.
Backup the existing one. Then upload the new one. That's all. |
Re: [Debug Console] Switching easy between showing variables or files
Wow! Very good!
How can I make this window by default to show the variables not the files? P.S. This forum is a treasure with a lot of value people. Keep going! |
Re: [Debug Console] Switching easy between showing variables or files
Edit the debug_templates.tpl file.
Replace this line: HTML Code:
_smarty_console.document.getElementById('vars').style.display = 'none'; with the: HTML Code:
_smarty_console.document.getElementById('templates').style.display = 'none'; |
Re: [Debug Console] Switching easy between showing variables or files
Works fine. Nice tip!
|
Re: [Debug Console] Switching easy between showing variables or files
I tried this on an old site running 4.1.9 and got the message:
Error: Smarty error: [in file:debug_templates.tpl line 10]: [plugin] modifier 'wm_remove' is not implemented (core.load_plugins.php, line 118) in C:\xampp\htdocs\mysite\Smarty-2.6.12\Smarty.class.php on line 1095 |
Re: [Debug Console] Switching easy between showing variables or files
Open the template and delete all instances of "wm_remove"
|
Re: [Debug Console] Switching easy between showing variables or files
cflsystems, you're beautiful!
|
Re: [Debug Console] Switching easy between showing variables or files
This was very helpful. Thank-you very much!
|
All times are GMT -8. The time now is 08:59 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.