Accéder au contenu.
Menu Sympa

devel - [Devel] r303 - branches/dui

Objet : devel-adl

Archives de la liste

[Devel] r303 - branches/dui


Chronologique Discussions 
  • From: svn AT agendadulibre.org
  • To: devel AT agendadulibre.org
  • Subject: [Devel] r303 - branches/dui
  • Date: Thu, 4 Oct 2007 22:17:37 +0200 (CEST)
  • List-archive: <http://agendadulibre.org/pipermail/devel>
  • List-id: Developpement de l'Agenda du Libre <devel.agendadulibre.org>

Author: ldayot
Date: Thu Oct 4 22:16:31 2007
New Revision: 303

Log:
Suite de la traduction de tags en mots-cles.
La portee est maintenant un parametre : locale+nationale ou autre comme
locale+regionale+nationale+internationale.
Ajout d'un lien en bas de page vers la partie administration pour
moderation.
Possibilité de modifier un evenement deja publie si on est identifie comme
moderateur.



Modified:
branches/dui/funcs.inc.php
branches/dui/ical.php
branches/dui/moderate.php
branches/dui/rss.php
branches/dui/showevent.php
branches/dui/text.inc.php

Modified: branches/dui/funcs.inc.php
==============================================================================
--- branches/dui/funcs.inc.php (original)
+++ branches/dui/funcs.inc.php Thu Oct 4 22:16:31 2007
@@ -139,10 +139,15 @@
echo " - <a href=\"rsslist.php\">Flux RSS</a>";
echo " - <a href=\"icallist.php\">Calendriers iCal</a>";
echo " - <a href=\"map.php\">Carte</a>";
- echo " - <a href=\"tags.php\">Tags</a>";
+ echo " - <a href=\"tags.php\">Mots-cl�s</a>";
echo " - <a href=\"infos.php\">Informations</a>";
echo " - <a href=\"stats.php\">Statistiques</a>";
- echo " - <a href=\"$adl_url_contact\">Contact</a></p>\n";
+ echo " - <a href=\"$adl_url_contact\">Contact</a>";
+ if (! isset($_COOKIE["agenda_libre_id"]) && !
isset($_SESSION["agenda_libre_id"]))
+ { // moderateur
+ echo " - <a href=\"moderate.php\">(r�serv�)</a>\n";
+ }
+ echo "</p>\n";


