aboutsummaryrefslogtreecommitdiff
path: root/views/rss
diff options
context:
space:
mode:
Diffstat (limited to 'views/rss')
-rw-r--r--views/rss/object/album.php31
1 files changed, 21 insertions, 10 deletions
diff --git a/views/rss/object/album.php b/views/rss/object/album.php
index 70552e833..7afb19d34 100644
--- a/views/rss/object/album.php
+++ b/views/rss/object/album.php
@@ -5,21 +5,32 @@
$album = $vars['entity'];
- $title = $album->title;
- if (empty($title)) {
- $subtitle = strip_tags($vars['entity']->description);
- $title = substr($subtitle,0,32);
- if (strlen($subtitle) > 32)
- $title .= " ...";
- }
-
$base_url = $vars['url'] . 'mod/tidypics/thumbnail.php?file_guid=';
+ // insert cover image if it exists image
+ if ($album->cover) {
+ // 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 . '&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
+ }
+
- $owner_guid = $album->getOwner();
$images = get_entities("object", "image", 0, "", 10, 0, false, 0, $album->guid);
- echo "\n";
foreach ($images as $image) {
$caption = $image->description;