aboutsummaryrefslogtreecommitdiff
path: root/views/rss/page/default.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/rss/page/default.php')
-rw-r--r--views/rss/page/default.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/views/rss/page/default.php b/views/rss/page/default.php
new file mode 100644
index 000000000..da6f69c41
--- /dev/null
+++ b/views/rss/page/default.php
@@ -0,0 +1,41 @@
+<?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'?>\n";
+
+// 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>
+ <?php echo elgg_view('extensions/channel'); ?>
+ <?php
+
+ echo $vars['body'];
+
+ ?>
+</channel>
+</rss>