Page 1 of 1

Request: Embedded Google Quicksearch

Posted: Tue Nov 06, 2007 7:15 am
by chickens
I just started using the Google Quicksearch plugin and I really like it. The only problem I see is that I want to keep the results on my site.

What I am thinking is just a simple iframe of sorts with the results rather than sending the results directly to google. Google also offers some javascript to embed the results on your own page rather than using an iframe.

When I tried to create something myself it just turned into a huge mess. I've got a programmer friend who might be interested, just doesn't have the time at the moment.

Has anyone does this or interested in it?

Re: Request: Embedded Google Quicksearch

Posted: Tue Nov 06, 2007 11:08 am
by garvinhicking
Hi!

The problem of an iframe is that it embeds really ugly into an existing page, because iframes have a fixed height.

What does the javascript look like that embeds a search result?

Regards,
Garvin

Posted: Tue Nov 06, 2007 6:14 pm
by chickens
I agree with the iframe, just trying to figure out what would work.

The javascript comes from adsense:

search box code:

Code: Select all

<!-- SiteSearch Google -->
<form method="get" action="http://zacgarrett.com/searchresults" target="_top">
<table border="0" bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">

</td>
<td nowrap="nowrap">
<input type="hidden" name="domains" value="zacgarrett.com"></input>
<label for="sbi" style="display: none">Enter your search terms</label>
<input type="text" name="q" size="20" maxlength="255" value="" id="sbi"></input>
<label for="sbb" style="display: none">Submit search form</label>
<input type="submit" name="sa" value="Google Search" id="sbb"></input>
</td></tr>
<tr>
<td> </td>
<td nowrap="nowrap">
<table>
<tr>
<td>
<input type="radio" name="sitesearch" value="" checked id="ss0"></input>
<label for="ss0" title="Search the Web"><font size="-1" color="#000000">Web</font></label></td>
<td>
<input type="radio" name="sitesearch" value="zacgarrett.com" id="ss1"></input>
<label for="ss1" title="Search zacgarrett.com"><font size="-1" color="#000000">zacgarrett.com</font></label></td>
</tr>
</table>
<input type="hidden" name="client" value="pub- Adsense code"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="ISO-8859-1"></input>
<input type="hidden" name="oe" value="ISO-8859-1"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:11"></input>
<input type="hidden" name="hl" value="en"></input>
</td></tr></table>
</form>
<!-- SiteSearch Google -->
Results page code:

Code: Select all

<!-- Google Search Result Snippet Begins -->
<div id="googleSearchUnitIframe"></div>

<script type="text/javascript">
   var googleSearchIframeName = 'googleSearchUnitIframe';
   var googleSearchFrameWidth = 600;
   var googleSearchFrameborder = 0 ;
   var googleSearchDomain = 'www.google.com';
</script>
<script type="text/javascript"
         src="http://www.google.com/afsonline/show_afs_search.js">
</script>
<!-- Google Search Result Snippet Ends -->
When I tried to use this code it was having issues due to the fact it is using GET instead of post. When I tried to just hack something together using a static page it wasn't liking it one bit. I am pretty sure it was due to rewrite rules, but I didn't investigate all that much.