Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3330
Modified Files:
NEWS rss.php serendipity_functions.inc.php
Log Message:
Added CC plugin from Evan Nemerson. Thanks for contributing!
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -d -r1.102 -r1.103
--- NEWS 2 Apr 2004 08:32:51 -0000 1.102
+++ NEWS 2 Apr 2004 09:09:28 -0000 1.103
@@ -3,6 +3,9 @@
Version 0.6 ()
------------------------------------------------------------------------
+ * Added plugin for usage of CreativeCommons (creativecommons.org)
+ license for the blog's contents (Evan Nemerson)
+
* Templates with an "inactive.txt" or no "info.txt" inside their
directory are not selectable for s9y. Usable for "work in progress"
templates. (garvinhicking)
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.246
retrieving revision 1.247
diff -u -d -r1.246 -r1.247
--- serendipity_functions.inc.php 2 Apr 2004 08:39:39 -0000 1.246
+++ serendipity_functions.inc.php 2 Apr 2004 09:09:28 -0000 1.247
@@ -887,7 +887,11 @@
dc:identifier="<?php echo serendipity_archiveURL($entry['id'], $entry['title']); ?>" />
</rdf:RDF>
-->
-
+ <?php
+ $eventData = array_merge(array('display_dat' => ''), $entry);
+ serendipity_plugin_api::hook_event('frontend_display:html:per_entry', $eventData);
+ echo $eventData['display_dat'];
+ ?>
<?php
if (isset($serendipity['GET']['id'])) {
?>
@@ -1474,6 +1478,11 @@
</content:encoded>
<pubDate><?php echo date('r', $entry['timestamp']); ?></pubDate>
<guid><?php echo $guid; ?></guid>
+ <?php
+ $eventData = array_merge(array('display_dat' => ''), $entry);
+ serendipity_plugin_api::hook_event('frontend_display:rss-2.0:per_entry', $eventData);
+ echo $eventData['display_dat'];
+ ?>
</item>
<?php
/*********** END 2.0 FEED EXTRAS *************/
@@ -1497,6 +1506,11 @@
echo utf8_encode(htmlspecialchars($entry['body'].$ext));
?>
</description>
+ <?php
+ $eventData = array_merge(array('display_dat' => ''), $entry);
+ serendipity_plugin_api::hook_event('frontend_display:rss-1.0:per_entry', $eventData);
+ echo $eventData['display_dat'];
+ ?>
<dc:publisher><?php echo utf8_encode(htmlspecialchars($serendipity['blogTitle'])); ?></dc:publisher>
<dc:creator><?php echo utf8_encode(htmlspecialchars($entry['email'])) . ' (' . utf8_encode(htmlspecialchars($entry['username'])) . ')'; ?></dc:creator>
<dc:subject><?php echo utf8_encode(htmlspecialchars($entry['category_name'])); ?></dc:subject>
Index: rss.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/rss.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- rss.php 21 Mar 2004 16:35:31 -0000 1.22
+++ rss.php 2 Apr 2004 09:09:28 -0000 1.23
@@ -121,8 +121,10 @@
$rdf_seq_li .= ' <rdf:li resource="' . serendipity_rss_getguid($entry, $comments) . '" />' . "\n";
}
}
+ $eventData = array_merge(array('display_dat' => ''), $entries);
+ serendipity_plugin_api::hook_event('frontend_display:rss-1.0:namespace', $eventData);
print <<<HEAD
-<rdf:RDF
+<rdf:RDF {$eventData['display_dat']}
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:admin="http://webns.net/mvcb/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
@@ -149,6 +151,8 @@
break;
case '2.0':
+ $eventData = array_merge(array('display_dat' => ''), $entries);
+ serendipity_plugin_api::hook_event('frontend_display:rss-2.0:namespace', $eventData);
print <<<HEAD
<rss version="2.0"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
@@ -156,7 +160,8 @@
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
- xmlns:content="http://purl.org/rss/1.0/modules/content/">
+ xmlns:content="http://purl.org/rss/1.0/modules/content/"
+ {$eventData['display_dat']}>
<channel>
<title>$title</title>
<link>{$serendipity['baseURL']}</link>
@@ -208,6 +213,9 @@
print "</rss>\n";
break;
case '1.0':
+ $eventData = array_merge(array('display_dat' => ''), $entries);
+ serendipity_plugin_api::hook_event('frontend_display:rss-1.0:once', $eventData);
+ echo $eventData['display_dat'];
print '</rdf:RDF>';
break;
case 'atom0.3':
|