From 1d368f67ef0d6112e68ca0cd6f0fc28b7fe9b006 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 25 Oct 2004 17:43:31 +0000 Subject: Fixed display month bottom. --- config.inc.php | 2 +- functions/template.php | 4 ++++ month.php | 2 ++ rss/index.php | 4 ++-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/config.inc.php b/config.inc.php index 5c754bf..4b553fd 100644 --- a/config.inc.php +++ b/config.inc.php @@ -31,7 +31,7 @@ $charset = 'UTF-8'; // Character set your calendar is in, suggested UTF-8, // Yes/No questions --- 'yes' means Yes, anything else means no. 'yes' must be lowercase. $display_custom_goto = 'no'; // In the 'Jump To' box, display the custom 'go to day' box. $allow_webcals = 'no'; // Allow http:// and webcal:// prefixed URLs to be used as the $cal for remote viewing of "subscribe-able" calendars. This does not have to be enabled to allow specific ones below. -$this_months_events = 'yes'; // Display "This month's events" at the bottom off the month page. +$this_months_events = 'ys'; // Display "This month's events" at the bottom off the month page. $enable_rss = 'yes'; // Enable RSS access to your calendars (good thing). $show_search = 'yes'; // Show the search box in the sidebar. $allow_preferences = 'yes'; // Allow visitors to change various preferences via cookies. diff --git a/functions/template.php b/functions/template.php index e9595d1..c3aac5a 100644 --- a/functions/template.php +++ b/functions/template.php @@ -829,6 +829,10 @@ class Page { return $return; } + function nomonthbottom() { + $this->page = preg_replace('!<\!-- switch showbottom on -->(.*)<\!-- switch showbottom off -->!is','', $this->page); + } + function monthbottom() { global $template, $getdate, $master_array, $this_year, $this_month, $cal, $timeFormat, $timeFormat_small, $dateFormat_week_list, $lang; preg_match("!<\!-- loop showbottomevents_odd on -->(.*)<\!-- loop showbottomevents_odd off -->!is", $this->page, $match1); diff --git a/month.php b/month.php index ceedb66..bd4f026 100644 --- a/month.php +++ b/month.php @@ -120,6 +120,8 @@ if ($allow_login == 'yes') { if ($this_months_events == 'yes') { $page->monthbottom($page); +} else { + $page->nomonthbottom($page); } $page->draw_subscribe($page); diff --git a/rss/index.php b/rss/index.php index 4357020..05feb8e 100644 --- a/rss/index.php +++ b/rss/index.php @@ -39,11 +39,11 @@ $page = new Page(BASE.'templates/'.$template.'/rss_index.tpl'); $page->replace_files(array( 'header' => BASE.'templates/'.$template.'/header.tpl', - 'footer' => BASE.'templates/'.$template.'/footer.tpl' + 'footer' => BASE.'templates/'.$template.'/footer.tpl', + 'event_js' => BASE.'functions/event.js' )); $page->replace_tags(array( - 'event_js' => BASE.'functions/event.js', 'default_path' => $default_path.'/', 'template' => $template, 'cal' => $cal, -- cgit v1.2.3