Accéder au contenu.
Menu Sympa

devel - [Devel] r101 - trunk

Objet : devel-adl

Archives de la liste

[Devel] r101 - trunk


Chronologique Discussions 
  • From: thomas AT lolut.utbm.info
  • To: devel AT agendadulibre.org
  • Subject: [Devel] r101 - trunk
  • Date: Mon, 19 Sep 2005 19:14:26 +0200 (CEST)
  • List-archive: <http://lolut.utbm.info/pipermail/devel>
  • List-id: Developpement de l'Agenda du Libre <devel.agendadulibre.org>

Author: thomas
Date: 2005-09-19 19:14:25 +0200 (Mon, 19 Sep 2005)
New Revision: 101

Modified:
trunk/funcs.inc.php
trunk/ical.php
trunk/icallist.php
Log:

- Utilisation d'URL en webcal:// pour que le logiciel de calendrier
se lance automagiquement lorsque l'on clique sur un lien vers un
calendrier.

- Ajout du champ PRODID, obligatoire d'apr?\195?\168s la RFC.

- Modification du champ X-WR-TIMEZONE. ?\195?\128 ce propos, j'ai quelques
doutes, car j'ai l'impression que la RFC dit qu'il faut que toutes
les dates soient en valeur UTC. Ai-je bien lu ?

- Correction de la typo sur DTSTART et DTEND (il y avait un
point-virgule alors qu'il fallait un :).

- Simplification du champ URL, vu les exemples de la RFC.

- Ajout d'un champ UID unique.



Modified: trunk/funcs.inc.php
===================================================================
--- trunk/funcs.inc.php 2005-09-18 13:22:14 UTC (rev 100)
+++ trunk/funcs.inc.php 2005-09-19 17:14:25 UTC (rev 101)
@@ -25,11 +25,11 @@
*
* @param[in] Relative URL in the website
*/
-function calendar_absolute_url($url="")
+function calendar_absolute_url($url="", $protocol="http")
{
global $root;
$root = rtrim ($root, "/");
- return $root . "/" . $url;
+ return $protocol . "://" . $root . "/" . $url;
}

function calendar_setlocale()

Modified: trunk/ical.php
===================================================================
--- trunk/ical.php 2005-09-18 13:22:14 UTC (rev 100)
+++ trunk/ical.php 2005-09-19 17:14:25 UTC (rev 101)
@@ -35,8 +35,9 @@
{
echo "BEGIN:VCALENDAR\n";
echo "VERSION:2.0\n";
+ echo "PRODID:-//AgendaDuLibre.org\n";
echo "X-WR-CALNAME:Agenda du Libre\n";
- echo "X-WR-TIMEZONE:US/Central\n";
+ echo "X-WR-TIMEZONE:Europe/Paris\n";
echo "CALSCALE:GREGORIAN\n";
echo "X-WR-CALDESC:Agenda du Libre\n";
}
@@ -46,15 +47,16 @@
echo "END:VCALENDAR";
}

-function ical_display_event ($city, $start, $end, $title, $url, $description)
+function ical_display_event ($id, $city, $start, $end, $title, $url,
$description)
{
global $timezone;

echo "BEGIN:VEVENT\n";
- echo "DTSTART;" . date ('Ymd\THi\0\0', $start) . "\n";
- echo "DTEND;" . date ('Ymd\THi\0\0', $end) . "\n";
+ echo "DTSTART:" . date ('Ymd\THi\0\0', $start) . "\n";
+ echo "DTEND:" . date ('Ymd\THi\0\0', $end) . "\n";
+ echo "UID:" . $id . "@agendadulibre.org\n";
echo "SUMMARY:" . $title . "\n";
- echo "URL;VALUE=URI:" . $url . "\n";
+ echo "URL:" . $url . "\n";
echo "DESCRIPTION:" . $description . "\n";
echo "LOCATION:" . $city . "\n";
echo "END:VEVENT\n";
@@ -92,7 +94,7 @@

while ($event = mysql_fetch_object($list))
{
- ical_display_event (utf8_encode($event->city),
+ ical_display_event ($event->id, utf8_encode($event->city),
date_mysql2timestamp ($event->start_time),
date_mysql2timestamp ($event->end_time),
utf8_encode($event->title),

Modified: trunk/icallist.php
===================================================================
--- trunk/icallist.php 2005-09-18 13:22:14 UTC (rev 100)
+++ trunk/icallist.php 2005-09-19 17:14:25 UTC (rev 101)
@@ -42,11 +42,11 @@

echo " <ul>\n";

-echo " <li><a href=\"ical.php?region=all\">Toutes les
r�gions</a></li>\n\n";
+echo " <li><a href=\"" . calendar_absolute_url("ical.php?region=all",
"webcal") . "\">Toutes les r�gions</a></li>\n\n";

while ($row = mysql_fetch_object($ret))
{
- echo " <li><a href=\"ical.php?region=" . $row->id . "\">" . $row->name .
"</a></li>\n";
+ echo " <li><a href=\"" . calendar_absolute_url("ical.php?region=" .
$row->id, "webcal") . "\">" . $row->name . "</a></li>\n";
}

echo " </ul>\n";





  • [Devel] r101 - trunk, thomas, 19/09/2005

Archives gérées par MHonArc 2.6.16.

Haut de le page