Forum Moderators: phranque
Search ( myname ): results for titles/website names show up which is fine, but if a listing has a pic on it, the actual path of the pic file shows too... hxxp://www.somesite.com/mynameimages/myname_image1.jpg
This is not only bad because it shows my folders if someone happens to do the "wrong" search, but for some weird reason "pulls apart" my images in the description fields. Instead of showing results with the title and description and image all looking nice, it shows the little "x" instead of my image and tears it apart showing nothing but its file path.
Does this makes sense to anyone? I know i shouldn't place images in my directory's site description field but it makes for a nice detailed listing with pics of things.
[edited by: JamesR at 4:56 pm (utc) on July 14, 2003]
[edit reason] changed to generic url [/edit]
You didn't mention what search script or server you're using... That makes it difficult to offer ideas. ;)
In any event, the best source for information is usually the support offered by a script's creator. And many search scripts are configurable in various ways, perhaps you could limit what directories or files are searched, check the documents that came with your script.
If it's a popular and commonly used script, there may be other users here that can offer suggestions.
[edited by: DaveAtIFG at 12:27 am (utc) on July 16, 2003]
I'm using scripts from Aleza. They offer software that gives rating, comments and search options for you site. I also found some other things under aspin.com since i'm in ASP development. So if thats not the answer and i can't figure out how to limit the search to certain columns in my databas, then i'll just use those. Thanks for any help you may have or have already given!
Eric
Yes :)
I don't know the script you mention but it'll probably be an option in your admin area.
Limiting the fields that are searched might get you less relevant results..
Another possible solution is to not highlight found words when they occur inside html elements. I don't know asp so you would have to ask someone else for a code example to make this happen.
In Perl a possible approach is to first have the script highlight every search term (as it does now)..and then make a correction for every search term that is highlighted but where the search term plus the highlight tags are surrounded by html tags.
if navfunc = "search" then
myTitle = highlight(myTitle, words, wCount, hcolor)
myDesc = highlight(myDesc, words, wCount, hcolor)
end if
I just basically deleted it and now the search works and keeps the pic untouched and the links untouched!
WOW i'm so happy haha.. this is such a great forum
Thank you again!
If you are after another search script/solution that doesn't break HTML while highlighting, you might want to take a look at the Zoom Search Engine [wrensoft.com] (... I can be pretty sure it doesn't break HTML, because I contributed that part of the code :))