From 068cd34f57ed3717280188a3fc7ada5c2ae796a2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 18 Jun 2005 14:11:54 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20Ne=20tient=20pas=20compte=20des=20caract?= =?UTF-8?q?=E8res=20non=20vus=20(balises=20html)=20dans=20le=20calcul=20de?= =?UTF-8?q?=20la=20longuer=20du=20texte=20affich=E9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/includes/boxes/modules_boxes.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/htdocs/includes/boxes/modules_boxes.php b/htdocs/includes/boxes/modules_boxes.php index 2477078ef65..b79bb101d05 100644 --- a/htdocs/includes/boxes/modules_boxes.php +++ b/htdocs/includes/boxes/modules_boxes.php @@ -36,7 +36,7 @@ class ModeleBoxes { - var $MAXLENGTHBOX=20; // Mettre 0 pour pas de limite + var $MAXLENGTHBOX=70; // Mettre 0 pour pas de limite var $error=''; @@ -86,20 +86,21 @@ class ModeleBoxes if (isset($contents[$i][$j]['width'])) $tdparam.=' width="'. $contents[$i][$j]['width'].'"'; if ($contents[$i][$j]['text']) { + $texte=$contents[$i][$j]['text']; + $textewithnotags=eregi_replace('<[^>]+>','',$texte); + //print "xxx $textewithnotags y"; + if (isset($contents[$i][$j]['logo']) && $contents[$i][$j]['logo']) print ''; else print ''; - if (isset($contents[$i][$j]['url'])) print ''; + if (isset($contents[$i][$j]['url'])) print ''; if (isset($contents[$i][$j]['logo']) && $contents[$i][$j]['logo']) { $logo=eregi_replace("^object_","",$contents[$i][$j]['logo']); print img_object($langs->trans("Show"),$logo); - print ''; + print ''; } - $texte=$contents[$i][$j]['text']; - $textewithnotag=eregi_replace('<[^>]+>','',$texte); - //print "x $textewithnotag y"; - if ($this->MAXLENGTHBOX && strlen($textewithnotag) > $this->MAXLENGTHBOX) + if ($this->MAXLENGTHBOX && strlen($textewithnotags) > $this->MAXLENGTHBOX) { $texte=substr($texte,0,$this->MAXLENGTHBOX)."..."; }