|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Danez Smarty Rookie
Joined: 14 Nov 2010 Posts: 5
|
Posted: Sun Nov 14, 2010 11:49 am Post subject: 3.0: Load other plugin in modifier |
|
|
If I want to load an other plugin in my modifier is this the right way?
Code: | <?php
$_smarty_tpl->smarty->loadPlugin('smarty_shared_make_timestamp');
function smarty_modifier_my_mod($string,$param1)
{
}
?> |
The docs say:
Code: | require_once $smarty->_get_plugin_filepath('function', 'html_options'); |
but i do not have a $smarty variable and the function _get_plugin_filepath does not seem to exist anymore.
Thanks |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sun Nov 14, 2010 2:05 pm Post subject: |
|
|
Your code should work. The problem is that modifier have direct access to the Smarty object.
The documentation need to be updated. |
|
Back to top |
|
geoB Smarty Regular
Joined: 09 Sep 2010 Posts: 46
|
Posted: Sun Nov 14, 2010 2:42 pm Post subject: |
|
|
A very timely thread! I'd just replaced 2.6 with 3.0 and was trying solve the _get_plugin_filepath failure problem. You have the solution. Thanks for saving the few remaining hairs on my head!
g |
|
Back to top |
|
|
|
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
|