thewire.php 825 B

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