Sorry. No. I just need to trim off a certain amount of characters in the generated excerpt.
PHP Code:
function nm_create_excerpt($content) {
global $NMEXCERPTLENGTH;
$len = intval($NMEXCERPTLENGTH);
if ($len == 0) {
return '';
} else {
$content = preg_replace('/\(%.*?%\)/', '', $content); // remove (% ... %)
$content = preg_replace('/\{%.*?%\}/', '', $content); // remove {% ... %}
$content = strip_tags($content);
if (strlen($content) > $len) {
if (function_exists('mb_substr'))
$content = trim(mb_substr($content, 0, $len, 'UTF-8'));
else
$content = trim(substr($content, 0, $len));
$content .= i18n_r('news_manager/ELLIPSIS');
}
return "<p>$content</p>";
}
}