2012-02-20, 06:36:42
Another issue when configuring NewsManager to turn GS into a blog is that the excerpts on the news page (i.e. whatever is configured to be the front page) ignore formatting tags, resulting in a wall-of-text for longer excerpts. To address this, open the NewsManager file /inc/functions.php and remove this line from the nm_create_slug function:
Before:
After:
Code:
$content = strip_tags($content);
Before:
Code:
/*******************************************************
* @function nm_create_excerpt
* @param $content the post content
* @return a truncated version of the post content
*/
function nm_create_excerpt($content) {
global $NMEXCERPTLENGTH;
$len = intval($NMEXCERPTLENGTH);
$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)) . ' [...]';
}
return "<p>$content</p>";
}
After:
Code:
/*******************************************************
* @function nm_create_excerpt
* @param $content the post content
* @return a truncated version of the post content
*/
function nm_create_excerpt($content) {
global $NMEXCERPTLENGTH;
$len = intval($NMEXCERPTLENGTH);
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)) . ' [...]';
}
return "<p>$content</p>";
}