From b7264e9ae5cd86fadbdf9cd64a0686cfb71dc81f Mon Sep 17 00:00:00 2001 From: Fil <fil@rezo.net> Date: Mon, 3 Sep 2007 20:55:14 +0000 Subject: [PATCH] et la classe format_png --- ecrire/inc/commencer_page.php | 2 +- ecrire/inc/filtres_images.php | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/ecrire/inc/commencer_page.php b/ecrire/inc/commencer_page.php index 7453cacd1f..a7dec4368c 100644 --- a/ecrire/inc/commencer_page.php +++ b/ecrire/inc/commencer_page.php @@ -134,7 +134,7 @@ function init_body($rubrique='accueil', $sous_rubrique='accueil', $id_rubrique=' . "<li id='bandeau_couleur3' class='bandeau_couleur'><div class='menu-item'>"; // Choix du layout - $res .= http_img_pack("choix-layout$spip_lang_rtl".($spip_lang=='he'?'_he':'').".gif", _T('choix_interface'), "class='format_png' style='vertical-align: middle' width='59' height='15' usemap='#map_layout'") + $res .= http_img_pack("choix-layout$spip_lang_rtl".($spip_lang=='he'?'_he':'').".gif", _T('choix_interface'), " style='vertical-align: middle' width='59' height='15' usemap='#map_layout'") . http_img_pack("rien.gif", "", "width='10' height='1'"); // grand ecran if ($spip_ecran == "large") { diff --git a/ecrire/inc/filtres_images.php b/ecrire/inc/filtres_images.php index 1acd7acc7a..e873a7a624 100644 --- a/ecrire/inc/filtres_images.php +++ b/ecrire/inc/filtres_images.php @@ -336,20 +336,12 @@ function image_ecrire_tag($valeurs,$surcharge){ $src = $surcharge['src']; unset($surcharge['src']); } - - // regarder la class pour gerer le 'format_png' en fonction du format de l'image - // (et le remettre sinon) + $class = $valeurs['class']; if (isset($surcharge['class'])){ $class = $surcharge['class']; unset($surcharge['class']); } - $is_png = preg_match(',[.]png($|\?),i',$src); - $p = strpos($class,'format_png'); - if ($is_png && $p===FALSE) - $class .= " format_png"; - if (!$is_png && $p!==FALSE) - $class = preg_replace(",\s*format_png,","",$class); if(strlen($class)) $tag = inserer_attribut($tag,'class',$class); @@ -2516,7 +2508,7 @@ function produire_image_typo() { $dimensions = getimagesize($image); $largeur = $dimensions[0]; $hauteur = $dimensions[1]; - return inserer_attribut("<img src='$image' width='$largeur' height='$hauteur' style='width:".$largeur."px;height:".$hauteur."px;' class='format_png' />", 'alt', $alt); + return inserer_attribut("<img src='$image' width='$largeur' height='$hauteur' style='width:".$largeur."px;height:".$hauteur."px;' />", 'alt', $alt); } ?> -- GitLab