Page 1 of 1

where is serendipity's smarty initialization

Posted: Fri Apr 01, 2005 1:01 am
by tjotoole
I would like to be able to write my own smarty plugins for use with serendipity, and keep these plugins in a separate "myplugins" directory.

To do this, I need to be able to access the smarty object serendipity is using and change the designed plugins directory settings -- but I can't find where that object is initialized by serendipity.

Can anyone point me in the right direction?

Re: where is serendipity's smarty initialization

Posted: Fri Apr 01, 2005 11:19 am
by garvinhicking
Sure: include/functions_smarty.inc.php - function serendipity_smarty_init(). :-)

Have fun,
Garvin

Posted: Fri Apr 01, 2005 4:16 pm
by tjotoole
I am trying to set the plugin_dir to an array that will point to the default plugin directory AND a plugin dir off my template directory.

The following seems like it should work, but it doesn't:

$serendipity['smarty']->plugin_dir = array($serendipity['serendipityPath'] . PATH_SMARTY_COMPILE, $serendipity['smarty']->template_dir . "/plugins");

Thanks for any suggestions.