From a3fc12aaf3ed0e90b750412fa8037da3dfa18e62 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 11 Nov 2002 19:59:36 +0000 Subject: Made a tweek to allow calendar folders outside phpicalendar installation. --- config.inc.php | 3 ++- functions/init.inc.php | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/config.inc.php b/config.inc.php index 01d5407..b476dd4 100644 --- a/config.inc.php +++ b/config.inc.php @@ -6,7 +6,6 @@ // Follow instructions to the right for detailed information $style_sheet = 'silver'; // Themes support - silver, red, green, orange, grey, tan -$calendar_path = './calendars'; // Path to directory with calendars $default_view = 'day'; // Default view for calendars = 'day', 'week', 'month', 'year' $minical_view = 'current'; // Where do the mini-calendars go when clicked? = 'day', 'week', 'month', 'current' $default_cal = 'School'; // Exact filename of calendar without .ics @@ -22,6 +21,8 @@ $week_events_lines = '1'; // Number of lines to wrap each event title in th $timezone = ''; // Set timezone. Read TIMEZONES file for more information $default_path = 'http://www.example.com/phpicalendar'; // The HTTP URL to the PHP iCalendar directory $tmp_dir = '/tmp'; // The temporary directory on your system (/tmp is fine for UNIXes including Mac OS X) +$calendar_path = ''; // Leave this blank on most installs, place your full path to calendars if they are outside the phpicalendar folder. + // Yes/No questions --- 'yes' means Yes, anything else means no. 'yes' must be lowercase. $save_parsed_cals = 'no'; // Recommended 'yes'. Saves a copy of the cal in /tmp after it's been parsed. Improves performence. diff --git a/functions/init.inc.php b/functions/init.inc.php index bc27ff0..4e19477 100644 --- a/functions/init.inc.php +++ b/functions/init.inc.php @@ -34,8 +34,11 @@ if (ini_get('max_execution_time') < 60) { ini_set('max_execution_time', '60'); } -$calendar_path_orig = $calendar_path; -$calendar_path = BASE.$calendar_path; +if ($calendar_path == '') { + $calendar_path = 'calendars'; + $calendar_path_orig = $calendar_path; + $calendar_path = BASE.$calendar_path; +} $is_webcal = FALSE; if (isset($HTTP_GET_VARS['cal']) && $HTTP_GET_VARS['cal'] != '') { -- cgit v1.2.3