PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Google Sitesearch - Dynamic selection of search engine

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Google Sitesearch - Dynamic selection of search engine

    Anyone who has an Adsense account would know that Google allows one to create a searchbox with either only Google or with Google and Sitesearch combo.

    Wondering if I could substitute the Google sitesearch form with ZoomEngine's. When someone selects the Sitesearch button, I'd like the results from ZoomEngine to be displayed, not Google's sitesearch's results.

    If anybody has been successful constructing this search form, please show me how.

  • #2
    I'm not entirely sure what exactly you are asking for. Am I correct to assume you want to have a search form that allows the user to switch between performing a Google Internet-wide search (the same as typing a search result into google.com's front page), and a site search that uses Zoom?

    The instructions and HTML for creating a search form for Zoom is described here:
    http://www.wrensoft.com/zoom/support...tml#simpleform

    But having a form that switches between different destination URLs (ie: switching between sending the data to Google or your own Zoom search engine) would require Javascripting, where you would most likely just switch between two HTML forms.

    On a side note, I've never really understood why people put Internet-wide Google search boxes on their own sites. It's unlikely that a visitor would not be aware of Google already, and couldn't go there themselves, if they wanted to perform an Internet-wide search. And so many people have Google toolbars, etc. In fact, I've always found it kinda frustrating to go to a site, assume that the search box was a site search, and then I get search results from across the whole Internet instead.
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      Google and Zoom

      While I understand that everyone knows where Google is if they want to place a search, Google Co-op program allows me to input as many websites as I want and they will only search those websites when giving the results. So I can use Google to take care of the web and Zoom to search my site and maybe a couple more.

      What I want to do is add 2 radio buttons to the Google form just as intuit does here http://jumpup.intuit.com/ one will reference my Google Co-op sites and one will send the search to the embedded CGI script. default would be site search.

      I'm building two sites that will have extensive directories of business and articles and the copy of Zoom professional I just purchased is beyond great to do site search for these sites. But I just don't have time or energy to manage indexing of 1000 external websites and the Google Co-op search does this just as I need it to and I might even make 10 cents a month to boot.

      So back to my question. How can I integrate two radio buttons in to the Google form with one calling to Google and the other calling the embedded CGI search of Zoom.

      A solution would make the search on my sites the best of both worlds. Oh one of the sites under construction is www.loud-quiet.com a directory for quiet businesses and places.

      Thanks

      Sit

      Comment


      • #4
        Should be V5

        I'm using V5 of Zoom... Sorry I didn't see the thread I was responding to was in V4


        Sit

        Comment


        • #5
          The easy solution to to create two search forms. One for the web and one for your site.

          The more advanced solution is to add some Javascript to switch between the search form's action.

          This example is derived from the generic example provided by Will Bontrager here.


          Code:
           
          <script type="text/javascript" language="JavaScript">
          function SwitchAction() {
           
            if(document.SearchForm.reason[0].checked == true) {
               document.SearchForm.action = 'http://www.google.com/custom';
               document.SearchForm.method = 'get';
            }
            if(document.SearchForm.reason[1].checked == true) {
               document.SearchForm.action = 'http://www.yoursite.com/zoom/search.php';
               document.SearchForm.method = 'get';
            }
            return true;
          }
          </script>
          <form name="SearchForm" method="post" action="/cgi-bin/mf.cgi">
          <input type="text" name="zoom_query" /><br>
          <input type="hidden" type="text" name="q" /><br>
          <input type="radio" name="reason">Google web search<br>
          <input type="radio" name="reason">Search this site<br>
          <input type="submit" value="Go" onClick="return SwitchAction();">
          </form>
          This example is not complete becuase you need to correctly build up the Google URL with the query string in the URL based on the sites you want to search with Google. But it should give you a good starting point. It would be good if you could post your final code.

          Comment


          • #6
            What is the reason for not using Zoom instead of Google for your external index?

            Comment


            • #7
              not a programmer

              Thanks for the answer and code but not being a programmer the code is not much help to me. I was hoping someone would have had a complete answer.

              Seems I should have done more home work before spending money on something that is not quite what I was looking for.. but live and learn. I love zoom and maybe someday I will find an answer that I can implement within my skill level.

              To answer the last question, I want to use google as an external search engine because I don't want to have to index many thousands or tens of thousands of pages on a regular basis.

              Comment


              • #8
                So either use the easy solution, and to create two search forms in HTML. This should only take 10 minutes.

                Or you could always employ a web designer (or programmer) to create the Google interface you need. A good web designer with some Javascript experience would probalby only take an hour or two to do this.

                If you don't know any web designers or programmers, or can't afford a local one, employ an Indian or Russian from rent-a-coder.

                Comment

                Working...
                X