'.print_r($items,true).''; + //print '
'.print_r($items,true).''; $nbitems = count($items); - for ($line = 0; $line < $max && $line < $nbitems; $line++) - { - $item = $items[$line]; + for ($line = 0; $line < $max && $line < $nbitems; $line++) + { + $item = $items[$line]; // Feed common fields - $href = $item['link']; - $title = urldecode($item['title']); + $href = $item['link']; + $title = urldecode($item['title']); $date = $item['date_timestamp']; // date will be empty if conversion into timestamp failed if ($rssparser->getFormat() == 'rss') // If RSS { @@ -145,46 +147,46 @@ if (is_numeric($date)) $date = dol_print_date($date, "dayhour"); $isutf8 = utf8_check($title); - if (!$isutf8 && $conf->file->character_set_client == 'UTF-8') $title = utf8_encode($title); - elseif ($isutf8 && $conf->file->character_set_client == 'ISO-8859-1') $title = utf8_decode($title); - - $title = preg_replace("/([[:alnum:]])\?([[:alnum:]])/", "\\1'\\2", $title); // Gere probleme des apostrophes mal codee/decodee par utf8 - $title = preg_replace("/^\s+/", "", $title); // Supprime espaces de debut - $this->info_box_contents["$href"] = "$title"; - - $tooltip = $title; - $description = !empty($item['description']) ? $item['description'] : ''; - $isutf8 = utf8_check($description); - if (!$isutf8 && $conf->file->character_set_client == 'UTF-8') $description = utf8_encode($description); - elseif ($isutf8 && $conf->file->character_set_client == 'ISO-8859-1') $description = utf8_decode($description); - $description = preg_replace("/([[:alnum:]])\?([[:alnum:]])/", "\\1'\\2", $description); - $description = preg_replace("/^\s+/", "", $description); - $description = str_replace("\r\n", "", $description); - $tooltip .= '
0) { $out .= ' colspan="'.$nbcol.'"'; }
- $out .= '>';
- if (!empty($conf->use_javascript_ajax))
- {
- //$out.= '
| ";
- $out .= "||
'."\n"; - - // Url - if (!empty($contents[$i][$j]['url']) && empty($contents[$i][$j]['logo'])) - { - $out .= 'trans("Show").' '.$tooltip, 1).'" class="classfortooltip"'; - } - //$out.= ' alt="'.$textwithnotags.'"'; // Pas de alt sur un "" - $out .= isset($contents[$i][$j]['target']) ? ' target="'.$contents[$i][$j]['target'].'"' : ''; - $out .= '>'; - } - - // Logo - if (!empty($contents[$i][$j]['logo'])) - { - $logo = preg_replace("/^object_/i", "", $contents[$i][$j]['logo']); - $out .= ''; - $out .= img_object($langs->trans("Show").' '.$tooltip, $logo, 'class="classfortooltip"'); - } - - $maxlength = $MAXLENGTHBOX; - if (!empty($contents[$i][$j]['maxlength'])) $maxlength = $contents[$i][$j]['maxlength']; - - if ($maxlength) $textwithnotags = dol_trunc($textwithnotags, $maxlength); - if (preg_match('/^<(img|div|span)/i', $text) || !empty($contents[$i][$j]['asis'])) $out .= $text; // show text with no html cleaning - else $out .= $textwithnotags; // show text with html cleaning - - // End Url - if (!empty($contents[$i][$j]['url'])) $out .= ''; - - if (preg_match('/^<(img|div|span)/i', $text2) || !empty($contents[$i][$j]['asis2'])) $out .= $text2; // show text with no html cleaning - else $out .= $text2withnotags; // show text with html cleaning - - if (!empty($textnoformat)) $out .= "\n".$textnoformat."\n"; - - $out .= " | \n"; - } - - $out .= "
0) { $out .= ' colspan="'.$nbcol.'"'; }
+ $out .= '>';
+ if (!empty($conf->use_javascript_ajax))
+ {
+ //$out.= '
| ";
+ $out .= "||
'."\n"; + + // Url + if (!empty($contents[$i][$j]['url']) && empty($contents[$i][$j]['logo'])) + { + $out .= 'trans("Show").' '.$tooltip, 1).'" class="classfortooltip"'; + } + //$out.= ' alt="'.$textwithnotags.'"'; // Pas de alt sur un "" + $out .= isset($contents[$i][$j]['target']) ? ' target="'.$contents[$i][$j]['target'].'"' : ''; + $out .= '>'; + } + + // Logo + if (!empty($contents[$i][$j]['logo'])) + { + $logo = preg_replace("/^object_/i", "", $contents[$i][$j]['logo']); + $out .= ''; + $out .= img_object($langs->trans("Show").' '.$tooltip, $logo, 'class="classfortooltip"'); + } + + $maxlength = $MAXLENGTHBOX; + if (!empty($contents[$i][$j]['maxlength'])) $maxlength = $contents[$i][$j]['maxlength']; + + if ($maxlength) $textwithnotags = dol_trunc($textwithnotags, $maxlength); + if (preg_match('/^<(img|div|span)/i', $text) || !empty($contents[$i][$j]['asis'])) $out .= $text; // show text with no html cleaning + else $out .= $textwithnotags; // show text with html cleaning + + // End Url + if (!empty($contents[$i][$j]['url'])) $out .= ''; + + if (preg_match('/^<(img|div|span)/i', $text2) || !empty($contents[$i][$j]['asis2'])) $out .= $text2; // show text with no html cleaning + else $out .= $text2withnotags; // show text with html cleaning + + if (!empty($textnoformat)) $out .= "\n".$textnoformat."\n"; + + $out .= " | \n"; + } + + $out .= "