generic_comment.php 821 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Elgg RSS view for a generic_comment annotation
  4. *
  5. * @package Elgg
  6. * @subpackage Core
  7. */
  8. $annotation = $vars['annotation'];
  9. $poster = $annotation->getOwnerEntity();
  10. $poster_name = htmlspecialchars($poster->name, ENT_NOQUOTES, 'UTF-8');
  11. $pubdate = date('r', $annotation->getTimeCreated());
  12. $permalink = $annotation->getURL();
  13. $title = elgg_echo('generic_comment:title', array($poster_name));
  14. $creator = elgg_view('page/components/creator', array('entity' => $annotation));
  15. $extensions = elgg_view('extensions/item', $vars);
  16. $item = <<<__HTML
  17. <item>
  18. <guid isPermaLink='true'>$permalink</guid>
  19. <pubDate>$pubdate</pubDate>
  20. <link>$permalink</link>
  21. <title><![CDATA[$title]]></title>
  22. <description><![CDATA[{$vars['annotation']->value}]]></description>
  23. $creator$extensions
  24. </item>
  25. __HTML;
  26. echo $item;