From 4edff402a5ce3b87b8ad2f6590f2636b44376488 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Wed, 14 Sep 2005 20:53:52 +0000 Subject: Search box can be unconfigured. --- README | 5 +++++ config.inc.php | 2 +- day.php | 4 ++++ functions/template.php | 4 ++++ month.php | 3 +++ week.php | 4 ++++ 6 files changed, 21 insertions(+), 1 deletion(-) diff --git a/README b/README index 5e4c69d..c958cb2 100644 --- a/README +++ b/README @@ -81,6 +81,11 @@ COPYING for more information about our license. Changes: -------- +2.0.2 + -Allows multiple calendar selection. + -Search box can be made to go away. + -Various bug fixes. + 2.0.1 -Event URLs display without LOCATION. -Fixed VTIMEZONE dates on Windows IIS. diff --git a/config.inc.php b/config.inc.php index 776df5a..048b18b 100644 --- a/config.inc.php +++ b/config.inc.php @@ -32,7 +32,7 @@ $charset = 'UTF-8'; // Character set your calendar is in, suggested UTF-8, $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. $enable_rss = 'yes'; // Enable RSS access to your calendars (good thing). -$show_search = 'yes'; // Show the search box in the sidebar. +$show_search = 'no'; // Show the search box in the sidebar. $allow_preferences = 'yes'; // Allow visitors to change various preferences via cookies. $printview_default = 'no'; // Set print view as the default view. day, week, and month only supported views for $default_view (listed well above). $show_todos = 'yes'; // Show your todo list on the side of day and week view. diff --git a/day.php b/day.php index 0936296..a2f2cf8 100644 --- a/day.php +++ b/day.php @@ -117,6 +117,10 @@ if ($allow_login == 'yes') { 'l_logout' => $lang['l_logout'] )); } + +if ($show_search != 'yes') { + $page->nosearch($page); +} $page->draw_day($page); $page->tomorrows_events($page); diff --git a/functions/template.php b/functions/template.php index 6ecae12..2b59381 100644 --- a/functions/template.php +++ b/functions/template.php @@ -962,6 +962,10 @@ class Page { function nomonthbottom() { $this->page = preg_replace('!<\!-- switch showbottom on -->(.*)<\!-- switch showbottom off -->!is','', $this->page); } + + function nosearch() { + $this->page = preg_replace('!<\!-- switch show_search on -->(.*)<\!-- switch show_search off -->!is','', $this->page); + } function monthbottom() { global $template, $getdate, $master_array, $this_year, $this_month, $cal, $timeFormat, $timeFormat_small, $dateFormat_week_list, $lang; diff --git a/month.php b/month.php index b2b38a3..9f19500 100644 --- a/month.php +++ b/month.php @@ -122,6 +122,9 @@ if ($allow_login == 'yes') { )); } +if ($show_search != 'yes') { + $page->nosearch($page); +} if ($this_months_events == 'yes') { $page->monthbottom($page); diff --git a/week.php b/week.php index 1018b5b..3198232 100644 --- a/week.php +++ b/week.php @@ -120,6 +120,10 @@ if ($allow_login == 'yes') { 'l_login' => $lang['l_login'], 'l_logout' => $lang['l_logout'] )); +} + +if ($show_search != 'yes') { + $page->nosearch($page); } $page->draw_week($page); -- cgit v1.2.3