aboutsummaryrefslogtreecommitdiff
path: root/views/rss/river/item.php
blob: f84e6ccf0f094053e2413987ab0ef346734f1e8f (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
<?php
/**
 * RSS river view
 *
 * @uses $vars['item']
 */
$item = $vars['item'];

$view = $item->getView();

$name = $item->getSubjectEntity()->name;
$body = elgg_view($item->getView(), array('item' => $item), false, false, 'default');
$body = "$name $body";

$title = strip_tags($body);
$timestamp = date('r', $item->getPostedTime());

$object = $item->getObjectEntity();
if ($object) {
	$url = htmlspecialchars($object->getURL());
} else {
	$url = elgg_get_site_url() . 'activity';
}

?>
<item>
	<guid isPermaLink='true'><?php echo $url; ?></guid>
	<pubDate><?php echo $timestamp; ?></pubDate>
	<link><?php echo $url; ?></link>
	<title><![CDATA[<?php echo $title; ?>]]></title>
	<description><![CDATA[<?php echo ($body); ?>]]></description>
</item>