blob: 8df98cf7a5a8607930d6dc80bdf686a3289d3160 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
<?php
/**
* Tidypics Album RSS View
*/
// for now catch the albums view and ignore it
if (get_context() == "search" && get_input('search_viewtype') == "gallery") {
?>
<item>
<guid isPermaLink='true'><?php echo $vars['entity']->getURL(); ?></guid>
<pubDate><?php echo date("r",$vars['entity']->time_created) ?></pubDate>
<link><?php echo $vars['entity']->getURL(); ?></link>
<title><![CDATA[<?php echo $vars['entity']->title; ?>]]></title>
<description><![CDATA[<?php echo (autop($vars['entity']->description)); ?>]]></description>
</item>
<?php
} else {
$album = $vars['entity'];
// use fullsize image
$base_url_fullsize = $vars['url'] . 'pg/photos/download/';
$album_cover_guid = $album->getCoverImageGuid();
if ($album_cover_guid) {
// 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_guid . '&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
}
$limit = get_input('limit', 20);
$images = elgg_get_entities(array(
"type" => "object",
"subtype" => "image",
"container_guid" => $album->guid,
"limit" => $limit,
));
foreach ($images as $image) {
echo elgg_view_entity($image);
}
}
|