aboutsummaryrefslogtreecommitdiffstats
path: root/functions/date_functions.php
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2003-11-20 05:18:38 +0000
committerChad Little <clittle@users.sourceforge.net>2003-11-20 05:18:38 +0000
commitb941c90ce2d8f9a1248425087063257aacd615bc (patch)
treeeb7512b970951143c189b7753d4154c52ead5f46 /functions/date_functions.php
parent4fb8c0746e8ab44a536be48107d7f56b00fa69a6 (diff)
downloadphpicalendar-b941c90ce2d8f9a1248425087063257aacd615bc.tar.gz
phpicalendar-b941c90ce2d8f9a1248425087063257aacd615bc.tar.bz2
phpicalendar-b941c90ce2d8f9a1248425087063257aacd615bc.zip
Added URL support to popup, re-wrote event.php for less code.
Diffstat (limited to 'functions/date_functions.php')
-rw-r--r--functions/date_functions.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/functions/date_functions.php b/functions/date_functions.php
index 8745c1a..374752f 100644
--- a/functions/date_functions.php
+++ b/functions/date_functions.php
@@ -160,7 +160,7 @@ function chooseOffset($time) {
return $offset;
}
-function openevent($calendar_name, $start, $end, $arr, $lines, $wrap, $pre_text, $post_text, $link_class) {
+function openevent($calendar_name, $start, $end, $arr, $lines, $wrap, $pre_text, $post_text, $link_class, $url) {
$event_text = stripslashes(urldecode($arr["event_text"]));
# for iCal pseudo tag <http> comptability
if (ereg("<([[:alpha:]]+://)([^<>[:space:]]+)>",$event_text,$matches)) {
@@ -190,6 +190,10 @@ function openevent($calendar_name, $start, $end, $arr, $lines, $wrap, $pre_text,
if (isset($arr["description"])) {
$description = addslashes(stripslashes(urldecode($arr["description"])));
}
+
+ if (isset($arr["url"])) {
+ $url = addslashes(stripslashes(urldecode($arr["url"])));
+ }
if (!empty($event_text)) {
if ($lines > 0) {
@@ -206,7 +210,7 @@ function openevent($calendar_name, $start, $end, $arr, $lines, $wrap, $pre_text,
echo <<<END
<script language="Javascript" type="text/javascript"><!--
- var eventData = new EventData('$escaped_event', '$escaped_calendar', '$escaped_start', '$escaped_end', '$description', '$status', '$location', '$organizer', '$attendee');
+ var eventData = new EventData('$escaped_event', '$escaped_calendar', '$escaped_start', '$escaped_end', '$description', '$status', '$location', '$organizer', '$attendee', '$url');
document.popup_data[$popup_data_index] = eventData;
// --></script>

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