Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Google Search Result

Quote Reply
Google Search Result
Is it possible that modify the search script to let it starts a new window to have google search result when my user can get any result from my search engine?
Quote Reply
Re: [erichk] Google Search Result In reply to
I am not sure I understand what you mean, but you can do something like this:

http://slashdemocracy.org/...d=1&query=google

with LSQL and the Google API.
Quote Reply
Re: [erichk] Google Search Result In reply to
You could just have a link on your search.html page

<%if query%><a href="http://www.google.com/search?q=<%term%>" target="_blank">Try a search for <%query%> in Google</a><%endif%>

Last edited by:

afinlr: Apr 27, 2003, 10:26 AM
Quote Reply
Re: [afinlr] Google Search Result In reply to
Wink Is it possible to compile the google api to Links SQL?
Quote Reply
Re: [erichk] Google Search Result In reply to
Well, it is possible to integrate Google search results into your LSQL, as the link I gave above shows. I use an inline frame, so it is a bit cheaty; if I were a better coder I would integrate the results into search.cgi. Is that what you mean?
Quote Reply
Re: [gotze] Google Search Result In reply to
Yes, it is exactly what I mean, is there any people in the forum can help me to do this?Tongue
Quote Reply
Re: [erichk] Google Search Result In reply to
I'd just like to modify search_results.html template to allow users to extend search to google (and others).
Does anyone know how this is possible ?
Thanks
--

Kestuveux.com
Quote Reply
Re: [croco] Google Search Result In reply to
Ok I've modified search_results.html template using <%query%> and <%term%> tags. It works fine.

But now I wonder how I could replace the sentence "No Matching Links." when no result is found with something like :
Code:
No Matching Links, try your to search <%query%> here :
<br>
<a href="http://www.google.com/search?num=10&query=<%term%>" target="_blank">Google</a>&nbsp;-
<a href="http://groups.google.com/groups?q=<%term%>" target="_blank">Google USENET</a>
instead of the search.html page ?
--

Kestuveux.com
Quote Reply
Re: [croco] Google Search Result In reply to
Hi. Try the following;

Code:
<%if error contains "No Matching Links"%>
show your google stuff here
<%else%>
show form and error here
<%endif%>

"contains" is a pretty cool template parser feature, which I've only just learned about :D

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: May 24, 2004, 2:19 AM
Quote Reply
Re: [Andy] Google Search Result In reply to
Thanks Andy,
I've tryed it in search_results.html but it doesn't produce anything :(

Is it the right file to modify ?

My knowledge in programming is very poor :)
--

Kestuveux.com
Quote Reply
Re: [croco] Google Search Result In reply to
Nah, you need to put it in search.html, as this is where <%error%> is shown if no results were found :0

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] Google Search Result In reply to
Thank's Andy, It works perfectly :)
--

Kestuveux.com