summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2005-11-25 13:37:35 +0100
committerAndreas Gohr <andi@splitbrain.org>2005-11-25 13:37:35 +0100
commitf96fa4150f2a8cda508b91dace3a81d166b54692 (patch)
treea3c310f27ca6ed30532f0bc1c24a1fd6fab4f4e8
parent2649b1a40f165832593df5b4b021fd3aa5a2ccd3 (diff)
downloadrpg-f96fa4150f2a8cda508b91dace3a81d166b54692.tar.gz
rpg-f96fa4150f2a8cda508b91dace3a81d166b54692.tar.bz2
Automatic adding of feeds and alternative versions can be disabled in template
darcs-hash:20051125123735-7ad00-78780796c46463692d5ae9310ddc7f136349380f.gz
-rw-r--r--inc/template.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/inc/template.php b/inc/template.php
index cd2531597..4993de19c 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -158,9 +158,10 @@ function tpl_admin(){
*
* This has to go into the head section of your template.
*
+ * @param boolean $alt Should feeds and alternative format links be added?
* @author Andreas Gohr <andi@splitbrain.org>
*/
-function tpl_metaheaders(){
+function tpl_metaheaders($alt=true){
global $ID;
global $INFO;
global $ACT;
@@ -172,10 +173,13 @@ function tpl_metaheaders(){
ptln('<meta name="generator" content="DokuWiki '.getVersion().'" />',$it);
ptln('<link rel="start" href="'.DOKU_BASE.'" />',$it);
ptln('<link rel="contents" href="'.wl($ID,'do=index').'" title="'.$lang['index'].'" />',$it);
- ptln('<link rel="alternate" type="application/rss+xml" title="Recent Changes" href="'.DOKU_BASE.'feed.php" />',$it);
- ptln('<link rel="alternate" type="application/rss+xml" title="Current Namespace" href="'.DOKU_BASE.'feed.php?mode=list&amp;ns='.$INFO['namespace'].'" />',$it);
- ptln('<link rel="alternate" type="text/html" title="Plain HTML" href="'.wl($ID,'do=export_html').'" />',$it);
- ptln('<link rel="alternate" type="text/plain" title="Wiki Markup" href="'.wl($ID, 'do=export_raw').'" />',$it);
+
+ if($alt){
+ ptln('<link rel="alternate" type="application/rss+xml" title="Recent Changes" href="'.DOKU_BASE.'feed.php" />',$it);
+ ptln('<link rel="alternate" type="application/rss+xml" title="Current Namespace" href="'.DOKU_BASE.'feed.php?mode=list&amp;ns='.$INFO['namespace'].'" />',$it);
+ ptln('<link rel="alternate" type="text/html" title="Plain HTML" href="'.wl($ID,'do=export_html').'" />',$it);
+ ptln('<link rel="alternate" type="text/plain" title="Wiki Markup" href="'.wl($ID, 'do=export_raw').'" />',$it);
+ }
// setup robot tags apropriate for different modes
if( ($ACT=='show' || $ACT=='export_html') && !$REV){