eXtropia: the open web technology company
Technology | Support | Tutorials | Development | About Us | Users | Contact Us
Development resources
 ::   WebWare 2.1 (Perl)
 ::   WebWare 2.0 (Java)
 ::   Cool hacks
cool hack
Site Search vs. Web Search Differentiate  
sent in the following cool hack...

I love your site search - just what I needed!  I keep several related sites
and wanted to be able to differentiate between them for searches.  I changed
the file search_define.pl to read:

sub PrintBodyHTML
    local($filename, $title) = @_;

    if ($filename =~ /trader/) {
	print "<img src='http://www.scs-intl.com/navimages/tticon.gif'
align='absmiddle'> "
    } elsif ($filename =~ /ondar/) {
	print "<img src='http://www.scs-intl.com/navimages/ondaricon.gif'
align='absmiddle'> "
    } elsif ($filename =~ /online/) {
	print "<img src='http://www.scs-intl.com/navimages/foicon.gif'
align='absmiddle'> "
    } else {
       print "<img src='http://www.scs-intl.com/navimages/scsicon.gif'
align='absmiddle'> ";

    print <<__BODYHTML__;
<font face="Verdana,Arial,Helvetica" size=2>
<A HREF="$server_url/$filename">


} # End of PrintBodyHTML

Now I get a cool little icon next to the link.  Check it out on