From cd60de7740306494f2146eb7e4b8e7df406ede64 Mon Sep 17 00:00:00 2001 From: Jim Hu Date: Wed, 31 Dec 2008 07:23:54 +0000 Subject: option to hide location in month view (feature request 1880571) --- config.inc.php | 5 +++-- default_config.php | 1 + functions/template.php | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/config.inc.php b/config.inc.php index f89eef1..01e12dc 100644 --- a/config.inc.php +++ b/config.inc.php @@ -51,15 +51,16 @@ phpicalendar currently supports about 30 language variants. For a list of suppo # 'language' => 'Spanish', # 'default_cal' => 'US Holidays', // Exact filename of calendar without .ics. # 'template' => 'green'; // Template support: change this to have a different "skin" for your installation. - # 'default_view' => 'year', // Default view for calendars' => 'day', 'week', 'month', 'year' +# 'default_view' => 'year', // Default view for calendars' => 'day', 'week', 'month', 'year' # 'printview_default' => 'yes', // Set print view as the default view. Uses'default_view (listed above). # 'gridLength' => 10, // Grid size in day and week views. Allowed values are 1,2,3,4,10,12,15,20,30,60. Default is 15 # 'minical_view' => 'current', // Where do the mini-calendars go when clicked?' => 'day', 'week', 'month', 'current' # 'allow_preferences' => 'no', + 'month_locations' => 'no', # 'show_search' => 'yes', # 'show_todos' => 'no', # 'show_completed' => 'no', - 'allow_login' => 'yes', // Set to yes to prompt for login to unlock calendars. +# 'allow_login' => 'yes', // Set to yes to prompt for login to unlock calendars. # 'week_start_day' => 'Monday', // Day of the week your week starts on # 'week_length' => '5', // Number of days to display in the week view # 'day_start' => '0600', // Start time for day grid diff --git a/default_config.php b/default_config.php index 9f99379..374879e 100644 --- a/default_config.php +++ b/default_config.php @@ -38,6 +38,7 @@ class Configs{ // Yes/No questions --- 'yes' means Yes, anything else means no. 'yes' must be lowercase. $this->allow_webcals = 'no'; // Allow http:// and webcal:// prefixed URLs to be used as the $this->cal for remote viewing of "subscribe-able" calendars. This does not have to be enabled to allow specific ones below. + $this->month_locations = 'yes'; // Display location in the month view. $this->this_months_events = 'yes'; // Display "This month's events" at the bottom off the month page. $this->enable_rss = 'yes'; // Enable RSS access to your calendars (good thing). $this->rss_link_to_event = ''; // Set to yes to have links in the feed popup an event window. Default is to link to day.php diff --git a/functions/template.php b/functions/template.php index 7c56f38..42cf1f5 100644 --- a/functions/template.php +++ b/functions/template.php @@ -970,7 +970,7 @@ class Page { if ($type == 'large') { $switch['ALLDAY'] .= '
'; $switch['ALLDAY'] .= openevent($daylink, $cal_time, $uid, $val, $phpiCal_config->month_event_lines, 15, 'psf'); - $switch['ALLDAY'] .= (isset($val['location']) && $val['location'] != '') ? $val['location']."
" : ''; + $switch['ALLDAY'] .= (isset($val['location']) && $val['location'] != '' && $phpiCal_config->month_locations == 'yes') ? $val['location']."
" : ''; $switch['ALLDAY'] .= '
'; } else { $switch['ALLDAY'] = ' '; @@ -980,7 +980,7 @@ class Page { if ($type == 'large') { $switch['EVENT'] .= '
'; $switch['EVENT'] .= openevent($daylink, $cal_time, $uid, $val, $phpiCal_config->month_event_lines, 10, 'ps3', "$start2 ").''; - $switch['EVENT'] .= (isset($val['location']) && $val['location'] != '') ? "
".$val['location']."
" : ''; + $switch['EVENT'] .= (isset($val['location']) && $val['location'] != '' && $phpiCal_config->month_locations == 'yes') ? "
".$val['location']."
" : ''; $switch['EVENT'] .= '
'; } else { $switch['EVENT'] = ' '; -- cgit v1.2.3