diff options
author | Cash Costello <cash.costello@gmail.com> | 2011-11-26 16:35:25 -0500 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2011-11-26 16:35:25 -0500 |
commit | ca5a35607dfb277cecba120ce27eece7c59f270a (patch) | |
tree | 301e5b6fb94a2521f18ce926e69e659fe4e4fa54 /views/rss/object/album.php | |
parent | 22afb49f30fc9bcd6be84f734e89a9b644f2fb0f (diff) | |
download | elgg-ca5a35607dfb277cecba120ce27eece7c59f270a.tar.gz elgg-ca5a35607dfb277cecba120ce27eece7c59f270a.tar.bz2 |
fixed RSS feeds for Elgg 1.8
Diffstat (limited to 'views/rss/object/album.php')
-rw-r--r-- | views/rss/object/album.php | 64 |
1 files changed, 10 insertions, 54 deletions
diff --git a/views/rss/object/album.php b/views/rss/object/album.php index 8df98cf7a..0c4606245 100644 --- a/views/rss/object/album.php +++ b/views/rss/object/album.php @@ -1,59 +1,15 @@ <?php - /** - * Tidypics Album RSS View - */ +/** + * Album RSS view + * + * @uses $vars['entity'] TidypicsAlbum + */ -// for now catch the albums view and ignore it -if (get_context() == "search" && get_input('search_viewtype') == "gallery") { -?> - <item> - <guid isPermaLink='true'><?php echo $vars['entity']->getURL(); ?></guid> - <pubDate><?php echo date("r",$vars['entity']->time_created) ?></pubDate> - <link><?php echo $vars['entity']->getURL(); ?></link> - <title><![CDATA[<?php echo $vars['entity']->title; ?>]]></title> - <description><![CDATA[<?php echo (autop($vars['entity']->description)); ?>]]></description> - </item> -<?php -} else { - - $album = $vars['entity']; - - // use fullsize image - $base_url_fullsize = $vars['url'] . 'pg/photos/download/'; - - $album_cover_guid = $album->getCoverImageGuid(); - if ($album_cover_guid) { - // Set title - $vars['title'] = $album->title; - if (empty($vars['title'])) { - $title = $vars['config']->sitename; - } else if (empty($vars['config']->sitename)) { - $title = $vars['title']; - } else { - $title = $vars['config']->sitename . ": " . $vars['title']; - } - $album_cover_url = $vars['url'] . 'mod/tidypics/thumbnail.php?file_guid=' . $album_cover_guid . '&size=thumb'; -?> <image> - <url><?php echo $album_cover_url; ?></url> - <title><![CDATA[<?php echo $title; ?>]]></title> - <link><?php echo $album->getURL() . '?view=rss'; ?></link> - </image> -<?php - } - - $limit = get_input('limit', 20); - - $images = elgg_get_entities(array( - "type" => "object", - "subtype" => "image", - "container_guid" => $album->guid, - "limit" => $limit, - )); - - - foreach ($images as $image) { - echo elgg_view_entity($image); - } +$full_view = elgg_extract('full_view', $vars, false); +if ($full_view) { + echo elgg_view('object/album/full', $vars); +} else { + echo elgg_view('object/album/summary', $vars); } |