Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Search Results

Quote Reply
Search Results
Hey,

When you search and the results appear with what category they are in above.

eg

Top: Shopping : Clothing

The Clothes Store
blah blah blah

How do I get rid of the Top : Shopping : Clothing part?

Cheers!
Quote Reply
Re: Search Results In reply to
I cannot find this in the template?
Quote Reply
Re: Search Results In reply to
If you mean the top indicator, just edit your template to remove that.

Part of this is to eventually (I hope) allow search in this category only type of actions.

------------------
POSTCARDS.COM -- Everything Postcards on the Internet www.postcards.com
LinkSQL FAQ: www.postcards.com/FAQ/LinkSQL/







Quote Reply
Re: Search Results In reply to
Oh, you want to get rid of the sorting by category. You have to edit search.cgi

The first foreach groups the links by category, the second inserts the linked title before the grouping.

Code:
# Build the list of link results.
if ($link_hits) {
my (%link_results, %displayed, $name);
foreach my $hit (@$link_hits) {
$hit = $linkdb->array_to_hash ($hit);
$link_results{$hit->{CategoryID}} .= &site_html_link ($hit, $dynamic);
}
foreach my $hit (@$link_hits) {
next if ($displayed{$hit->{CategoryID}}++);
$name = &get_category_name ($hit->{CategoryID});
$link_results .= "<p>" . &search_build_linked_title ($name) . "</p>";
$link_results .= $link_results{$hit->{CategoryID}};
}

To get rid of the titles, just get rid of the line:

$link_results .= "<p>" . &search_build_linked_title ($name) . "</p>";

The links are grouped in the first loop, then the groups are added together in the $link_results
variable with the linked_title inserted before the corresponding group.

To prevent grouping by category all together, you'd have to edit the routines to look something like:

Code:
# Build the list of link results.
if ($link_hits) {
my (%link_results, %displayed, $name);
foreach my $hit (@$link_hits) {
$hit = $linkdb->array_to_hash ($hit);
$link_results .= &site_html_link ($hit, $dynamic);
}

ALl this does is iterate through the returned hits, turn them into "links" then add them to
the $link_results in the order returned by the search routines (score first)

This is untested, but should work -- with at most a minor tweak.



------------------
POSTCARDS.COM -- Everything Postcards on the Internet www.postcards.com
LinkSQL FAQ: www.postcards.com/FAQ/LinkSQL/







Quote Reply
Re: Search Results In reply to
I just changed what you said, and when I perform a search, it comes up with

The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.

HTTP 500 Internal Server Error

Please help me

~A

Quote Reply
Re: Search Results In reply to
What does the error log say? Did you make sure to upload the file as ASCII ?



------------------
POSTCARDS.COM -- Everything Postcards on the Internet www.postcards.com
LinkSQL FAQ: www.postcards.com/FAQ/LinkSQL/








Quote Reply
Re: Search Results In reply to
Yes I made sure

~A