Thread: XML error
View Single Post
Old 01-18-2004, 08:02 AM   #3
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. In the search_function.php file, change:
PHP Code:
if(eregi($reg_strings,$extract_content)) {
   
$match_this_spot str_replace('<','&lt;',str_replace('>','&gt;',trim($match_this_spot)));
   
$match_this_spot eregi_replace($reg_strings,"\\1<\\2>\\3",$extract_content);
   
$first_bold_spot strpos($match_this_spot,"<");
   
$first_bold_spot max($first_bold_spot round((SNIPPET_DISPLAY_LENGTH 2),0), 0);
   
$extract_content substr($extract_content,$first_bold_spot,max(SNIPPET_DISPLAY_LENGTHstrlen($query_string)));
   
$extract .= ' ...'.phpdigHighlight($reg_strings,str_replace('<','&lt;',str_replace('>','&gt;',trim($extract_content)))).'... ';
   
$num_extracts++;

to the following:
PHP Code:
if(eregi($reg_strings,$extract_content)) {
   
$extract_content str_replace('<','&lt;',str_replace('>','&gt;',trim($extract_content)));
   
$match_this_spot eregi_replace($reg_strings,"\\1<\\2>\\3",$extract_content);
   
$first_bold_spot strpos($match_this_spot,"<");
   
$first_bold_spot max($first_bold_spot round((SNIPPET_DISPLAY_LENGTH 2),0), 0);
   
$extract_content substr($extract_content,$first_bold_spot,max(SNIPPET_DISPLAY_LENGTHstrlen($query_string)));
   
$extract .= ' ...'.phpdigHighlight($reg_strings,$extract_content).'... ';
   
$num_extracts++;

Remember to remove any "word" wrapping in the above code.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote