Objet : devel-adl
Archives de la liste
- From: Sebastien Bechet <s.bechet AT av7.net>
- To: devel AT agendadulibre.org
- Subject: [Devel] patch restant
- Date: Sun, 05 Feb 2006 17:54:02 +0100
- List-archive: <http://lolut.utbm.info/pipermail/devel>
- List-id: Developpement de l'Agenda du Libre <devel.agendadulibre.org>
- Organization: Av7
Bonjour,
Suite au patch de Thomas, voilà le patch pour le svn courant.
Il reste :
- titre et description remonté dans la configuration
- correction mineur pour $root
- gestion des adresses email dans la configuration
- passage en fonction de l'affichage des lugs
- activation ou non de l'affichage des lugs
- quelques textes plus génériques (RMLL)
- suppression des includes en trop
Je crois que c'est tout.
A+
Common subdirectories: ../../agenda.svn/trunk/.svn and ./.svn diff -u ../../agenda.svn/trunk/INSTALL ./INSTALL --- ../../agenda.svn/trunk/INSTALL 2006-02-05 17:15:28.803755576 +0100 +++ ./INSTALL 2006-02-05 17:20:36.696948696 +0100 @@ -64,7 +64,7 @@ $bdd = "agendadulibre"; /** Root URL of the libre agenda, without leading slash */ -$root = "http://localhost/~david/agenda"; +$root = "localhost/~david/agenda"; ) 6) Use it! diff -u ../../agenda.svn/trunk/bd-private.inc.php.template ./bd-private.inc.php.template --- ../../agenda.svn/trunk/bd-private.inc.php.template 2006-02-05 17:15:28.800756032 +0100 +++ ./bd-private.inc.php.template 2006-02-05 17:20:36.697948544 +0100 @@ -6,6 +6,12 @@ * must be created in order to allow the libre agenda to work. */ +/** Agenda Title */ +$agendatitle = "L'Agenda du Libre"; + +/** One line description */ +$agendadescription = "Agenda des \xe9v\xe8nements autour du Logiciel Libre"; + /** Where the database is hosted */ $host = "host"; @@ -19,9 +25,21 @@ $bdd = "bdd"; /** Root URL of the libre agenda, without leading slash */ -$root = "http://dummy.url.org"; +$root = "dummy.url.org"; + +/** Root domain */ +$rootdomain = "url.org"; + +/** Mail From: */ +$mailfrom = "webmaster@" . $rootdomain; /** Mailing-list of moderators */ -$moderatorlist = "moderators AT your.domain.org"; +$moderatorlist = "moderators@" . $rootdomain; + +/** Mailing-list of developers */ +$devellist = "devel@" . $rootdomain; + +/** Set to false to remove lugs informations */ +$activatelugs = false; ?> diff -u ../../agenda.svn/trunk/funcs.inc.php ./funcs.inc.php --- ../../agenda.svn/trunk/funcs.inc.php 2006-02-05 17:15:28.808754816 +0100 +++ ./funcs.inc.php 2006-02-05 17:43:07.521592136 +0100 @@ -47,6 +47,8 @@ function put_header ($title) { + global $agendatitle; + calendar_setlocale(); $db = new db(); @@ -67,18 +69,18 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> - <title>L'Agenda du Libre - <?php echo $title;?></title> + <title><?php echo "$agendatitle - $title";?></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <link rel="stylesheet" type="text/css" href="calendar.css" title="Officielle" /> <link rel="alternate stylesheet" type="text/css" href="air1.css" title="Air1" /> <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" /> <?php - rss_feed_header ("rss.php?region=all", "Agenda du Libre, toutes les régions"); + rss_feed_header ("rss.php?region=all", $agendatitle . ", toutes les régions"); while ($row = mysql_fetch_object($region_list)) { - rss_feed_header ("rss.php?region=" . $row->id, "Agenda du Libre, " . $row->name); + rss_feed_header ("rss.php?region=" . $row->id, $agendatitle . ", " . $row->name); } ?> @@ -89,16 +91,18 @@ <div id="important"> <p>Pour rester informé des évènements de l'agenda, utilisez les <a href="rsslist.php">flux RSS</a> ou les <a href="icallist.php">calendriers</a> !</p> </div> -<h1><a href="index.php">L'Agenda du Libre</a></h1> +<h1><a href="index.php"><?php echo $agendatitle ?></a></h1> <?php } //' function put_footer () { + global $moderatorlist; + ?> </div> <div class="footer"> -<p><a href="submit.php">Proposer un évènement</a> - <a href="rsslist.php">Flux RSS</a> - <a href="icallist.php">Calendriers iCal</a> - <a href="map.php">Carte</a> - <a href="infos.php">Informations</a> - <a href="stats.php">Statistiques</a> - <a href="mailto:moderateurs CHEZ agendadulibre POINT org">Contact</a></p> +<p><a href="submit.php">Proposer un évènement</a> - <a href="rsslist.php">Flux RSS</a> - <a href="icallist.php">Calendriers iCal</a> - <a href="map.php">Carte</a> - <a href="infos.php">Informations</a> - <a href="stats.php">Statistiques</a> - <a href="mailto:<?php echo scramble_email(stripslashes($moderatorlist))?>">Contact</a></p> </div> </body> </html> @@ -144,16 +148,21 @@ function calendar_mail ($recv, $cc, $title, $contents) { - $title = '=?iso8859-1?B?'.base64_encode("[agendadulibre.org] " . $title).'?='; + global $agendatitle; + global $root; + global $rootdomain; + global $mailfrom; + + $title = '=?iso8859-1?B?'.base64_encode("[" . $root . "] " . $title).'?='; return mail($recv, $title, $contents, /* Message headers */ - "From: webmaster AT agendadulibre.org\n" . - "Reply-To: webmaster AT agendadulibre.org\n" . + "From: " . $mailfrom . "\n" . + "Reply-To: " . $mailfrom . "\n" . "Content-Type: text/plain; charset=ISO-8859-1\n" . "Content-Transfert-Encoding: 8bit\n" . ($cc ? "CC: " . $cc . "\n" : "") . - "X-Mailer: Agenda du Libre\n"); + "X-Mailer: " . $agendatitle . "\n"); } function get_prev_month($month, $year) diff -u ../../agenda.svn/trunk/ical.php ./ical.php --- ../../agenda.svn/trunk/ical.php 2006-02-05 17:15:28.787758008 +0100 +++ ./ical.php 2006-02-05 17:20:36.703947632 +0100 @@ -20,7 +20,6 @@ */ include("bd.inc.php"); -include("bd-private.inc.php"); include("funcs.inc.php"); $db = new db(); @@ -33,13 +32,16 @@ function ical_start_calendar ($region) { + global $agendatitle; + global $rootdomain; + echo "BEGIN:VCALENDAR\n"; echo "VERSION:2.0\n"; - echo "PRODID:-//AgendaDuLibre.org\n"; - echo "X-WR-CALNAME:Agenda du Libre - " . $region . "\n"; + echo "PRODID:-//" . $rootdomain . "\n"; + echo "X-WR-CALNAME:" . $agendatitle . " - " . $region . "\n"; echo "X-WR-TIMEZONE:Europe/Paris\n"; echo "CALSCALE:GREGORIAN\n"; - echo "X-WR-CALDESC:" . utf8_encode("L'Agenda des évènements autour du Libre en région ") . $region . "\n"; + echo "X-WR-CALDESC:" . utf8_encode("L'Agenda des évènements en région ") . $region . "\n"; } function ical_end_calendar() @@ -49,12 +51,13 @@ function ical_display_event ($id, $city, $start, $end, $title, $url, $description) { + global $rootdomain; 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 "UID:" . $id . "@agendadulibre.org\n"; + echo "UID:" . $id . "@" . $rootdomain . "\n"; echo "SUMMARY:" . $title . "\n"; echo "URL:" . $url . "\n"; echo "DESCRIPTION:" . $description . "\n"; @@ -94,12 +97,14 @@ while ($event = mysql_fetch_object($list)) { + global $agendatitle; + ical_display_event ($event->id, utf8_encode(strip_tags($event->city)), date_mysql2timestamp ($event->start_time), date_mysql2timestamp ($event->end_time), utf8_encode(strip_tags($event->title)), calendar_absolute_url("showevent.php?id=" . $event->id), - utf8_encode("Un évènement de l'Agenda du Libre")); + utf8_encode("Un évènement de l'agenda : " . $agendatitle)); } ical_end_calendar(); diff -u ../../agenda.svn/trunk/icallist.php ./icallist.php --- ../../agenda.svn/trunk/icallist.php 2006-02-05 17:15:28.782758768 +0100 +++ ./icallist.php 2006-02-05 17:39:15.453871792 +0100 @@ -38,7 +38,7 @@ exit; } -echo "<p>Chaque calendrier iCal liste les évènements pour les 30 jours à venir dans une région donnée. En vous inscrivant au calendrier de votre région, vous verrez apparaître les évènements de votre région à portée locale, ainsi que tous les évènements à portée nationale, comme les RMLL.</p>"; +echo "<p>Chaque calendrier iCal liste les évènements pour les 30 jours à venir dans une région donnée. En vous inscrivant au calendrier de votre région, vous verrez apparaître les évènements de votre région à portée locale, ainsi que tous les évènements à portée nationale.</p>"; echo " <ul>\n"; @@ -69,4 +69,4 @@ <p>N'hésitez pas à <a href="mailto:devel AT agendadulibre.org">nous faire part</a> de vos succès et de vos échecs avec d'autres logiciels.</p> -<?php put_footer(); ?> \ No newline at end of file +<?php put_footer(); ?> diff -u ../../agenda.svn/trunk/index.php ./index.php --- ../../agenda.svn/trunk/index.php 2006-02-05 17:15:28.783758616 +0100 +++ ./index.php 2006-02-05 17:20:49.802956280 +0100 @@ -64,4 +64,4 @@ } put_footer(); -?> \ No newline at end of file +?> diff -u ../../agenda.svn/trunk/map.php ./map.php --- ../../agenda.svn/trunk/map.php 2006-02-05 17:15:28.797756488 +0100 +++ ./map.php 2006-02-05 17:20:49.803956128 +0100 @@ -24,6 +24,44 @@ include("bd-private.inc.php"); include("funcs.inc.php"); +function map_lugs($db) +{ + global $activatelugs; + + if (!$activatelugs) return; + + $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>"; + } +} + function generate_event_description ($db) { $start = mktime(); @@ -80,36 +118,7 @@ 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>"; - } + map_lugs($db); echo "</dd>\n</dl>\n"; } diff -u ../../agenda.svn/trunk/moderate.php ./moderate.php --- ../../agenda.svn/trunk/moderate.php 2006-02-05 17:15:28.772760288 +0100 +++ ./moderate.php 2006-02-05 17:36:24.359882032 +0100 @@ -141,7 +141,7 @@ date_mysql2timestamp($row->end_time), $row->description, $row->city, $row->region, $row->locality, $row->url, $row->contact) . "\n\n" . - "Merci de votre contribution à l'Agenda du Libre et à bientôt !\n\n". + "Merci de votre contribution et à bientôt !\n\n". "-- L'équipe de modération"); return 0; diff -u ../../agenda.svn/trunk/moderateinfos.php ./moderateinfos.php --- ../../agenda.svn/trunk/moderateinfos.php 2006-02-05 17:15:28.771760440 +0100 +++ ./moderateinfos.php 2006-02-05 17:20:49.808955368 +0100 @@ -74,4 +74,4 @@ <?php put_footer(); -?> \ No newline at end of file +?> diff -u ../../agenda.svn/trunk/rss.php ./rss.php --- ../../agenda.svn/trunk/rss.php 2006-02-05 17:15:28.785758312 +0100 +++ ./rss.php 2006-02-05 17:20:51.290730104 +0100 @@ -21,7 +21,6 @@ */ include("bd.inc.php"); -include("bd-private.inc.php"); include("funcs.inc.php"); $db = new db(); @@ -91,12 +90,12 @@ 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/\">\n"; -echo "<channel rdf:about=\"http://www.agendadulibre.org\">\n"; -echo " <title>Agenda du Libre [ " . $region . " ]</title>\n"; -echo " <description>Agenda des évènements autour du Logiciel Libre</description>\n"; -echo " <link>http://www.agendadulibre.org</link>\n"; +echo "<channel rdf:about=\"http://" . $root . "\">\n"; +echo " <title>" . $agendatitle . " [ " . $region . " ]</title>\n"; +echo " <description>" . $agendadescription . "</description>\n"; +echo " <link>http://" . $root . "</link>\n"; echo " <dc:language>fr</dc:language>\n"; -echo " <dc:creator>AgendaDuLibre.org</dc:creator>\n"; +echo " <dc:creator>" . $rootdomain . "</dc:creator>\n"; echo " <items>\n"; echo " <rdf:Seq>\n"; @@ -131,7 +130,7 @@ echo " <item rdf:about=\"" . calendar_absolute_url("showevent.php?id=" . $event->id) . "\">\n"; echo " <title>" . xmlentities($event->city) . " : " . xmlentities($event->title) . "</title>\n"; echo " <link>" . calendar_absolute_url("showevent.php?id=" . $event->id) . "</link>\n"; - echo " <guid>" . $event->id . "@agendadulibre.org</guid>"; + echo " <guid>" . $event->id . "@" . $rootdomain . "</guid>"; echo " <description>\n"; echo xmlentities(strip_tags(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))); diff -u ../../agenda.svn/trunk/rsslist.php ./rsslist.php --- ../../agenda.svn/trunk/rsslist.php 2006-02-05 17:15:28.779759224 +0100 +++ ./rsslist.php 2006-02-05 17:33:14.769704120 +0100 @@ -38,7 +38,7 @@ exit; } -echo "<p>Chaque flux RSS liste les évènements pour le mois en cours dans une région donnée. En vous abonnant à un flux régional, vous recevrez des informations sur les évènements de votre région à portée locale, mais également les évènements à portée nationale comme les RMLL.</p>"; +echo "<p>Chaque flux RSS liste les évènements pour le mois en cours dans une région donnée. En vous abonnant à un flux régional, vous recevrez des informations sur les évènements de votre région à portée locale, mais également les évènements à portée nationale.</p>"; echo " <ul>\n"; @@ -53,4 +53,4 @@ put_footer(); -?> \ No newline at end of file +?> diff -u ../../agenda.svn/trunk/showevent.php ./showevent.php --- ../../agenda.svn/trunk/showevent.php 2006-02-05 17:15:28.807754968 +0100 +++ ./showevent.php 2006-02-05 17:31:45.152328032 +0100 @@ -23,14 +23,12 @@ include("bd.inc.php"); include("funcs.inc.php"); -$db = new db(); - -put_header("Informations sur un évènement"); +function showevent_lugs($db) +{ + global $activatelugs; -$event = fetch_event ($db, get_safe_integer('id', 0)); + if (!$activatelugs) return; -if ($event) -{ echo "<div id=\"lug-list\"><h1>Groupes d'utilisateurs de la région</h1>"; $lugs = $db->query ("select distinct region, name, url from lugs where region = '" . @@ -61,6 +59,16 @@ echo " </ul>"; } echo "</div>"; +} + +$db = new db(); + +put_header("Informations sur un \xe9v\xe8nement"); + +$event = fetch_event ($db, get_safe_integer('id', 0)); + +if ($event) +{ echo format_event ($db, $event->title, @@ -76,4 +84,4 @@ put_footer(); -?> \ No newline at end of file +?> diff -u ../../agenda.svn/trunk/submit.php ./submit.php --- ../../agenda.svn/trunk/submit.php 2006-02-05 17:15:28.780759072 +0100 +++ ./submit.php 2006-02-05 17:20:52.506545272 +0100 @@ -28,6 +28,7 @@ function alert_moderators ($db, $id, $title, $start, $end, $description, $city, $region, $locality, $url, $contact) { + global $agendatitle; global $moderatorlist; $mail_title = "Nouvel évènement à modérer : '" . $title . "'"; @@ -37,7 +38,7 @@ format_ascii_event ($db, $title, $start, $end, $description, $city, $region, $locality, $url, $contact) . "\n\n" . "Merci !\n" . - "-- Agenda du Libre"; + "-- " . $agendatitle; calendar_mail ($moderatorlist, "", $mail_title, $mail_body);
- [Devel] patch restant, Sebastien Bechet, 05/02/2006
- Re: [Devel] patch restant, David MENTRE, 05/02/2006
- Re: [Devel] patch restant, Sebastien Bechet, 05/02/2006
- Re: [Devel] patch restant, Thomas Petazzoni, 05/02/2006
- Re: [Devel] patch restant, Sebastien Bechet, 05/02/2006
- Re: [Devel] patch restant, David MENTRE, 06/02/2006
- Re: [Devel] patch restant, Thomas Petazzoni, 06/02/2006
- Re: [Devel] patch restant, Sebastien Bechet, 06/02/2006
- Re: [Devel] patch restant, Xavier Maillard, 06/02/2006
- Re: [Devel] patch restant, Melanie.Bats AT UTBM.fr, 06/02/2006
- Re: [Devel] patch restant, Thomas Petazzoni, 06/02/2006
- Re: [Devel] patch restant, Thomas Petazzoni, 06/02/2006
- Re: [Devel] patch restant, David MENTRE, 06/02/2006
- Re: [Devel] patch restant, Sebastien Bechet, 05/02/2006
- Re: [Devel] patch restant, David MENTRE, 05/02/2006
Archives gérées par MHonArc 2.6.16.