I kind of seem to remember asking this before. Sorry if I did
Is there any way in a current s9y to check within a .tpl file if a certain plugin is actually installed and active?
If not, we should most definitely have this. Thanks to serendipity_showPlugin, I can emit a plugin at almost any given location in a template. But if I do this and the user doesn't have an active instance of said plugin, the template will emit unnecessary code.
Yes, through "if (class_exists('serendipity_event_freetag'))" for example. However, you need to register class_exists as an allowed function in smarty through $serendipity['smarty']->register_modifier('class_exists', 'class_exists');.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
garvinhicking wrote:Yes, through "if (class_exists('serendipity_event_freetag'))" for example. However, you need to register class_exists as an allowed function in smarty through $serendipity['smarty']->register_modifier('class_exists', 'class_exists');.
I supposed I'd do this in the template's config.inc.php? Anywhere or should it go in a specific place there?