aboutsummaryrefslogtreecommitdiff
path: root/views/default/page_elements/header.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-19 20:18:40 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-19 20:18:40 +0000
commitc25dcd4533ec98c7e58c647e4b2c08169c6b7dc4 (patch)
treea8569b30b979a78f0fa052023a2d1dffe03daadf /views/default/page_elements/header.php
parent5681f47424f7c4b17acb56656135efff420fa09a (diff)
downloadelgg-c25dcd4533ec98c7e58c647e4b2c08169c6b7dc4.tar.gz
elgg-c25dcd4533ec98c7e58c647e4b2c08169c6b7dc4.tar.bz2
Automatic RSS feeds!
git-svn-id: https://code.elgg.org/elgg/trunk@1011 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/page_elements/header.php')
-rw-r--r--views/default/page_elements/header.php24
1 files changed, 23 insertions, 1 deletions
diff --git a/views/default/page_elements/header.php b/views/default/page_elements/header.php
index fdcfe71df..75ef6f746 100644
--- a/views/default/page_elements/header.php
+++ b/views/default/page_elements/header.php
@@ -24,6 +24,23 @@
$title = $vars['title'];
} else {
$title = $vars['config']->sitename . ": " . $vars['title'];
+ }
+
+ global $autofeed;
+ if (isset($autofeed) && $autofeed == true) {
+ $url = full_url();
+ if (substr_count($url,'?')) {
+ $url .= "&view=rss";
+ } else {
+ $url .= "?view=rss";
+ }
+ $feedref = <<<END
+
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="{$url}" />
+
+END;
+ } else {
+ $feedref = "";
}
?>
@@ -38,7 +55,12 @@
<script type="text/javascript" src="<?php echo $vars['url']; ?>javascript/initialise_elgg.js"></script>
<!-- include the default css file -->
<link rel="stylesheet" href="<?php echo $vars['url']; ?>_css/css.css" type="text/css" />
- <?php echo elgg_view('metatags',$vars); ?>
+ <?php
+
+ echo $feedref;
+ echo elgg_view('metatags',$vars);
+
+ ?>
</head>
<body>