Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv880
Modified Files:
rss.php serendipity_functions.inc.php
Log Message:
* append 'full=true' to your RSS URLs to get a full text feed including
extended entries.
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.446
retrieving revision 1.447
diff -u -d -r1.446 -r1.447
--- serendipity_functions.inc.php 18 Oct 2004 18:22:06 -0000 1.446
+++ serendipity_functions.inc.php 19 Oct 2004 19:34:47 -0000 1.447
@@ -2026,7 +2026,7 @@
return preg_replace($p, $r, $html);
}
-function serendipity_printEntries_rss($entries, $version, $comments = false) {
+function serendipity_printEntries_rss($entries, $version, $comments = false, $full = false) {
global $serendipity;
if (is_array($entries)) {
@@ -2041,7 +2041,10 @@
// Embed a link to extended entry, if existing
if ($entry['exflag']) {
- $ext = '<br /><a href="' . $guid . '#extended">' . sprintf(VIEW_EXTENDED_ENTRY, htmlspecialchars($entry['title'])) . '</a>';
+ if ($full === true)
+ $ext = htmlspecialchars($entry['extended']);
+ else
+ $ext = '<br /><a href="' . $guid . '#extended">' . sprintf(VIEW_EXTENDED_ENTRY, htmlspecialchars($entry['title'])) . '</a>';
} else {
$ext = '';
}
Index: rss.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/rss.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- rss.php 8 Oct 2004 11:09:16 -0000 1.29
+++ rss.php 19 Oct 2004 19:34:46 -0000 1.30
@@ -14,6 +14,12 @@
$serendipity['GET']['category'] = $_GET['category'];
}
+if (isset($_GET['full'])) {
+ $full = ($_GET['full'] == "true");
+} else {
+ $full = false;
+}
+
if (!isset($_GET['type'])) {
$_GET['type'] = 'content';
}
@@ -219,7 +225,7 @@
die("Invalid RSS version specified\n");
}
-serendipity_printEntries_rss($entries, $version, $comments);
+serendipity_printEntries_rss($entries, $version, $comments, $full);
switch ($version) {
case '0.91':
|