Skip to content

Instantly share code, notes, and snippets.

@teki
Created August 13, 2008 03:10
Show Gist options
  • Save teki/5188 to your computer and use it in GitHub Desktop.
Save teki/5188 to your computer and use it in GitHub Desktop.
Index: include/feedcreator.class.php
===================================================================
--- include/feedcreator.class.php (revision 635)
+++ include/feedcreator.class.php (working copy)
@@ -325,6 +325,7 @@
* Optional attributes of a feed.
*/
var $syndicationURL, $image, $language, $copyright, $pubDate, $lastBuildDate, $editor, $editorEmail, $webmaster, $category, $docs, $ttl, $rating, $skipHours, $skipDays;
+ var $guid_is_permalink;
/**
@@ -849,7 +850,11 @@
$feed.= " <pubDate>".htmlspecialchars($itemDate->rfc822())."</pubDate>\n";
}
if ($this->items[$i]->guid!="") {
- $feed.= " <guid>".$this->items[$i]->guid."</guid>\n";
+ $guid_tag = " <guid>";
+ if ($this->guid_is_permalink == false) {
+ $guid_tag = " <guid isPermaLink=\"false\">";
+ }
+ $feed.= $guid_tag . $this->items[$i]->guid . "</guid>\n";
}
$feed.= $this->_createAdditionalElements($this->items[$i]->additionalElements, " ");
$feed.= " </item>\n";
Index: rss.php
===================================================================
--- rss.php (revision 635)
+++ rss.php (working copy)
@@ -77,6 +77,7 @@
$rss->syndicationURL = $rss->link;
$rss->xslStyleSheet = ""; //required for UniversalFeedCreator since 1.7
$rss->cssStyleSheet = ""; //required for UniversalFeedCreator since 1.7
+$rss->guid_is_permalink = false;
//$divbox = "<div>";
//$divfont = "<span>";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment