X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   [Debug Console] Switching easy between showing variables or files (https://forum.x-cart.com/showthread.php?t=44543)

ADDISON 01-02-2009 02:11 AM

[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?

carpeperdiem 01-02-2009 04:58 AM

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.

Ene 01-02-2009 06:58 AM

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.

ADDISON 01-02-2009 07:19 AM

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!

Ene 01-03-2009 07:25 AM

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';

ADDISON 01-11-2009 12:43 PM

Re: [Debug Console] Switching easy between showing variables or files
 
Works fine. Nice tip!

ozchris 08-19-2009 04:45 PM

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

cflsystems 08-19-2009 04:59 PM

Re: [Debug Console] Switching easy between showing variables or files
 
Open the template and delete all instances of "wm_remove"

ozchris 08-19-2009 07:29 PM

Re: [Debug Console] Switching easy between showing variables or files
 
cflsystems, you're beautiful!

andrewmattress 03-05-2013 07:58 AM

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.