diff --git a/rss.php b/rss.php index 3abb4f6..da0a449 100644 --- a/rss.php +++ b/rss.php @@ -62,12 +62,27 @@ foreach ($posts as $post) // 'r' ยป RFC 2822 formatted date (Example: Thu, 21 Dec 2000 16:01:07 +0200) $date = date ('r', strtotime ($post['created'])); - $item->addChild ('title', htmlspecialchars ($post['title'])); - $item->addChild ('description', htmlspecialchars ($description)); - $item->addChild ('link', $link); - $item->addChild ('freepostLink', $freepost_link); - $item->addChild ('pubDate', $date); - $item->addChild ('author', htmlspecialchars ($post['username'])); + /** + * It's recommended that you provide the guid, and if possible make it a + * permalink. This enables aggregators to not repeat items, even if there + * have been editing changes. + */ + $item->addChild ('guid', $post['hashId']); + + /** + * Optional. If set to true, the reader may assume that it is a permalink + * to the item (a url that points to the full item described by the + * element). The default value is true. If set to false, the guid may not + * be assumed to be a url. + */ + $item->addChild ('isPermaLink', false); + + $item->addChild ('title', htmlspecialchars ($post['title'])); + $item->addChild ('description', htmlspecialchars ($description)); + $item->addChild ('link', $link); + $item->addChild ('freepostLink', $freepost_link); + $item->addChild ('pubDate', $date); + $item->addChild ('author', htmlspecialchars ($post['username'])); } // Output RSS