default.php 849 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * RSS object view
  4. *
  5. * @package Elgg
  6. * @subpackage Core
  7. */
  8. $title = $vars['entity']->title;
  9. if (empty($title)) {
  10. $title = strip_tags($vars['entity']->description);
  11. $title = elgg_get_excerpt($title, 32);
  12. }
  13. $permalink = htmlspecialchars($vars['entity']->getURL(), ENT_NOQUOTES, 'UTF-8');
  14. $pubdate = date('r', $vars['entity']->getTimeCreated());
  15. $description = elgg_autop($vars['entity']->description);
  16. $creator = elgg_view('page/components/creator', $vars);
  17. $georss = elgg_view('page/components/georss', $vars);
  18. $extension = elgg_view('extensions/item', $vars);
  19. $item = <<<__HTML
  20. <item>
  21. <guid isPermaLink="true">$permalink</guid>
  22. <pubDate>$pubdate</pubDate>
  23. <link>$permalink</link>
  24. <title><![CDATA[$title]]></title>
  25. <description><![CDATA[$description]]></description>
  26. $creator$georss$extension
  27. </item>
  28. __HTML;
  29. echo $item;