aboutsummaryrefslogtreecommitdiff
path: root/views/rss/object/album.php
blob: 9f7b7b1230d40e09380ef62b50687b51d2176649 (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
<?php
	/**
	 * Tidypics Album RSS View
	 */

	$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 .= " ...";
	}

	$owner_guid = $album->getOwner();
	$images = get_entities("object", "image", 0, "", 10, 0, false, 0, $album->container_guid);
	
	//error_log(count($images));
?>

	<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'); ?>
	</item>