I added a google search button to my weblog yesterday. The following code was placed into my homepage template:
<!-- BEGIN_CUSTOM_EDIT --> <p> <FORM method=GET action=http://www.google.com/custom> <INPUT TYPE=text name=q size=7 maxlength=255 value=""> <INPUT type=submit name=sa VALUE="Search"> <br> <input type=hidden name=sitesearch value="mark.michaelis.net" checked> <input type=hidden name=filter value="0" checked> </FORM> </p> <!-- END_CUSTOM_EDIT -->
This adds the following text box and button:
I took the code from the Radio Userland Search page. Originally it included a line:
<INPUT type=hidden name=cof VALUE="AH:center;AWFID:901e54b48f490ab5;">
but I didn't know what that did and removing it did not seem to have any effect so I didn't include it.
Two features I would like to add it to limit searches to a particular category and not enable my homepage as a valid result. Unfortunately, I was not able to figure out how to have Google limit the search beyond just a domain.
1/22/03: See followup discussion More on the Google It Macro.
10:16:59 AM
|