]> git.mjollnir.org Git - s9y.git/commitdiff
Add 'template' option
authorgarvinhicking <garvinhicking>
Thu, 21 Feb 2008 09:42:50 +0000 (09:42 +0000)
committergarvinhicking <garvinhicking>
Thu, 21 Feb 2008 09:42:50 +0000 (09:42 +0000)
docs/NEWS
include/functions_smarty.inc.php
include/plugin_api.inc.php
serendipity_config.inc.php

index ada247b6a776f0bfdcedd8db4cf8355640e12516..22f2d8e4361e790a33472915ea821bd08c7c1e02 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -1,5 +1,11 @@
 # $Id$
 
+Version 1.3 ()
+------------------------------------------------------------------------
+
+    * Add option "template" to smarty function call {serendipity_
+      printSidebar} (garvinhicking)
+
 Version 1.3-beta1 (February 19th)
 ------------------------------------------------------------------------
 
index 8e030c57edda59f6c7d9cb789327d82f7e90b3d7..b6f04e55170b9791b890ce8eebf8e117141e73bd 100644 (file)
@@ -592,7 +592,12 @@ function serendipity_smarty_printSidebar($params, &$smarty) {
         $smarty->trigger_error(__FUNCTION__ .": missing 'side' parameter");
         return;
     }
-    return serendipity_plugin_api::generate_plugins($params['side']);
+
+    if (isset($params['template'])) {
+        return serendipity_plugin_api::generate_plugins($params['side'], '', false, null, null, $params['template']);
+    } else {
+        return serendipity_plugin_api::generate_plugins($params['side']);
+    }
 }
 
 /**
index 535025664febfc598292cb0c577cf2df05410a5b..8b6d41142b3fadb86abeeb4f481f251f27f88bc2 100644 (file)
@@ -804,7 +804,7 @@ class serendipity_plugin_api
      * @param   string      Only show a plugin with this instance ID
      * @return  string      Smarty HTML output
      */
-    function generate_plugins($side, $tag = '', $negate = false, $class = null, $id = null)
+    function generate_plugins($side, $tag = '', $negate = false, $class = null, $id = null, $tpl = 'sidebar.tpl')
     {
         global $serendipity;
 
@@ -861,7 +861,7 @@ class serendipity_plugin_api
         $serendipity['smarty']->assign_by_ref('plugindata', $pluginData);
         $serendipity['smarty']->assign('pluginside', ucfirst($side));
 
-        return serendipity_smarty_fetch('sidebar_'. $side, 'sidebar.tpl', true);
+        return serendipity_smarty_fetch('sidebar_'. $side, $tpl, true);
     }
 
     /**
index b28a3df26546946976bcc6d411f6ef3860c5cc93..49b2cbd948e8f3c74a0e69a31fa068fee666c9bc 100644 (file)
@@ -41,7 +41,7 @@ if (defined('USE_MEMSNAP')) {
 }
 
 // The version string
-$serendipity['version']         = '1.3-beta1';
+$serendipity['version']         = '1.3-beta2';
 
 // Setting this to 'false' will enable debugging output. All alpa/beta/cvs snapshot versions will emit debug information by default. To increase the debug level (to enable Smarty debugging), set this flag to 'debug'.
 $serendipity['production']      = (preg_match('@\-(alpha|beta|cvs)@', $serendipity['version']) ? false : true);