Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

SearchFeed.com

(Page 1 of 2)
> >
Quote Reply
SearchFeed.com
Ok, I know that the old XML search results feed is no longer working (company went under?), so I'm looking at alternatives. Would people like to see a plugin using SearchFeed.com as the company where the results are grabbed? It will be a free plugin, so I'm not guaranteeing when it will be complete, but I would imagine by monday the latest.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] SearchFeed.com In reply to
Anyone at all interested?

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] SearchFeed.com In reply to
I am!
Quote Reply
Re: [Payooo] SearchFeed.com In reply to
Ok, heres a little sneak preview of it ;) I'll be finishing it off pretty soon, so I'll post a beta version here once its done;

http://216.127.75.251/...gi?d=1&query=cat

Any ideas/suggestions are welcome :)

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] SearchFeed.com In reply to
Ok...beta is ready now. Please find it attached. There is no readme, as its all pretty simple. If anyone does have trouble with it, please start a thread about it, or carry on this one.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] SearchFeed.com In reply to
I may be wrong but I would have thought this line would cause a fatal error:

Code:
my ($mgr, $tar) = @_;

# if template already exist...dont get rid of em!
if (-e "$CFG->{admin_root_path}/templates/$CFG->{build_default_tpl}/search_link.html") { next; }

You can't use next; outside a loop (this is in Install.pm)
Quote Reply
Re: [Paul] SearchFeed.com In reply to
Mmm....doesn't seem to cause an error, but I see where you are coming from. Maybe I should stick an 'if' around the install part, something like;

unless (file exists) { do template install }

I'll look into it....

Thanks

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] SearchFeed.com In reply to
You'll need to change it is what I'm really saying as for me it does cause a fatal.

Code:
#!/perl/bin/perl -w
#==========================================================

use strict;

if (! -e "non-existant.txt") {
next;

}
print "Content-type: text/html\n\n";
print "Done";

Log:

[Fri Mar 29 13:54:58 2002] [error] [client 213.106.15.158] Can't "next" outside a loop block at E:/Apache2/cgi-bin/test.cgi line 7.
Quote Reply
Re: [Paul] SearchFeed.com In reply to
This one better? I've used the 'unless', like i showed in my last post...

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] SearchFeed.com In reply to
It looks like you've used the code from my MyLinks plugin which uses a loop but you haven't copied over the loop.

You still have a last; in your nested unless.

Code:
unless (!-e "$CFG->{admin_root_path}/templates/$CFG->{build_default_tpl}/search_link.html") {
my $file = $tar->get_file ("search_link.html");
$file->name("$CFG->{admin_root_path}/templates/$CFG->{build_default_tpl}/search_link.html") or return Plugins::SearchFeed_Results->error("Error: $GT::Tar::error");
unless ($file->write) {
last;
return Plugins::SearchFeed_Results->error("Unable to extract file: '$CFG->{admin_root_path}/templates/$CFG->{build_default_tpl}/search_link.html' ($GT::Tar::error)", 'WARN');
}

}
Quote Reply
Re: [Paul] SearchFeed.com In reply to
Ok..should be sorted now...can't believe I missed that Crazy

I've also added a small readme...

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] SearchFeed.com In reply to
Hehe sorry to keep getting you to update your plugin but now you aren't calling an error for $file->write so if the file isn't extracted (which can happen) then the user won't know and some site_html errors will start showing.

Last edited by:

Paul: Sep 16, 2002, 8:28 AM
Quote Reply
Re: [Paul] SearchFeed.com In reply to
LOL..thats no problem Wink Heres the updated version. I add a warn statement if the template was not uploaded successfully...

At least we are getting all of the bugs out of the way Smile

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] SearchFeed.com In reply to
Hi Andy,

What can I say, Thanks :-)

