Accéder au contenu.
Menu Sympa

devel - [Devel] r353 - trunk

Objet : devel-adl

Archives de la liste

[Devel] r353 - trunk


Chronologique Discussions 
  • From: svn AT agendadulibre.org
  • To: devel AT agendadulibre.org
  • Subject: [Devel] r353 - trunk
  • Date: Fri, 11 Jul 2008 20:09:44 +0200 (CEST)
  • List-archive: <http://agendadulibre.org/pipermail/devel>
  • List-id: Developpement de l'Agenda du Libre <devel.agendadulibre.org>

Author: thomas
Date: Fri Jul 11 20:08:23 2008
New Revision: 353

Log:
Mise en place d'une carte dynamique affichant la localisation des
évènements. Elle remplace la carte des régions auparavant disponible.

* map.php

Implémentation de la nouvelle carte. Elle repose sur la
bibliothèque Javascript OpenLayers (http://www.openlayers.org) et
utilise un layer OpenStreetMap plus un layer GeoRSS pour afficher
les évènements de l'agenda.

Les évènements de toutes les régions prévus à n'importe quelle date
dans le futur sont disponibles.

* oldmap.php

L'ancienne carte, conservée au cas où. Elle n'est pas accessible
depuis un lien sur le site, seulement directement par l'URL.

* rss.php

Nouvelle sémantique pour le paramètre "daylimit". Quand il vaut 0,
cela signifie que tous les évènements dans le futur doivent être
listés dans le flux RSS.

Nouvel argument "map". C'est un hack qui permet de supprimer la
génération des champs <content:encoded> dans le flux RSS qui semble
poser problème à OpenLayers. Un bug a été reporté à ce sujet chez
OpenLayers, http://trac.openlayers.org/ticket/1615

Séparation sur plusieurs lignes de l'entête rdf:RDF et surtout
suppression du / final dans l'adresse du namespace
xmlns:georss. Cela posait problème à OpenLayers.

* funcs.inc.php

Hack divers permettant de passer un bout de code Javascript custom
dans le <head> et d'appeler une fonction Javascript au chargement
de la page via <body onload="machin()">. Pas joli.



Added:
trunk/oldmap.php
- copied unchanged from r340, /trunk/map.php
Modified:
trunk/funcs.inc.php
trunk/map.php
trunk/rss.php

Modified: trunk/funcs.inc.php
==============================================================================
--- trunk/funcs.inc.php (original)
+++ trunk/funcs.inc.php Fri Jul 11 20:08:23 2008
@@ -47,7 +47,7 @@
echo "<link rel=\"alternate\" href=\"" . $href . "\" title=\"" . $title .
"\" type=\"application/rss+xml\" />";
}

