Gossamer Forum
Home : Products : Links 2.0 : Customization :

customizing how search results appear

Quote Reply
customizing how search results appear
hi, i am very new here. i've visited a site called www.japanesereference.com. does anyone know how i could format my links to appear like the ones at that site? like in this format:

Site Title
URL: http://www.site.com
Category: Category1/subcategory2/etc.
Added: 6-Sep-2000 - Hits: 6 - Votes: 0

Quote Reply
Re: customizing how search results appear In reply to
think templates...

--Drew
Links 2.0 stuff
http://www.camelsoup.com
Quote Reply
Re: customizing how search results appear In reply to
I could tell ya to Search the Forum!!! but I wont.. :) To make your search results look similar to the results on Google.com just do the following. Change link.html a bit more if you want something different.

Modify sub site_html_link in site_html_templates.pl like below
--------------------------------------------------------------

In Reply To:
my %rec = @_;

# Set new and pop to either 1 or 0 for templates.
($rec{'isNew'} eq 'Yes') ? ($rec{'isNew'} = 1) : (delete $rec{'isNew'});
($rec{'isPopular'} eq 'Yes') ? ($rec{'isPopular'} = 1) : (delete $rec{'isPopular'});

$cat_clean = &build_clean($rec{Category});

return &load_template ('link.html', {
detailed_url => "$db_detailed_url/$rec{'ID'}$build_extension",
%rec,
%globals,
cat => $cat_clean
});
}
Replace the code in link.html with this
---------------------------------------

In Reply To:
<ul><a class="link" href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>"><%Title%></a>


<%if Description%>
<font size=-1 color=#6f6f6f>Description: </font><small><span class="descript"><%Description%></span></small>

<%endif%>

<font size=-1 color=#6f6f6f>Category: <a class="linkcat" href="<%build_root_url%>/<%Category%>"><%cat%></a></font>


<small><font color=green><%URL%> - </font></small>

<%if isNew%>
<small>new</small>
<%endif%>

<%if isPopular%>
<small>popular</small>
<%endif%>

</ul>
Cheers..

Madtech


Quote Reply
Re: customizing how search results appear In reply to
thanks, madtech! i was actually thinking of google and you hit it on target. i have some more questions, i hope you don't mind.

like in google, all of the related categories appear on top, and not on top of each set of links that fall under it. i wonder if that is possible.
Quote Reply
Re: customizing how search results appear In reply to
If you are trying to get all of the related categories to appear at the top, then try the following. In category.html add the following where you want the related categories to appear;

Code:
<%if related%>
<%related%>
<%endif%>
Dunno if that is what you are trying to do though Wink

Andy

webmaster@ace-installer.com
http://www.ace-installer.com
Quote Reply
Re: customizing how search results appear In reply to
right now, my search results appear this way:

Telecommunications

Telecom.com
Description: blah blah blah blah... etc..
Category: Telecommunications
http://www.telecom.com new pop

News

CNN
Description: blah blah blah blah... etc..
Category: News
http://www.cnn.com new pop

what i would like to happen is this:

Categories: Telecommunications News

Telecom.com
Description: blah blah blah blah... etc..
Category: Telecommunications
http://www.telecom.com new pop

CNN
Description: blah blah blah blah... etc..
Category: News
http://www.cnn.com new pop