Gossamer Forum
Home : Products : Links 2.0 : Customization :

Fluid Search Engine mod?

Quote Reply
Fluid Search Engine mod?
Hi! Does anyone have ever tried to combinate Links2.0 with the Fluid Search Engine from http://www.xav.com/ ? Since the Altavista mod is not working anymore, I am urgently looking for a way to get results from a spider (if necessary, I would even build up my own small fluid search engine), in case there are no own results from our Links2.0 webcatalogue. Can someone help me please? Exists any kind of mod, which could help to solve this problem? Or any other idea?

THANK YOU VERY MUCH,
alex.


Quote Reply
Re: Fluid Search Engine mod? In reply to
In search.cgi change:
Code:
# Return unless we have results.
((keys %link_results > 0) or ($#category_results >= 0)) or
&site_html_search_failure ("no matching records") and return;
..to....

Code:
# Return unless we have results.
((keys %link_results > 0) or ($#category_results >= 0)) or &extra_search;
.....then add this sub at the very bottom of search.cgi
Code:
sub extra_search {

use LWP::Simple;

my $term = $in{'query'};

my $url = "http://www.google.com/search?q=$term";

@data = get($url);

foreach (@data) {
$page .= $_;
}

&site_html_search_results($page);
}
Then in site_html_templates.pl in sub site_html_search_results add:

Code:
page => $page,
Then in the search_results.html template add:

Code:
<%page%>
I haven't tested that at all so it may not work but let me know if you try it and if it works or not Smile


Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Post deleted by halloalex In reply to
Quote Reply
Re: Fluid Search Engine mod? In reply to
Hi,

Did you add

page => $page,

in site_html_templates.pl in the place I said?

If you did you shouln't get the unknown tag error Frown

Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Re: Fluid Search Engine mod? In reply to
In site_html_templates.pl replace:


Code:
sub site_html_search_results {
# --------------------------------------------------------
# This routine displays the search results.
#
my $term = &urlencode ($in{'query'});
&html_print_headers;
print &load_template ('search_results.html', {
term => $term,
link_results => $link_results,
category_results => $category_results,
next => $next,
cat_hits => $cat_hits,
link_hits => $link_hits,
%in,
%globals
});
}
with......
Code:
sub site_html_search_results {
# --------------------------------------------------------
# This routine displays the search results.
#
my $term = &urlencode ($in{'query'});
my $page = shift;
&html_print_headers;
print &load_template ('search_results.html', {
term => $term,
link_results => $link_results,
category_results => $category_results,
next => $next,
cat_hits => $cat_hits,
link_hits => $link_hits,
page => $page,
%in,
%globals
});
}

Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Post deleted by halloalex In reply to
Quote Reply
Re: Fluid Search Engine mod? In reply to
OK for dmoz just change:

my $url = "http://www.google.com/search?q=$term";

to...

my $url = "http://search.dmoz.org/cgi-bin/search?search=$term";

I'll try to come up with some code to get rid of the bits you don't want. I'll get back to you...

Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Re: Fluid Search Engine mod? In reply to
So what is "fluid search engine" where can it been seen at work.... alex where is your site ? and is the difference with the altavita mod ?

Quote Reply
Post deleted by halloalex In reply to
Quote Reply
Re: Fluid Search Engine mod? In reply to
Hi,

The mod still needs a bit of work because it shows your error page at the bottom of the dmoz results but it is 11.15pm in the UK so I can't do it now..

You will also need to change:

&site_html_search_results($page);

to

&site_html_search_results($page) and return;

Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Post deleted by halloalex In reply to
Quote Reply
Post deleted by halloalex In reply to
Quote Reply
Re: Fluid Search Engine mod? In reply to
OK here is the mod...this works now but I'm still working on getting it to remove unwanted bits....

You will need to restore search.cgi to it's original state and replace:

Code:
# Return unless we have results.
((keys %link_results > 0) or ($#category_results >= 0)) or
&site_html_search_failure ("No matching records") and return;
with....

Code:
# Return unless we have results.
unless ((keys %link_results > 0) or ($#category_results >= 0)) {
use LWP::Simple;
my $term = $in{'query'};
my $url = "http://search.dmoz.org/cgi-bin/search?search=$term";

@data = get($url);

foreach (@data) {
s/src=\"(.+)\"/src=\"http:\/\/www.dmoz.org$1\"/gi;
$page .= $_;
}
&site_html_search_results($page);
return;

}

Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Post deleted by halloalex In reply to
Quote Reply
Re: Fluid Search Engine mod? In reply to
I have the Fluid Dynamics search engine on my site, here:
http://southernarizona.com/...tion/linksearch.html
I haven't done much with it lately, but it works great, and the support is good!

Leonard
http://southernarizona.com
Quote Reply
Re: Fluid Search Engine mod? In reply to
And if we press Next in

http://www.journalistenplattform.de/cgi-bin/search.cgi?query=testing&bool=or&type=keyword&sprache=Alle&search=&mh=+25


we get:
---------------
Open the www.journalistenplattform.de home page, and then look for links to the information you want.
Click the Back button to try another link.
Click Search to look for information on the Internet.



HTTP 404 - File not found
Internet Explorer
--------------------
How to correct ?


Andrew.N
Quote Reply
Post deleted by halloalex In reply to
Quote Reply
Re: Fluid Search Engine mod? In reply to
It's because at the moment your really only just grabing the page rather than parsing it. ie. the next link is the next link used in the original dmoz page...

Glenn

Links 2 Mods Site:
http://cgi-resource.co.uk/pages/links2mods.shtml
Quote Reply
Re: Fluid Search Engine mod? In reply to
Yes it shouldn't be hard to correct - probably just with regex.

I mentioned it was only a quick example - after all, I was doing it a midnight last night Smile

Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Re: Fluid Search Engine mod? In reply to
A few days back I posted here how to modify altavista.cgi so that Dmoz or Excite can be parsed (I didn't bother posting how to work it with search.cgi as I thought most people should be able to figure it out from there):

http://www.gossamer-threads.com/...w=collapsed&sb=5



Glenn

Links 2 Mods Site:
http://cgi-resource.co.uk/pages/links2mods.shtml
Quote Reply
Re: Fluid Search Engine mod? In reply to
Hi Leonard!

Thanks for help.

But it seems, that you have replaced the links2.0-search completly with the fluid search. Have you ever tried, to combinate them? So you get results from the fluid engine only in case there are no webcatalog results? I guess, this would be much better.

Greetings,
alex.

Quote Reply
Re: Fluid Search Engine mod? In reply to
 
Hi Paul!

Thanks for you kind support.

Because the "subject" line "DMOZ mod" is more similar to the topic than ours, I left a short message there. Plz check it out:
http://www.gossamer-threads.com/perl/forum/showflat.pl?Cat=&Board=L2Cust&Number=143073&page=0&view=collapsed&sb=5

I really hope, you help us on!

Greetings,
alex.


Quote Reply
Re: Fluid Search Engine mod? In reply to
Hi,

Sorry I don't see what you need help with in that other thread. It just seems like the other user wants to know what happens in Netscape and doesn't know how to install the mod, but all the instructions he needs are in this thread. But also the mod isn't great yet, I would need to spend some time on it to get it running smoothly.

Installations:http://www.wiredon.net/gt/
Favicon:http://www.wiredon.net/favicon/

Quote Reply
Re: Fluid Search Engine mod? In reply to
alex,

The theory was to use the search that came with links to search the link listings (key word, kinda), but to also be able to use the FDSE to search entire sites that I had the script crawl. The fellow at FDSE (I forgot his name...) wrote a little script that allows my site to use either search, but so far the FDSE won't use two-word searches, as it loses the '+' in translation...

As I said, I haven't spent much time on it lately, but I am trying to keep things somewhat current. Though in messing around, I lost all the guestbook entries. :( Also the tell-a-friend dosen't work... I have been working on a new site, which also now includes Links, at http://talkaboutthetruth.com.

Leonard
http://southernarizona.com