Site Search Functionality

Basil has a series going on Learning To Blog. He is on Part VI: Site Search. Just wanted to chip in my 2 gold dubloons, and add a little bit. Also, you can visit Harvey,who really isn’t a Bad Example, and whose posts helped me alot when I first started. This is the code that I use for Google site search:

<!– SiteSearch Google –>

<form method="get" action="http://www.google.com/custom" target="_top">
<table border="0" bgcolor="#6699CC">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<a href="http://www.google.com/">
<img src="http://www.google.com/logos/Logo_25wht.gif"
border="0" alt="Google"></img></a>
<br/>
<input type="hidden" name="domains" value="thepiratescove.us"></input>
<input type="text" name="q" size="21" maxlength="255" value=""></input>
</td></tr>
<tr>
<td nowrap="nowrap">
<font size="-1" color="#FFFFFF">
<input type="radio" name="sitesearch" value="thepiratescove.us" checked="checked"></input>Pirate’s Cove<br>
<input type="radio" name="sitesearch" value=""></input> Web<br>

</font>&nbsp;&nbsp;
<input type="submit" name="sa" value="Search"></input>
<input type="hidden" name="client" value="pub-8614959142428937"></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:#006699;GL:1;DIV:#CCCCCC;VLC:006699;AH:center;BGC:FFFFFF;

LBGC:FFFFFF;ALC:333333;LC:333333;T:666666;GFNT:CCCCCC;GIMP:CCCCCC;

FORID:1;">

</input>
<input type="hidden" name="hl" value="en"></input>

</td></tr></table>
</form>
<!– SiteSearch Google –>

It is a little more customizeable then the standard Google search. Here is what you do:

  1. The line that says table border, change the color code to the one you want.
  2. Change the 2 "thepiratescove.us" to your blogs address, as well as changing Pirate’s Cove to your blogs name.
  3. The line that says "input type="text" name="q" size="21"" change the number after size to what you need it to be. For me, with a 200 pixle wide sidebar, 21 is good.
  4. The line that says "font size="-1" color="#FFFFFF" change the color code to the one you want.

What are the color codes? One way to find them is to go here.

Give it a shot.

A slight update during the 5 free minutes I have today: part of the code was cut off, since no scroll. So, i have broken it up a little bit. Just to make sure there are no errors, once you copy it, put the cursor right before the "input" that is red, hit backspace. Then cursor before FORID, back space, then LBGC, backspace.

Save $10 on purchases of $49.99 & up on our Fruit Bouquets at 1800flowers.com. Promo Code: FRUIT49
If you liked my post, feel free to subscribe to my rss feeds.

Both comments and trackbacks are currently closed

5 Responses to “Site Search Functionality”

  1. Diane says:

    Thanks for your extra information, after months of trying to figure out how to make the search box smaller, now comes lots of good help all at once. I’ll try to color my google later today.

  2. Beth says:

    All right, you…where’s the tip jar?

    You so ROCK!!!

  3. Jay says:

    Very useful info, thanks!

  4. Harvey says:

    Good point on being able to change the color on the box. I forgot to point that out.

  5. Bad Example says:

    HELP FOR THE BLOGSPOTTED: GOOGLE SEARCH YOUR SITE

    Google bought Blogger a while back, and yet Blogger still doesn’t have a native search function included in the blogging software. Which isn’t really a problem… until that day comes (and it will) when you want to find one of…

Bad Behavior has blocked 5904 access attempts in the last 7 days.