aboutsummaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2004-01-26 21:30:17 +0000
committerChad Little <clittle@users.sourceforge.net>2004-01-26 21:30:17 +0000
commit5c5eed1390a103fecc2c57c21bbf79365cb1ee98 (patch)
tree3f5b5c2d8e9b48428c2c692e759e1970ced8e808 /functions
parent044a72589427d5fa7f5e59562300bd9c2844ce89 (diff)
downloadphpicalendar-5c5eed1390a103fecc2c57c21bbf79365cb1ee98.tar.gz
phpicalendar-5c5eed1390a103fecc2c57c21bbf79365cb1ee98.tar.bz2
phpicalendar-5c5eed1390a103fecc2c57c21bbf79365cb1ee98.zip
More template work on event.php
Diffstat (limited to 'functions')
-rw-r--r--functions/template.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/functions/template.php b/functions/template.php
index 1472c15..ebecf7a 100644
--- a/functions/template.php
+++ b/functions/template.php
@@ -20,7 +20,16 @@ class Page {
function replace_tags($tags = array()) {
if (sizeof($tags) > 0)
foreach ($tags as $tag => $data) {
+
+ // This opens up another template and parses it as well.
$data = (file_exists($data)) ? $this->parse($data) : $data;
+
+ // This removes any unfilled tags
+ if ($data == '') {
+ $this->page = eregi_replace('<!-- switch ' . $tag . ' on -->(.*)<!-- switch ' . $tag . ' off -->', '', $this->page);
+ }
+
+ // This replaces any tags
$this->page = eregi_replace('{' . $tag . '}', $data, $this->page);
}
else

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