diff --git a/ecrire/breves.php3 b/ecrire/breves.php3 index 1a6ede7572e625e23a0a0ae463794557b85c2058..76dfa1cbe1c08f8514a002aea1d880f1613e6bdb 100644 --- a/ecrire/breves.php3 +++ b/ecrire/breves.php3 @@ -17,9 +17,9 @@ if ($statut) { } - - function enfant($leparent){ + global $spip_lang_left, $spip_lang_right; + $query="SELECT * FROM spip_rubriques WHERE id_parent='$leparent' ORDER BY titre"; $result=spip_query($query); @@ -42,7 +42,7 @@ function enfant($leparent){ echo "<B>$titre</B></FONT>\n"; echo aide ("breves"); - echo "<P ALIGN='left'>"; + echo "<p>"; if ($GLOBALS['connect_statut'] == "0minirezo") $statuts = "'prop', 'refuse', 'publie'"; else $statuts = "'prop', 'publie'"; @@ -50,7 +50,7 @@ function enfant($leparent){ $query = "SELECT id_breve, date_heure, titre, statut FROM spip_breves ". "WHERE id_rubrique='$id_rubrique' AND statut IN ($statuts) ORDER BY date_heure DESC"; afficher_breves('', $query); - echo "<div align='right'>"; + echo "<div align='$spip_lang_right'>"; icone(_T('icone_nouvelle_breve'), "breves_edit.php3?new=oui&id_rubrique=$id_rubrique", "breve-24.gif", "creer.gif"); echo "</div>"; diff --git a/ecrire/inc_lang.php3 b/ecrire/inc_lang.php3 index 65cdc6a26a78d8980e9ff19bacc9e43cc99eb3cc..911de0af098eed95b0d17fc44cd0d4a1727512f8 100644 --- a/ecrire/inc_lang.php3 +++ b/ecrire/inc_lang.php3 @@ -88,13 +88,15 @@ function charger_langue($lang, $module = 'spip', $forcer = false) { // Changer la langue courante // function changer_langue($lang) { - global $all_langs, $spip_lang_rtl, $spip_lang_right, $spip_lang_left; + global $all_langs, $spip_lang_rtl, $spip_lang_right, $spip_lang_left, $spip_lang_dir, $spip_dir_lang; if ($lang && ereg(",$lang,", ",$all_langs,")) { $GLOBALS['spip_lang'] = $lang; $spip_lang_rtl = lang_dir($lang, '', '_rtl'); $spip_lang_left = lang_dir($lang, 'left', 'right'); $spip_lang_right = lang_dir($lang, 'right', 'left'); + $spip_lang_dir = lang_dir($lang); + $spip_dir_lang = " dir='$spip_lang_dir'"; return true; } diff --git a/ecrire/inc_presentation.php3 b/ecrire/inc_presentation.php3 index 772b2d76cbbc083aff6bdf8aaf3c2bcfd0d48604..ff7403c477172ac577c7eddcb5fcb2da0b96f366 100644 --- a/ecrire/inc_presentation.php3 +++ b/ecrire/inc_presentation.php3 @@ -455,9 +455,9 @@ function afficher_articles($titre_table, $requete, $afficher_visites = false, $a $s .= "<img src=\"img_pack/$puce\" alt='' width=\"13\" height=\"14\" border=\"0\"></a> "; if (acces_restreint_rubrique($id_rubrique)) $s .= "<img src='img_pack/admin-12.gif' alt='' width='12' height='12' title='"._T('titre_image_admin_article')."'> "; - $s .= "<a href=\"articles.php3?id_article=$id_article\"$descriptif><span $dir_lang>".typo($titre)."</span></a>"; + $s .= "<a href=\"articles.php3?id_article=$id_article\"$descriptif$dir_lang>".typo($titre)."</a>"; if ($afficher_langue AND $lang != $langue_defaut) - $s .= " <font size='1' color='#666666'>(".traduire_nom_langue($lang).")</font>"; + $s .= " <font size='1' color='#666666'$dir_lang>(".traduire_nom_langue($lang).")</font>"; if ($petition) $s .= " <Font size=1 color='red'>"._T('lien_petitions')."</font>"; $vals[] = $s; @@ -498,7 +498,7 @@ function afficher_articles($titre_table, $requete, $afficher_visites = false, $a // function afficher_breves($titre_table, $requete, $affrub=false) { - global $connect_id_auteur; + global $connect_id_auteur, $spip_lang_right, $dir_lang; if ((lire_meta('multi_rubriques') == 'oui' AND $GLOBALS['coll'] == 0) OR lire_meta('multi_articles') == 'oui') { $afficher_langue = true; @@ -556,14 +556,15 @@ function afficher_breves($titre_table, $requete, $affrub=false) { $s = "<a href='breves_voir.php3?id_breve=$id_breve' title=\"$title\">"; $s .= "<img src='img_pack/$puce.gif' alt='' width='8' height='9' border='0'></a> "; - $s .= "<a href='breves_voir.php3?id_breve=$id_breve'>"; + $s .= "<a href='breves_voir.php3?id_breve=$id_breve'$dir_lang>"; $s .= typo($titre); $s .= "</a>"; - if ($afficher_langue AND $lang != $langue_defaut) $s .= " <font size='1' color='#666666'>(".traduire_nom_langue($lang).")</font>"; + if ($afficher_langue AND $lang != $langue_defaut) + $s .= " <font size='1' color='#666666'$dir_lang>(".traduire_nom_langue($lang).")</font>"; $vals[] = $s; - $s = "<div align=\"right\">"; + $s = "<div align='$spip_lang_right'>"; if ($affrub) { $rub = spip_fetch_array(spip_query("SELECT titre FROM spip_rubriques WHERE id_rubrique=$id_rubrique")); $s .= typo($rub['titre']); diff --git a/ecrire/index.php3 b/ecrire/index.php3 index 306a668ec66562c749e2b6a862b5a12251fcc147..cdbb617e7404d2d5246a72281066fa02ee39567f 100644 --- a/ecrire/index.php3 +++ b/ecrire/index.php3 @@ -11,7 +11,7 @@ debut_gauche(); function enfant($collection){ - global $les_enfants, $couleur_foncee; + global $les_enfants, $couleur_foncee, $lang_dir; $query2 = "SELECT * FROM spip_rubriques WHERE id_parent=\"$collection\" ORDER BY titre"; $result2 = spip_query($query2); @@ -19,50 +19,54 @@ function enfant($collection){ $id_rubrique=$row['id_rubrique']; $id_parent=$row['id_parent']; $titre=$row['titre']; - $descriptif=propre($row['descriptif']); $bouton_layer = bouton_block_invisible("enfants$id_rubrique"); $les_sous_enfants = sous_enfant($id_rubrique); + changer_typo($row['lang']); + $descriptif=propre($row['descriptif']); + $les_enfants.= "<P>"; if ($id_parent == "0") $les_enfants .= debut_cadre_relief("secteur-24.gif", true); else $les_enfants .= debut_cadre_relief("rubrique-24.gif", true); - $les_enfants.= "<FONT FACE=\"Verdana,Arial,Sans,sans-serif\">"; - if (strlen($les_sous_enfants) > 0){ - $les_enfants.= $bouton_layer; + $les_enfants .= $bouton_layer; + } + $les_enfants .= "<FONT FACE=\"Verdana,Arial,Sans,sans-serif\">"; + + if (acces_restreint_rubrique($id_rubrique)) + $les_enfants .= "<img src='img_pack/admin-12.gif' alt='' width='12' height='12' title='"._T('image_administrer_rubrique')."'> "; + + $les_enfants.= "<span dir='$lang_dir'><B><A HREF='naviguer.php3?coll=$id_rubrique'><font color='$couleur_foncee'>".typo($titre)."</font></A></B></span>"; + if (strlen($descriptif)>1) { + $les_enfants .= "<br><FONT SIZE=1><span dir='$lang_dir'>$descriptif</span></FONT>"; } - if (acces_restreint_rubrique($id_rubrique)) - $les_enfants.= "<img src='img_pack/admin-12.gif' alt='' width='12' height='12' title='"._T('info_administrer_rubriques')."'> "; - $les_enfants.= "<B><A HREF='naviguer.php3?coll=$id_rubrique'><font color='$couleur_foncee'>".typo($titre)."</font></A></B>"; - if (strlen($descriptif)>1) - $les_enfants.="<BR><FONT SIZE=1>$descriptif</FONT>"; $les_enfants.= "</FONT>"; - $les_enfants.="<FONT FACE='arial, helvetica'>"; $les_enfants .= $les_sous_enfants; - $les_enfants .="</FONT> "; $les_enfants .= fin_cadre_relief(true); } } function sous_enfant($collection2){ + global $lang_dir, $spip_lang_dir; $query3 = "SELECT * FROM spip_rubriques WHERE id_parent=\"$collection2\" ORDER BY titre"; $result3 = spip_query($query3); if (spip_num_rows($result3) > 0){ - $retour = debut_block_invisible("enfants$collection2")."\n\n<FONT SIZE=1><ul style='list-style-image: url(img_pack/rubrique-12.gif)'>"; + $retour = debut_block_invisible("enfants$collection2")."\n<ul style='list-style-image: url(img_pack/rubrique-12.gif)'>\n<FONT SIZE=1 face='arial,helvetica,sans-serif'>"; while($row=spip_fetch_array($result3)){ $id_rubrique2=$row['id_rubrique']; $id_parent2=$row['id_parent']; $titre2=$row['titre']; + changer_typo($row['lang']); - $retour.="<LI><A HREF='naviguer.php3?coll=$id_rubrique2'>$titre2</A>\n"; + $retour.="<LI><A HREF='naviguer.php3?coll=$id_rubrique2'><span dir='$lang_dir'>".typo($titre2)."</span></A>\n"; } $retour .= "</FONT></ul>\n\n".fin_block()."\n\n"; } - + return $retour; } @@ -72,7 +76,7 @@ function sous_enfant($collection2){ // -echo "<p align='left'>"; +echo "<p>"; debut_cadre_relief("fiche-perso-24.gif"); echo "<font face='Verdana,Arial,Sans,sans-serif' size='2'>"; if ($bonjour == "oui" OR $spip_ecran == "large") echo bouton_block_visible("info_perso"); @@ -207,7 +211,7 @@ fin_raccourcis(); // // Annonces // - afficher_taches(); +afficher_taches(); @@ -292,7 +296,7 @@ if ($connect_statut == "0minirezo") { $post_dates = lire_meta("post_dates"); if ($post_dates == "non" AND $connect_statut == '0minirezo' AND $options == 'avancees') { - echo "<P align=left>"; + echo "<p>"; afficher_articles(_T('info_article_a_paraitre'), "WHERE statut='publie' AND date>NOW() ORDER BY date"); } @@ -302,7 +306,7 @@ if ($post_dates == "non" AND $connect_statut == '0minirezo' AND $options == 'ava // Vos articles en cours de redaction // -echo "<P align=left>"; +echo "<p>"; $vos_articles = afficher_articles(_T('info_en_cours_validation'), ", spip_auteurs_articles AS lien WHERE articles.id_article=lien.id_article ". "AND lien.id_auteur=$connect_id_auteur AND articles.statut='prepa' ORDER BY articles.date DESC"); diff --git a/ecrire/naviguer.php3 b/ecrire/naviguer.php3 index 00cd0e12a133de1b97ba7fe81f0629bb6179e1bf..78877357ec87c4a98fd5912546fe4cb0473eb8af 100644 --- a/ecrire/naviguer.php3 +++ b/ecrire/naviguer.php3 @@ -29,19 +29,20 @@ function enfant($collection){ $les_enfants.= "<P>"; if ($id_parent == "0") $les_enfants .= debut_cadre_relief("secteur-24.gif", true); else $les_enfants .= debut_cadre_relief("rubrique-24.gif", true); - $les_enfants.= "<span dir='$lang_dir'><FONT FACE=\"Verdana,Arial,Sans,sans-serif\">"; - if (strlen($les_sous_enfants) > 0){ - $les_enfants.= $bouton_layer; + $les_enfants .= $bouton_layer; } + $les_enfants .= "<FONT FACE=\"Verdana,Arial,Sans,sans-serif\">"; + if (acces_restreint_rubrique($id_rubrique)) - $les_enfants.= "<img src='img_pack/admin-12.gif' alt='' width='12' height='12' title='"._T('image_administrer_rubrique')."'> "; + $les_enfants .= "<img src='img_pack/admin-12.gif' alt='' width='12' height='12' title='"._T('image_administrer_rubrique')."'> "; - $les_enfants.= "<B><A HREF='naviguer.php3?coll=$id_rubrique'><font color='$couleur_foncee'>".typo($titre)."</font></A></B>"; - if (strlen($descriptif)>1) - $les_enfants.="<BR><FONT SIZE=1>$descriptif</FONT>"; + $les_enfants.= "<span dir='$lang_dir'><B><A HREF='naviguer.php3?coll=$id_rubrique'><font color='$couleur_foncee'>".typo($titre)."</font></A></B></span>"; + if (strlen($descriptif)>1) { + $les_enfants .= "<br><FONT SIZE=1><span dir='$lang_dir'>$descriptif</span></FONT>"; + } - $les_enfants.= "</FONT></span>"; + $les_enfants.= "</FONT>"; $les_enfants .= $les_sous_enfants; $les_enfants .= fin_cadre_relief(true); @@ -49,12 +50,12 @@ function enfant($collection){ } function sous_enfant($collection2){ - global $lang_dir; + global $lang_dir, $spip_lang_dir; $query3 = "SELECT * FROM spip_rubriques WHERE id_parent=\"$collection2\" ORDER BY titre"; $result3 = spip_query($query3); if (spip_num_rows($result3) > 0){ - $retour = debut_block_invisible("enfants$collection2")."\n\n<FONT SIZE=1 face='arial,helvetica,sans-serif'><ul style='list-style-image: url(img_pack/rubrique-12.gif)'>"; + $retour = debut_block_invisible("enfants$collection2")."\n<ul style='list-style-image: url(img_pack/rubrique-12.gif)'>\n<FONT SIZE=1 face='arial,helvetica,sans-serif'>"; while($row=spip_fetch_array($result3)){ $id_rubrique2=$row['id_rubrique']; $id_parent2=$row['id_parent']; @@ -367,7 +368,7 @@ echo "</tr>\n"; if (strlen($descriptif) > 1) { echo "<tr><td>\n"; - echo "<div align='left' style='padding: 5px; border: 1px dashed #aaaaaa;'>"; + echo "<div align='$spip_lang_left' style='padding: 5px; border: 1px dashed #aaaaaa;'>"; echo "<font size=2 face='Verdana,Arial,Sans,sans-serif'>"; echo propre($descriptif."~"); echo "</font>"; @@ -390,7 +391,7 @@ if ($flag_mots!= 'non' AND $flag_editable AND $options == 'avancees' AND $coll > if (strlen($texte) > 1) { - echo "\n<p><font size=3 face='Verdana,Arial,Sans,sans-serif'><div align='justify'>"; + echo "\n<p><div align='justify'><font size=3 face='Verdana,Arial,Sans,sans-serif'>"; echo justifier(propre($texte)); echo " </font></div>"; } @@ -426,16 +427,13 @@ if ($coll>0 AND lire_meta('multi_rubriques') == 'oui' AND (lire_meta('multi_sect echo fin_block(); fin_cadre_enfonce(); - - - } fin_cadre_relief(); -echo "<DIV align=left>"; +//echo "<div align='$spip_lang_left'>"; enfant($coll); @@ -450,24 +448,24 @@ if (strpos($les_enfants2,"<P>")){ // Afficher les sous-rubriques - echo "<p><table cellpadding=0 cellspacing=0 border=0 width='100%'>"; - echo "<tr><td valign='top' width=50% rowspan=2>$les_enfants1</td>"; - echo "<td width=20 rowspan=2><img src='img_pack/rien.gif' width=20></td>"; - echo "<td valign='top' width=50%>$les_enfants2 "; - if (strlen($les_enfants2) > 0) echo "<p>"; - echo "</td></tr>"; - - echo "<tr><td align='right' valign='bottom'>"; - if ($flag_editable) { +echo "<p><table cellpadding=0 cellspacing=0 border=0 width='100%'>"; +echo "<tr><td valign='top' width=50% rowspan=2>$les_enfants1</td>"; +echo "<td width=20 rowspan=2><img src='img_pack/rien.gif' width=20></td>"; +echo "<td valign='top' width=50%>$les_enfants2 "; +if (strlen($les_enfants2) > 0) echo "<p>"; +echo "</td></tr>"; + +echo "<tr><td align='right' valign='bottom'>"; +if ($flag_editable) { if ($coll == "0") icone(_T('icone_creer_rubrique'), "rubriques_edit.php3?new=oui&retour=nav", "secteur-24.gif", "creer.gif"); else icone(_T('icone_creer_sous_rubrique'), "rubriques_edit.php3?new=oui&retour=nav&id_parent=$coll", "rubrique-24.gif", "creer.gif"); echo "<p>"; - } - echo "</td></tr>"; - echo "</table>"; +} +echo "</td></tr>"; +echo "</table>"; -echo "<DIV align='left'>"; +//echo "<div align='$spip_lang_left'>"; ////////// Vos articles en cours de redaction diff --git a/ecrire/plan_trad.php3 b/ecrire/plan_trad.php3 index 82251b06240e5a2f75201e1c5ad838e4bb36c40f..1d9a05d70b29a68976484c98dc954c49ccafe225 100644 --- a/ecrire/plan_trad.php3 +++ b/ecrire/plan_trad.php3 @@ -51,9 +51,15 @@ function afficher_rubrique($id_parent, $marge = 0, $cond = '', $afficher = true) global $trad_lang; global $couleur_foncee; global $dir_lang; + global $spip_lang_left; static $total_articles = 0; static $rubriques_actives; + // + // Calculer les rubriques actives + // (contenant des articles a afficher) + // + if (!$rubriques_actives) { $rubriques_actives[0] = true; @@ -125,8 +131,8 @@ function afficher_rubrique($id_parent, $marge = 0, $cond = '', $afficher = true) $s .= "</a> "; } - $s .= "<a href=\"articles.php3?id_article=$id_article\"$descriptif><span $dir_lang>".typo($titre)."</span></a>"; - $s .= " <font size='1' color='#666666'>(".traduire_nom_langue($lang).")</font>"; + $s .= "<a href=\"articles.php3?id_article=$id_article\"$descriptif$dir_lang>".typo($titre)."</a>"; + $s .= " <font size='1' color='#666666'$dir_lang>(".traduire_nom_langue($lang).")</font>"; $vals[] = $s; @@ -184,7 +190,7 @@ function afficher_rubrique($id_parent, $marge = 0, $cond = '', $afficher = true) "</div>\n"; if ($afficher) { - $cond_fils['avant'] = "<div style='margin: 0px; margin-left: ".$marge."px; padding: 0px; background: none;'>\n".$bandeau; + $cond_fils['avant'] = "<div style='margin: 0px; margin-$spip_lang_left: ".$marge."px; padding: 0px; background: none;'>\n".$bandeau; $cond_fils['apres'] = "</div>\n"; if (!$id_parent) $cond_fils['avant'] = "<p>".$cond_fils['avant']; }