|
10-25-2003, 08:23 AM | #1 |
Green Mole
Join Date: Oct 2003
Posts: 8
|
Shorter Decription
Hi there.
I was trying to make shorter descriptions, but no succes. I would like It to be like 150 characters, I tried to put that value in config, but it still creates larger descriptions. In other words, I have desriptions like 4 lines of text, and I would like to have only 2 lines of text. And another thing; I does something like that: ...part of the texton site ... ...bla bla bla... ...sdf gsdgsdg dsgdsg... Does it show a context of the keyword? Well, my wish is to be not longer ( whole description) than 150-160 characters. Please Help Paul |
10-25-2003, 09:03 AM | #2 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Hi. Try changing define('DISPLAY_SNIPPETS_NUM',4); to define('DISPLAY_SNIPPETS_NUM',2); in the config file. This shold make it so that there are a max of two ... keyword in here ... ... keyword also in here ... displayed in the results.
__________________
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. |
10-25-2003, 09:20 AM | #3 |
Green Mole
Join Date: Oct 2003
Posts: 8
|
huh, Idid that just now, but :
those snippets are not more than 2 , but they are too long (180 characters), if there are 2 snippets in one description, it makes 360 charecters. and what I want is something about 160-180 caracters for whole descriptions, so if I set 2 snippets, they got to be not larger than 90-100 characters. Somethings wrong with it: I will post 2 lines of my config: define('SUMMARY_DISPLAY_LENGTH',190); //Max chars displayed in description define('DISPLAY_SNIPPETS_NUM',2); //Max snippets to display and if still displays more than I wish. I even tryied to crawl again after changing config values. No luck. Huh help please. THX Plodz1 |
10-25-2003, 09:45 AM | #4 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Hi. Oh, I see. Try setting DISPLAY_SUMMARY to true and DISPLAY_SNIPPETS to false and SUMMARY_DISPLAY_LENGTH to 160.
__________________
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. |
10-25-2003, 10:05 AM | #5 |
Green Mole
Join Date: Oct 2003
Posts: 8
|
oki i did that, but it doesn't show description at all, then ??
Plodz1 |
10-25-2003, 10:14 AM | #6 |
Green Mole
Join Date: Oct 2003
Posts: 8
|
Well thats becouse some pages doesn't have descriptions in meta, so best way is to reduce numer of words in snippets?
Do You know how to do that?? THX Paul |
10-25-2003, 01:37 PM | #7 |
Head Mole
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:
PHP Code:
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. |
10-26-2003, 05:24 AM | #8 |
Green Mole
Join Date: Oct 2003
Posts: 8
|
welll I got blank page with errors:
Parse error: parse error in phpdig/libs/search_function.php on line 302 Fatal error: Call to undefined function: phpdigsearch() in /public_html/search.php on line 47 thx anyway Plodz1 |
10-26-2003, 07:45 AM | #9 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Hi. The above code is currently working in the demo. Maybe a typo was introduced somewhere during the copy-paste?
__________________
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. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to show shorter titles in results? | orbitalz | Troubleshooting | 1 | 05-01-2004 07:18 AM |