-function put_header ($title)
+function put_header ($title, $jscriptcode = "", $onloadfunc = "")
{
calendar_setlocale();

@@ -82,11 +82,20 @@
{
rss_feed_header ("rss.php?region=" . $row->id, "Agenda du Libre, " .
$row->name);
}
+
+ if ($jscriptcode)
+ echo $jscriptcode;
?>

</head>

-<body>
+<?php
+if ($onloadfunc)
+ echo "<body onload=\"" . $onloadfunc . "\">";
+else
+ echo "<body>";
+?>
+
<div class="main">
<div id="important">
<!-- <p>Restez inform� en utilisant les <a href="rsslist.php">flux RSS</a>
ou les <a href="icallist.php">calendriers</a>&nbsp;!</p> -->

Modified: trunk/map.php
==============================================================================
--- trunk/map.php (original)
+++ trunk/map.php Fri Jul 11 20:08:23 2008
@@ -24,144 +24,48 @@
include("bd-private.inc.php");
include("funcs.inc.php");

-function generate_event_description ($db)
-{
- $start = mktime();
- $end = mktime() + (30 * 24 * 60 * 60);
-
- echo "<dl class=\"region-map-event\" id=\"box\">\n";
- echo " <dt><b>Carte des r�gions</b></dt>\n";
- echo " <dd>Cliquez sur une r�gion pour voir les �v�nements !</dd>\n";
- echo "</dl>\n";
-
- $regions = $db->query ("select * from regions");
- if ($regions == FALSE)
- return FALSE;
-
- while ($region = mysql_fetch_object ($regions))
- {
- echo "<dl class=\"region-map-event\" style=\"display: none;\"
id=\"region-" . $region->id . "\">";
-
- echo "<dt>";
-
- echo "<b>" . $region->name . "</b><br/> ";
-
- echo "<a href=\"rss.php?region=" . $region->id . "\"><i>rss</i></a> -
\n";
- echo "<a href=\"ical.php?region=" . $region->id .
"\"><i>ical</i></a>\n";
-
- echo "</dt>\n";
-
- $events = $db->query ("select * from events where " .
- "(start_time <= '" . date_timestamp2mysql($end)
. "') AND " .
- "(end_time >= '" . date_timestamp2mysql($start)
. "') AND " .
- "((region=" . $region->id . ")) AND (moderated=1)
order by start_time");
-
- echo "<dd>";
-
- if (mysql_num_rows ($events) == 0)
- {
- echo "Pas d'�v�nements pr�vus ce mois.<br/>";
- }
- else
- {
- echo "�v�nements des 30 prochains jours: <ul>\n";
-
- while ($event = mysql_fetch_object ($events))
- {
- $start_time_str = strftime ("%A %d %B", date_mysql2timestamp
($event->start_time));
- $end_time_str = strftime ("%A %d %B", date_mysql2timestamp
($event->end_time));
-
- if ($start_time_str != $end_time_str)
- echo "<li><i>" . $start_time_str . " au " . $end_time_str .
"</i> <a href=\"showevent.php?id=" . $event->id . "\">" . $event->title .
"</a> � " . $event->city . "</li>";
- else
- echo "<li><i>" . $start_time_str . "</i> <a
href=\"showevent.php?id=" . $event->id . "\">" . $event->title . "</a> � " .
$event->city . "</li>";
- }
-
- echo " </ul>\n";
- }
-
- $lugs = $db->query ("select distinct region, name, url from lugs where
region = '" .
- $region->id . "'");
-
- if (mysql_num_rows ($lugs) == 0)
- {
- echo "Pas de groupes d'utilisateur.<br/>";
- }
- else
- {
- echo "Groupes d'utilisateurs:\n";
-
- echo " <ul>";
-
- while ($lug = mysql_fetch_object ($lugs))
- {
- echo "<li><a href=\"" . $lug->url . "\">" . $lug->name . "</a>
(";
- $dpts = $db->query ("select distinct department from lugs where
name = '" . $lug->name . "'");
- $i = 1;
- while ($dpt = mysql_fetch_object ($dpts))
- {
- echo $dpt->department;
- if ($i != mysql_num_rows($dpts))
- echo ", ";
- $i++;
- }
- echo ")</li>";
- }
-
- echo " </ul>";
- }
-
- echo "</dd>\n</dl>\n";
- }
-}
+calendar_setlocale();

-$db = new db();
+$jcode = "
+ <script src=\"http://openlayers.org/api/OpenLayers.js\";></script>
+ <script
src=\"http://openstreetmap.org/openlayers/OpenStreetMap.js\";></script>
+ <script type=\"text/javascript\">
+ var lat=46.8
+ var lon=1
+ var zoom=6
+ var map;

-calendar_setlocale();
+ function init() {
+
+ map = new OpenLayers.Map (\"map\", {
+ controls:[
+ new OpenLayers.Control.Navigation(),
+ new OpenLayers.Control.PanZoomBar(),
+ new OpenLayers.Control.Attribution()],
+ maxResolution: 156543.0399,
+ units: 'm',
+ } );
+
+ map.addControl(new OpenLayers.Control.LayerSwitcher());
+
+ layerTilesAtHome = new
OpenLayers.Layer.OSM.Osmarender(\"Osmarender\");
+ map.addLayer(layerTilesAtHome);
+
+ var lonLat = new OpenLayers.LonLat(lon, lat).transform(new
OpenLayers.Projection(\"EPSG:4326\"), new
OpenLayers.Projection(\"EPSG:900913\"));
+
+ map.setCenter (lonLat, zoom);
+
+ var newl = new OpenLayers.Layer.GeoRSS('AdL', '" .
calendar_absolute_url("rss.php?region=all&map=1&daylimit=0") . "');
+ map.addLayer(newl);
+ }

-put_header("Carte");
+ </script>
+";

-echo "<h2>Carte des r�gions</h2>\n";
+put_header("Carte", $jcode, "init()"); ?>

-generate_event_description ($db);
+<h2>Carte des �v�nements</h2>

-?>
+<div style="margin: auto; width:60%; height:500px; border: 1px solid black;"
id="map"></div>

-<p>
- <img id="region-map" src="adl-regions.png" width="519" height="516"
usemap="#map" />
- <map name="map">
- <area shape="poly"
-
coords="86,202,90,202,94,199,99,197,99,191,106,191,119,188,125,183,135,186,141,177,144,170,141,158,145,151,143,144,136,144,132,146,126,143,124,136,117,136,114,131,106,133,100,136,96,132,81,140,68,119,50,120,46,127,38,125,36,129,32,123,23,127,16,125,4,128,1,142,14,143,13,147,4,146,7,152,14,151,18,160,1,161,15,175,27,173,35,179,47,182,59,194,75,193,69,197,88,202"
- alt="Bretagne" href="#"
onClick="document.getElementById('box').innerHTML =
document.getElementById('region-6').innerHTML" />
- <area shape="poly"
-
coords="145,145,145,155,142,160,144,172,135,186,124,182,114,190,99,191,95,201,83,209,88,215,97,211,111,216,97,215,94,221,102,228,96,240,106,254,105,259,120,271,134,275,138,271,154,273,157,270,154,265,156,259,153,251,153,245,147,235,156,235,163,229,176,230,184,226,192,199,194,203,202,198,213,186,217,183,214,176,219,169,201,159,198,148,182,155,177,142,172,148,167,146,158,150,145,145"
- alt="Pays de la Loire" href="#"
onClick="document.getElementById('box').innerHTML =
document.getElementById('region-18').innerHTML" />
- <area shape="poly"
-
coords="115,72,118,79,117,91,126,103,126,131,131,136,126,137,127,144,131,146,140,143,157,150,167,147,173,148,175,142,180,147,184,153,186,155,191,150,197,149,200,152,200,160,206,162,214,165,216,165,222,150,218,137,209,125,202,126,204,106,198,93,175,101,154,94,144,95,138,84,141,78,140,75,128,77,123,76"
- alt="Basse Normandie" href="#"
onClick="document.getElementById('box').innerHTML =
document.getElementById('region-4').innerHTML" />
-<area shape="poly"
coords="241,59,228,66,203,73,194,78,191,89,197,91,202,92,199,100,203,125,210,127,218,139,226,132,237,134,244,126,244,116,249,115,252,107,254,94,252,78,255,67,240,59"
alt="Haute Normandie" href="#"
onClick="document.getElementById('box').innerHTML =
document.getElementById('region-11').innerHTML" />
-<area shape="poly"
coords="247,49,242,57,253,68,256,77,253,82,255,91,254,99,255,105,252,108,259,111,269,107,269,111,277,110,285,116,294,114,297,112,319,130,328,122,323,118,324,112,329,112,329,109,326,106,326,102,341,98,339,83,347,79,346,65,331,59,322,60,313,62,301,59,292,58,291,54,282,56,282,48,272,51,268,50,262,43,250,41,248,45,252,51,249,50,247,49"
alt="Picardie" href="#" onClick="document.getElementById('box').innerHTML =
document.getElementById('region-19').innerHTML" />
-<area shape="poly"
coords="250,41,250,6,253,8,280,0,285,1,287,6,288,14,296,21,304,17,311,17,313,32,325,35,328,45,344,43,345,53,347,58,347,63,345,64,329,60,308,63,291,57,280,53,283,50,273,49,266,48,260,41,250,40,251,40,251,39"
alt="Nord Pas de Calais" href="#"
onClick="document.getElementById('box').innerHTML =
document.getElementById('region-17').innerHTML" />
-<area shape="poly"
coords="348,66,348,79,340,85,341,97,326,103,327,109,330,108,329,113,325,113,323,118,326,122,320,130,317,135,322,146,318,150,317,155,320,161,326,170,333,170,335,178,342,183,348,180,353,183,359,181,364,176,374,180,373,184,379,187,377,196,391,201,392,203,395,200,397,197,407,196,407,190,413,183,406,175,406,164,394,156,393,149,378,143,377,135,373,130,376,124,379,120,375,116,376,106,381,99,380,88,391,88,390,82,372,71,370,64,372,56,366,56,367,62,360,66,348,66"
alt="Champagne Ardenne" href="#"
onClick="document.getElementById('box').innerHTML =
document.getElementById('region-8').innerHTML" />
-<area shape="poly"
coords="251,109,248,116,243,117,244,124,248,131,249,144,255,149,259,155,262,162,270,160,272,163,280,163,282,168,282,175,290,172,300,170,302,161,307,158,316,156,317,149,322,145,318,136,317,134,320,130,314,127,308,120,301,116,295,112,293,117,283,114,277,109,268,109,262,111,253,109,252,108"
alt="Ile de France" href="#"
onClick="document.getElementById('box').innerHTML =
document.getElementById('region-12').innerHTML" />
-<area shape="poly"
coords="392,86,389,89,381,88,378,91,381,102,377,107,375,114,378,121,378,125,375,128,377,137,379,143,395,152,397,160,406,164,406,172,405,174,414,183,421,176,427,181,435,181,439,182,448,183,453,185,455,172,459,163,461,158,458,154,460,150,458,145,463,144,467,139,465,133,467,128,457,126,452,124,455,119,458,112,465,119,476,121,479,115,477,109,470,107,465,111,457,109,452,106,447,108,446,110,431,90,423,89,418,94,412,94,410,89,399,88,398,92,393,86,392,86"
alt="Lorraine" href="#" onClick="document.getElementById('box').innerHTML =
document.getElementById('region-15').innerHTML" />
-<area shape="poly"
coords="501,118,490,136,485,154,480,167,480,178,479,194,480,203,476,208,467,208,461,201,459,194,454,188,454,179,463,158,460,152,462,150,461,145,468,141,464,134,467,129,462,126,460,127,452,123,459,115,467,122,476,123,481,113,502,116"
alt="Alsace" href="#" onClick="document.getElementById('box').innerHTML =
document.getElementById('region-1').innerHTML" />
-<area shape="poly"
coords="424,269,424,264,438,249,439,238,462,217,456,213,455,207,462,203,462,199,458,199,458,192,452,190,453,186,443,182,437,183,428,181,423,177,415,183,410,187,408,189,405,197,399,198,395,200,399,204,397,208,396,208,400,218,398,229,394,237,390,240,395,242,398,245,394,248,397,253,399,261,394,265,397,267,395,273,402,279,407,276,413,280,420,275,423,268"
alt="Franche Comt�" href="#"
onClick="document.getElementById('box').innerHTML =
document.getElementById('region-10').innerHTML" />
-<area shape="poly"
coords="305,158,301,165,301,171,303,175,307,181,303,186,298,194,294,196,298,203,296,207,299,213,297,218,300,223,301,251,307,257,317,257,324,256,328,255,329,265,334,265,342,272,344,276,339,277,336,280,339,285,354,285,358,277,363,281,369,280,371,284,374,283,378,264,382,267,388,265,394,269,397,268,396,261,397,253,394,248,397,244,395,241,392,241,391,237,397,234,399,224,399,216,395,208,398,204,398,201,393,203,388,202,387,198,376,194,380,186,373,184,371,178,363,176,361,179,352,180,345,181,341,183,335,183,330,169,326,171,325,162,317,156,303,158,305,159"
alt="Bourgnogne" href="#" onClick="document.getElementById('box').innerHTML
= document.getElementById('region-5').innerHTML" />
-<area shape="poly"
coords="336,280,331,284,332,293,335,295,330,298,328,301,332,304,329,308,337,323,342,326,338,331,339,334,347,336,355,331,357,338,362,342,359,346,356,344,357,350,352,355,348,362,342,361,335,369,338,376,343,387,346,394,352,397,358,392,360,396,365,393,368,396,372,394,379,397,382,397,381,394,379,391,381,387,385,388,387,391,385,395,389,396,391,394,392,399,402,401,405,404,411,400,412,394,400,390,400,381,411,384,409,379,408,376,415,374,419,369,431,360,437,361,440,357,434,351,431,349,435,346,442,348,462,341,468,336,470,327,463,321,462,313,454,307,464,297,454,282,456,275,451,271,431,274,434,280,431,286,421,287,420,283,428,277,427,271,420,272,419,279,413,279,408,275,404,279,388,265,379,266,372,284,368,279,357,277,356,285,336,287,336,279"
alt="Rhone Alpes" href="#" onClick="document.getElementById('box').innerHTML
= document.getElementById('region-22').innerHTML" />
-<area shape="poly"
coords="301,251,295,255,286,255,286,264,276,267,271,271,277,278,285,285,285,295,284,301,276,308,282,317,279,334,274,333,270,345,263,355,265,364,267,372,278,371,286,358,295,362,302,373,303,375,318,359,325,369,335,370,347,357,355,353,357,342,353,332,339,337,336,328,341,325,326,308,332,281,341,274,330,265,326,255,321,260,306,258,302,251"
alt="Auvergne" href="#" onClick="document.getElementById('box').innerHTML =
document.getElementById('region-3').innerHTML" />
-<area shape="poly"
coords="230,271,215,278,211,284,213,290,217,297,212,297,211,304,206,308,203,313,211,312,211,319,219,317,228,328,233,327,231,332,229,334,230,339,227,341,231,344,235,346,236,353,243,352,249,357,264,356,266,350,269,339,273,336,273,330,280,333,280,312,279,306,275,307,285,296,283,290,282,279,271,274,272,268,259,270,255,266,251,272,244,269,238,272,228,271,229,271"
alt="Limousin" href="#" onClick="document.getElementById('box').innerHTML =
document.getElementById('region-14').innerHTML" />
-<area shape="poly"
coords="244,125,249,128,249,143,253,149,257,156,262,163,275,162,282,165,279,172,303,170,305,179,301,185,300,191,294,194,295,220,300,222,302,250,295,254,285,254,284,262,269,271,256,270,254,268,231,272,219,259,207,235,194,240,185,225,192,199,196,202,217,184,216,173,219,169,214,166,222,152,219,139,227,132,238,134,244,124,244,125"
alt="Centre" href="#" onClick="document.getElementById('box').innerHTML =
document.getElementById('region-7').innerHTML" />
-<area shape="poly"
coords="148,235,154,245,153,251,156,259,154,266,157,272,153,274,140,270,132,275,131,282,136,288,135,297,128,302,128,309,143,319,148,332,154,329,160,335,161,341,176,344,177,339,187,335,190,325,197,319,207,308,212,301,209,295,217,295,212,290,212,279,228,273,221,262,217,258,207,235,203,240,193,238,190,230,186,228,176,229,160,230,155,235,147,235"
alt="Poitou Charentes" href="#"
onClick="document.getElementById('box').innerHTML =
document.getElementById('region-20').innerHTML" />
-<area shape="poly"
coords="131,318,124,365,130,363,133,369,125,371,111,432,97,443,99,446,112,448,113,454,109,459,110,463,120,456,119,464,142,471,145,476,156,475,158,471,173,447,167,433,162,433,160,428,165,423,165,412,174,410,176,414,182,408,198,407,203,408,213,396,210,389,219,388,216,380,237,356,234,346,228,342,230,336,228,333,230,329,219,318,210,319,206,312,202,313,197,322,190,327,188,335,181,341,179,339,176,342,177,345,162,344,159,340,160,336,154,331,149,333,155,353,150,352,144,330,131,318"
alt="Aquitaine" href="#" onClick="document.getElementById('box').innerHTML =
document.getElementById('region-2').innerHTML" />
-<area shape="poly"
coords="236,354,237,359,217,379,217,380,220,389,212,389,215,395,210,402,207,406,201,411,197,409,186,412,178,411,180,415,171,414,169,412,164,414,167,425,160,428,162,432,172,435,174,443,170,456,159,470,160,477,168,486,177,485,184,486,192,483,197,486,203,479,219,482,221,487,229,488,231,492,245,494,248,495,260,490,258,486,251,483,254,477,255,470,257,468,252,463,246,460,245,451,252,444,257,446,265,447,270,444,275,445,284,445,283,432,291,433,297,430,303,428,301,423,310,423,313,418,318,415,313,410,315,403,305,399,302,378,294,363,286,359,279,374,273,373,266,375,264,373,266,365,262,358,252,358,245,356,242,351,235,352"
alt="Midi-Pyr�n�es" href="#"
onClick="document.getElementById('box').innerHTML =
document.getElementById('region-16').innerHTML" />
-<area shape="poly"
coords="305,500,300,494,308,457,319,455,339,440,349,439,352,444,361,436,360,430,369,428,371,418,375,413,373,407,370,394,365,392,363,395,355,392,353,396,345,394,343,386,340,383,335,370,322,370,318,361,301,379,306,398,310,401,317,403,311,409,319,413,292,435,283,434,285,447,269,444,267,448,252,446,244,454,247,460,254,463,259,469,256,474,252,481,253,486,264,483,262,489,248,495,246,501,260,510,270,503,279,510,291,504,304,500,304,499,303,500,302,500"
alt="Languedoc Rousillon" href="#"
onClick="document.getElementById('box').innerHTML =
document.getElementById('region-13').innerHTML" />
-<area shape="poly"
coords="370,394,372,407,379,411,367,432,361,432,360,437,351,445,367,445,374,451,382,448,384,439,391,440,393,444,385,451,400,450,401,458,418,462,423,468,432,464,435,468,438,463,457,456,451,451,491,420,489,414,498,400,492,398,487,404,462,390,463,376,471,367,446,345,442,349,438,345,432,348,439,355,439,361,428,361,415,373,408,374,410,382,409,384,403,381,401,390,412,396,410,403,401,403,393,399,389,393,385,397,385,387,379,388,382,398,375,397,373,393,370,394"
alt="Paca" href="#" onClick="document.getElementById('box').innerHTML =
document.getElementById('region-21').innerHTML" />
-<area shape="poly"
coords="518,447,513,442,515,420,511,419,510,439,504,436,490,443,482,444,481,451,474,456,480,460,477,465,479,471,484,474,479,479,476,483,479,486,486,482,484,488,480,492,483,496,490,498,485,502,489,509,494,509,501,515,508,513,509,504,512,496,512,485,518,474,518,472"
alt="Corse" href="#" onClick="document.getElementById('box').innerHTML =
document.getElementById('region-9').innerHTML" />
-</map>
-
- </p>
-
-<?php
-put_footer();
-?>
+<?php put_footer(); ?>

Modified: trunk/rss.php
==============================================================================
--- trunk/rss.php (original)
+++ trunk/rss.php Fri Jul 11 20:08:23 2008
@@ -45,11 +45,16 @@
function get_events ($db, $region, $tag, $daylimit)
{
$start = mktime();
- $end = mktime() + ($daylimit * 24 * 60 * 60);

$sql = "select * from events where " .
- "(start_time <= '" . date_timestamp2mysql($end) . "') AND " .
- "(end_time >= '" . date_timestamp2mysql($start) . "') AND
(moderated=1)";
+ "(moderated=1) AND " .
+ "(end_time >= '" . date_timestamp2mysql($start) . "')";
+
+ if ($daylimit != 0)
+ {
+ $end = mktime() + ($daylimit * 24 * 60 * 60);
+ $sql .= " AND (start_time <= '" . date_timestamp2mysql($end) . "')";
+ }

if ($region != "all")
$sql .= " AND ((region=" . $region . ") OR (locality=1))";
@@ -90,11 +95,21 @@
else
$tag = '';

+$map = get_safe_integer('map', 0);
+
Header("Content-type: text/xml; charset=iso-8859-1");

echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>\n";

-echo "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\";
xmlns:dc=\"http://purl.org/dc/elements/1.1/\";
xmlns:sy=\"http://purl.org/rss/1.0/modules/syndication/\";
xmlns:admin=\"http://webns.net/mvcb/\";
xmlns:cc=\"http://web.resource.org/cc/\";
xmlns:content=\"http://purl.org/rss/1.0/modules/content/\";
xmlns=\"http://purl.org/rss/1.0/\";
xmlns:georss=\"http://www.georss.org/georss/\";>\n";
+echo "<rdf:RDF\n";
+echo " xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n";;
+echo " xmlns=\"http://purl.org/rss/1.0/\"\n";;
+echo " xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n";;
+echo " xmlns:sy=\"http://purl.org/rss/1.0/modules/syndication/\"\n";;
+echo " xmlns:admin=\"http://webns.net/mvcb/\"\n";;
+echo " xmlns:cc=\"http://web.resource.org/cc/\"\n";;
+echo " xmlns:content=\"http://purl.org/rss/1.0/modules/content/\"\n";;
+echo " xmlns:georss=\"http://www.georss.org/georss\";>\n";

echo "<channel rdf:about=\"http://www.agendadulibre.org\";>\n";
echo " <title>Agenda du Libre [ " . $region . " ]</title>\n";
@@ -169,17 +184,20 @@
$event->submitter,
$event->tags)));

echo " </description>\n";
- echo " <content:encoded>\n";

- echo xmlentities(format_event ($db, $event->title,
- date_mysql2timestamp($event->start_time),
- date_mysql2timestamp($event->end_time),
- $event->description, $event->city,
- $event->region, $event->locality,
- $event->url, $event->contact,
- $event->submitter, $event->tags));
+ if (! $map)
+ {
+ echo " <content:encoded>\n";
+ echo xmlentities(format_event ($db, $event->title,
+ date_mysql2timestamp($event->start_time),
+ date_mysql2timestamp($event->end_time),
+ $event->description, $event->city,
+ $event->region, $event->locality,
+ $event->url, $event->contact,
+ $event->submitter, $event->tags));
+ echo " </content:encoded>\n";
+ }

- echo " </content:encoded>\n";
echo " </item>\n\n";
}





  • [Devel] r353 - trunk, svn, 11/07/2008

Archives gérées par MHonArc 2.6.16.

Haut de le page