SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Evangelist
    Join Date
    Oct 2003
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Code for Google - Search Site

    Hey,
    What code should I implement on the Google search on barrennorth.com to make the "Search this Site" button actually search the site, rather than the Web?
    Thanks.

  2. #2
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hello

    You need a database of information stored on your server. Then you would point the form action to that database.

    That is my basic explaination, there may be other ways, and there is alot I do not know about databases.

    Later
    Johnny

  3. #3
    l 0 l silver trophybronze trophy lo0ol's Avatar
    Join Date
    Aug 2002
    Location
    Palo Alto
    Posts
    5,329
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you talking about a simple site: string?

    http://www.google.com/help/features.html#sitesearch

  4. #4
    l 0 l silver trophybronze trophy lo0ol's Avatar
    Join Date
    Aug 2002
    Location
    Palo Alto
    Posts
    5,329
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah, I bet you're talking about

    http://www.google.com/searchcode.html

  5. #5
    SitePoint Evangelist
    Join Date
    Oct 2003
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes. I had to modify Google's site search code - the radio buttons won't go with my template well, but most of all, no one would use the "search the net" thing, anyway. I'm wondering how to use the site search code here:

    Code:
    <!-- Search Google -->
    <center>
    <FORM method="GET" action="http://www.google.com/custom">
    <TABLE bgcolor="#dcdcdc" cellspacing="0" border="0">
    <tr valign=top><td>
    </td>
    <td>
    <INPUT TYPE=text name="q" size=20 maxlength=255 value="">
    <INPUT type=submit name="sa" VALUE="Search this Site">
    <INPUT type=hidden name="cof" VALUE="S:http://www.BarrenNorth.com;GL:1;AH:center;BGC:lightgrey;LH:43;LC:darkred;L:http://barrennorth.com/images/logo.gif;LW:700;AWFID:cd4dcd6f30c7fbda;">
    </td></tr></TABLE>
    </FORM>
    </center>
    <!-- Search Google -->

  6. #6
    SitePoint Evangelist
    Join Date
    Oct 2003
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nevermind, got it. Thanks.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •