function getPreamble($limit = false) { global $CONFIG; if (!$limit) { $limit = 300; } $text = strip_tags($this->text); $textlen = strlen($text); return lineTrim($text, $limit); }
function getPreamble($limit = false, &$clipping_occured = false) { global $CONFIG; /* if(!$limit) $limit = ($CONFIG->News->Preamble_size ? $CONFIG->News->Preamble_size : 300); */ return dntHash::deHash(lineTrim(strip_tags(preg_replace_callback(array('#<(a|b)[^>]*?>.*?</\\1>#i', '#<br[^>]*?>#i'), array('dntHash', 'hash'), $this->getContent('Text'))), $limit, '...', $clipping_occured)); }