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.
is there a Smarty tag equivalent to $this->FireEvent() ?
codegrunt
New
Howdy. I am currently working on theming my Vanilla Forums install and the current order of business is to setup a default.master.tpl Smarty template. Looking at the PHP version, I notice that the following method is called towards the end, presumably so that plugins can do something after the main page content has been rendered:
The docs for template tags are here:
http://vanillaforums.com/blog/category/help/template-tags-help-topics/
There is no mention of the FireEvent call in the above list and the default.master.tpl template found under the stock mobile theme also does not have anything like this in it.
So my question is whether there is a Smarty based way to keep the same functionality or do we lose the ability to have plugins called via events if we go with Smarty templates over the PHP based views? It is definitely preferable to reduce to the amount of layout tangled up with program logic which is why going with Smarty for the templates is very much preferred.
Cheers
<?php $this->FireEvent('AfterBody'); ?>
The docs for template tags are here:
http://vanillaforums.com/blog/category/help/template-tags-help-topics/
There is no mention of the FireEvent call in the above list and the default.master.tpl template found under the stock mobile theme also does not have anything like this in it.
So my question is whether there is a Smarty based way to keep the same functionality or do we lose the ability to have plugins called via events if we go with Smarty templates over the PHP based views? It is definitely preferable to reduce to the amount of layout tangled up with program logic which is why going with Smarty for the templates is very much preferred.
Cheers
0
Comments
Vanilla Forums COO [GitHub, Twitter, About.me]
{event name="BeforeCommentBody"}
Unfortunately, there are context issues that affect loops in Smarty so for example, the above event will only see the first row's data if called in "themes/mytheme/views/discussion/index.tpl".
Any know of a way to control what gets passed to the event at the Smarty template level to work around this?
Cheers
How can I achieve {searchbox} using PHP rather than Smarty? We have "RenderAsset", but is there a "RenderTag"?
look at the default master the example is right there
grep is your friend.
@x00, thanks as always!
Just to clarify, for anyone as obtuse as me, the location of the default master is (assuming your root is /vanilla):
/vanilla/applications/dashboard/views/default.master.php