aboutsummaryrefslogtreecommitdiff
path: root/views/rss/object/album.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/rss/object/album.php')
-rw-r--r--views/rss/object/album.php64
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 . '&amp;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);
}