Re: Search results blank...sometimes?? [message #163269 is a reply to message #163268] |
Wed, 13 October 2010 15:06 |
tw_nick
Messages: 57 Registered: October 2010 Location: Dallas, TX
Karma:
|
Member |
|
|
Here's what's in the file:
function trim_body($body)
{
/* remove stuff in old bad quote tags - remove in future release */
while (($p = strpos($body, '<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1"><tr><td class="SmallText"><b>')) !== false) {
if (($pos = strpos($body, '<br></td></tr></table>', $p)) === false) {
$pos = strpos($body, '<br /></td></tr></table>', $p);
if ($pos === false) {
break;
}
$e = $pos + strlen('<br /></td></tr></table>');
} else {
$e = $pos + strlen('<br></td></tr></table>');
}
$body = substr($body, 0, $p) . substr($body, $e);
}
/* Remove stuff in quotes */
while (preg_match('!<cite>(.*?)</cite><blockquote>(.*?)</blockquote>!is', $body)) {
$body = preg_replace('!<cite>(.*?)</cite><blockquote>(.*?)</blockquote>!is', '', $body);
}
$body = strip_tags($body);
if (strlen($body) > $GLOBALS['MNAV_MAX_LEN']) {
$body = mb_substr($body, 0, $GLOBALS['MNAV_MAX_LEN']) . '...';
}
return $body;
}
|
|
|