aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/rss/extensions/tidypics/channel.php1
-rw-r--r--views/rss/extensions/tidypics/xmlns.php1
-rw-r--r--views/rss/object/album.php42
3 files changed, 26 insertions, 18 deletions
diff --git a/views/rss/extensions/tidypics/channel.php b/views/rss/extensions/tidypics/channel.php
new file mode 100644
index 000000000..8b620d15d
--- /dev/null
+++ b/views/rss/extensions/tidypics/channel.php
@@ -0,0 +1 @@
+<description /> \ No newline at end of file
diff --git a/views/rss/extensions/tidypics/xmlns.php b/views/rss/extensions/tidypics/xmlns.php
new file mode 100644
index 000000000..cb9646dcb
--- /dev/null
+++ b/views/rss/extensions/tidypics/xmlns.php
@@ -0,0 +1 @@
+ xmlns:media="http://search.yahoo.com/mrss/" \ No newline at end of file
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