aboutsummaryrefslogtreecommitdiff
path: root/views/rss/object/album.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-06-28 13:22:18 +0000
committerCash Costello <cash.costello@gmail.com>2009-06-28 13:22:18 +0000
commitec24309e01d00fd913071747839aece6f7a8d866 (patch)
tree64353da763f84b543688a2d36272328158539b49 /views/rss/object/album.php
parentea636d9fbc60dbd54cd4f8ca271fd845361a2726 (diff)
downloadelgg-ec24309e01d00fd913071747839aece6f7a8d866.tar.gz
elgg-ec24309e01d00fd913071747839aece6f7a8d866.tar.bz2
new rss view of albums - includes yahoo media xmlns
Diffstat (limited to 'views/rss/object/album.php')
-rw-r--r--views/rss/object/album.php42
1 files changed, 24 insertions, 18 deletions
diff --git a/views/rss/object/album.php b/views/rss/object/album.php
index 9f7b7b123..fbe1ab058 100644
--- a/views/rss/object/album.php
+++ b/views/rss/object/album.php
@@ -12,27 +12,33 @@
if (strlen($subtitle) > 32)
$title .= " ...";
}
+
+ $base_url = $vars['url'] . 'mod/tidypics/thumbnail.php?file_guid=';
+
$owner_guid = $album->getOwner();
- $images = get_entities("object", "image", 0, "", 10, 0, false, 0, $album->container_guid);
+ $images = get_entities("object", "image", 0, "", 10, 0, false, 0, $album->guid);
- //error_log(count($images));
+ echo "\n";
+
+ foreach ($images as $image) {
+ $caption = $image->description;
+ if (!$caption)
+ $caption = "No caption";
?>
-
<item>
- <guid isPermaLink='true'><?php echo htmlspecialchars($album->getURL()); ?></guid>
- <pubDate><?php echo date("r",$album->time_created) ?></pubDate>
- <link><?php echo htmlspecialchars($album->getURL()); ?></link>
- <title><![CDATA[<?php echo $title; ?>]]></title>
- <description><![CDATA[<?php echo (autop($album->description)); ?>]]></description>
-<?php
- $owner = $album->getOwnerEntity();
- if ($owner)
- {
-?>
- <dc:creator><?php echo $owner->name; ?></dc:creator>
-<?php
- }
-?>
- <?php echo elgg_view('extensions/item'); ?>
+ <title><?php echo $image->title; ?></title>
+ <link><?php echo $image->getURL(); ?></link>
+ <description><?php echo $caption; ?></description>
+ <pubDate><?php echo date("r", $image->time_created); ?></pubDate>
+ <guid isPermaLink="true"><?php echo $image->getURL(); ?></guid>
+ <media:content url="<?php echo $base_url . $image->guid . '&amp;size=large'; ?>">
+ <media:title><?php echo $image->title; ?></media:title>
+ <media:description><?php echo $caption; ?></media:description>
+ <media:thumbnail url="<?php echo $base_url . $image->guid . '&amp;size=thumb'; ?>"></media:thumbnail>
+ </media:content>
</item>
+
+<?php
+ }
+?> \ No newline at end of file