Google Search + Website Search...

nimzie - March 22, 2008 - 00:45

Hi folks. I'm wondering how I would set things up so that my site would have a radio button where the user can choose a google or a site search and use the same text field to do both...

Thanks,

Adam

Google

jaak - March 22, 2008 - 08:00

http://drupal.org/project/googleajaxsearch
Google Ajax Search Module

http://drupal.org/project/google_cse
Google Custom Search Engine

Googleajaxsearch

nimzie - March 31, 2008 - 18:44

I've installed this component and finally got a search block coming up. I type in the field and click search and nothing happens. I have an api key for localhost and I'm connected. If I turn on some of the "block searchers", they work.

Anyone got any tips?

And also, how would I get it to output the choices with radio buttons (web, local) searches.

I've got the search itself

nimzie - April 1, 2008 - 16:07

I've got the search itself working. I am having a hard time with the Ajax Search Result Location now. If I leave the Enable Search From Root box unchecked, I get my tabs as I would assume in the same block as the search. I want the results in a different div, so I created a div:

    <div id="googleResults" >
    </div>

and entered googleResults in the "Type in div id in which you want to display results:" field. I now get no results at all.

Has anyone got an idea how to get this working?

Ideally, it would be in the <div class="contentholder"> div, however I see reference to ID, so I tried both and neither worked.

googleajaxsearch - code snippet for displaying results

happysnowmantech - July 12, 2008 - 23:35

Not sure if it applies to your situation, but I posted a code snippet here for displaying results.

As for the radio button, it might be easier to just use Google's CSE code for rendering the search form, but I'm not 100% certain.

 
 

Drupal is a registered trademark of Dries Buytaert.