diff options
author | Cash Costello <cash.costello@gmail.com> | 2009-06-28 13:49:04 +0000 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2009-06-28 13:49:04 +0000 |
commit | ac0de7ada7ddefc77f6b25965ab71a736b27bca1 (patch) | |
tree | 310f48922802c9b714df706adb2d420236f95b35 /views/rss | |
parent | cb8f1902d1fed270507c045d7b1575fb265a57f2 (diff) | |
download | elgg-ac0de7ada7ddefc77f6b25965ab71a736b27bca1.tar.gz elgg-ac0de7ada7ddefc77f6b25965ab71a736b27bca1.tar.bz2 |
added album cover as image for channel
Diffstat (limited to 'views/rss')
-rw-r--r-- | views/rss/object/album.php | 31 |
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;
|