[Devel] r229 - trunk

svn at agendadulibre.org svn at agendadulibre.org
Mar 16 Jan 22:08:57 CET 2007


Author: thomas
Date: Tue Jan 16 22:08:56 2007
New Revision: 229

Added:
   trunk/lef-2007-small.png   (contents, props changed)
Modified:
   trunk/funcs.inc.php

Log:
Pour les jours du Libre en Fête dans le calendrier, ajout d'une petite
icône avec un lien vers le site officiel.



Modified: trunk/funcs.inc.php
==============================================================================
--- trunk/funcs.inc.php	(original)
+++ trunk/funcs.inc.php	Tue Jan 16 22:08:56 2007
@@ -248,6 +248,16 @@
     }
 }
 
+function calendar_custom_icon($year, $month, $day)
+{
+  if ($year == 2007 && $month == 3 && $day >= 17 && $day <= 25)
+    {
+      echo "<a href=\"http://www.libre-en-fete.net\">";
+      echo "<img src=\"lef-2007-small.png\" style=\"float: right; border: 0;\"/>";
+      echo "</a>";
+    }
+}
+
 function calendar($db, $month, $year, $region)
 {
   $prev = get_prev_month($month, $year);
@@ -288,6 +298,7 @@
 	    {
 	      echo "  <td class=\"other_month\">\n";
 	      echo "   <h1>";
+	      calendar_custom_icon($year, $month, $day);
 	      echo $max_day_in_prev_month + $day;
 	      echo "</h1>\n";
 	      show_day_events ($db, $max_day_in_prev_month + $day, $prev_month, $prev_year, $region);
@@ -304,6 +315,7 @@
 		echo "  <td class=\"current_month today\"><h1>";
 	      else
 		echo "  <td class=\"current_month\"><h1>";
+	      calendar_custom_icon($year, $month, $day);
 	      echo $day;
 	      echo "</h1>\n";
 	      show_day_events ($db, $day, $month, $year, $region);
@@ -313,6 +325,7 @@
 	  else
 	    {
 	      echo "  <td class=\"other_month\"><h1>";
+	      calendar_custom_icon($year, $month, $day);
 	      echo $day - $max_day_in_month;
 	      echo "</h1>\n";
 	      show_day_events ($db, $day - $max_day_in_month, $next_month, $next_year, $region);
@@ -571,6 +584,7 @@
   $result  = "<h2><i>" . $city . "</i> : " . $title . "</h2>\n\n";
   $result .= "<h3>Date et lieu</h3>\n";
   $result .= $date;
+
   $result .= "<p>À <i><a href=\"http://fr.wikipedia.org/wiki/" . $city . "\">" . $city . "</a></i>, <a href=\"http://fr.wikipedia.org/wiki/" . $region . "\">" . $region . "</a></p>\n\n";
   $result .= "<h3>Description</h3>\n";
   $result .= $description . "\n\n";

Added: trunk/lef-2007-small.png
==============================================================================
Binary file. No diff available.


Plus d'informations sur la liste de diffusion Devel