if (file_exists("includes/bottom.html"))
@@ -271,7 +276,7 @@
((end_time >= " .
$db->quote_smart(date_timestamp2mysql($cur)) . ") AND
(start_time <= " .
$db->quote_smart(date_timestamp2mysql($next)) . ") AND
(moderated = 1) AND
- ((region = " . $db->quote_smart($region) . ") OR
(locality=1)) )
+ ((region = " . $db->quote_smart($region) . ") OR
(locality>=1)) )
order by city";

$result = $db->query ($sql);
@@ -647,22 +652,11 @@
$result .= "<p>Contact: <a href=\"mailto:"; . $contact . "\">" . $contact .
"</a></p>\n";

if ($moderation)
- $result .= "<p>�v�nement � port�e <b>" . ($locality == 1 ? "nationale" :
"locale") . "</b></p>";
+ $result .= "<p>�v�nement � port�e <b>".
$GLOBALS["adl_locality"][$locality]. "</b></p>";

if ($tags != "")
{
$result .= format_tags($tags);
- /*
- $tags = split(" ", $tags);
- $result .= "<p>Tags: ";
- for ($i = 0; $i < count($tags); $i++)
- {
- $result .= "<a href=\"listevents.php?tag=" . $tags[$i] . "\">" .
$tags[$i] . "</a>";
- if ($i != count($tags) - 1)
- $result .= ", ";
- }
- $result .= "</p>";
- */
}

return $result;
@@ -943,16 +937,10 @@
<td>
<select name="__event_locality">
<?php
- if ($locality == 1)
- {
- echo " <option value=\"0\">Locale</option>\n";
- echo " <option value=\"1\"
selected=\"selected\">Nationale</option>\n";
- }
- else
- {
- echo " <option value=\"0\"
selected=\"selected\">Locale</option>\n";
- echo " <option value=\"1\">Nationale</option>\n";
- }
+ foreach ($GLOBALS["adl_locality"] as $key=>$value)
+ {
+ echo "<option value=\"$key\"". ($locality == $key ? "
selected=\"selected\"" : ""). ">$value</option>\n";
+ }
?>
</select>
</td>
@@ -1079,7 +1067,7 @@
function selectTagsHTML($aTags)
{
$oTags = selectCategoryTags($aTags, 0, $fieldName="tags[tag]",
$multiple=false);
- $return = "<strong>". _("Tags"). "</strong> : {$oTags->HTML}<br />\n";
+ $return = "<strong>". _("Mots-cl�s"). "</strong> : {$oTags->HTML}<br />\n";
$aCategoryTags = selectWithCategoryTags($aTags, $multiple=true);
foreach ($aCategoryTags->HTML as $category_id=>$aSelect)
{
@@ -1102,7 +1090,7 @@
"ORDER BY tags_categories.name");
if ($ret == FALSE)
{
- error ("Erreur lors de la recherche des tags");
+ error ("Erreur lors de la recherche des mots-cl�s");
put_footer();
exit;
}
@@ -1133,14 +1121,6 @@
}

// Function to choose tags
-// $aTags is an array (tag_name)
-// output if HTML string select part of form
-/*function selectWithoutCategoryTags($aTags=array(), $fieldName="tags[0]",
$multiple=false)
-{
- return selectCategoryTags($aTags, $categoryId=0, $fieldName, $multiple);
-}*/
-
-// Function to choose tags
// $aTags is an array (tag_name) of tags to be selected/checked
// output if HTML string select/checkboxes part of form
function selectCategoryTags($aTags=array(), $categoryId=0,
$fieldName="tags[0]", $multiple=false, $categoryName="")
@@ -1151,7 +1131,7 @@
$ret = $db->query ("SELECT name, COUNT(event_id) AS n FROM tags LEFT JOIN
tags_events ON tag_id=id WHERE category_id='$categoryId' GROUP BY id ORDER BY
name");
if ($ret == FALSE)
{
- error ("Erreur lors de la recherche des tags");
+ error ("Erreur lors de la recherche des mots-cl�s");
put_footer();
exit;
}
@@ -1197,7 +1177,7 @@
$result = $db->query ($query);
if ($result == FALSE)
{
- error (_("Erreur lors de la recherche des tags"));
+ error (_("Erreur lors de la recherche des mots-cl�s"));
put_footer();
exit;
}

Modified: branches/dui/ical.php
==============================================================================
--- branches/dui/ical.php (original)
+++ branches/dui/ical.php Thu Oct 4 22:16:31 2007
@@ -87,7 +87,7 @@
"(end_time >= '" . date_timestamp2mysql($start) . "') AND
(moderated=1)";

if ($region != "all")
- $sql .= " AND ((region=" . $region . ") OR (locality=1))";
+ $sql .= " AND ((region=" . $region . ") OR (locality>=1))";

if ($tag != "")
$sql .= " GROUP BY events.id ";

Modified: branches/dui/moderate.php
==============================================================================
--- branches/dui/moderate.php (original)
+++ branches/dui/moderate.php Thu Oct 4 22:16:31 2007
@@ -337,7 +337,8 @@
*/
echo "<h2>�v�nements � mod�rer</h2>\n";

-$ret = $db->query ("SELECT * from events where moderated=0");
+$ret = $db->query ("SELECT * from events where moderated=0".
+ (isset($_GET["id"]) ? " OR id={$_GET["id"]}" : "") );

if ($ret == FALSE)
{

Modified: branches/dui/rss.php
==============================================================================
--- branches/dui/rss.php (original)
+++ branches/dui/rss.php Thu Oct 4 22:16:31 2007
@@ -69,7 +69,7 @@
}

if ($region != "all")
- $sqlWhere .= " AND ((region=" . $region . ") OR (locality=1))";
+ $sqlWhere .= " AND ((region=" . $region . ") OR (locality>=1))";

$sql .= $sqlWhere;


Modified: branches/dui/showevent.php
==============================================================================
--- branches/dui/showevent.php (original)
+++ branches/dui/showevent.php Thu Oct 4 22:16:31 2007
@@ -18,8 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
- *
- * $Id: top.inc.php,v 1.51 2007/03/10 16:22:12 ldayot Exp $
*/

include("bd.inc.php");
@@ -33,17 +31,13 @@

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 = '" .
- $event->region . "'");
+ $lugs = $db->query ("select distinct region, name, url from lugs where
region = '".
+ $event->region . "'");

- if ($db->numRows ($lugs) == 0)
- {
- echo "Pas de groupes d'utilisateur.<br/>";
- }
- else
+ if ($db->numRows ($lugs) > 0)
{
+ echo "<div id=\"lug-list\"><h1>Groupes d'utilisateurs de la
r�gion</h1>";
echo " <ul>";

while ($lug = $db->fetchObject ($lugs))
@@ -77,7 +71,13 @@
echo "</p>";
}

- echo "</div>";
+ if ($db->numRows ($lugs) > 0)
+ echo "</div>";
+
+ if (isset($_COOKIE["agenda_libre_id"]) ||
isset($_SESSION["agenda_libre_id"]))
+ { // moderateur
+ echo "<div id=\"lug-list\"><a
href=\"moderate.php?id={$event->id}\">Modifier</a></div>\n";
+ }

echo format_event ($db,
$event->title,

Modified: branches/dui/text.inc.php
==============================================================================
--- branches/dui/text.inc.php (original)
+++ branches/dui/text.inc.php Thu Oct 4 22:16:31 2007
@@ -48,6 +48,9 @@
"<a href=\"http://www.libre-en-fete.net\";>Libre en F�te</a>, pr�cisez ".
"le tag <code>libre-en-fete-2007</code><br/>\n";

+//$adl_locality = array(-1=>"locale", 0=>"r�gionale", 1=>"nationale",
2=>"internationale");
+$adl_locality = array(0=>"r�gionale", 1=>"nationale");
+
// ical.php
$adl_uid_end = "agendadulibre.org";
$adl_one_event = "Un �v�nement de l'Agenda du Libre";




  • [Devel] r303 - branches/dui, svn, 04/10/2007

Archives gérées par MHonArc 2.6.16.

Haut de le page