diff --git a/ecrire/inc_barre.php3 b/ecrire/inc_barre.php3 index 7c536571dad42057435daad70730ca762c47bb6d..04c99c36fd44ef82a940a4446815721734e69489 100644 --- a/ecrire/inc_barre.php3 +++ b/ecrire/inc_barre.php3 @@ -8,6 +8,9 @@ define("_INC_BARRE", "1"); function test_barre() { global $HTTP_UA_OS, $browser_name, $browser_version, $browser_description, $browser_rev; + global $xhtml; + + if ($xhtml) return false; if ($browser_name == '') verif_butineur(); @@ -43,7 +46,7 @@ function bouton_barre_racc($action, $img, $help, $formulaire, $texte) { $champhelp = "document.$formulaire.helpbox$texte"; $retour = "<a href=\"".$action."\" class='spip_barre' tabindex='1000' title=\"".attribut_html($help)."\""; if (!$flag_ecrire) $retour .= " onMouseOver=\"helpline('".addslashes(attribut_html($help))."',$champhelp)\" onMouseOut=\"helpline('".attribut_html(_T('barre_aide'))."', $champhelp)\""; - $retour .= "><img src='".($flag_ecrire ? "../" : "")."IMG/icones_barre/".$img."' border='0' height='16' width='16' align='middle'></a>"; + $retour .= "><img src='".($flag_ecrire ? "../" : "")."IMG/icones_barre/".$img."' border='0' height='16' width='16' align='middle' /></a>\n"; return $retour; } @@ -74,7 +77,7 @@ function afficher_barre($formulaire='',$texte='', $forum=false) { } if ($forum) { $ret .= "</td> <td>"; - $ret .= bouton_barre_racc ("javascript:barre_raccourci('\n\n<quote>','</quote>\n\n',$champ)", "quote.png", _T('barre_quote'), $formulaire, $texte); + $ret .= bouton_barre_racc ("javascript:barre_raccourci('\n\n<quote>','</quote>\n\n',$champ)", "quote.png", _T('barre_quote'), $formulaire, $texte); } if ($options == "avancees") { @@ -83,10 +86,8 @@ function afficher_barre($formulaire='',$texte='', $forum=false) { $ret .= " "; $ret .= bouton_barre_racc ("javascript:barre_tableau($champ)", "barre-tableau.png", "Insérer un tableau", $formulaire, $texte);*/ } - - $ret .= "</td>"; - $ret .= "</td> <td>"; + $ret .= "</td> "; // Insertion de caracteres difficiles a taper au clavier (guillemets, majuscules accentuees...) $ret .= "<td style='text-align:$spip_lang_left;' valign='middle'>"; @@ -114,7 +115,7 @@ function afficher_barre($formulaire='',$texte='', $forum=false) { $ret .= bouton_barre_racc ("javascript:barre_inserer('€',$champ)", "euro.png", _T('barre_euro'), $formulaire, $texte); $ret .= "</td>"; - $ret .= "</td> <td>"; + $ret .= " "; if ($flag_ecrire) { $ret .= "<td style='text-align:$spip_lang_right;' valign='middle'>"; @@ -136,6 +137,6 @@ function afficher_barre($formulaire='',$texte='', $forum=false) { } function afficher_claret() { - return "onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);' ondbclick='storeCaret(this);'"; + if (test_barre()) return "onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);' ondbclick='storeCaret(this);'"; } ?> diff --git a/ecrire/inc_tidy.php b/ecrire/inc_tidy.php index 536d48de19e35ceb5d891f2bae7c2679c3d5046b..ca37d8ed3aec174c709321e78a0fcf5ffbadcb41 100644 --- a/ecrire/inc_tidy.php +++ b/ecrire/inc_tidy.php @@ -51,6 +51,7 @@ function xhtml ($buffer) { tidy_setopt('indent-spaces', 4); tidy_setopt('output-xhtml', true); tidy_setopt('indent', 5); + tidy_setopt('show-body-only', false); $html = tidy_parse_string($buffer); tidy_clean_repair(); diff --git a/inc-formulaires.php3 b/inc-formulaires.php3 index 1ce0c3f8649010b65eb6614bd611f08d03d59440..f1aec7931ef2f92128af8335fabdcc9b89f96b41 100644 --- a/inc-formulaires.php3 +++ b/inc-formulaires.php3 @@ -390,14 +390,17 @@ function formulaire_inscription($type) { } else { echo _T('form_forum_indiquer_nom_email'); - $link = $GLOBALS['clean_link']; - echo $link->getForm('GET'); - echo "<P><B>"._T('form_pet_votre_nom')."</B><BR>"; - echo "<INPUT TYPE=\"text\" CLASS=\"forml\" NAME=\"nom_inscription\" VALUE=\"\" SIZE=\"30\">"; - echo "<P><B>"._T('form_pet_votre_email')."</B><BR>"; - echo "<INPUT TYPE=\"text\" CLASS=\"forml\" NAME=\"mail_inscription\" VALUE=\"\" SIZE=\"30\">"; - echo "<DIV ALIGN=\"right\"><INPUT TYPE=\"submit\" NAME=\"Valider\" CLASS=\"spip_bouton\" VALUE=\""._T('bouton_valider')."\">"; - echo "</DIV></FORM>"; + + $link = new Link; + $url = $link->getUrl(); + $url = ereg_replace("\&", "&", $url); + echo "<form method='get' action='$url' style='border: 0px; margin: 0px;'>\n"; + echo "<div><b>"._T('form_pet_votre_nom')."</b></div>"; + echo "<div><input type=\"text\" class=\"forml\" name=\"nom_inscription\" value=\"\" size=\"30\" /></div>"; + echo "<div><b>"._T('form_pet_votre_email')."</b></div>"; + echo "<div><input type=\"text\" class=\"forml\" name=\"mail_inscription\" value=\"\" size=\"30\" /></div>"; + echo "<div align=\"right\"><input type=\"submit\" name=\"Valider\" class=\"spip_bouton\" value=\""._T('bouton_valider')."\" /></div>"; + echo "</form>"; } } diff --git a/inc-forum.php3 b/inc-forum.php3 index 01f7c29c8fdbc9535de3db939eda2c7640670f47..57b8d8b5ba1500d70750185db8757e6a10acd455 100644 --- a/inc-forum.php3 +++ b/inc-forum.php3 @@ -132,6 +132,9 @@ function retour_forum($id_rubrique, $id_parent, $id_article, $id_breve, $id_synd } if ($afficher_texte != 'non') { + $lien = ereg_replace("\&", "&", $lien); + + $ret .= "\n<form action='$lien' name='formulaire' method='post'>"; $ret .= "<div class='spip_encadrer'>"; if ($afficher_texte != "non"){ $ret .= "<div style='font-size: 120%; font-weigth: bold;'>".typo($titre)."</div>"; @@ -144,23 +147,26 @@ function retour_forum($id_rubrique, $id_parent, $id_article, $id_breve, $id_synd // Verifier mots associes au message $query_mots = "SELECT mots.* FROM spip_mots_forum AS lien, spip_mots AS mots WHERE id_forum='$id_message' AND mots.id_mot = lien.id_mot GROUP BY mots.id_mot"; $result_mots = spip_query($query_mots); - if (spip_num_rows($result_mots)>0) $ret .= "<p>"._T('forum_avez_selectionne'); - while ($row = spip_fetch_array($result_mots)) { - $id_mot = $row['id_mot']; - $type_mot = $row['type']; - $titre_mot = $row['titre']; - $les_mots[$id_mot] = true; - $presence_mots = true; - - $ret.= "<li class='font-size=80%'> $type_mot : <b>$titre_mot</b></li>"; + if (spip_num_rows($result_mots)>0) { + $ret .= "<p>"._T('forum_avez_selectionne')."</p>"; + $ret .= "<ul>"; + while ($row = spip_fetch_array($result_mots)) { + $id_mot = $row['id_mot']; + $type_mot = $row['type']; + $titre_mot = $row['titre']; + $les_mots[$id_mot] = true; + $presence_mots = true; + + $ret.= "<li class='font-size=80%'> $type_mot : <b>$titre_mot</b></li>\n"; + } + $ret .= "</ul>"; } - - $ret .= "\n<form action='$lien' name='formulaire' method='post'>"; + if (strlen($texte) < 10 AND !$presence_mots) { - $ret .= "<p align='right'><font color=red>"._T('forum_attention_dix_caracteres')."</font></p>\n"; + $ret .= "<p align='right' style='color: red;'>"._T('forum_attention_dix_caracteres')."</p>\n"; } else if (strlen($titre) < 3 AND $afficher_texte <> "non") { - $ret .= "<p align='right'><font color=red>"._T('forum_attention_trois_caracteres')."</font></p>\n"; + $ret .= "<p align='right' style='color: red;'><font color=\"red\">"._T('forum_attention_trois_caracteres')."</p>\n"; } else { $ret .= "\n<div align='right'><input type='submit' name='confirmer' class='spip_bouton' value='"._T('forum_message_definitif')."' /></div>"; @@ -197,6 +203,7 @@ function retour_forum($id_rubrique, $id_parent, $id_article, $id_breve, $id_synd $auteur = $GLOBALS['auteur_session']['nom']; $email_auteur = $GLOBALS['auteur_session']['email']; } + $lien = ereg_replace("\&", "&", $lien); $ret .= "\n<form action='$lien' name='formulaire' method='post'>"; } @@ -226,22 +233,23 @@ function retour_forum($id_rubrique, $id_parent, $id_article, $id_breve, $id_synd } else { $ret .= "\n<div class='spip_encadrer'><b>"._T('forum_titre')."</b><br />"; - $ret .= "\n<input type='text' CLASS='forml' name='titre' value=\"$titre\" size='40'></div>"; + $ret .= "\n<input type='text' class='forml' name='titre' value=\"$titre\" size='40' /></div>"; } - $ret .= "\n<input type='Hidden' name='id_message' value=\"$id_message\" />"; - $ret .= "\n<input type='Hidden' name='ajout_forum' value=\"oui\" />"; - $ret .= "\n<input type='Hidden' name='forum_id_rubrique' value=\"$id_rubrique\" />"; - $ret .= "\n<input type='Hidden' name='forum_id_parent' value=\"$id_parent\" />"; - $ret .= "\n<input type='Hidden' name='forum_id_article' value=\"$id_article\" />"; - $ret .= "\n<input type='Hidden' name='forum_id_breve' value=\"$id_breve\" />"; - $ret .= "\n<input type='Hidden' name='forum_id_syndic' value=\"$id_syndic\" />"; - $ret .= "\n<input type='Hidden' name='alea' value=\"$alea\" />"; - $ret .= "\n<input type='Hidden' name='hash' value=\"$hash\" />"; - $ret .= "\n<input type='Hidden' name='retour_forum' value=\"$retour\" />"; - - if ($new != "oui" AND $redac != "oui") $ret .= "\n<input type='Hidden' name='new' value=\"oui\" />"; - if ($new == "oui") $ret .= "\n<input type='Hidden' name='redac' value=\"oui\" />"; + $ret .= "\n<input type='hidden' name='id_message' value=\"$id_message\" />"; + $ret .= "\n<input type='hidden' name='ajout_forum' value=\"oui\" />"; + $ret .= "\n<input type='hidden' name='forum_id_rubrique' value=\"$id_rubrique\" />"; + $ret .= "\n<input type='hidden' name='forum_id_parent' value=\"$id_parent\" />"; + $ret .= "\n<input type='hidden' name='forum_id_article' value=\"$id_article\" />"; + $ret .= "\n<input type='hidden' name='forum_id_breve' value=\"$id_breve\" />"; + $ret .= "\n<input type='hidden' name='forum_id_syndic' value=\"$id_syndic\" />"; + $ret .= "\n<input type='hidden' name='alea' value=\"$alea\" />"; + $ret .= "\n<input type='hidden' name='hash' value=\"$hash\" />"; + $retour = ereg_replace("\&", "&", $retour); + $ret .= "\n<input type='hidden' name='retour_forum' value=\"$retour\" />"; + + if ($new != "oui" AND $redac != "oui") $ret .= "\n<input type='hidden' name='new' value=\"oui\" />"; + if ($new == "oui") $ret .= "\n<input type='hidden' name='redac' value=\"oui\" />"; if ($afficher_texte != "non"){ $ret .= "\n<br /><div class='spip_encadrer'><b>"._T('forum_texte')."</b><br />\n"; @@ -273,7 +281,7 @@ function retour_forum($id_rubrique, $id_parent, $id_article, $id_breve, $id_synd $result_groupe = spip_query($query_groupe); while ($row_groupe = spip_fetch_array($result_groupe)) { $id_groupe = $row_groupe['id_groupe']; - $titre_groupe = $row_groupe['titre']; + $titre_groupe = propre($row_groupe['titre']); $unseul_groupe = $row_groupe['unseul']; $query = "SELECT * FROM spip_mots WHERE id_groupe='$id_groupe'"; @@ -284,7 +292,7 @@ function retour_forum($id_rubrique, $id_parent, $id_article, $id_breve, $id_synd $ret .= "\n<p /><div class='spip_encadrer' style='font-size: 80%;'>"; $ret.= "<b>$titre_groupe :</b>"; - $ret .= "<table cellpadding=0 cellspacing=0 border=0 width='100%'>\n"; + $ret .= "<table cellpadding='0' cellspacing='0' border='0' width='100%'>\n"; $ret .= "<tr><td width='47%' valign='top'>"; $i = 0; @@ -292,30 +300,30 @@ function retour_forum($id_rubrique, $id_parent, $id_article, $id_breve, $id_synd $id_mot = $row['id_mot']; $titre_mot = propre($row['titre']); $type_mot = propre($row['type']); - $descriptif_mot = $row['descriptif']; + $descriptif_mot = propre($row['descriptif']); if ($i >= ($total_rows/2) AND $i < $total_rows){ $i = $total_rows + 1; - $ret .= "</font></td><td width='6%'> </td><td width='47%' valign='top'>"; + $ret .= "</td><td width='6%'> </td><td width='47%' valign='top'>"; } - if ($les_mots[$id_mot]) $checked = "checked"; + if ($les_mots[$id_mot]) $checked = "checked='checked'"; else $checked = ""; if ($unseul_groupe == 'oui'){ - $ret .= "<input type='radio' name='ajouter_mot[$id_groupe][]' value='$id_mot' $checked id='mot$id_mot'> "; + $ret .= "<input type='radio' name='ajouter_mot[$id_groupe][]' value='$id_mot' $checked id='mot$id_mot' /> "; } else { - $ret .= "<input type='checkbox' name='ajouter_mot[$id_groupe][]' value='$id_mot' $checked id='mot$id_mot'> "; + $ret .= "<input type='checkbox' name='ajouter_mot[$id_groupe][]' value='$id_mot' $checked id='mot$id_mot' /> "; } $ret .= afficher_petits_logos_mots($id_mot); - $ret .= "<B><label for='mot$id_mot'>$titre_mot</label></B><br>"; - if (strlen($descriptif_mot) > 0) $ret .= "$descriptif_mot<br>"; + $ret .= "<b><label for='mot$id_mot'>$titre_mot</label></b><br />"; + if (strlen($descriptif_mot) > 0) $ret .= "$descriptif_mot<br />"; $i++; } - $ret .= "</font></td></tr></table>"; + $ret .= "</td></tr></table>"; $ret .= "</div>"; } @@ -328,7 +336,7 @@ function retour_forum($id_rubrique, $id_parent, $id_article, $id_breve, $id_synd $ret .= "\n<br /><div class='spip_encadrer'>"._T('forum_lien_hyper')."<br />\n"; $ret .= _T('forum_page_url'); $ret .= "<br />\n"._T('forum_titre'); - $ret .= "<br />\n<input type='text' class='forml' name='nom_site_forum' value=\"".entites_html($nom_site_forum)."\" size='40'><br />"; + $ret .= "<br />\n<input type='text' class='forml' name='nom_site_forum' value=\"".entites_html($nom_site_forum)."\" size='40' /><br />"; if (!$url_site) $url_site = "http://"; $ret .= "\n"._T('forum_url'); diff --git a/inc-login.php3 b/inc-login.php3 index f55e0acddd90ecbe91b2c9c204e1605d8d0fc4c0..622b494ae59abbf74ea391e61ba7b9799d79fe41 100644 --- a/inc-login.php3 +++ b/inc-login.php3 @@ -41,12 +41,12 @@ function ouvre_login($titre='') { if ($titre) $retour .= "<h3 class='spip'>$titre</h3>"; - $retour .= '<font size="2" face="Verdana,arial,helvetica,sans-serif">'; + $retour .= '<div style="font-family: Verdana,arial,helvetica,sans-serif; font-size: 2;">'; return $retour; } function ferme_login() { - $retour = "</font>"; + $retour = "</div>"; $retour .= "</div>"; return $retour; } @@ -213,12 +213,12 @@ function login($cible = '', $prive = 'prive', $message_login='') { echo "<form name='form_login' action='$action' method='post'>\n"; echo "<div class='spip_encadrer'>"; - if ($erreur) echo "<font color=red><b>$erreur</b></font><p>"; + if ($erreur) echo "<span style='color:red;'><b>$erreur</b></span><p />"; echo "<label><b>"._T('login_login2')."</b><br></label>"; - echo "<input type='text' name='var_login' class='forml' value=\"\" size='40'>\n"; + echo "<input type='text' name='var_login' class='forml' value=\"\" size='40' />\n"; - echo "<input type='hidden' name='var_url' value='$url'>\n"; - echo "<div align='right'><input type='submit' class='spip_bouton' name='submit' value='"._T('bouton_valider')."'></div>\n"; + echo "<input type='hidden' name='var_url' value='$url' />\n"; + echo "<div align='right'><input type='submit' class='spip_bouton' name='submit' value='"._T('bouton_valider')."' /></div>\n"; echo "</div>"; echo "</form>"; } @@ -230,9 +230,9 @@ function login($cible = '', $prive = 'prive', $message_login='') { echo "<form action='spip_cookie.php3' method='get'>"; echo "<fieldset>\n<p>"; echo _T('login_preferez_refuser')." \n"; - echo "<input type='hidden' name='essai_auth_http' value='oui'> "; + echo "<input type='hidden' name='essai_auth_http' value='oui' /> "; $url = $cible->getUrl(); - echo "<input type='hidden' name='url' value='$url'>\n"; + echo "<input type='hidden' name='url' value='$url' />\n"; echo "<div align='right'><input type='submit' name='submit' class='spip_bouton' value='"._T('login_sans_cookiie')."'></div>\n"; echo "</fieldset></form>\n"; } diff --git a/sommaire-dist.html b/sommaire-dist.html index 37d3ac1a52c4c2e1c4e1c68f1935f10f4c3f671c..9e7b1c4d880799ce1448bd61006651d480b1ac34 100644 --- a/sommaire-dist.html +++ b/sommaire-dist.html @@ -148,7 +148,8 @@ <!-- Inscription au site --> - [<div class="formulaire"><:participer_site:><p> + [<div class="formulaire"><:participer_site:> + <br /><br /> (#FORMULAIRE_INSCRIPTION)</div>] </div>