It sounds good with the searchfeed plugin ( I haven't read your post before now), and I will install it right away !

Cool !!!!
Take care, Bent



Hi Again.

I have just installed the script, but I got an error, hoping that you could tell me what is wrong.

When i install it, and try to do a search, I get this:

GT::Plugins (28734): Error running plugin PRE hook: Plugins::SearchFeed_Results::do_checks. Reason: Can't locate XML/Simple.pm in @INC (@INC contains: /usr/home/bannerzone/www/cgi-bin/links/admin /usr/libdata/perl/5.00503/mach /usr/libdata/perl/5.00503 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd /usr/local/lib/perl5/site_perl/5.005 .) at /usr/home/bannerzone/www/cgi-bin/links/admin/Plugins/SearchFeed_Results.pm line 23.
BEGIN failed--compilation aborted at /usr/home/bannerzone/www/cgi-bin/links/admin/Plugins/SearchFeed_Results.pm line 23.
at GT::Plugins::_load_hook line 263.

Is there maybe something I haven't installed on the host where my site is? Or?

It's saying, can't locate XML, what is that....???Shocked



Please help if you can...Cool

Thanks,

Bent

Last edited by:

bannerzone: Sep 16, 2002, 9:54 AM
Quote Reply
Re: [bannerzone] SearchFeed.com In reply to
Hi,

Bannerzone - You may already have the answer to this, but what it means is that more than likely the perl module that handles the XML is not installed. I would talk to your sysadmin about getting the XML-Simple module installed which can be found here.
Webmaster
http://www.e-bannerx.com

Last edited by:

Paul: Sep 22, 2002, 2:56 AM
Quote Reply
Re: [fulcan] SearchFeed.com In reply to
Hi Andy,

On your search results, I have tried to make it run, however, when I type in a single word to be searched it works fine and I get all the results. However as soon as you type in two words like "alarm system" it gets an error. Here is the error message.Not an ARRAY reference at /home/virtual/site14/fst/var/www/cgi-bin/linkssql/admin/Plugins/SearchFeed_Results.pm line 85.Is there a way to fix this?Also, how do I get it to include search results from my own directory as well as the searchfeed.com results?Thanks
Webmaster
http://www.e-bannerx.com
Quote Reply
Re: [fulcan] SearchFeed.com In reply to
Hi...sorry about that....it should be fixed up now. It was because the space in between the words was not being translated to a +. I've also added the code to edit anything like % $ " ! (i.e non-words) to a plus....if anyone has another way to edit them to URL friendly charachters, I'm all ears Wink

New version is available in the download area...

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] SearchFeed.com In reply to
>>
if anyone has another way to edit them to URL friendly charachters, I'm all ears
<<

$IN->escape($url)
Quote Reply
Re: [Andy] SearchFeed.com In reply to
One of my users found a bug in this plugin. For some reason a search for creditcardconsolidators makes it return a completly blank page. See the HTML below.




<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>




Any ideas on this Andy? I have just disabled this as this is a show stopping bug. If you can't replicate this error let me know and I'll turn it on on my site so you can have a look.

cdkrg

Able2Know :: Ajooja Directory
Quote Reply
Re: [cdkrg] SearchFeed.com In reply to
Andy,

I think I know what this is. I think that when Search Feed returns no results it kills the whole page somehow. Any ideas on how to change this?

cdkrg

Able2Know :: Ajooja Directory
Quote Reply
Re: [cdkrg] SearchFeed.com In reply to
Interesting. After this line (in SearchFeed_Results.pm);

my $inc = $opts->{Active};

can you add;

if (!$results->{link_hits}) { return Links::SiteHTML::display('search', { error => 'No results were found for your query' } ); }

What does that do for you?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!

Last edited by:

Andy: Oct 14, 2003, 1:43 AM
Quote Reply
Re: [Andy] SearchFeed.com In reply to
I get this error:




A fatal error has occured:
Undefined subroutine &Links::SiteHTML called at /home/a2kname/public_html/cgi-bin/links/admin/Plugins/SearchFeed_Results.pm line 51.


