From 8835f290aeb05b2071320b38c14f6a4f013c06be Mon Sep 17 00:00:00 2001 From: Jim Hu Date: Fri, 16 Feb 2007 06:34:10 +0000 Subject: allow rss link to event popup option --- config.inc.php | 3 ++- rss/rss.php | 11 +++++++++-- rss/rss1.0.php | 12 +++++++++--- rss/rss2.0.php | 10 +++++++--- 4 files changed, 27 insertions(+), 9 deletions(-) diff --git a/config.inc.php b/config.inc.php index 1253283..2c50bfb 100644 --- a/config.inc.php +++ b/config.inc.php @@ -26,13 +26,14 @@ $second_offset = ''; // The time in seconds between your time and your serv $bleed_time = '-1'; // This allows events past midnight to just be displayed on the starting date, only good up to 24 hours. Range from '0000' to '2359', or '-1' for no bleed time. $cookie_uri = ''; // The HTTP URL to the PHP iCalendar directory, ie. http://www.example.com/phpicalendar -- AUTO SETTING -- Only set if you are having cookie issues. $download_uri = ''; // The HTTP URL to your calendars directory, ie. http://www.example.com/phpicalendar/calendars -- AUTO SETTING -- Only set if you are having subscribe issues. -$default_path = 'http://localhost/phpicalendar'; // The HTTP URL to the PHP iCalendar directory, ie. http://www.example.com/phpicalendar +$default_path = ''; // The HTTP URL to the PHP iCalendar directory, ie. http://www.example.com/phpicalendar $charset = 'UTF-8'; // Character set your calendar is in, suggested UTF-8, or iso-8859-1 for most languages. // Yes/No questions --- 'yes' means Yes, anything else means no. 'yes' must be lowercase. $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). +$rss_link_to_event = ''; // Set to yes to have links in the feed popup an event window. Default is to link to day.php $show_search = 'yes'; // 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). diff --git a/rss/rss.php b/rss/rss.php index 6062b8f..e37e7bf 100644 --- a/rss/rss.php +++ b/rss/rss.php @@ -188,9 +188,16 @@ $uid_arr = array(); $rss_title = urldecode ("$dayofweek: $event_text"); - $event_data = serialize($val); - $rss_link = "$default_path/event.php?getdate=$thisdate&cal=$cal&event_data=$event_data"; + + if (isset($rss_link_to_event) && $$rss_link_to_event == 'yes'){ + $event_data = serialize($val); + $rss_link = "$default_path/event.php?getdate=$thisdate&cal=$cal&event_data=$event_data"; + }else{ + $rss_link = ("$default_path/day.php?getdate=$thisdate&cal=$urlcal"); + + } if (isset($cpath) && $cpath !='') $rss_link.="&cpath=$cpath"; + $rss_description = htmlspecialchars ("$dayofweek $event_start: $description"); $rss .= ''."\n"; diff --git a/rss/rss1.0.php b/rss/rss1.0.php index 8dcc0a0..cd99958 100755 --- a/rss/rss1.0.php +++ b/rss/rss1.0.php @@ -196,11 +196,17 @@ $uid_arr = array(); */ /* Add %20's for spaces for the calendar links to make them valid url's */ $urlcal = rawurlencode ("$cal"); - $rss_link = ("$default_path/day.php?getdate=$thisdate&cal=$urlcal"); - if (isset($cpath) && $cpath !=''){ - $rss_link .= "&cpath=$cpath"; + + if (isset($rss_link_to_event) && $$rss_link_to_event == 'yes'){ + $event_data = serialize($val); + $rss_link = "$default_path/event.php?getdate=$thisdate&cal=$cal&event_data=$event_data"; + }else{ + $rss_link = ("$default_path/day.php?getdate=$thisdate&cal=$urlcal"); + } + if (isset($cpath) && $cpath !='') $rss_link.="&cpath=$cpath"; /* End link modification */ + $rss_description = htmlspecialchars ("$dayofweek $event_start: $description"); $rss .= ''."\n"; diff --git a/rss/rss2.0.php b/rss/rss2.0.php index 1fd30a0..c315730 100644 --- a/rss/rss2.0.php +++ b/rss/rss2.0.php @@ -199,10 +199,14 @@ $uid_arr = array(); */ /* Add %20's for spaces for the calendar links to make them valid url's */ $urlcal = rawurlencode ("$cal"); - $rss_link = ("$default_path/day.php?getdate=$thisdate&cal=$urlcal"); - if (isset($cpath) && $cpath !=''){ - $rss_link .= "&cpath=$cpath"; + if (isset($rss_link_to_event) && $$rss_link_to_event == 'yes'){ + $event_data = serialize($val); + $rss_link = "$default_path/event.php?getdate=$thisdate&cal=$cal&event_data=$event_data"; + }else{ + $rss_link = ("$default_path/day.php?getdate=$thisdate&cal=$urlcal"); + } + if (isset($cpath) && $cpath !='') $rss_link.="&cpath=$cpath"; /* End link modification */ $rss_description = htmlspecialchars ("$dayofweek $event_start: $description"); -- cgit v1.2.3