Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Selectively Hiding a variable in debugger

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
Saeid
Smarty Rookie


Joined: 21 Jun 2010
Posts: 25

PostPosted: Fri Apr 17, 2015 10:43 pm    Post subject: Selectively Hiding a variable in debugger Reply with quote

Hey Very Happy I am back after a long time!

I wonder if it is possible to hide certain variables from the debugger?

I have a huge php array which contains language translations. I am debugging using the smarty pop-up debugger. I would like to hide this variable from the debugger. Is there a way?

Code:

//picking up language file
if($language == "fa") {
    require(ROOT_DIR."/core/lang/lang.fa.php");
} else if($language == "en") {
    require(ROOT_DIR."/core/lang/lang.en.php");
}

$smarty->assign("lang", $LANG);


I mean I don't want to see '$lang' in the smarty debug window!

Please let me know if I my question is not clear!

Thanks!
Back to top
View user's profile Send private message Visit poster's website
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Sat Apr 18, 2015 12:01 am    Post subject: Reply with quote

One of the ways is to write a 'gettext' plugin that will fetch your variable from application scope rather than to pass whole array to the template. (Which isn't very nice either way.)
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Sat Apr 18, 2015 12:51 pm    Post subject: Reply with quote

To answer the original question; There is no way to hide variables from th debugger.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP