$link = sefRelToAbs( 'index.php?option=com_content&task=view&id='. $row->id . $Itemid ); ?> <li class="latestnews<?php echo $class_sfx; ?>"> <a href="<?php echo $link; ?>" class="latestnews<?php echo $class_sfx; ?>"> <?php echo $row->title; ?> </a> </li> <?php}?></ul>
$link = sefRelToAbs( 'index.php?option=com_content&task=view&id='. $row->id . $Itemid ); if (strlen($row->title) >52) { $title = substr($row->title, 0, 52).'...'; } else { $title = $row->title; } ?> <li class="latestnews"> <a href="<?php echo $link; ?>" class="latestnews"> <?php echo $title; ?></a> </li> <?php}?></ul>
/**************/ /* LIMIT TEXT */ /**************/ public function limittext($txt, $textlimit) { $len = eUTF::utf8_strlen($txt); if ($len <= $textlimit) { return $txt; } else { $txt = eUTF::utf8_substr($txt, 0, $textlimit); $pos = eUTF::utf8_strrpos($txt,' '); if ($pos >0) { $txt = eUTF::utf8_substr($txt, 0, $pos); if ((($tpos = eUTF::utf8_strrpos($txt,'<')) > eUTF::utf8_strrpos($txt,'>')) && ($tpos > 0)) { $txt = eUTF::utf8_substr($txt, 0, $tpos-1); } } return $txt.' ...'; } }