aboutsummaryrefslogtreecommitdiffstats
path: root/functions/template.php
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2004-05-16 05:39:25 +0000
committerChad Little <clittle@users.sourceforge.net>2004-05-16 05:39:25 +0000
commit34b8a450d77e374fe3f268eed30ba37e131fde62 (patch)
tree27cb60038cd89d590cfe71680ad6a7e9774160a6 /functions/template.php
parent642aaedc0e7de5d1209549f8e1125185791701a4 (diff)
downloadphpicalendar-34b8a450d77e374fe3f268eed30ba37e131fde62.tar.gz
phpicalendar-34b8a450d77e374fe3f268eed30ba37e131fde62.tar.bz2
phpicalendar-34b8a450d77e374fe3f268eed30ba37e131fde62.zip
Added RSS check, updated month for XHTML validation.
Diffstat (limited to 'functions/template.php')
-rw-r--r--functions/template.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/functions/template.php b/functions/template.php
index 561787b..7f79b3a 100644
--- a/functions/template.php
+++ b/functions/template.php
@@ -867,7 +867,7 @@ class Page {
}
function output() {
- global $template, $php_started, $lang;
+ global $template, $php_started, $lang, $enable_rss;
// Looks for {MONTH} before sending page out
preg_match_all ('!\{MONTH_([A-Z]*)\|?([+|-])([0-9]{1,2})\}!is', $this->page, $match);
@@ -901,6 +901,11 @@ class Page {
$php_ended = @getmicrotime();
$generated = number_format(($php_ended-$php_started),3);
$this->page = str_replace('{GENERATED}', $generated, $this->page);
+ if ($enable_rss != 'yes') {
+ $this->page = preg_replace('!<\!-- switch rss_powered on -->(.*)<\!-- switch rss_powered off -->!is', '', $this->page);
+ } else {
+ $this->page = str_replace('{BASE}', BASE, $this->page);
+ }
print($this->page);
}
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy