rss.phtml 1.2 KB

1234567891011121314151617181920212223242526272829
  1. <?php echo '<?xml version="1.0" encoding="UTF-8" ?>'; ?>
  2. <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  3. <channel>
  4. <title><?php echo $this->rss_title; ?></title>
  5. <link><?php echo Minz_Url::display(null, 'html', true); ?></link>
  6. <description><?php echo _t('index.feed.rss_of', $this->rss_title); ?></description>
  7. <pubDate><?php echo date('D, d M Y H:i:s O'); ?></pubDate>
  8. <lastBuildDate><?php echo gmdate('D, d M Y H:i:s'); ?> GMT</lastBuildDate>
  9. <atom:link href="<?php echo Minz_Url::display($this->url, 'html', true); ?>" rel="self" type="application/rss+xml" />
  10. <?php
  11. foreach ($this->entries as $item) {
  12. ?>
  13. <item>
  14. <title><?php echo $item->title(); ?></title>
  15. <link><?php echo $item->link(); ?></link>
  16. <?php $author = $item->author(); ?>
  17. <?php if ($author != '') { ?>
  18. <dc:creator><?php echo $author; ?></dc:creator>
  19. <?php } ?>
  20. <description><![CDATA[<?php
  21. echo $item->content();
  22. ?>]]></description>
  23. <pubDate><?php echo date('D, d M Y H:i:s O', $item->date(true)); ?></pubDate>
  24. <guid isPermaLink="false"><?php echo $item->id(); ?></guid>
  25. </item>
  26. <?php } ?>
  27. </channel>
  28. </rss>