Please enable debugging in setup for more details.Stack Trace======================================Links (26729): Links::environment called at /home/a2kname/public_html/cgi-bin/links/admin/Links.pm line 431 with no arguments.Links (26729): Links::fatal called at /home/a2kname/public_html/cgi-bin/links/admin/Plugins/SearchFeed_Results.pm line 51 with arguments (Undefined subroutine &Links::SiteHTML called at /home/a2kname/public_html/cgi-bin/links/admin/Plugins/SearchFeed_Results.pm line 51. ).Links (26729): Plugins::SearchFeed_Results::do_checks called at /home/a2kname/public_html/cgi-bin/links/admin/GT/Plugins.pm line 118 with arguments (HASH(0x8588458)).Links (26729): GT::Plugins::dispatch called at /home/a2kname/public_html/cgi-bin/links/admin/Links/User/Search.pm line 67 with arguments (GT::Plugins, /home/a2kname/public_html/cgi-bin/links/admin/Plugins, search_results, CODE(0x82530a4), HASH(0x83dc608)).Links (26729): Links::User::Search::search called at /home/a2kname/public_html/cgi-bin/links/admin/Links/User/Search.pm line 48 with no arguments.Links (26729): Links::User::Search::handle called at /home/a2kname/public_html/cgi-bin/links/admin/GT/Plugins.pm line 108 with no arguments.Links (26729): GT::Plugins::dispatch called at search.cgi line 25 with arguments (GT::Plugins, /home/a2kname/public_html/cgi-bin/links/admin/Plugins, handle_search, CODE(0x82353e0)).

cdkrg

Able2Know :: Ajooja Directory
Quote Reply
Re: [cdkrg] SearchFeed.com In reply to
Try Links::SiteHTML::display
Quote Reply
Re: [afinlr] SearchFeed.com In reply to
That gives the following error:



A fatal error has occured:
Can't use string ("No results were found for your q") as a HASH ref while "strict refs" in use at /home/a2kname/public_html/cgi-bin/links/admin/Links.pm line 265.


Please enable debugging in setup for more details.Stack Trace======================================Links (7976): Links::environment called at /home/a2kname/public_html/cgi-bin/links/admin/Links.pm line 431 with no arguments.Links (7976): Links::fatal called at /home/a2kname/public_html/cgi-bin/links/admin/Links.pm line 265 with arguments (Can't use string ("No results were found for your q") as a HASH ref while "strict refs" in use at /home/a2kname/public_html/cgi-bin/links/admin/Links.pm line 265. ).Links (7976): Links::user_page called at (eval 21) line 1 with arguments (search.html, error, No results were found for your query).Links (7976): Links::SiteHTML::site_html_search called at /home/a2kname/public_html/cgi-bin/links/admin/GT/Plugins.pm line 108 with arguments (error, No results were found for your query).Links (7976): GT::Plugins::dispatch called at /home/a2kname/public_html/cgi-bin/links/admin/Links/SiteHTML.pm line 28 with arguments (GT::Plugins, /home/a2kname/public_html/cgi-bin/links/admin/Plugins, site_html_search, *Links::SiteHTML::site_html_search, error, No results were found for your query).Links (7976): Links::SiteHTML::display called at /home/a2kname/public_html/cgi-bin/links/admin/Plugins/SearchFeed_Results.pm line 51 with arguments (search, error, No results were found for your query).Links (7976): Plugins::SearchFeed_Results::do_checks called at /home/a2kname/public_html/cgi-bin/links/admin/GT/Plugins.pm line 118 with arguments (HASH(0x85805e0)).Links (7976): GT::Plugins::dispatch called at /home/a2kname/public_html/cgi-bin/links/admin/Links/User/Search.pm line 67 with arguments (GT::Plugins, /home/a2kname/public_html/cgi-bin/links/admin/Plugins, search_results, CODE(0x824a36c), HASH(0x83dbe20)).Links (7976): Links::User::Search::search called at /home/a2kname/public_html/cgi-bin/links/admin/Links/User/Search.pm line 48 with no arguments.Links (7976): Links::User::Search::handle called at /home/a2kname/public_html/cgi-bin/links/admin/GT/Plugins.pm line 108 with no arguments.Links (7976): GT::Plugins::dispatch called at search.cgi line 25 with arguments (GT::Plugins, /home/a2kname/public_html/cgi-bin/links/admin/Plugins, handle_search, CODE(0x8235190)).

cdkrg

Able2Know :: Ajooja Directory
Quote Reply
Re: [cdkrg] SearchFeed.com In reply to
The error => ... needs to be in {}
> >