From fd36550ddf8cdc7eed1526b36d369ef7a837aa5d Mon Sep 17 00:00:00 2001 From: "Committo,Ergo:sum" <esj@rezo.net> Date: Mon, 3 Jan 2005 21:45:41 +0000 Subject: [PATCH] =?UTF-8?q?Alt/title=20plus=20syst=C3=A9matiques=20et=20pr?= =?UTF-8?q?eparatoires=20aux=20traductions=20pour=20les=20icones=20de=20im?= =?UTF-8?q?g=5Fpack?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecrire/admin_index.php3 | 2 +- ecrire/admin_tech.php3 | 3 +- ecrire/articles.php3 | 19 +-- ecrire/articles_edit.php3 | 2 +- ecrire/articles_forum.php3 | 4 +- ecrire/articles_tous.php3 | 10 +- ecrire/auteur_infos.php3 | 4 +- ecrire/auteurs.php3 | 9 +- ecrire/inc_calendrier.php | 113 +++++++++--------- ecrire/inc_documents.php3 | 10 +- ecrire/inc_mots.php3 | 8 +- ecrire/inc_presentation.php3 | 193 +++++++++++++++++-------------- ecrire/inc_sites.php3 | 4 +- ecrire/inc_version.php3 | 2 +- ecrire/messagerie.php3 | 6 +- ecrire/statistiques_visites.php3 | 26 +++-- 16 files changed, 211 insertions(+), 204 deletions(-) diff --git a/ecrire/admin_index.php3 b/ecrire/admin_index.php3 index 74addf519c..bb75c7bf29 100644 --- a/ecrire/admin_index.php3 +++ b/ecrire/admin_index.php3 @@ -74,7 +74,7 @@ debut_cadre_relief(); function jauge($couleur,$pixels) { if ($pixels) - echo http_img_pack("jauge-$couleur.gif", "height='10' width='$pixels' alt='$couleur'"); + echo http_img_pack("jauge-$couleur.gif", $couleur, "height='10' width='$pixels'"); } echo "<table>"; diff --git a/ecrire/admin_tech.php3 b/ecrire/admin_tech.php3 index aa905059a7..2948116b8d 100644 --- a/ecrire/admin_tech.php3 +++ b/ecrire/admin_tech.php3 @@ -49,8 +49,7 @@ echo "<tr><td class='serif'>"; echo "\n<FORM ACTION='export_all.php3' METHOD='get'>"; echo "\n<p align='justify'>"; - -echo http_img_pack('warning.gif', 'alt="'._T('info_avertissement').'" width="48" height="48" align="right"'); +echo http_img_pack('warning.gif', _T('info_avertissement'), "width='48' height='48' align='right'"); echo _T('texte_admin_tech_01'); echo "<p>"._T('texte_admin_tech_02'); diff --git a/ecrire/articles.php3 b/ecrire/articles.php3 index f5c89bc61a..5b6e477daf 100644 --- a/ecrire/articles.php3 +++ b/ecrire/articles.php3 @@ -777,7 +777,7 @@ echo "</td>"; if ($flag_editable) { - echo "<td>". http_img_pack('rien.gif', "alt='' width=5") . "</td>\n"; + echo "<td>". http_img_pack('rien.gif', "", "width=5") . "</td>\n"; echo "<td align='center'>"; $flag_modif = false; @@ -1125,7 +1125,7 @@ if (spip_num_rows($result)) { else $vals[] = " "; if ($flag_editable AND ($connect_id_auteur != $id_auteur OR $connect_statut == '0minirezo') AND $options == 'avancees') { - $vals[] = "<A HREF='articles.php3?id_article=$id_article&supp_auteur=$id_auteur#auteurs'>"._T('lien_retirer_auteur')." ". http_img_pack('croix-rouge.gif', "alt='X' width='7' height='7' border='0' align='middle'") . "</A>"; + $vals[] = "<A HREF='articles.php3?id_article=$id_article&supp_auteur=$id_auteur#auteurs'>"._T('lien_retirer_auteur')." ". http_img_pack('croix-rouge.gif', "X", "width='7' height='7' border='0' align='middle'") . "</A>"; } else { $vals[] = ""; } @@ -1360,14 +1360,15 @@ if ((lire_meta('multi_articles') == 'oui') } - $vals[] = http_img_pack("puce-".puce_statut($statut_trad).'.gif', "alt='' width='7' height='7' border='0' NAME='statut'"); + $vals[] = http_img_pack("puce-".puce_statut($statut_trad).'.gif', "", "width='7' height='7' border='0' NAME='statut'"); if ($id_article_trad == $id_trad) { - $vals[] = http_img_pack('langues-12.gif', "width='12' height='12' alt='' border='0'"); + $vals[] = http_img_pack('langues-12.gif', "", "width='12' height='12' border='0'"); $titre_trad = "<b>$titre_trad</b>"; } else { - if ($connect_statut=='0minirezo') $vals[] = "<a href='articles.php3?id_article=$id_article&id_trad_old=$id_trad&id_trad_new=$id_article_trad'>". http_img_pack('langues-off-12.gif', "width='12' height='12' alt='' border='0'") . "</a>"; - else $vals[] = http_img_pack('langues-off-12.gif', "width='12' height='12' alt='' border='0'"); + if ($connect_statut=='0minirezo') $vals[] = "<a href='articles.php3?id_article=$id_article&id_trad_old=$id_trad&id_trad_new=$id_article_trad'>". + http_img_pack('langues-off-12.gif', "", "width='12' height='12' border='0'") . "</a>"; + else $vals[] = http_img_pack('langues-off-12.gif', "", "width='12' height='12' border='0'"); } $ret .= "</td>"; @@ -1420,7 +1421,7 @@ if ((lire_meta('multi_articles') == 'oui') echo "</form>"; echo "</td>\n"; echo "<td background='' width='10'> </td>"; - echo "<td background='" . _DIR_IMG_PACK . "tirets-separation.gif' width='2'>". http_img_pack('rien.gif', "alt='' width=2 height=2") . "</td>"; + echo "<td background='" . _DIR_IMG_PACK . "tirets-separation.gif' width='2'>". http_img_pack('rien.gif', "", "width=2 height=2") . "</td>"; echo "<td background='' width='10'> </td>"; } echo "<td>"; @@ -1428,7 +1429,7 @@ if ((lire_meta('multi_articles') == 'oui') echo "</td>"; if ($flag_editable AND $options == "avancees" AND $ret) { echo "<td background='' width='10'> </td>"; - echo "<td background='" . _DIR_IMG_PACK . "tirets-separation.gif' width='2'>". http_img_pack('rien.gif', "alt='' width=2 height=2") . "</td>"; + echo "<td background='" . _DIR_IMG_PACK . "tirets-separation.gif' width='2'>". http_img_pack('rien.gif', "", "width=2 height=2") . "</td>"; echo "<td background='' width='10'> </td>"; echo "<td>"; icone_horizontale(_T('trad_delier'), "articles.php3?id_article=$id_article&supp_trad=oui", "traductions-24.gif", "supprimer.gif"); @@ -1494,7 +1495,7 @@ if ($connect_statut == '0minirezo' AND acces_rubrique($rubrique_article)) { echo "<OPTION" . mySel("refuse", $statut_article) . " style='background-color: #FFA4A4'>"._T('texte_statut_refuse')."\n"; echo "</SELECT>"; - echo " ". http_img_pack("puce-".puce_statut($statut_article).'.gif', "alt='' border='0' NAME='statut'") . " "; + echo " ". http_img_pack("puce-".puce_statut($statut_article).'.gif', "", "border='0' NAME='statut'") . " "; // echo "<noscript><INPUT TYPE='submit' NAME='Modifier' VALUE='"._T('bouton_modifier')."' CLASS='fondo'></noscript>"; echo "<span class='visible_au_chargement' id='valider_statut'>"; diff --git a/ecrire/articles_edit.php3 b/ecrire/articles_edit.php3 index 56bea93a12..daf39b2efa 100644 --- a/ecrire/articles_edit.php3 +++ b/ecrire/articles_edit.php3 @@ -346,7 +346,7 @@ echo "<td>"; else icone(_T('icone_retour'), "articles.php3?id_article=$id_article", "article-24.gif", "rien.gif"); echo "</td>"; -echo "<td>". http_img_pack('rien.gif', "alt='' width=10") . "</td>\n"; +echo "<td>". http_img_pack('rien.gif', "", "width=10") . "</td>\n"; echo "<td width='100%'>"; echo _T('texte_modifier_article'); gros_titre($titre); diff --git a/ecrire/articles_forum.php3 b/ecrire/articles_forum.php3 index ff29f23290..23912f60be 100644 --- a/ecrire/articles_forum.php3 +++ b/ecrire/articles_forum.php3 @@ -50,7 +50,7 @@ echo "<td>"; icone(_T('icone_retour'), "articles.php3?id_article=$id_article", "article-24.gif", "rien.gif"); echo "</td>"; -echo "<td>" . http_img_pack('rien.gif', "width=10") ."</td>\n"; +echo "<td>" . http_img_pack('rien.gif', "", "width='10'") ."</td>\n"; echo "<td width='100%'>"; echo _T('texte_messages_publics'); gros_titre($titre); @@ -109,4 +109,4 @@ echo "</FONT>"; fin_page(); -?> \ No newline at end of file +?> diff --git a/ecrire/articles_tous.php3 b/ecrire/articles_tous.php3 index 15bdecd692..5556bf7a35 100644 --- a/ecrire/articles_tous.php3 +++ b/ecrire/articles_tous.php3 @@ -140,7 +140,7 @@ if ($aff_statut["prepa"]) { else { echo "<input type='checkbox' name='aff_art[]' value='prepa' id='prepa'>"; } - echo " <label for='prepa'>". http_img_pack('puce-blanche-breve.gif', "alt='' width='8' height='9' border='0'"); + echo " <label for='prepa'>". http_img_pack('puce-blanche-breve.gif', "", "width='8' height='9' border='0'"); echo " "._T('texte_statut_en_cours_redaction')."</label><BR>"; } @@ -152,7 +152,7 @@ if ($aff_statut["prop"]) { else { echo "<input type='checkbox' name='aff_art[]' value='prop' id='prop'>"; } - echo " <label for='prop'>". http_img_pack('puce-orange-breve.gif', "alt='' width='8' height='9' border='0'"); + echo " <label for='prop'>". http_img_pack('puce-orange-breve.gif', "", "width='8' height='9' border='0'"); echo " "._T('texte_statut_attente_validation')."</label><BR>"; } @@ -163,7 +163,7 @@ if ($aff_statut["publie"]) { else { echo "<input type='checkbox' name='aff_art[]' value='publie' id='publie'>"; } - echo " <label for='publie'>". http_img_pack('puce-verte-breve.gif', "alt='' width='8' height='9' border='0'"); + echo " <label for='publie'>". http_img_pack('puce-verte-breve.gif', "", "width='8' height='9' border='0'"); echo " "._T('texte_statut_publies')."</label><BR>"; } @@ -174,7 +174,7 @@ if ($aff_statut["refuse"]) { else { echo "<input type='checkbox' name='aff_art[]' value='refuse' id='refuse'>"; } - echo " <label for='refuse'>" . http_img_pack('puce-rouge-breve.gif', "alt='' width='8' height='9' border='0'"); + echo " <label for='refuse'>" . http_img_pack('puce-rouge-breve.gif', "", "width='8' height='9' border='0'"); echo " "._T('texte_statut_refuses')."</label><BR>"; } @@ -185,7 +185,7 @@ if ($aff_statut["poubelle"]) { else { echo "<input type='checkbox' name='aff_art[]' value='poubelle' id='poubelle'>"; } - echo " <label for='poubelle'>" . http_img_pack('puce-poubelle-breve.gif', "alt='' width='8' height='9' border='0'"); + echo " <label for='poubelle'>" . http_img_pack('puce-poubelle-breve.gif', "", "width='8' height='9' border='0'"); echo " "._T('texte_statut_poubelle')."</label>"; } diff --git a/ecrire/auteur_infos.php3 b/ecrire/auteur_infos.php3 index 6265108057..79c377fb4e 100644 --- a/ecrire/auteur_infos.php3 +++ b/ecrire/auteur_infos.php3 @@ -251,7 +251,7 @@ debut_droite(); if ($echec){ debut_cadre_relief(); - echo http_img_pack("warning.gif", 'alt="'._T('info_avertissement').'" width="48" height="48" align="left"'); + echo http_img_pack("warning.gif", _T('info_avertissement'), "width='48' height='48' align='left'"); echo "<font color='red'>$echec <p>"._T('info_recommencer')."</font>"; fin_cadre_relief(); echo "<p>"; @@ -352,7 +352,7 @@ debut_cadre_relief("base-24.gif"); // Avertissement en cas de modifs de ses propres donnees if (($edit_login OR $edit_pass) AND $connect_id_auteur == $id_auteur) { debut_cadre_enfonce(); - echo http_img_pack("warning.gif", 'alt="'._T('info_avertissement').'" width="48" height="48" align="right"'); + echo http_img_pack("warning.gif", _T('info_avertissement'), "width='48' height='48' align='right'"); echo "<b>"._T('texte_login_precaution')."</b>\n"; fin_cadre_enfonce(); echo "<p>"; diff --git a/ecrire/auteurs.php3 b/ecrire/auteurs.php3 index d2ee91a068..f566b24c45 100644 --- a/ecrire/auteurs.php3 +++ b/ecrire/auteurs.php3 @@ -218,11 +218,10 @@ debut_cadre_relief('auteur-24.gif'); echo "<TABLE BORDER=0 CELLPADDING=2 CELLSPACING=0 WIDTH='100%' class='arial2' style='border: 1px solid #aaaaaa;'>\n"; echo "<tr bgcolor='#DBE1C5'>"; echo "<td width='20'>"; - $img = "<img src='" . _DIR_IMG_PACK . "admin-12.gif' alt='' border='0'>"; - if ($tri=='statut') - echo $img; - else - echo "<a href='auteurs.php3?tri=statut' title='"._T('lien_trier_statut')."'>$img</a>"; +if ($tri=='statut') + echo http_img_pack('admin-12.gif','', "border='0'"); + else + echo http_href_img('auteurs.php3?tri=statut','admin-12.gif', "border='0'", _T('lien_trier_statut')); echo "</td><td>"; if ($tri == '' OR $tri=='nom') diff --git a/ecrire/inc_calendrier.php b/ecrire/inc_calendrier.php index 1f4642a6a8..3ac54439cd 100644 --- a/ecrire/inc_calendrier.php +++ b/ecrire/inc_calendrier.php @@ -27,9 +27,9 @@ if ($GLOBALS['set_partie_cal']) { global $bleu, $vert, $jaune; -$bleu = "<img src='" . _DIR_IMG_PACK . "/m_envoi_bleu$spip_lang_rtl.gif' alt='B' width='14' height='7' border='0' />"; -$vert = "<img src='" . _DIR_IMG_PACK . "/m_envoi$spip_lang_rtl.gif' alt='V' width='14' height='7' border='0' />"; -$jaune= "<img src='" . _DIR_IMG_PACK . "/m_envoi_jaune$spip_lang_rtl.gif' alt='J' width='14' height='7' border='0' />"; +$bleu = http_img_pack("m_envoi_bleu$spip_lang_rtl.gif", 'B', "width='14' height='7' border='0'"); +$vert = http_img_pack("m_envoi$spip_lang_rtl.gif", 'V', "width='14' height='7' border='0'"); +$jaune= http_img_pack("m_envoi_jaune$spip_lang_rtl.gif", 'J', "width='14' height='7' border='0'"); // Conversion en HTML d'un tableau de champ ics // Le champ URL devient une balise a href=URL entourant les champs SUMMARY et DESC @@ -135,7 +135,7 @@ function http_calendrier_aujourdhui_et_aide($now, $texte, $href) (($now) ? '' : ("<a href='$href' class='cellule-h'>" . "<table cellpadding='0'><tr>\n" . - "<td>" . http_img_pack("calendrier-24.gif", "alt=''") . "</td>\n" . + "<td>" . http_img_pack("calendrier-24.gif", "", "") . "</td>\n" . "<td>" . _T("info_aujourdhui")."<br />". $texte . "</td></tr></table></a>\n")) . @@ -244,31 +244,24 @@ function http_calendrier_navigation($jour, $mois, $annee, $echelle, $nom, $retour = "<div class='navigation-calendrier'>"; $retour .= http_href($script . "type=$type&echelle=$echelle&$args_pred$ancre", - "<img\nsrc='" . _DIR_IMG_PACK . "/fleche-$spip_lang_left.png' class='format_png' alt='<<<' width='12' height='12' />", - 'précédent'); + http_img_pack("fleche-$spip_lang_left.png", '<<<', "class='format_png' width='12' height='12'"), + _L('précédent')); $retour .= " "; $retour .= "<b>$nom</b>"; $retour .= " "; $retour .= http_href(($script . "type=$type&echelle=$echelle&$args_suiv$ancre"), - "<img\nsrc='" . _DIR_IMG_PACK . "/fleche-$spip_lang_right.png' class='format_png' alt='>>>' width='12' height='12' />", - 'suivant'); + http_img_pack("fleche-$spip_lang_right.png", '>>>', "class='format_png' width='12' height='12'"), + _L('suivant')); $retour .= " "; - - + $img_att = ($type == 'jour') ? " class='navigation-bouton-desactive'" : ''; - $retour .= http_href(($script . "type=jour&echelle=$echelle&$args"), - ("<img\nsrc='" . _DIR_IMG_PACK . "/cal-jour.gif' alt='jour' $img_att />"), - 'calendrier par jour'); - ($type == 'semaine') ? $img_att = " class='navigation-bouton-desactive'" : $img_att = "" ; - $retour .= http_href($script . "type=semaine&echelle=$echelle&$args", - ("<img\nsrc='" . _DIR_IMG_PACK . "/cal-semaine.gif' alt='semaine' $img_att />"), - 'calendrier par semaine'); - ($type == 'mois') ? $img_att = " class='navigation-bouton-desactive'" : $img_att = "" ; - $retour .= http_href($script . "type=mois&echelle=$echelle&$args", - ("<img\nsrc='" . _DIR_IMG_PACK . "/cal-mois.gif' alt='mois' $img_att />"), - 'calendrier par mois'); + $retour .= http_href_img(($script . "type=jour&echelle=$echelle&$args"),"cal-jour.gif", $img_att, _L('calendrier par jour')); + $img_att = ($type == 'semaine') ? " class='navigation-bouton-desactive'" : "" ; + $retour .= http_href_img($script . "type=semaine&echelle=$echelle&$args", "cal-semaine.gif", $img_att, _L('calendrier par semaine')); + $img_att = ($type == 'mois') ? " class='navigation-bouton-desactive'" : "" ; + $retour .= http_href_img($script . "type=mois&echelle=$echelle&$args","cal-mois.gif", $img_att, _L('calendrier par mois')); $retour .= " "; @@ -282,52 +275,52 @@ function http_calendrier_navigation($jour, $mois, $annee, $echelle, $nom, if ($type == 'mois') $condition = ($annee == $annee_today && $mois == $mois_today); else $condition = ($annee == $annee_today && $mois == $mois_today && $jour == $jour_today); - $condition ? $img_att = " class='navigation-bouton-desactive'" : $img_att = "" ; - $retour .= "<span onMouseOver=\"montrer('nav_agenda');\">"; - $retour .= http_href($script . "type=$type&echelle=$echelle&$arguments", - ("<img\nsrc='" . _DIR_IMG_PACK . "/cal-today.gif' alt=\"aujourd\'hui\" $img_att />"), - 'aujourd\'hui'); + $retour .= http_href_img($script . "type=$type&echelle=$echelle&$arguments", + "cal-today.gif", + $condition ? " class='navigation-bouton-desactive'" : "", + _L("aujourd'hui")); $retour .= "</span>"; if ($type != "mois") { $retour .= " "; - $retour .= http_href($script . "type=$type&set_echelle=" . - floor($echelle * 1.5) . "&$args", - "<img\nsrc='" . _DIR_IMG_PACK . "/loupe-moins.gif' alt='zoom-' />"); - $retour .= http_href(($script . "type=$type&set_echelle=" . - floor($echelle / 1.5) . - "&$args"), - "<img\nsrc='" . _DIR_IMG_PACK . "/loupe-plus.gif' alt='zoom+' />"); - + $retour .= http_href_img(($script . "type=$type&set_echelle=" . + floor($echelle * 1.5) . "&$args"), + "loupe-moins.gif", + '', + _L('zoom'). '-'); + $retour .= http_href_img(($script . "type=$type&set_echelle=" . + floor($echelle / 1.5) . "&$args"), + "loupe-plus.gif", + '', + _L('zoom'). '+'); $retour .= " "; - - + if ($GLOBALS['partie_cal'] == "tout") $img_att = " class='navigation-bouton-desactive'"; else $img_att = ""; - $retour .= "<span$img_att>".http_href(($script . "type=$type". - "&set_partie_cal=tout" . - "&$args"), - "<img\nsrc='" . _DIR_IMG_PACK . "/heures-tout.png' width='13' height='13' alt='tout' class='format_png' />") . "</span>"; + $retour .= "<span$img_att>" + .http_href_img(($script . "type=$type&set_partie_cal=tout&$args"), + "heures-tout.png", "width='13' height='13' class='format_png'", _L('jour entier')) . "</span>"; if ($GLOBALS['partie_cal'] == "matin") $img_att = " class='navigation-bouton-desactive'"; else $img_att = ""; - $retour .= "<span$img_att>".http_href(($script . "type=$type". - "&set_partie_cal=matin" . - "&$args"), - "<img\nsrc='" . _DIR_IMG_PACK . "/heures-am.png' width='13' height='13' alt='AM' class='format_png' />") . "</span>"; + $retour .= "<span$img_att>" + .http_href_img(($script . "type=$type&set_partie_cal=matin&$args"), + "heures-am.png", + "width='13' height='13' class='format_png'", + _L('matin')) + . "</span>"; if ($GLOBALS['partie_cal'] == "soir") $img_att = " class='navigation-bouton-desactive'"; else $img_att = ""; - $retour .= "<span$img_att>".http_href(($script . "type=$type". - "&set_partie_cal=soir" . - "&$args"), - "<img\nsrc='" . _DIR_IMG_PACK . "/heures-pm.png' width='13' height='13' alt='PM' class='format_png' />") . "</span>"; + $retour .= "<span$img_att>" + .http_href_img(($script . "type=$type&set_partie_cal=soir&$args"), + "heures-pm.png", + "width='13' height='13' class='format_png'", + _L('après-midi')) + . "</span>"; } - - - $gadget = "<div id='nav_agenda' onMouseOver=\"montrer('nav_agenda');\" onMouseOut=\"cacher('nav_agenda');\" style='position: relative; visibility: hidden;z-index: 1000; '><div style='position: absolute; padding: 5px; background-color: $couleur_claire; margin-bottom: 5px; -moz-border-radius-bottomleft: 8px; -moz-border-radius-bottomright: 8px;'>"; //$gadget .= "<a href='calendrier_semaine.php3' class='lien_sous'>"; //$gadget .= _T('icone_agenda'); @@ -352,7 +345,7 @@ function http_calendrier_navigation($jour, $mois, $annee, $echelle, $nom, } $gadget .= "</td>"; $gadget .= "</tr>"; - $gadget .= "<tr>"; + $gadget .= "\n<tr>"; $gadget .= "<td valign='top' width='33%'>"; $gadget .= http_calendrier_agenda($mois-1, $annee, $jour, $mois, $annee, $GLOBALS['afficher_bandeau_calendrier_semaine']) ; $gadget .= "</td><td valign='top' width='33%'>"; @@ -361,7 +354,7 @@ function http_calendrier_navigation($jour, $mois, $annee, $echelle, $nom, $gadget .= http_calendrier_agenda($mois+1, $annee, $jour, $mois, $annee, $GLOBALS['afficher_bandeau_calendrier_semaine']) ; $gadget .= "</td>"; $gadget .= "</tr>"; - $gadget .= "<tr><td colspan='3' style='text-align:$spip_lang_right;'>"; + $gadget .= "\n<tr><td colspan='3' style='text-align:$spip_lang_right;'>"; for ($i=$mois+2; $i <= 12; $i++) { $gadget .= http_href("calendrier.php3?mois=$i&annee=$annee", nom_mois("$annee-$i-1"),'','', 'calendrier-annee'); @@ -492,7 +485,7 @@ function http_calendrier_les_jours($intitul, $claire, $foncee) round(100/$nb) . "%; padding: 3px; color: black; text-align: center; background-color: $claire; font-family: Verdana, Arial, Sans, sans-serif; font-size: 10px;'"; foreach($intitul as $j) $r .= "\n\t<td $bo><b>$j</b></td>"; - return "<tr>$r\n</tr>"; + return "\n<tr>$r\n</tr>"; } # dispose les lignes d'un calendrier de 7 colonnes (les jours) @@ -842,7 +835,7 @@ function http_calendrier_image_et_typo($evenements) $i = 'puce-verte-breve.gif'; else $i = 'puce-blanche-breve.gif'; - $v['SUMMARY'] = http_img_pack($i, "alt='.' width='8' height='9' border='0'"); + $v['SUMMARY'] = http_img_pack($i, ".", "width='8' height='9' border='0'"); $v['DESCRIPTION'] = typo($v['DESCRIPTION']); } $res[$k] = $v; @@ -1295,7 +1288,7 @@ function http_calendrier_ical($id) { "<div class='verdana1'>"._T("calendrier_synchro") . "<a href='$lien' class='cellule-h'><table cellpadding='0' valign='middle'><tr>\n" . "<td><a href='$lien'><div class='cell-i'>" - . http_img_pack($fonction, http_style_background($fond, "background-repeat: no-repeat; background-position: center center;' alt=''")) + . http_img_pack($fonction, '', http_style_background($fond, "background-repeat: no-repeat; background-position: center center;")) . "</div></a></td>\n" . "<td class='cellule-h-lien'><a href='$lien' class='cellule-h'>$texte</a></td>\n" . "</tr></table></a>\n" ."</div>" . @@ -1332,9 +1325,9 @@ function http_calendrier_rv($messages, $type) { $total .= "<tr><td width='24' valign='middle'>" . http_href($url, ($rv ? - http_img_pack("rv.gif", - http_style_background($bouton . '.gif', "no-repeat;' border='0' alt=''")) : - http_img_pack("$bouton.gif", "border='0' alt=''")), + http_img_pack("rv.gif", '', + http_style_background($bouton . '.gif', "no-repeat;' border='0'")) : + http_img_pack("$bouton.gif", '', "border='0'")), '', '') . "</td>" . "<td valign='middle'>" . @@ -1692,6 +1685,4 @@ function calendrier_div_style($evenement) return array($contrastes[$i][$b], $contrastes[$i][$f]); } } - - ?> diff --git a/ecrire/inc_documents.php3 b/ecrire/inc_documents.php3 index 695f34c017..619640deec 100644 --- a/ecrire/inc_documents.php3 +++ b/ecrire/inc_documents.php3 @@ -563,7 +563,7 @@ function afficher_documents_non_inclus($id_article, $type = "article", $flag_mod $link->addVar('doc_supp', $id_vignette); echo "<div style='float: $spip_lang_left'>"; - echo "<a href='".$link->getUrl("porfolio")."' title=\""._T('info_supprimer_vignette')."\" class='bouton_rotation'>" . http_img_pack('croix-rouge.gif', "border='0'") ."</a>"; + echo "<a href='".$link->getUrl("porfolio")."' title=\""._T('info_supprimer_vignette')."\" class='bouton_rotation'>" . http_img_pack('croix-rouge.gif', "", "border='0'") ."</a>"; echo "</div>"; $vignette_perso = true; @@ -584,7 +584,7 @@ function afficher_documents_non_inclus($id_article, $type = "article", $flag_mod $link_rot->addVar('doc_rotate', $id_document); $link_rot->addVar('vignette_aff', $id_document); $link_rot->addVar('var_rot', -90); - echo "<a href='".$link_rot->getUrl("portfolio")."' class='bouton_rotation'>" . http_img_pack('tourner-gauche.gif', "border='0'") ."</a>"; + echo http_href_img($link_rot->getUrl("portfolio"), 'tourner-gauche.gif', "border='0'", "tourner-gauche", '', 'bouton_rotation'); echo "<br />"; $link_rot = $image_link; $link_rot->addVar('redirect', $redirect_url); @@ -593,7 +593,7 @@ function afficher_documents_non_inclus($id_article, $type = "article", $flag_mod $link_rot->addVar('doc_rotate', $id_document); $link_rot->addVar('vignette_aff', $id_document); $link_rot->addVar('var_rot', 90); - echo "<a href='".$link_rot->getUrl("portfolio")."' class='bouton_rotation'>" . http_img_pack('tourner-droite.gif', "border='0'") ."</a>"; + echo http_href_img($link_rot->getUrl("portfolio"), 'tourner-droite.gif', "border='0'", "tourner-droite", '', 'bouton_rotation'); echo "<br />"; $link_rot = $image_link; @@ -603,7 +603,7 @@ function afficher_documents_non_inclus($id_article, $type = "article", $flag_mod $link_rot->addVar('doc_rotate', $id_document); $link_rot->addVar('vignette_aff', $id_document); $link_rot->addVar('var_rot', 180); - echo "<a href='".$link_rot->getUrl("portfolio")."' class='bouton_rotation'>" . http_img_pack('tourner-180.gif', "border='0'") ."</a>"; + echo http_href_img($link_rot->getUrl("portfolio"), 'tourner-180.gif', "border='0'", "tourner-180", '', 'bouton_rotation'); echo "</div>"; } } @@ -818,7 +818,7 @@ function afficher_documents_non_inclus($id_article, $type = "article", $flag_mod $link->addVar('doc_supp', $id_vignette); echo "<div style='float: $spip_lang_left'>"; - echo "<a href='".$link->getUrl("porfolio")."' title=\""._T('info_supprimer_vignette')."\" class='bouton_rotation'>" . http_img_pack('croix-rouge.gif', "border='0'") ."</a>"; + echo "<a href='".$link->getUrl("porfolio")."' title=\""._T('info_supprimer_vignette')."\" class='bouton_rotation'>" . http_img_pack('croix-rouge.gif', "", "border='0'") ."</a>"; echo "</div>"; $vignette = spip_fetch_array(spip_query("SELECT * FROM spip_documents WHERE id_document = $id_vignette"));; diff --git a/ecrire/inc_mots.php3 b/ecrire/inc_mots.php3 index d50c192753..0747678f8d 100644 --- a/ecrire/inc_mots.php3 +++ b/ecrire/inc_mots.php3 @@ -306,7 +306,7 @@ function formulaire_mots($table, $id_objet, $nouv_mot, $supp_mot, $cherche_mot, $url = "mots_edit.php3?id_mot=$id_mot&redirect=".rawurlencode($url_base.'#mots'); - $vals[] = "<A HREF='$url'>" . http_img_pack('petite-cle.gif', "alt='' width='23' height='12' border='0'") ."</A>"; + $vals[] = "<A HREF='$url'>" . http_img_pack('petite-cle.gif', "", "width='23' height='12' border='0'") ."</A>"; // Changer @@ -343,7 +343,7 @@ function formulaire_mots($table, $id_objet, $nouv_mot, $supp_mot, $cherche_mot, if ($flag_editable){ $s = ""; if ($flag_groupe) - $s .= "<A HREF=\"$url_base&supp_mot=$id_mot#mots\">"._T('info_retirer_mot')." " . http_img_pack('croix-rouge.gif', "alt='X' width='7' height='7' border='0' align='middle'") ."</A>"; + $s .= "<A HREF=\"$url_base&supp_mot=$id_mot#mots\">"._T('info_retirer_mot')." " . http_img_pack('croix-rouge.gif', "X", "width='7' height='7' border='0' align='middle'") ."</A>"; else $s .= " "; } $vals[] = $s; @@ -473,14 +473,14 @@ if (triangle) triangle.src = '" . _DIR_IMG_PACK . "deplierbas$spip_lang_rtl.gif' echo "<SELECT NAME='nouv_mot' SIZE='1' onChange=\"setvisibility('valider_groupe_$id_groupe', 'visible');\" STYLE='width: 180px; ' CLASS='fondl'>"; $ifond == 0; - echo "<OPTION VALUE='x' style='font-variant: small-caps;'>$titre_groupe"; + echo "\n<option value='x' style='font-variant: small-caps;'>$titre_groupe</option>"; while($row = spip_fetch_array($result)) { $id_mot = $row['id_mot']; $titre_mot = $row['titre']; $texte_option = entites_html(textebrut(typo($titre_mot))); echo "\n<OPTION VALUE=\"$id_mot\">"; echo " "; - echo $texte_option; + echo "$texte_option</option>"; } echo "</SELECT>"; echo "</td>\n<td>"; diff --git a/ecrire/inc_presentation.php3 b/ecrire/inc_presentation.php3 index b67a3b0293..d28d3967cc 100644 --- a/ecrire/inc_presentation.php3 +++ b/ecrire/inc_presentation.php3 @@ -20,11 +20,10 @@ function aide($aide='') { return " <a class='aide' href=\"". _DIR_RESTREINT . "aide_index.php3?aide=$aide&var_lang=$spip_lang\" target=\"spip_aide\" ". "onclick=\"javascript:window.open(this.href, 'spip_aide', 'scrollbars=yes, ". - "resizable=yes, width=740, height=580'); return false;\"> -<img ". - "src=\"". _DIR_IMG_PACK . "aide.gif\" alt=\""._T('info_image_aide')."\" ". - "title=\""._T('titre_image_aide')."\" width=\"12\" height=\"12\" border=\"0\" ". - "align=\"middle\"></a>"; + "resizable=yes, width=740, height=580'); return false;\">" . + http_img_pack("aide.gif" ,_T('info_image_aide'), + "title=\""._T('titre_image_aide')."\" width=\"12\" height=\"12\" border=\"0\" align=\"middle\"") . + "</a>"; } @@ -59,7 +58,7 @@ function bouton_imessage($destinataire, $row = '') { if ($destinataire) $title = _T('info_envoyer_message_prive'); else $title = _T('info_ecire_message_prive'); - $texte_bouton = http_img_pack("m_envoi$spip_lang_rtl.gif", "width='14' height='7' border='0' alt='m>' title='$title'"); + $texte_bouton = http_img_pack("m_envoi$spip_lang_rtl.gif", "m>", "width='14' height='7' border='0' title='$title'"); $ret .= "<a href='". $url->getUrl() ."' title=\"$title\">"; @@ -112,10 +111,10 @@ function debut_cadre($style, $icone = "", $fonction = "", $titre = "") { $ret .= "<div style='position: absolute; top: -16px; $spip_lang_left: 10px;'>"; if ($fonction) { $ret .= "<div " . http_style_background($icone, "no-repeat; padding: 0px; margin: 0px;'"); - $ret .= http_img_pack($fonction, "alt=''"); + $ret .= http_img_pack($fonction, "", ""); $ret .= "</div>"; } - else $ret .= http_img_pack("$icone", "alt=''"); + else $ret .= http_img_pack("$icone", "", ""); $ret .= "</div>"; $style_cadre = " style='position: relative; top: 15px; margin-bottom: 14px;'"; @@ -332,11 +331,11 @@ function bandeau_titre_boite($titre, $afficher_auteurs, $boite_importante = true echo "<B>$titre</B></FONT></TD>"; if ($afficher_auteurs){ echo "<TD WIDTH='100'>"; - echo http_img_pack("rien.gif", "alt='' width='100' height='12' border='0'"); + echo http_img_pack("rien.gif", "", "width='100' height='12' border='0'"); echo "</TD>"; } echo "<TD WIDTH='90'>"; - echo http_img_pack("rien.gif", "alt='' width='90' height='12' border='0'"); + echo http_img_pack("rien.gif", "", "width='90' height='12' border='0'"); echo "</TD>"; echo "</TR>"; } @@ -351,7 +350,7 @@ function bandeau_titre_boite2($titre, $logo="", $fond="white", $texte="black", $ if (strlen($logo) > 0 AND $spip_display != 1 AND $spip_display != 4) { $retour .= "<div style='position: relative;'>"; $retour .= "<div style='position: absolute; top: -12px; $spip_lang_left: 3px;'>" . - http_img_pack("$logo", "alt=''") . "</div>"; + http_img_pack("$logo", "", "") . "</div>"; $retour .= "<div style='background-color: $fond; color: $texte; padding: 3px; padding-$spip_lang_left: 30px; border-bottom: 1px solid #444444;' class='verdana2'><b>$titre</b></div>"; $retour .= "</div>"; @@ -401,10 +400,10 @@ function afficher_plus($lien) { if ($options == "avancees" AND $spip_display != 4) { if ($browser_name == "MSIE") return "<a href='$lien'>" . - http_img_pack("plus.gif", "alt='+' border='0'"). "</a> "; + http_img_pack("plus.gif", "+", "border='0'"). "</a> "; else return "<div style='float:$spip_lang_right; padding-top: 2px;'><a href='$lien'>" . - http_img_pack("plus.gif", "border='0'") ."</a></div>"; + http_img_pack("plus.gif", "+", "border='0'") ."</a></div>"; } } @@ -577,27 +576,31 @@ function puce_statut_article($id_article, $statut) { $puce = "puce-$puce.gif"; if ($connect_statut == '0minirezo' AND $options == 'avancees') { - - if ($browser_name == "MSIE") $alt = "alt"; - else $alt = "title"; - + // les versions de MSIE ne font pas toutes pareil sur alt/title + // la combinaison suivante semble ok pour tout le monde. + $titles = array( + "blanche" => _T('texte_statut_en_cours_redaction'), + "orange" => _T('texte_statut_propose_evaluation'), + "verte" => _T('texte_statut_publie'), + "rouge" => _T('texte_statut_refuse'), + "poubelle" => _T('texte_statut_poubelle')); $inser_puce = "<div class='puce_article' id='statut$id_article'$dir_lang>" . "<div class='puce_article_fixe' onmouseover=\"montrer('statutdecal$id_article');\">" . - http_img_pack("$puce", "id='imgstatut$id_article' border='0' style='margin: 1px;'") ."</div>" + http_img_pack("$puce", "", "id='imgstatut$id_article' border='0' style='margin: 1px;'") ."</div>" . "<div class='puce_article_popup' id='statutdecal$id_article' onmouseout=\"cacher('statutdecal$id_article');\" style=' margin-left: -".((11*$clip)+1)."px;'>" . "<a onmouseover=\"montrer('statutdecal$id_article');\" href=\"javascript:selec_statut_art($id_article, 0, 'prepa');\">" . - http_img_pack("puce-blanche.gif", "$alt=\""._T('texte_statut_en_cours_redaction')."\""). "</a>" + http_img_pack("puce-blanche.gif", "", "title='$titles[blanche]'"). "</a>" . "<a onmouseover=\"montrer('statutdecal$id_article');\" href=\"javascript:selec_statut_art($id_article, 1, 'prop');\">" . - http_img_pack("puce-orange.gif", "$alt=\""._T('texte_statut_propose_evaluation')."\"") . "</a>" + http_img_pack("puce-orange.gif", "", "title='$titles[orange]'") . "</a>" . "<a onmouseover=\"montrer('statutdecal$id_article');\" href=\"javascript:selec_statut_art($id_article, 2, 'publie');\">" . - http_img_pack("puce-verte.gif", "$alt=\""._T('texte_statut_publie')."\"")."</a>" + http_img_pack("puce-verte.gif", "", "title='$titles[verte]'")."</a>" . "<a onmouseover=\"montrer('statutdecal$id_article');\" href=\"javascript:selec_statut_art($id_article, 3, 'refuse');\">" . - http_img_pack("puce-rouge.gif", "$alt=\""._T('texte_statut_refuse')."\""). "</a>" + http_img_pack("puce-rouge.gif", "", "title='$titles[rouge]'"). "</a>" . "<a onmouseover=\"montrer('statutdecal$id_article');\" href=\"javascript:selec_statut_art($id_article, 4, 'poubelle');\">" . - http_img_pack("puce-poubelle.gif", "$alt=\""._T('texte_statut_poubelle')."\""). "</a>" + http_img_pack("puce-poubelle.gif", "", "title='$titles[poubelle]'"). "</a>" . "</div></div>"; } else { - $inser_puce = http_img_pack("$puce", "id='imgstatut$id_article' border='0' style='margin: 1px;'"); + $inser_puce = http_img_pack("$puce", "", "id='imgstatut$id_article' border='0' style='margin: 1px;'"); } return $inser_puce; } @@ -628,22 +631,22 @@ function puce_statut_breve($id_breve, $statut) { if ($connect_statut == '0minirezo' AND $options == 'avancees') { - if ($browser_name == "MSIE") $alt = "alt"; - else $alt = "title"; - + // les versions de MSIE ne font pas toutes pareil sur alt/title + // la combinaison suivante semble ok pour tout le monde. + $inser_puce = "<div class='puce_breve' id='statutbreve$id_breve'$dir_lang>" . "<div class='puce_breve_fixe' onmouseover=\"montrer('statutdecalbreve$id_breve');\">" . - http_img_pack("$puce", "id='imgstatutbreve$id_breve' border='0' style='margin: 1px;'"). "</div>" + http_img_pack("$puce", "", "id='imgstatutbreve$id_breve' border='0' style='margin: 1px;'"). "</div>" . "<div class='puce_breve_popup' id='statutdecalbreve$id_breve' onmouseout=\"cacher('statutdecalbreve$id_breve');\" style=' margin-left: -".((9*$clip)+1)."px;'>" . "<a onmouseover=\"montrer('statutdecalbreve$id_breve');\" href=\"javascript:selec_statut_breve($id_breve, 0, 'prop');\">" . - http_img_pack("puce-orange-breve.gif", "$alt=\""._T('texte_statut_propose_evaluation')."\"") . "</a>" + http_img_pack("puce-orange-breve.gif", "", "title=\""._T('texte_statut_propose_evaluation')."\"") . "</a>" . "<a onmouseover=\"montrer('statutdecalbreve$id_breve');\" href=\"javascript:selec_statut_breve($id_breve, 1, 'publie');\">" . - http_img_pack("puce-verte-breve.gif", "$alt=\""._T('texte_statut_publie')."\""). "</a>" + http_img_pack("puce-verte-breve.gif", "", "title=\""._T('texte_statut_publie')."\""). "</a>" . "<a onmouseover=\"montrer('statutdecalbreve$id_breve');\" href=\"javascript:selec_statut_breve($id_breve, 2, 'refuse');\">" . - http_img_pack("puce-rouge-breve.gif", "$alt=\""._T('texte_statut_refuse')."\""). "</a>" + http_img_pack("puce-rouge-breve.gif", "", "title=\""._T('texte_statut_refuse')."\""). "</a>" . "</div></div>"; } else { - $inser_puce = http_img_pack("$puce", "id='imgstatut$id_article' border='0' style='margin: 1px;'"); + $inser_puce = http_img_pack("$puce", "", "id='imgstatut$id_article' border='0' style='margin: 1px;'"); } return $inser_puce; } @@ -750,7 +753,7 @@ function afficher_articles($titre_table, $requete, $afficher_visites = false, $a $s = "<div>"; if (acces_restreint_rubrique($id_rubrique)) - $s .= http_img_pack("admin-12.gif", "alt='' width='12' height='12' title='"._T('titre_image_admin_article')."'") . " "; + $s .= http_img_pack("admin-12.gif", "", "width='12' height='12' title='"._T('titre_image_admin_article')."'") . " "; $s .= "<a href=\"articles.php3?id_article=$id_article\"$descriptif$dir_lang style=\"display:block;\">"; if ($spip_display != 1 AND $spip_display != 4 AND lire_meta('image_process') != "non") { @@ -995,7 +998,7 @@ function afficher_rubriques($titre_table, $requete) { else $puce = "rubrique-12.gif"; $s = "<b><a href=\"naviguer.php3?id_rubrique=$id_rubrique\">"; - $s .= http_img_pack($puce, "alt=\"- \" border=\"0\""); + $s .= http_img_pack($puce, '- ', "border='0'"); $s .= typo($titre); $s .= "</A></b>"; $vals[] = $s; @@ -1027,19 +1030,19 @@ function bonhomme_statut($row) { switch($row['statut']) { case "0minirezo": - $image = http_img_pack("admin-12.gif", "alt='' title='"._T('titre_image_administrateur')."' border='0'"); + $image = http_img_pack("admin-12.gif", "", "title='"._T('titre_image_administrateur')."' border='0'"); break; case "1comite": if ($connect_statut == '0minirezo' AND ($row['source'] == 'spip' AND !($row['pass'] AND $row['login']))) - $image = http_img_pack("visit-12.gif", "alt='' title='"._T('titre_image_redacteur')."' border='0'"); + $image = http_img_pack("visit-12.gif", "", "title='"._T('titre_image_redacteur')."' border='0'"); else - $image = http_img_pack("redac-12.gif", "alt='' title='"._T('titre_image_redacteur_02')."' border='0'"); + $image = http_img_pack("redac-12.gif", "", "title='"._T('titre_image_redacteur_02')."' border='0'"); break; case "5poubelle": - $image = http_img_pack("poubelle.gif", "alt='' title='"._T('titre_image_auteur_supprime')."' border='0'"); + $image = http_img_pack("poubelle.gif", "", "title='"._T('titre_image_auteur_supprime')."' border='0'"); break; case "6forum": - $image = http_img_pack("visit-12.gif", "alt='' title='"._T('titre_image_visiteur')."' border='0'"); + $image = http_img_pack("visit-12.gif", "", "title='"._T('titre_image_visiteur')."' border='0'"); break; case "nouveau": default: @@ -1189,7 +1192,7 @@ function afficher_messages($titre_table, $query_message, $afficher_auteurs = tru break; } - $s .= http_img_pack("$puce", "width='14' height='7' border='0' alt=''"); + $s .= http_img_pack("$puce", "", "width='14' height='7' border='0'"); $s .= " ".typo($titre)."</A>"; $vals[] = $s; @@ -1337,7 +1340,7 @@ function afficher_forum($request, $adresse_retour, $controle_id_article = 0) { $fleche="forum-droite$spip_lang_rtl.gif"; } if ($spip_display != 4) echo "<td width='10' valign='top' background=$fond[$count]>" . - http_img_pack($fleche, "alt='' width='10' height='13' border='0'"). "</td>\n"; + http_img_pack($fleche, "", "width='10' height='13' border='0'"). "</td>\n"; } if ($spip_display != 4) echo "\n<td width=100% valign='top'>"; @@ -1873,7 +1876,7 @@ function onglet($texte, $lien, $onglet_ref, $onglet, $icone=""){ if ($spip_display != 1) { if (strlen($icone) > 0) { echo "<div style='z-index: 2; position: absolute; top: 0px; $spip_lang_left: 5px;'>" . - http_img_pack("$icone", "") . "</div>"; + http_img_pack("$icone", "", "") . "</div>"; $style = " top: 7px; padding-$spip_lang_left: 32px; z-index: 1;"; } else { $style = " top: 7px;"; @@ -1889,7 +1892,7 @@ function onglet($texte, $lien, $onglet_ref, $onglet, $icone=""){ if ($spip_display != 1) { if (strlen($icone) > 0) { echo "<div style='z-index: 2; position: absolute; top: 0px; $spip_lang_left: 5px;'>" . - http_img_pack("$icone", "") . "</div>"; + http_img_pack("$icone", "", "") . "</div>"; $style = " top: 7px; padding-$spip_lang_left: 32px; z-index: 1;"; } else { $style = " top: 7px;"; @@ -1990,7 +1993,6 @@ function largeur_icone_bandeau_principal($texte) { else { if (count(explode(" ", $texte)) > 1) $largeur = 84; else $largeur = 80; - $alt = " alt=\" \""; } if ($spip_ecran == "large") $largeur = $largeur + 30; @@ -2009,15 +2011,16 @@ function icone_bandeau_principal($texte, $lien, $fond, $rubrique_icone = "vide", $largeur = largeur_icone_bandeau_principal($texte); - + $alt = ''; + $title = ''; if ($spip_display == 1){ } else if ($spip_display == 3){ - $title = " title=\"$texte\""; - $alt = " alt=\"$texte\""; + $title = "title=\"$texte\""; + $alt = $texte; } else { - $alt = " alt=\" \""; + $alt = ' '; } if (!$menu_accesskey) $menu_accesskey = 1; @@ -2043,7 +2046,7 @@ function icone_bandeau_principal($texte, $lien, $fond, $rubrique_icone = "vide", if ($spip_display != 1 AND $spip_display != 4) { echo "<td class='cellule48' onMouseOver=\"changestyle('bandeau$rubrique_icone', 'visibility', 'visible');\" width='$largeur'>$a_href" . - http_img_pack("$fond", "width='48' height='48'$alt$title"); + http_img_pack("$fond", $alt, "$title width='48' height='48'"); if ($spip_display != 3) { echo "<span>$texte</span>"; } @@ -2059,6 +2062,8 @@ function icone_bandeau_secondaire($texte, $lien, $fond, $rubrique_icone = "vide" global $spip_display; global $menu_accesskey, $compteur_survol; + $alt = ''; + $title = ''; if ($spip_display == 1) { //$hauteur = 20; $largeur = 80; @@ -2066,14 +2071,14 @@ function icone_bandeau_secondaire($texte, $lien, $fond, $rubrique_icone = "vide" else if ($spip_display == 3){ //$hauteur = 26; $largeur = 40; - $title = " title=\"$texte\""; - $alt = " alt=\"$texte\""; + $title = "title=\"$texte\""; + $alt = $texte; } else { //$hauteur = 68; if (count(explode(" ", $texte)) > 1) $largeur = 80; else $largeur = 70; - $alt = " alt=\" \""; + $alt = " "; } if ($aide AND $spip_display != 3) { $largeur += 50; @@ -2100,7 +2105,7 @@ function icone_bandeau_secondaire($texte, $lien, $fond, $rubrique_icone = "vide" if ($spip_display != 1) { echo "<td class='cellule36' style='width: ".$largeur."px;'>"; echo "$a_href" . - http_img_pack("$fond","$alt$title"); + http_img_pack("$fond", $alt, "$title"); if ($aide AND $spip_display != 3) echo aide($aide)." "; if ($spip_display != 3) { echo "<span>$texte</span>"; @@ -2122,18 +2127,18 @@ function icone($texte, $lien, $fond, $fonction="", $align="", $afficher='oui'){ if ($spip_display == 1){ $hauteur = 20; $largeur = 100; - $alt = " alt=\"\""; + $alt = ""; } else if ($spip_display == 3){ $hauteur = 30; $largeur = 30; - $title = " title=\"$texte\""; - $alt = " alt=\"$texte\""; + $title = "title=\"$texte\""; + $alt = $texte; } else { $hauteur = 70; $largeur = 100; - $alt = " alt=\"$texte\""; + $alt = $texte; } if ($fonction == "supprimer.gif") { @@ -2147,12 +2152,11 @@ function icone($texte, $lien, $fond, $fonction="", $align="", $afficher='oui'){ $icone .= "<tr><td class='icone36$style' style='text-align:center;'><a href='$lien'>"; if ($spip_display != 1 AND $spip_display != 4){ if ($fonction != "rien.gif"){ - $icone .= http_img_pack($fonction, - http_style_background($fond, "no-repeat center center") . - " $alt$title width='24' height='24' border='0'"); + $icone .= http_img_pack($fonction, $alt, "$title width='24' height='24' border='0'" . + http_style_background($fond, "no-repeat center center")); } else { - $icone .= http_img_pack("$fond","$alt$title width='24' height='24' border='0'"); + $icone .= http_img_pack($fond, $alt, "$title width='24' height='24' border='0'"); } } if ($spip_display != 3){ @@ -2181,7 +2185,7 @@ function icone_horizontale($texte, $lien, $fond = "", $fonction = "", $echo = tr if ($spip_display != 1) { $retour .= "<a href='$lien' class='cellule-h' $javascript><table cellpadding='0' valign='middle'><tr>\n"; $retour .= "<td><a href='$lien'><div class='cell-i'>" . - http_img_pack($fonction, http_style_background($fond,"center center no-repeat") . " alt=''") . + http_img_pack($fonction, "", http_style_background($fond, "center center no-repeat")) . "</div></a></td>\n" . "<td class='cellule-h-lien'><a href='$lien' class='cellule-h'>$texte</a></td>\n"; $retour .= "</tr></table></a>\n"; @@ -2479,31 +2483,31 @@ else { echo "<td valign='middle' class='bandeau_couleur' style='text-align: $spip_lang_left;'>"; echo "<a href='articles_tous.php3' class='icone26' onMouseOver=\"changestyle('bandeautoutsite','visibility','visible');\">" . - http_img_pack("tout-site.png", "width='26' height='20' border='0' alt=''") . "</a>"; + http_img_pack("tout-site.png", "", "width='26' height='20' border='0'") . "</a>"; $id_rubrique = $GLOBALS['id_rubrique']; if ($id_rubrique > 0) echo "<a href='brouteur.php3?id_rubrique=$id_rubrique' class='icone26' onMouseOver=\"changestyle('bandeaunavrapide','visibility','visible');\">" . - http_img_pack("naviguer-site.png", "alt='' width='26' height='20' border='0'") ."</a>"; + http_img_pack("naviguer-site.png", "", "width='26' height='20' border='0'") ."</a>"; else echo "<a href='brouteur.php3' class='icone26' onMouseOver=\"changestyle('bandeaunavrapide','visibility','visible');\" >" . - http_img_pack("naviguer-site.png", "alt='' width='26' height='20' border='0'") . "</a>"; + http_img_pack("naviguer-site.png", "", "width='26' height='20' border='0'") . "</a>"; echo "<a href='recherche.php3' class='icone26' onMouseOver=\"changestyle('bandeaurecherche','visibility','visible');\" >" . - http_img_pack("loupe.png", "alt='' width='26' height='20' border='0'") ."</a>"; + http_img_pack("loupe.png", "", "width='26' height='20' border='0'") ."</a>"; - echo http_img_pack("rien.gif", "width='10' alt=''"); + echo http_img_pack("rien.gif", "", "width='10'"); echo "<a href='calendrier_semaine.php3' class='icone26' onMouseOver=\"changestyle('bandeauagenda','visibility','visible');\">" . - http_img_pack("cal-rv.png", "alt='' width='26' height='20' border='0'") ."</a>"; + http_img_pack("cal-rv.png", "", "width='26' height='20' border='0'") ."</a>"; echo "<a href='messagerie.php3' class='icone26' onMouseOver=\"changestyle('bandeaumessagerie','visibility','visible');\">" . - http_img_pack("cal-messagerie.png", "alt='' width='26' height='20' border='0'") ."</a>"; + http_img_pack("cal-messagerie.png", "", "width='26' height='20' border='0'") ."</a>"; echo "<a href='synchro.php3' class='icone26' onMouseOver=\"changestyle('bandeausynchro','visibility','visible');\">" . - http_img_pack("cal-suivi.png", "alt='' width='26' height='20' border='0'") . "</a>"; + http_img_pack("cal-suivi.png", "", "width='26' height='20' border='0'") . "</a>"; if (!($connect_statut == "0minirezo" AND $connect_toutes_rubriques)) { - echo http_img_pack("rien.gif", "width='10' alt=''"); + echo http_img_pack("rien.gif", "", "width='10'"); echo "<a href='auteurs_edit.php3?id_auteur=$connect_id_auteur' class='icone26' onMouseOver=\"changestyle('bandeauinfoperso','visibility','visible');\">" . - http_img_pack("fiche-perso.png", "border='0' onMouseOver=\")changestyle('bandeauvide','visibility', 'visible';\""); + http_img_pack("fiche-perso.png", "", "border='0' onMouseOver=\")changestyle('bandeauvide','visibility', 'visible';\""); echo "</a>"; } @@ -2538,25 +2542,27 @@ else { $icone = "interface-display.png"; } echo "<a href='". $lien->getUrl() ."' class='icone26' onMouseOver=\"changestyle('bandeaudisplay','visibility', 'visible');\">" . - http_img_pack("$icone", "alt='' width='26' height='20' border='0'")."</a>"; + http_img_pack("$icone", "", "width='26' height='20' border='0'")."</a>"; - echo http_img_pack("rien.gif", "width='10' height='1' alt=''"); - echo http_img_pack("choix-layout$spip_lang_rtl".($spip_lang=='he'?'_he':'').".png", "alt='abc' class='format_png' valign='middle' width='59' height='15' usemap='#map_layout' border='0'"); + echo http_img_pack("rien.gif", "", "width='10' height='1'"); + echo http_img_pack("choix-layout$spip_lang_rtl".($spip_lang=='he'?'_he':'').".png", "abc", "class='format_png' valign='middle' width='59' height='15' usemap='#map_layout' border='0'"); - echo http_img_pack("rien.gif", "width='10' height='1' alt=''"); + echo http_img_pack("rien.gif", "", "width='10' height='1'"); // grand ecran $lien = new Link; if ($spip_ecran == "large") { $lien->addVar('set_ecran', 'etroit'); - echo "<a href='". $lien->getUrl() ."' class='icone26' onMouseOver=\"changestyle('bandeauecran','visibility', 'visible');\" title=\""._T('info_petit_ecran')."\">" . - http_img_pack("set-ecran-etroit.png", "alt=\")"._T('info_petit_ecran')."\" width='26' height='20' border='0'") . "</a>"; + $i = _T('info_petit_ecran'); + echo "<a href='". $lien->getUrl() ."' class='icone26' onMouseOver=\"changestyle('bandeauecran','visibility', 'visible');\" title=\"$i\">" . + http_img_pack("set-ecran-etroit.png", $i, "width='26' height='20' border='0'") . "</a>"; $ecran = "<div><a href='".$lien->getUrl()."' class='lien_sous'>"._T('info_petit_ecran')."</a>/<b>"._T('info_grand_ecran')."</b></div>"; } else { $lien->addVar('set_ecran', 'large'); - echo "<a href='". $lien->getUrl() ."' class='icone26' onMouseOver=\"changestyle('bandeauecran','visibility', 'visible');\" title=\""._T('info_grand_ecran')."\">" . - http_img_pack("set-ecran.png", "alt=\""._T('info_grand_ecran')."\" width='26' height='20' border='0'") ."</a>"; + $i = _T('info_grand_ecran'); + echo "<a href='". $lien->getUrl() ."' class='icone26' onMouseOver=\"changestyle('bandeauecran','visibility', 'visible');\" title=\"$i\">" . + http_img_pack("set-ecran.png", $i, "width='26' height='20' border='0'") ."</a>"; $ecran = "<div><b>"._T('info_petit_ecran')."</b>/<a href='".$lien->getUrl()."' class='lien_sous'>"._T('info_grand_ecran')."</a></div>"; } // echo "<img src=_DIR_IMG_PACK . 'rien.gif' width='10' height='1' alt='' />"; @@ -2572,7 +2578,7 @@ else { $link->addVar('set_couleur', $key); echo "<a href=\"".$link->getUrl()."\">" . - http_img_pack("rien.gif", "width='8' height='8' border='0' style='margin: 1px; background-color: ".$couleurs_spip[$key]['couleur_claire'].";' onMouseOver=\"changestyle('bandeauinterface','visibility', 'visible');\" alt=''"). "</a>"; + http_img_pack("rien.gif", "", "width='8' height='8' border='0' style='margin: 1px; background-color: ".$couleurs_spip[$key]['couleur_claire'].";' onMouseOver=\"changestyle('bandeauinterface','visibility', 'visible');\""). "</a>"; } // echo "<img src=_DIR_IMG_PACK . 'rien.gif' width='10' height='1' />"; echo "</td>"; @@ -2589,7 +2595,7 @@ else { if ($auth_can_disconnect) { echo "<a href='../spip_cookie.php3?logout=$connect_login' class='icone26' onMouseOver=\"changestyle('bandeaudeconnecter','visibility', 'visible');\">" . - http_img_pack("deconnecter-24.gif", "border='0' alt=''") . "</a>"; + http_img_pack("deconnecter-24.gif", "", "border='0'") . "</a>"; } echo "</td>"; @@ -2938,7 +2944,7 @@ function gros_titre($titre, $ze_logo=''){ } else { echo "<div class='verdana2' style='font-size: 18px; color: $couleur_foncee; font-weight: bold;'>"; - if (strlen($ze_logo) > 3) echo http_img_pack("$ze_logo", "alt='' border=0 align='middle'") . " "; + if (strlen($ze_logo) > 3) echo http_img_pack("$ze_logo", "", "border=0 align='middle'") . " "; echo typo($titre); echo "</div>\n"; } @@ -3098,7 +3104,7 @@ function debut_droite($rubrique="") { $lien = new Link; $lien->addVar('debloquer_article', $ze_article); echo "<div class='arial1' style='text-align:right;'><a href='". $lien->getUrl() ."' title='"._T('lien_liberer')."'>"._T('lien_liberer')." " . - http_img_pack("croix-rouge.gif", "alt='X' width='7' height='7' border='0' align='middle'") . "</a></div>"; + http_img_pack("croix-rouge.gif", "X", "width='7' height='7' border='0' align='middle'") . "</a></div>"; } echo "</div>"; @@ -3107,7 +3113,7 @@ function debut_droite($rubrique="") { $lien = new Link; $lien->addVar('debloquer_article', 'tous'); echo "<div class='arial2' style='text-align:right; padding:2px; border-top: 1px solid $couleur_foncee;'><a href='". $lien->getUrl() ."'>"._T('lien_liberer_tous')." " . - http_img_pack("croix-rouge.gif", "alt='' width='7' height='7' border='0' align='middle'") ."</a></div>"; + http_img_pack("croix-rouge.gif", "", "width='7' height='7' border='0' align='middle'") ."</a></div>"; } //echo "</font>"; fin_cadre_enfonce(); @@ -3152,7 +3158,7 @@ function fin_html() { // rejouer le cookie de session si l'IP a change if ($GLOBALS['spip_session'] && $GLOBALS['auteur_session']['ip_change']) { echo - http_img_pack('rien.gif', "name='img_session' width='0' height='0' alt='' /"), + http_img_pack('rien.gif', "", "name='img_session' width='0' height='0'"), http_script(" document.img_session.src='../spip_cookie.php3?change_session=oui'"); } @@ -3342,9 +3348,14 @@ function voir_en_ligne ($type, $id, $statut=false, $image='racine-24.gif') { icone_horizontale($message, "../spip_redirect.php3?id_$type=$id&$en_ligne=oui", $image, "rien.gif"); } -function http_img_pack($img, $att) { - return "<img src='" . _DIR_IMG_PACK . $img . - ($att ? ("' " . $att) : "'") . " />"; +// produit une balise img avec un champ alt d'office (et different) si vide +// attention le htmlentities et la traduction doivent etre appliques avant. + +function http_img_pack($img, $alt, $att) { + static $num = 0; + return "<img src='" . _DIR_IMG_PACK . $img . + ("'\nalt=\"" . ($alt ? $alt : ('img_pack' . $num++)) . '" ') . + $att . " />"; } function http_style_background($img, $att='') @@ -3352,4 +3363,8 @@ function http_style_background($img, $att='') return " style='background: url(\"" . _DIR_IMG_PACK . $img . '")' . ($att ? (' ' . $att) : '') . ";'"; } + +function http_href_img($href, $img, $att, $title='', $style='', $class='') { + return http_href($href, http_img_pack($img, $title, $att), $title, $style, $class); +} ?> diff --git a/ecrire/inc_sites.php3 b/ecrire/inc_sites.php3 index 9c850a4373..c5b44ad05a 100644 --- a/ecrire/inc_sites.php3 +++ b/ecrire/inc_sites.php3 @@ -501,7 +501,7 @@ function afficher_sites($titre_table, $requete) { } - $s .= http_img_pack($puce, "alt='' width='7' height='7' border='0'") ." "; + $s .= http_img_pack($puce, "", "width='7' height='7' border='0'") ." "; $s .= typo($nom_site); /*if ($moderation == 'oui') @@ -643,7 +643,7 @@ function afficher_syndic_articles($titre_table, $requete, $afficher_site = false $puce = 'puce-rouge-anim.gif'; } - echo http_img_pack($puce, "width='7' height='7' border='0' alt=''"); + echo http_img_pack($puce, "", "width='7' height='7' border='0'"); if ($statut == "refuse") echo "<font color='black'> $titre</font>"; diff --git a/ecrire/inc_version.php3 b/ecrire/inc_version.php3 index 73801e9e5c..d89942e9b9 100644 --- a/ecrire/inc_version.php3 +++ b/ecrire/inc_version.php3 @@ -740,7 +740,7 @@ class Link { if (!preg_match('/^('. (!_DIR_RESTREINT ? '|lang|set_options|set_couleur|set_disp|set_ecran': - '|submit|var_mode') + 'var_mode') . ')$/i', $name)) { if (is_array($value)) $this->arrays[$name] = $value; diff --git a/ecrire/messagerie.php3 b/ecrire/messagerie.php3 index 4c47dea10f..33ff41ec08 100644 --- a/ecrire/messagerie.php3 +++ b/ecrire/messagerie.php3 @@ -27,15 +27,15 @@ debut_boite_info(); echo _T('info_gauche_messagerie'); -echo "<p>"."<IMG SRC='" . _DIR_IMG_PACK . "m_envoi$spip_lang_rtl.gif' WIDTH='14' HEIGHT='7' BORDER='0' alt='' /> "._T('info_symbole_vert'); +echo "<p>".http_img_pack("m_envoi$spip_lang_rtl.gif", 'V', "WIDTH='14' HEIGHT='7' BORDER='0'") .' ' . _T('info_symbole_vert'); echo aide ("messut"); -echo "<p>"."<IMG SRC='" . _DIR_IMG_PACK . "m_envoi_bleu$spip_lang_rtl.gif' WIDTH='14' HEIGHT='7' BORDER='0' alt='' /> "._T('info_symbole_bleu'); +echo "<p>".http_img_pack("m_envoi_bleu$spip_lang_rtl.gif", 'B', "WIDTH='14' HEIGHT='7' BORDER='0'") .' ' . _T('info_symbole_bleu'); echo aide ("messpense"); -echo "<p>"."<IMG SRC='" . _DIR_IMG_PACK . "m_envoi_jaune$spip_lang_rtl.gif' WIDTH='14' HEIGHT='7' BORDER='0' alt='' /> "._T('info_symbole_jaune'); +echo "<p>".http_img_pack("m_envoi_jaune$spip_lang_rtl.gif", 'J', "WIDTH='14' HEIGHT='7' BORDER='0'") .' ' . _T('info_symbole_jaune'); diff --git a/ecrire/statistiques_visites.php3 b/ecrire/statistiques_visites.php3 index 58e8dbbce3..5179b06cfe 100644 --- a/ecrire/statistiques_visites.php3 +++ b/ecrire/statistiques_visites.php3 @@ -5,16 +5,10 @@ include_ecrire("inc_statistiques.php3"); function http_img_rien($width, $height, $style='', $title='') { - return "<img src='" - . _DIR_IMG_PACK . "rien.gif' width='$width' height='$height' alt=''" - . (!$style ? '' : (" style='$style'")) - . (!$title ? '' : (" title=\"$title\"")) - . "/>"; -} - -function http_a_img($href, $img, $att) -{ - return "<a href='$href'><img src='" . _DIR_IMG_PACK . $img . "' $att /></a>"; + return http_img_pack('rien.gif', $title, + "width='$width' height='$height'" + . (!$style ? '' : (" style='$style'")) + . (!$title ? '' : (" title=\"$title\""))); } if ($id_article = intval($id_article)){ @@ -314,8 +308,16 @@ if (!$origine) { if ($id_article) $pour_article="&id_article=$id_article"; - if ($date_premier < $date_debut) echo http_a_img("statistiques_visites.php3?aff_jours=$aff_jours_plus$pour_article", 'loupe-moins.gif', "border='0' valign='center'"), " "; - if ( (($date_today - $date_debut) / (24*3600)) > 30) echo http_a_img("statistiques_visites.php3?aff_jours=$aff_jours_moins$pour_article", 'loupe-plus.gif', "border='0' valign='center'"), " "; + if ($date_premier < $date_debut) + echo http_href_img("statistiques_visites.php3?aff_jours=$aff_jours_plus$pour_article", + 'loupe-moins.gif', + "border='0' valign='center'", + _L('zoom'). '-'), " "; + if ( (($date_today - $date_debut) / (24*3600)) > 30) + echo http_href_img("statistiques_visites.php3?aff_jours=$aff_jours_moins$pour_article", + 'loupe-plus.gif', + "border='0' valign='center'", + _L('zoom'). '+'), " "; /* if ($spip_svg_plugin == 'oui') { -- GitLab