From ac0de7ada7ddefc77f6b25965ab71a736b27bca1 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 28 Jun 2009 13:49:04 +0000 Subject: added album cover as image for channel --- views/rss/object/album.php | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) (limited to 'views') 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'; +?> + + <![CDATA[<?php echo $title; ?>]]> + getURL() . '?view=rss'; ?> + + +getOwner(); $images = get_entities("object", "image", 0, "", 10, 0, false, 0, $album->guid); - echo "\n"; foreach ($images as $image) { $caption = $image->description; -- cgit v1.2.3