Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16556
Modified Files:
NEWS rss.php serendipity_functions.inc.php
serendipity_plugin_api.php serendipity_sidebar_items.php
Log Message:
* OPML 1.0 feed (well...not that usefull but nice to have)
* RemoteRSS plugin upgraded to be able for OPML blogroll import
* New CSS classes for each sidebar plugin
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -d -r1.145 -r1.146
--- NEWS 10 Jun 2004 19:03:02 -0000 1.145
+++ NEWS 11 Jun 2004 12:19:05 -0000 1.146
@@ -3,6 +3,21 @@
Version 0.7 ()
------------------------------------------------------------------------
+ * Plugin API: Now each sidebar plugin item will get a CSS class
+ name added to the default "serendipitySideBarContent" one, which
+ is called 'sidebar_wrap_', 'sidebar_title_', 'sidebar_content_'
+ and then the original class name of the plugin appended. I.e.:
+ 'sidebar_wrap_serendipity_html_nugget_plugin'. This allows special
+ customization of any individual sidebar item. (garvinhicking)
+
+ * Finally a OPML-based blogroll importing feature added to
+ the serendipity_plugin_remoterss plugin (Richard Harrison,
+ garvinhicking)
+
+ * Simple OPML 1.0 outline feed (Richard Harrison, garvinhicking)
+
+ * Removed german blogbot pinging service, it was shut down (nohn)
+
* Allow pinging of blogbot.dk (tomsommer)
* Fixed variable namespace problems in Textile Event plugin
Index: serendipity_sidebar_items.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_sidebar_items.php,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- serendipity_sidebar_items.php 7 Jun 2004 14:22:47 -0000 1.58
+++ serendipity_sidebar_items.php 11 Jun 2004 12:19:05 -0000 1.59
@@ -184,6 +184,7 @@
'show_2.0',
'show_2.0c',
'show_atom0.3',
+ 'show_opml1.0',
'seperator',
'prevent_cache',
'seperator',
@@ -232,6 +233,12 @@
$propbag->add('description', '');
break;
+ case 'show_opml1.0':
+ $propbag->add('type', 'boolean');
+ $propbag->add('name', sprintf(SYNDICATION_PLUGIN_GENERIC_FEED, 'OPML 1.0'));
+ $propbag->add('description', '');
+ break;
+
case 'seperator':
$propbag->add('type', 'seperator');
break;
@@ -340,6 +347,13 @@
<a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=2.0&type=comments<?php echo $cache; ?>"><?php echo ($serendipity['XHTML11'] ? '<span style="white-space: nowrap">' : '<nobr>'); ?>RSS 2.0 <?php echo COMMENTS; ?><?php echo ($serendipity['XHTML11'] ? '</span>' : '</nobr>'); ?></a>
<?php
}
+
+ if (serendipity_db_bool($this->get_config('show_opml1.0', false))) {
+?>
+ <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=opml1.0<?php echo $cache; ?>"><img src="<?php echo serendipity_getTemplateFile('img/xml.gif'); ?>" <?php echo ($serendipity['XHTML11'] ? 'style="border: 0px"' : 'border="0"'); ?> alt="XML" /></a>
+ <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=opml1.0<?php echo $cache; ?>">OPML 1.0 feed</a>
+<?php
+ }
}
function generate_rss_fields(&$title, &$description, &$entries) {
Index: rss.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/rss.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- rss.php 24 May 2004 10:43:12 -0000 1.26
+++ rss.php 11 Jun 2004 12:19:05 -0000 1.27
@@ -174,6 +174,7 @@
HEAD;
break;
+
case 'atom0.3':
$modified = gmdate('Y-m-d\TH:i:s\Z', $entries[0]['last_modified']);
print <<<HEAD
@@ -200,6 +201,20 @@
HEAD;
break;
+
+case 'opml1.0':
+ $modified = gmdate('Y-m-d\TH:i:s\Z', $entries[0]['last_modified']);
+ print <<<HEAD
+<opml version="{$version}">
+<head>
+ <title>$title</title>
+ <dateModified>$modified</dateModified>
+ <ownerName>Serendipity {$serendipity['version']} - http://www.s9y.org/</ownerName>
+</head>
+<body>
+HEAD;
+break;
+
default:
die("Invalid RSS version specified\n");
}
@@ -220,6 +235,9 @@
break;
case 'atom0.3':
print '</feed>';
+ break;
+case 'opml1.0':
+ print "</body>\n</opml>";
}
/* vim: set sts=4 ts=4 expandtab : */
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.285
retrieving revision 1.286
diff -u -d -r1.285 -r1.286
--- serendipity_functions.inc.php 10 Jun 2004 17:59:08 -0000 1.285
+++ serendipity_functions.inc.php 11 Jun 2004 12:19:05 -0000 1.286
@@ -1900,6 +1900,10 @@
?>
</item>
<?php
+ } elseif ($version == 'opml1.0') {
+?>
+ <outline text="<?php echo serendipity_utf8_encode(htmlspecialchars($entry['title'])); ?>" type="url" htmlUrl="<?php echo $guid; ?>" urlHTTP="<?php echo $guid; ?>" />
+<?php
}
}
}
Index: serendipity_plugin_api.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_plugin_api.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- serendipity_plugin_api.php 6 Jun 2004 19:55:53 -0000 1.21
+++ serendipity_plugin_api.php 11 Jun 2004 12:19:05 -0000 1.22
@@ -311,11 +311,12 @@
ob_start();
if ($plugin->generate_content($title) !== false) {
$content = ob_get_contents();
+ $class = get_class($plugin);
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 " <div class=\"$plugin->wrap_class sidebar_wrap_$class\">\n";
+ echo " <h3 class=\"$plugin->title_class sidebar_title_$class\">$title</h3>\n";
+ echo " <div class=\"$plugin->content_class sidebar_content_$class\">\n";
echo " $content\n";
echo " </div>\n";
echo " </div>\n";
|