![]() |
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 |
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.
|
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 |
Hi. Oh, I see. Try setting DISPLAY_SUMMARY to true and DISPLAY_SNIPPETS to false and SUMMARY_DISPLAY_LENGTH to 160.
|
oki i did that, but it doesn't show description at all, then ??
Plodz1 |
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 |
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. ;) |
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 |
Hi. The above code is currently working in the demo. Maybe a typo was introduced somewhere during the copy-paste?
|
All times are GMT -8. The time now is 12:36 PM. |
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.