aboutsummaryrefslogtreecommitdiff
path: root/views/rss/page/default.php
blob: 246ec972e272eea06597e9f3da5994f570ea2cf1 (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
<?php
/**
 * Elgg RSS output pageshell
 *
 * @package Elgg
 * @subpackage Core
 */

header("Content-Type: text/xml");

// allow caching as required by stupid MS products for https feeds.
header('Pragma: public', TRUE);

echo "<?xml version='1.0'?>";

// Set title
if (empty($vars['title'])) {
	$title = elgg_get_config('sitename');
} else {
	$title = elgg_get_config('sitename') . ": " . $vars['title'];
}

// Remove RSS from URL
$url = str_replace('?view=rss', '', full_url());
$url = str_replace('&view=rss', '', $url);

?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:georss="http://www.georss.org/georss" <?php echo elgg_view('extensions/xmlns'); ?> >
<channel>
	<title><![CDATA[<?php echo $title; ?>]]></title>
	<link><?php echo htmlentities($url); ?></link>
	<description></description>
<?php
	echo elgg_view('extensions/channel');
	echo $vars['body'];
?>
</channel>
</rss>