Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7447
Modified Files:
NEWS serendipity_plugin_api.php
Log Message:
new plugin 'entrylinks'.
Index: serendipity_plugin_api.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_plugin_api.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- serendipity_plugin_api.php 26 May 2004 12:06:59 -0000 1.20
+++ serendipity_plugin_api.php 6 Jun 2004 19:55:53 -0000 1.21
@@ -309,16 +309,19 @@
$title = get_class($plugin);
ob_start();
- $plugin->generate_content($title);
- $content = ob_get_contents();
- ob_end_clean();
+ if ($plugin->generate_content($title) !== false) {
+ $content = ob_get_contents();
+ ob_end_clean();
- echo " <div class=\"$plugin->wrap_class\">\n";
- echo " <h3 class=\"$plugin->title_class\">$title</h3>\n";
- echo " <div class=\"$plugin->content_class\">\n";
- echo " $content\n";
- echo " </div>\n";
- echo " </div>\n";
+ echo " <div class=\"$plugin->wrap_class\">\n";
+ echo " <h3 class=\"$plugin->title_class\">$title</h3>\n";
+ echo " <div class=\"$plugin->content_class\">\n";
+ echo " $content\n";
+ echo " </div>\n";
+ echo " </div>\n";
+ } else {
+ ob_end_clean();
+ }
}
echo "</$tagname>\n";
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -d -r1.138 -r1.139
--- NEWS 1 Jun 2004 15:42:42 -0000 1.138
+++ NEWS 6 Jun 2004 19:55:53 -0000 1.139
@@ -3,6 +3,15 @@
Version 0.7 ()
------------------------------------------------------------------------
+ * New sidebar plugin "eventlinks". Displays all links to the
+ currently viewed article (only on full article view).
+ (garvinhicking)
+
+ * Plugin API: The method 'generate_content' of a sidebar plugin
+ can now return false to instruct the plugin API to NOT display
+ the sidebar. Allows optional sidebar plugins to be only shown
+ on specific parameters (garvinhicking)
+
* Updated upgrade.sh script for better checks (Jez Hancock)
* Fixed javascript error when submitting comments with "remember me"
|