Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Smarty problem

Hi!
1.Why when I write {$User|@var_dump} or {'test'|@var_dump}
application crashed with message:
"Something has gone wrong.
We've run into a problem and are unable to handle this request right now.
Please check back in a little while."
2.
{php} var_dump('test'); var_dump($User); echo 'test''; {/php}
hothing happens...(
3.
{php} $var = $this->get_template_vars('var'); var_dump($var); {/php}
Apache log:
PHP Fatal error: Call to a member function get_template_vars() on a non-object in /var/www/html/Vanilla-bootstrap/cache/Smarty/compile/vanilla^%%FD^FDB^FDB7A827%%default.master.tpl.php on line 83, referer: http://vb.loc/
P.S. LAMP + Smarty already installed.
0
Comments
Enable debug mode by adding
$Configuration['Debug'] = TRUE;
to your/conf/config.php
file. That will give you more information when you see a "Something has gone wrong" page.IIRC, Vanilla has the
{php}
smarty tags disabled.Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Thank you!
How I can enable
{php}
or{$User|@var_dump}
?Use the
{debug}
tag to get information on the Smarty environment.Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Great, it's work.
{$var|@debug_print_var}
Can I set enable
{php}
? It's possible?There is no reason to use smarty if you are going to use the
{php}
tag.Either make your output stateless (like the template wants) or make a function and register the smarty tag via a plugin (like my previous link suggests).
What are you trying to accomplish?
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
You might be interested in creating your own Smarty functions: http://vanillaforums.org/discussion/27767/how-to-create-custom-smarty-functions#latest
I just realized I didn't link to that like I thought I did.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
You did already and I would have cited you if I saw it first
http://vanillaforums.org/discussion/26188/how-to-modify-the-layout-of-the-panel-asset#latest
Thank you. I followed your advice and all work perfect. That's all what I needed.