aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2003-02-16 20:25:21 +0000
committerChad Little <clittle@users.sourceforge.net>2003-02-16 20:25:21 +0000
commit34f353f0d7e4868171c18a5614d78f6a4b2844f7 (patch)
tree25422aaa505176c17a093b905b6f4bc4d57e7d32
parentd2e3763e39c6920bdb01b259a4dc4871199ff4a3 (diff)
downloadphpicalendar-34f353f0d7e4868171c18a5614d78f6a4b2844f7.tar.gz
phpicalendar-34f353f0d7e4868171c18a5614d78f6a4b2844f7.tar.bz2
phpicalendar-34f353f0d7e4868171c18a5614d78f6a4b2844f7.zip
You can now set hard paths for cookies, downloads, and webcals. Also updated footer to 0.9.1. Closed all bugs
reguarding cookies, fixed back button on preferences page.
-rw-r--r--config.inc.php6
-rw-r--r--functions/init.inc.php12
-rw-r--r--includes/calendar_nav.php2
-rw-r--r--includes/footer.inc.php2
-rw-r--r--includes/sidebar.php2
-rw-r--r--preferences.php17
6 files changed, 30 insertions, 11 deletions
diff --git a/config.inc.php b/config.inc.php
index d5e93c5..68751cd 100644
--- a/config.inc.php
+++ b/config.inc.php
@@ -19,10 +19,14 @@ $tomorrows_events_lines = '1'; // Number of lines to wrap each event title in
$allday_week_lines = '1'; // Number of lines to wrap each event title in all-day events in week view, 0 means display all lines.
$week_events_lines = '1'; // Number of lines to wrap each event title in the 'Tommorrow's events' box, 0 means display all lines.
$timezone = ''; // Set timezone. Read TIMEZONES file for more information
-$default_path = 'http://www.example.com/phpicalendar'; // The HTTP URL to the PHP iCalendar directory
+$default_path = 'http://www.example.com/phpicalendar'; // The HTTP URL to the PHP iCalendar directory, ie. http://www.example.com/phpicalendar
$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.
+// Advanced settings for custom installs, cookies, etc.
+// In most cases these will not need to be set.
+$cookie_uri = ''; // The HTTP URL to the PHP iCalendar directory, ie. http://www.example.com/phpicalendar
+$download_uri = ''; // The HTTP URL to your calendars directory, ie. http://www.example.com/phpicalendar/calendars
// 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 b1e6f65..ae9812c 100644
--- a/functions/init.inc.php
+++ b/functions/init.inc.php
@@ -99,7 +99,17 @@ if ($is_webcal) {
}
}
}
- $subscribe_path = 'webcal://'.$HTTP_SERVER_VARS['SERVER_NAME'].dirname($HTTP_SERVER_VARS['PHP_SELF']).'/'.$filename;
+
+ // Sets the download and subscribe paths from the config if present.
+ if ($download_uri == '') {
+ $subscribe_path = 'webcal://'.$HTTP_SERVER_VARS['SERVER_NAME'].dirname($HTTP_SERVER_VARS['PHP_SELF']).'/'.$filename;
+ $download_filename = $filename;
+ } else {
+ $newurl = eregi_replace("^(http://)", "", $download_uri);
+ $subscribe_path = 'webcal://'.$newurl.'/'.$cal_filename.'.ics';
+ $download_filename = $download_uri.'/'.$cal_filename.'.ics';
+ }
+
}
}
?> \ No newline at end of file
diff --git a/includes/calendar_nav.php b/includes/calendar_nav.php
index 501bae8..7598d98 100644
--- a/includes/calendar_nav.php
+++ b/includes/calendar_nav.php
@@ -198,7 +198,7 @@
<a class=\"psf\" href=\"year.php?cal=$cal&amp;getdate=$today_today\">$goyear_lang</a><br>\n
<a class=\"psf\" href=\"print.php?cal=$cal&amp;getdate=$getdate&amp;printview=$current_view\">$goprint_lang</a><br>\n
<a class=\"psf\" href=\"preferences.php?cal=$cal&amp;getdate=$getdate\">$preferences_lang</a><br>\n
- <a class=\"psf\" href=\"$subscribe_path\">$subscribe_lang</a>&nbsp;|&nbsp;<a class=\"psf\" href=\"$filename\">$download_lang</a>\n
+ <a class=\"psf\" href=\"$subscribe_path\">$subscribe_lang</a>&nbsp;|&nbsp;<a class=\"psf\" href=\"$download_filename\">$download_lang</a>\n
"; ?>
</td>
</tr>
diff --git a/includes/footer.inc.php b/includes/footer.inc.php
index c4bedac..5a6eaf4 100644
--- a/includes/footer.inc.php
+++ b/includes/footer.inc.php
@@ -1,6 +1,6 @@
<?php
-echo "<center><font class=\"V9\"><br>$powered_by_lang <a class=\"psf\" href=\"http://phpicalendar.sourceforge.net/nuke/\">PHP iCalendar 0.9 CVS</a>";
+echo "<center><font class=\"V9\"><br>$powered_by_lang <a class=\"psf\" href=\"http://phpicalendar.sourceforge.net/nuke/\">PHP iCalendar 0.9.1 CVS</a>";
if ($enable_rss == 'yes') {
echo "<br>\n";
if ($current_view == 'rssindex') {
diff --git a/includes/sidebar.php b/includes/sidebar.php
index 4fa48cc..bf1a7b6 100644
--- a/includes/sidebar.php
+++ b/includes/sidebar.php
@@ -39,7 +39,7 @@
<a class=\"psf\" href=\"year.php?cal=$cal&amp;getdate=$today_today\">$goyear_lang</a><br>\n
<a class=\"psf\" href=\"print.php?cal=$cal&amp;getdate=$getdate&amp;printview=$current_view\">$goprint_lang</a><br>\n
<a class=\"psf\" href=\"preferences.php?cal=$cal&amp;getdate=$getdate\">$preferences_lang</a><br>\n
- <a class=\"psf\" href=\"$subscribe_path\">$subscribe_lang</a>&nbsp;|&nbsp;<a class=\"psf\" href=\"$filename\">$download_lang</a>\n
+ <a class=\"psf\" href=\"$subscribe_path\">$subscribe_lang</a>&nbsp;|&nbsp;<a class=\"psf\" href=\"$download_filename\">$download_lang</a>\n
"; ?>
</td>
</tr>
diff --git a/preferences.php b/preferences.php
index ffd1e0b..1584bfc 100644
--- a/preferences.php
+++ b/preferences.php
@@ -1,5 +1,7 @@
<?php
-$cookie_uri = $HTTP_SERVER_VARS['SERVER_NAME'].substr($HTTP_SERVER_VARS['PHP_SELF'],0,strpos($HTTP_SERVER_VARS['PHP_SELF'], '/'));
+if ($cookie_uri == '') {
+ $cookie_uri = $HTTP_SERVER_VARS['SERVER_NAME'].substr($HTTP_SERVER_VARS['PHP_SELF'],0,strpos($HTTP_SERVER_VARS['PHP_SELF'], '/'));
+}
define('BASE','./');
$current_view = "preferences";
$default_view = "$default_view" . ".php";
@@ -51,6 +53,9 @@ if ((!isset($HTTP_COOKIE_VARS['phpicalendar'])) || ($cookie_unset)) {
$cookie_startday = $week_start_day;
$cookie_time = $day_start;
}
+
+$back_page = BASE.$default_view.'.php?cal='.$cal.'&amp;getdate='.$getdate;
+
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
@@ -71,7 +76,7 @@ if ((!isset($HTTP_COOKIE_VARS['phpicalendar'])) || ($cookie_unset)) {
<td align="center" valign="middle">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
- <td align="left" width="120" class="navback">&nbsp;</td>
+ <td align="left" width="120" class="navback"><?php echo '<a href="'.$back_page.'"><img src="'.BASE.'styles/'.$style_sheet.'/back.gif" alt=" " border="0" align="left"></a>'; ?></td>
<td class="navback">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
@@ -82,10 +87,10 @@ if ((!isset($HTTP_COOKIE_VARS['phpicalendar'])) || ($cookie_unset)) {
<td align="right" width="120" class="navback">
<table width="120" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td><?php echo '<a class="psf" href="day.php?cal='.$cal.'&amp;getdate='.$getdate.'"><img src="'.BASE.'/styles/'.$style_sheet.'/day_on.gif" alt="'.$day_view_lang.'" border="0"></a></td>'; ?>
- <td><?php echo '<a class="psf" href="week.php?cal='.$cal.'&amp;getdate='.$getdate.'"><img src="'.BASE.'/styles/'.$style_sheet.'/week_on.gif" alt="'.$week_view_lang.'" border="0"></a></td>'; ?>
- <td><?php echo '<a class="psf" href="month.php?cal='.$cal.'&amp;getdate='.$getdate.'"><img src="'.BASE.'/styles/'.$style_sheet.'/month_on.gif" alt="'.$month_view_lang.'" border="0"></a></td>'; ?>
- <td><?php echo '<a class="psf" href="year.php?cal='.$cal.'&amp;getdate='.$getdate.'"><img src="'.BASE.'/styles/'.$style_sheet.'/year_on.gif" alt="'.$year_view_lang.'" border="0"></a></td>'; ?>
+ <td><?php echo '<a class="psf" href="'.BASE.'day.php?cal='.$cal.'&amp;getdate='.$getdate.'"><img src="'.BASE.'styles/'.$style_sheet.'/day_on.gif" alt=" " border="0"></td>'; ?>
+ <td><?php echo '<a class="psf" href="'.BASE.'week.php?cal='.$cal.'&amp;getdate='.$getdate.'"><img src="'.BASE.'styles/'.$style_sheet.'/week_on.gif" alt=" " border="0"></td>'; ?>
+ <td><?php echo '<a class="psf" href="'.BASE.'month.php?cal='.$cal.'&amp;getdate='.$getdate.'"><img src="'.BASE.'styles/'.$style_sheet.'/month_on.gif" alt=" " border="0"></td>'; ?>
+ <td><?php echo '<a class="psf" href="'.BASE.'year.php?cal='.$cal.'&amp;getdate='.$getdate.'"><img src="'.BASE.'styles/'.$style_sheet.'/year_on.gif" alt=" " border="0"></td>'; ?>
</tr>
</table>
</td>

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