Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Alex - search bug?

Quote Reply
Alex - search bug?
Don't know if this a really a bug per se but...

One of my visitors pointed out an oddity in the search results when using an apostrophe in the site title or link description:

When doing a search for 'Logan's Run' as keywords, 9 sites are returned, no categories are returned (since I can't include an apostrophe in the category title, this makes sense).

When doing a search for 'Logans Run' with no punctuation (as keywords) the category and three sites are returned. The thing is, only one of those sites doesn't have an apostrophe; the other two do and are also returned with the first search. Just to make things fun, the same search as a phrase only returns the one link, not the category (i.e. it says it found "0" categories).

Any ideas what would cause this sort of behavior? Shouldn't the phrase search at least have found the matching category name? Which would you consider the "correct" response from the script?

If its helpful, try it out for yourself:
speculativevision.com/network/
Quote Reply
Re: Alex - search bug? In reply to
You'll find 'logans run' in the url. The script by defaults searches the url as well as the title and description.

By the way, I love the look of the site. =)

Cheers,

Alex
Quote Reply
Re: Alex - search bug? In reply to
Ah ha! I hadn't even considered the URL. That makes sense.

Thanks for the kind words about my site (or should I say "my obsession" *LOL*).
Quote Reply
Re: Alex - search bug? In reply to
Brad

Great site.

I've been trying to get the Hits and ratings info to print on a separate line just below the link (the way you have it on your site) and indent the description. But, being the rookie that I am, I haven't succeeded.

I use templates, so I assume I have to make changes in sub site_html_print_cat in the site_html_templates.pl file.

Can you tell me where and how it's done?


Thanks,
Jim
Quote Reply
Re: Alex - search bug? In reply to
The print_cat sub is for the category listings on your home page only. The actual link descriptions are controlled by link.html. Note that it is a partial file so you will have to edit it by hand.

All I did is switch the formatting of link.html from a unordered list to a definition list:

Code:
<DL><DT><FONT SIZE="2"><a class="link" href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>"><%Title%></A></FONT>
<%if isNew%>
<IMG SRC="foo/images/new.gif" WIDTH="XX" HEIGHT="XX" ALT="new">
<%endif%>
<%if isPopular%>
<IMG SRC="foo/images/cool.gif" WIDTH="XX" HEIGHT="XX" ALT="cool">
<%endif%>
<BR><small class="date"> <FONT SIZE="1">(Added: <%Date%>, Hits: <%Hits%>, Rating: <%Rating%>, Votes: <%Votes%> )
<A HREF="<%db_cgi_url%>/rate.cgi?ID=<%ID%>">Rate this site</A></FONT></small><BR>
<%if Description%>
<DD><span class="descript"><FONT SIZE="2"><%Description%></FONT></span><BR>
<%endif%>
</DL>

The redundant font and CSS class codes help ensure cross browser appearance. Also note that I am using graphics for the new and cool flags...just change them to match your graphic references or you can switch the IMG tags for the text that came with the original file.

Glad you liked my site!

[This message has been edited by Brad Richardson (edited March 22, 1999).]
Quote Reply
Re: Alex - search bug? In reply to
Thanks Brad . . .

I would be lost without all the great help from these forums.

Jim