From afc4c997d37fc62538e0c3c3663da7f58f16f67b Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Mon, 29 Nov 2010 16:53:25 +0000 Subject: [PATCH] Allow to pass 'template' variable to serendipity_showPlugin --- docs/NEWS | 2 ++ include/functions_smarty.inc.php | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/NEWS b/docs/NEWS index e65130cd..ca4d80da 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,8 @@ Version 1.6 () ------------------------------------------------------------------------ + * Allow to pass 'template' variable to serendipity_showPlugin + * Make CSS permalink pattern compatible to 1&1 servers, thanks to lfrantzen diff --git a/include/functions_smarty.inc.php b/include/functions_smarty.inc.php index e3419275..1171a566 100644 --- a/include/functions_smarty.inc.php +++ b/include/functions_smarty.inc.php @@ -465,8 +465,11 @@ function serendipity_smarty_showPlugin($params, &$smarty) { if (!isset($params['negate'])) { $params['negate'] = null; } + if (empty($params['template'])) { + $params['template'] = 'sidebar.tpl'; + } - return serendipity_plugin_api::generate_plugins($params['side'], null, $params['negate'], $params['class'], $params['id']); + return serendipity_plugin_api::generate_plugins($params['side'], null, $params['negate'], $params['class'], $params['id'], $params['template']); } /**