View Single Post
Old 10-25-2003, 12:37 PM   #7
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. The DISPLAY_SUMMARY starts at the beginning and goes to SUMMARY_DISPLAY_LENGTH whereas the DISPLAY_SNIPPETS is per line and displays DISPLAY_SNIPPETS_NUM snippets.

To get SUMMARY_DISPLAY_LENGTH to work with DISPLAY_SNIPPETS_NUM try the following.

In the libs directory, open search_function.php and find the following:
PHP Code:
if(eregi($reg_strings,$extract_content)) { 
and right afterwards put the following:
PHP Code:
$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((SUMMARY_DISPLAY_LENGTH 2),0), 0);
$extract_content substr($extract_content,$first_bold_spot,max(SUMMARY_DISPLAY_LENGTHstrlen($query_string))); 
Now set DISPLAY_SUMMARY to false, DISPLAY_SNIPPETS to true, DISPLAY_SNIPPETS_NUM to X snippets, and SUMMARY_DISPLAY_LENGTH to Y characters so that X times Y equals 160.

Also, the length of the text displayed between the dots is dependent on the length of that line in the respective file in the text_content directory.

That means that if the length of the line equals Z characters, which is less than Y characters, then only Z characters will be displayed between the dots.

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