videolist_item.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /**
  3. * Elgg default object view
  4. *
  5. * @package Elgg
  6. * @subpackage Core
  7. */
  8. $title = $vars['entity']->title;
  9. if (empty($title)) {
  10. $subtitle = strip_tags($vars['entity']->description);
  11. $title = substr($subtitle, 0, 32);
  12. if (strlen($subtitle) > 32) {
  13. $title .= ' ...';
  14. }
  15. }
  16. set_input('view', 'default');
  17. $description = elgg_view("videolist/watch/".$vars['entity']->videotype, array(
  18. 'entity' => $vars['entity'],
  19. ));
  20. set_input('view', 'rss');
  21. $description .= $vars['entity']->description;
  22. $permalink = htmlspecialchars($vars['entity']->getURL());
  23. $pubdate = date('r', $vars['entity']->time_created);
  24. $creator = elgg_view('object/creator', $vars);
  25. $georss = elgg_view('object/georss', $vars);
  26. $extension = elgg_view('extensions/item', $vars);
  27. $item = <<<__HTML
  28. <item>
  29. <guid isPermaLink="true">$permalink</guid>
  30. <pubDate>$pubdate</pubDate>
  31. <link>$permalink</link>
  32. <title><![CDATA[$title]]></title>
  33. <description><![CDATA[$description]]></description>
  34. $creator$georss$extension
  35. </item>
  36. __HTML;
  37. echo $item;