exclude parts from search results
Exclude content from inclusion within search results is not possibly with this script as-is. But it is an option extra if you wish to change some code.
Simply go into search.php about line 359 where you see this code:
$file_contents = preg_replace('#<script[^>]*>.*<'.'/script>#ismU','',$file_contents);
add this line of code before the above line of code:
$file_contents = preg_replace('#<!--\s*hidesearch start\s*-->.*<!--\s*hidesearch end\s*-->#ismU','',$file_contents);UTF8 characters show up funny in search results (at the start or end of the search result, near the …. )
change these 3 bits of code in search.php:
substr($matches[1],-$before_limit) substr($matches[3],0,$after_limit) substr($this_result[$highlight_item],0,$GLOBALS['_SEARCH_SUMMARY_LENGTH'])
to these 3 lines of code respectively:
utf8_encode(substr(utf8_decode($matches[1]),-$before_limit)) utf8_encode(substr(utf8_decode($matches[3]),0,$after_limit)) utf8_encode(substr(utf8_decode($this_result[$highlight_item]),0,$GLOBALS['_SEARCH_SUMMARY_LENGTH']))


293 Purchases
39 Comments