bookmarks.php 976 B

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