diff --git a/.gitattributes b/.gitattributes index ffa6b0fc674d1472c02d42a4662cc59bdc9adfc8..42ce78c99e93a04c6561397382a53b5d2bf21945 100644 --- a/.gitattributes +++ b/.gitattributes @@ -93,7 +93,7 @@ ecrire/img_pack/image-24.gif -text ecrire/img_pack/jauge-fond.gif -text ecrire/img_pack/jauge-rouge.gif -text ecrire/img_pack/jauge-vert.gif -text -ecrire/img_pack/langues-24.png svneol=native#unset +ecrire/img_pack/langues-24.gif -text ecrire/img_pack/m_envoi.gif -text ecrire/img_pack/m_envoi_bleu.gif -text ecrire/img_pack/m_envoi_jaune.gif -text @@ -151,5 +151,11 @@ ecrire/img_pack/visit-12.gif -text ecrire/img_pack/visiter-48.gif -text ecrire/img_pack/warning-24.gif -text ecrire/img_pack/warning.gif -text +ecrire/lang/drap_de.gif -text +ecrire/lang/drap_en.gif -text +ecrire/lang/drap_es.gif -text +ecrire/lang/drap_fr.gif -text +ecrire/lang/drap_it.gif -text +ecrire/lang/drap_ru.gif -text ecrire/puce.gif -text /puce.gif -text diff --git a/ecrire/config-fonctions.php3 b/ecrire/config-fonctions.php3 index 7eb8621ffb7068673071892e28cbfa7533f9155f..ce269436421fd3a8c97893e96b2ea849c9c4cbb7 100644 --- a/ecrire/config-fonctions.php3 +++ b/ecrire/config-fonctions.php3 @@ -190,64 +190,6 @@ if ($options == "avancees") { } -// -// Configuration i18n -// - -debut_cadre_relief("langues-24.png"); - -$langues_prop = split(",",lire_meta("langues_proposees")); -$langue_site = lire_meta('langue_site'); - -echo "<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3 WIDTH=\"100%\">"; -echo "<TR><TD BGCOLOR='$couleur_foncee' BACKGROUND='img_pack/rien.gif'><B><FONT FACE='Verdana,Arial,Helvetica,sans-serif' SIZE=3 COLOR='#FFFFFF'>"._T('info_langues')."</FONT></B> ".aide ()."</TD></TR>"; - -echo "<TR><TD class='verdana2'>"; -echo _T('texte_choix_langue_defaut'); -echo "</TD></TR>"; - - -// langue par defaut -echo "<TR><TD ALIGN='left' class='verdana2'>"; -echo _T('info_langue_defaut'); -echo "\n<select name='langue_site' class='fondl'>\n"; -echo "<option value='$langue_site' selected>"._T("langue_".$langue_site)."</option>\n"; -reset ($langues_prop); -while (list(,$l) = each ($langues_prop)) { - if ($l <> $langue_site) - echo "<option value='$l'>"._T("langue_".$l)."</option>\n"; -} -echo "</select><br>\n"; -echo "</TD></TR>"; - - -// langues proposees -echo "<TR><TD ALIGN='left' class='verdana2'>"; -echo _T('info_langues_proposees'); -$langues_toutes = split(',',$all_langs); -$langues_proposees = lire_meta('langues_proposees'); -$test = (ereg(",$langue_site,", ",$langues_tests,")) ? _T('info_en_test_1') : ""; -echo "<input type='checkbox' name='langues_prop[]' value='$langue_site' checked id='lang_$langue_site'><label for='lang_$langue_site'> <b>"._T("langue_".$langue_site).'</b>'.$test."</label>\n"; -while (list(,$l) = each ($langues_toutes)) { - if ($l AND ($l <> $langue_site)) { - $test = (ereg(",$l,", ",$langues_tests,")) ? _T('info_en_test_2') : ""; - if (ereg(",$l,", ",$langues_proposees,")) - echo " <input type='checkbox' name='langues_prop[]' value='$l' checked id='lang_$l'><label for='lang_$l'> <b>"._T("langue_".$l).'</b>'.$test.'</label>'; - else - echo " <input type='checkbox' name='langues_prop[]' value='$l' id='lang_$l'> <label for='lang_$l'>"._T("langue_".$l).$test.'</label>'; - } -} -echo "</TD></TR>"; - - -echo "<TR><TD ALIGN='right'>"; -echo "<INPUT TYPE='submit' NAME='Valider' VALUE='"._T('bouton_valider')."' CLASS='fondo'>"; -echo "</TD></TR>"; -echo "</TABLE>\n"; - -fin_cadre_relief(); - -echo "<p>"; // diff --git a/ecrire/config-lang.php3 b/ecrire/config-lang.php3 new file mode 100644 index 0000000000000000000000000000000000000000..8330db63559937326e9cc0ffa490475a6ee17be1 --- /dev/null +++ b/ecrire/config-lang.php3 @@ -0,0 +1,99 @@ +<?php + +include ("inc.php3"); + +include_ecrire ("inc_config.php3"); + +if ($connect_statut != '0minirezo' OR !$connect_toutes_rubriques) { + echo _T('avis_non_acces_page'); + exit; +} + +init_config(); +if ($changer_config == 'oui') { + appliquer_modifs_config(); +} + +debut_page(_T('titre_page_config_fonctions'), "administration", "configuration"); + +echo "<br><br><br>"; +gros_titre(_T('titre_config_fonctions')); +barre_onglets("configuration", "lang"); + +debut_gauche(); +debut_droite(); + +lire_metas(); + + +echo "<form action='config-lang.php3' method='post'>"; +echo "<input type='hidden' name='changer_config' value='oui'>"; + + +// +// Configuration i18n +// + +debut_cadre_relief("langues-24.gif"); + +$langues_prop = split(",",lire_meta("langues_proposees")); +$langue_site = lire_meta('langue_site'); + +echo "<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3 WIDTH=\"100%\">"; +echo "<TR><TD BGCOLOR='$couleur_foncee' BACKGROUND='img_pack/rien.gif'><B><FONT FACE='Verdana,Arial,Helvetica,sans-serif' SIZE=3 COLOR='#FFFFFF'>"._T('info_langues')."</FONT></B> ".aide ()."</TD></TR>"; + +echo "<TR><TD class='verdana2'>"; +echo _T('texte_choix_langue_defaut'); +echo "</TD></TR>"; + + +// langue par defaut +echo "<TR><TD ALIGN='left' class='verdana2'>"; +echo _T('info_langue_defaut'); +echo "\n<select name='langue_site' class='fondl'>\n"; +echo "<option value='$langue_site' style='background-image: url(lang/drap_$langue_site.gif); background-repeat: no-repeat; background-position: 3px 3px; padding-left: 20px;' selected>"._T("langue_".$langue_site)."</option>\n"; +reset ($langues_prop); +while (list(,$l) = each ($langues_prop)) { + if ($l <> $langue_site) + echo "<option value='$l' style='background-image: url(lang/drap_$l.gif); background-repeat: no-repeat; background-position: 3px 3px; padding-left: 20px;'>"._T("langue_".$l)."</option>\n"; +} +echo "</select><br>\n"; +echo "</TD></TR>"; + + +// langues proposees +echo "<TR><TD ALIGN='left' class='verdana2'>"; +echo _T('info_langues_proposees'); +$langues_toutes = split(',',$all_langs); +$langues_proposees = lire_meta('langues_proposees'); +$test = (ereg(",$langue_site,", ",$langues_tests,")) ? _T('info_en_test_1') : ""; +echo "<input type='checkbox' name='langues_prop[]' value='$langue_site' checked id='lang_$langue_site'><label for='lang_$langue_site'> <b>"._T("langue_".$langue_site).'</b>'.$test."</label>\n"; +while (list(,$l) = each ($langues_toutes)) { + if ($l AND ($l <> $langue_site)) { + $test = (ereg(",$l,", ",$langues_tests,")) ? _T('info_en_test_2') : ""; + if (ereg(",$l,", ",$langues_proposees,")) + echo "<br> <input type='checkbox' name='langues_prop[]' value='$l' checked id='lang_$l'><label for='lang_$l'> <b>"._T("langue_".$l).'</b>'.$test.'</label>'; + else + echo "<br> <input type='checkbox' name='langues_prop[]' value='$l' id='lang_$l'> <label for='lang_$l'>"._T("langue_".$l).$test.'</label>'; + } +} +echo "</TD></TR>"; + + +echo "<TR><TD ALIGN='right'>"; +echo "<INPUT TYPE='submit' NAME='Valider' VALUE='"._T('bouton_valider')."' CLASS='fondo'>"; +echo "</TD></TR>"; +echo "</TABLE>\n"; + +fin_cadre_relief(); + +echo "<p>"; + + + + +echo "</form>"; + +fin_page(); + +?> diff --git a/ecrire/img_pack/langues-24.gif b/ecrire/img_pack/langues-24.gif new file mode 100644 index 0000000000000000000000000000000000000000..408c23abaa6b134e47d3b599b8670b4e6d9b170d Binary files /dev/null and b/ecrire/img_pack/langues-24.gif differ diff --git a/ecrire/img_pack/langues-24.png b/ecrire/img_pack/langues-24.png deleted file mode 100644 index 52d520d0c0dba5783a22849086dccd590f3ded20..0000000000000000000000000000000000000000 Binary files a/ecrire/img_pack/langues-24.png and /dev/null differ diff --git a/ecrire/inc_presentation.php3 b/ecrire/inc_presentation.php3 index e5ffc931d5e1090bd9742462b6052bc134121420..3ea8db41f9dfb207771b291775fbaba23861dee0 100644 --- a/ecrire/inc_presentation.php3 +++ b/ecrire/inc_presentation.php3 @@ -1011,6 +1011,7 @@ function barre_onglets($rubrique, $onglet){ onglet(_T('onglet_contenu_site'), "configuration.php3", "contenu", $onglet, "racine-site-24.gif"); onglet(_T('onglet_intercativite'), "config-contenu.php3", "interactivite", $onglet, "forum-interne-24.gif"); onglet(_T('onglet_fonctions_avances'), "config-fonctions.php3", "fonctions", $onglet, "image-24.gif"); + onglet(_T('onglet_langue'), "config-lang.php3", "lang", $onglet, "langues-24.gif"); } if ($rubrique == "suivi_forum"){ @@ -1531,19 +1532,23 @@ function debut_page($titre = "", $rubrique = "asuivre", $sous_rubrique = "asuivr // choix de la langue // if (strpos(lire_meta('langues_proposees'), ',')) { - //echo "<td align='center'><font face='arial,helvetica,sans-serif' size=2><img src='img_pack/langues-24.png' align='center'>"; + //echo "<td align='center'><font face='arial,helvetica,sans-serif' size=2><img src='img_pack/langues-24.gif' align='center'>"; + echo "<td> </td>"; echo "<td align='center'><font face='arial,helvetica,sans-serif' size=2>"; $langues = explode(',', lire_meta('langues_proposees')); while (list(,$langue) = each ($langues)) { + if (file_exists("lang/drap_$langue.gif")) $icone = "<img src='lang/drap_$langue.gif' border='0'>"; + else $icone = "<font size=1 color='white'>".majuscules("$langue")."</font>"; + $lien = $clean_link; $lien->addVar('set_lang', $langue); if ($langue != $GLOBALS['spip_lang']) { //echo "<span class='fondgris' color='white' onMouseOver=\"changeclass(this,'fondgrison2')\" onMouseOut=\"changeclass(this,'fondgris')\">"; - echo "<a href='". $lien->getUrl() ."' title='"._T("langue_$langue")."'><font color='white'>$langue</font></a>"; + echo "<a href='". $lien->getUrl() ."' title='"._T("langue_$langue")."'>$icone</a>"; //echo "</span>"; } else { - echo "<span class='fondgrison2'><b>$langue</b></span>"; + echo "<b>$icone</b>"; //echo " <font color='#ffffff'>[$langue]</font>"; } echo " "; diff --git a/ecrire/lang/drap_de.gif b/ecrire/lang/drap_de.gif new file mode 100644 index 0000000000000000000000000000000000000000..d848351ed1c3c3c1279c0cdc2c2f0b1518510f6b Binary files /dev/null and b/ecrire/lang/drap_de.gif differ diff --git a/ecrire/lang/drap_en.gif b/ecrire/lang/drap_en.gif new file mode 100644 index 0000000000000000000000000000000000000000..73ea75133f19b09164b8ec4f5c6b1e11d3a011cd Binary files /dev/null and b/ecrire/lang/drap_en.gif differ diff --git a/ecrire/lang/drap_es.gif b/ecrire/lang/drap_es.gif new file mode 100644 index 0000000000000000000000000000000000000000..1fc02b629841c247c178f50009d9d5d0f1c6c9bd Binary files /dev/null and b/ecrire/lang/drap_es.gif differ diff --git a/ecrire/lang/drap_fr.gif b/ecrire/lang/drap_fr.gif new file mode 100644 index 0000000000000000000000000000000000000000..e33b0718c948dffa674418432ab218697f045249 Binary files /dev/null and b/ecrire/lang/drap_fr.gif differ diff --git a/ecrire/lang/drap_it.gif b/ecrire/lang/drap_it.gif new file mode 100644 index 0000000000000000000000000000000000000000..c485b1780b2d59de59e273d9a970fd48cff5c186 Binary files /dev/null and b/ecrire/lang/drap_it.gif differ diff --git a/ecrire/lang/drap_ru.gif b/ecrire/lang/drap_ru.gif new file mode 100644 index 0000000000000000000000000000000000000000..a05989041ef4c0d3cbd5a74afc6d33e7e856a6e6 Binary files /dev/null and b/ecrire/lang/drap_ru.gif differ diff --git a/ecrire/lang/spip_en.php3 b/ecrire/lang/spip_en.php3 index 0bcbd5b0983a0cb369a48b9a86053993a9e99a3a..10ddf341fc4a349ec65633477eb6b61b98f4b175 100644 --- a/ecrire/lang/spip_en.php3 +++ b/ecrire/lang/spip_en.php3 @@ -1039,6 +1039,7 @@ requiring an FTP access to the Web site.', 'onglet_fonctions_avances' => 'Advanced functions', 'onglet_informations_personnelles' => 'Personal Information', 'onglet_intercativite' => 'Interactivity', +'onglet_langue' => 'Site\'s languages', 'onglet_messagerie' => 'Messaging', 'onglet_messages_internes' => 'Internal messages', 'onglet_messages_publics' => 'Public messages', diff --git a/ecrire/lang/spip_fr.php3 b/ecrire/lang/spip_fr.php3 index 7d018f06a6c32bf58b2eee20075806380140b36a..0834c18cef5da5e251de1daddc071e6406b7ffe4 100644 --- a/ecrire/lang/spip_fr.php3 +++ b/ecrire/lang/spip_fr.php3 @@ -1047,6 +1047,7 @@ exige d\'avoir un accès FTP au site Web.', 'onglet_fonctions_avances' => 'Fonctions avancées', 'onglet_informations_personnelles' => 'Informations personnelles', 'onglet_intercativite' => 'Interactivité', +'onglet_langue' => 'Langues du site', 'onglet_messagerie' => 'Messagerie', 'onglet_messages_internes' => 'Messages internes', 'onglet_messages_publics' => 'Messages publics', diff --git a/ecrire/statistiques_visites.php3 b/ecrire/statistiques_visites.php3 index e5a04f8782cf4cc8ee2e6ed3035e8e6c5828fee7..3fe49bbf33454821843a18bf3186bd48a12b815e 100644 --- a/ecrire/statistiques_visites.php3 +++ b/ecrire/statistiques_visites.php3 @@ -216,7 +216,7 @@ else { $query="SELECT UNIX_TIMESTAMP(date) AS date_unix, visites FROM $table ". - "WHERE $where AND date > DATE_SUB(NOW(),INTERVAL 420 DAY) ORDER BY date"; + "WHERE $where AND date > DATE_SUB(NOW(),INTERVAL 89 DAY) ORDER BY date"; $result=spip_query($query); while ($row = spip_fetch_array($result)) { @@ -260,7 +260,7 @@ if (count($log)>0){ $rapport = 200 / $maxgraph; - if (count($log) < 420) $largeur = floor(420 / ($nb_jours+1)); + if (count($log) < 420) $largeur = floor(450 / ($nb_jours+1)); if ($largeur < 1) $largeur = 1; debut_cadre_relief("statistiques-24.gif");