From 614c1203c7ddd6108c24b6114d3278089fa70633 Mon Sep 17 00:00:00 2001 From: Sem Date: Thu, 10 Nov 2011 21:51:56 +0100 Subject: Video embedded on RSS. --- views/rss/object/videolist_item.php | 47 ++++++++++++++++++++++++++++++++++ views/rss/videolist/contentwrapper.php | 15 ----------- views/rss/videolist/videolist.php | 17 ------------ 3 files changed, 47 insertions(+), 32 deletions(-) create mode 100644 views/rss/object/videolist_item.php delete mode 100644 views/rss/videolist/contentwrapper.php delete mode 100644 views/rss/videolist/videolist.php (limited to 'views/rss') diff --git a/views/rss/object/videolist_item.php b/views/rss/object/videolist_item.php new file mode 100644 index 000000000..41d89fadf --- /dev/null +++ b/views/rss/object/videolist_item.php @@ -0,0 +1,47 @@ +title; +if (empty($title)) { + $subtitle = strip_tags($vars['entity']->description); + $title = substr($subtitle, 0, 32); + if (strlen($subtitle) > 32) { + $title .= ' ...'; + } +} + +set_input('view', 'default'); + +$description = elgg_view("videolist/watch/".$vars['entity']->videotype, array( + 'entity' => $vars['entity'], +)); + +set_input('view', 'rss'); + +$description .= $vars['entity']->description; + +$permalink = htmlspecialchars($vars['entity']->getURL()); +$pubdate = date('r', $vars['entity']->time_created); + +$creator = elgg_view('object/creator', $vars); +$georss = elgg_view('object/georss', $vars); +$extension = elgg_view('extensions/item', $vars); + +$item = <<<__HTML + + $permalink + $pubdate + $permalink + <![CDATA[$title]]> + + $creator$georss$extension + + +__HTML; + +echo $item; diff --git a/views/rss/videolist/contentwrapper.php b/views/rss/videolist/contentwrapper.php deleted file mode 100644 index c8e2438d5..000000000 --- a/views/rss/videolist/contentwrapper.php +++ /dev/null @@ -1,15 +0,0 @@ - - * @copyright Prateek Choudhary - */ - - - echo $vars['body']; - -?> diff --git a/views/rss/videolist/videolist.php b/views/rss/videolist/videolist.php deleted file mode 100644 index 7745b070b..000000000 --- a/views/rss/videolist/videolist.php +++ /dev/null @@ -1,17 +0,0 @@ - - * @copyright Prateek Choudhary - */ - - if ($foreach = elgg_get_entities(array('types' => 'object', 'subtypes' => 'videolist'))) { - foreach($foreach as $videos) - echo elgg_view_entity($videos); - } - -?> -- cgit v1.2.3