header left image   header right image

Home > Toolkit > Adding a Google search to your site

Adding a Google search to your site

You may wish to include a search form on your web page that will allow users to search only the documents in your web publishing area. To do this, simply include a form that takes user input and passes it to the search engine. Note: You can only use this if your site is on the webpub.brown.edu server. Copy and paste this HTML code for the form into your page, and then make one customization (in red below):

<form method="GET" action="http://www.google.com/u/brown">

<input type="hidden" name="hq" value="inurl:www.brown.edu/yoursite" />
Search for:
<input size="30" name="query" value="" />
<input type="submit" name="submit" value="Submit" />

</form>


Set the variable hq to refer to the section of the Brown web you'd like to include in your search. For example,

<input type="hidden" name="hq" VALUE="inurl:www.brown.edu/Facilities/CIS" />

You will get the following search box:

Search for:


which will search only the CIS site. You can control the look of the page where you start the search, but it is not possible to control the look of the results page.

In order to use this Google search on your homepage, you will need to place the Google logo on any page that has the search box. Use this code to add the Google logo to your page:

<p>Search provided by <a href="http://www.google.com"><img src="/Library/google-dark.gif" width="50" height="20" border="0" align="absmiddle" /> </a></p>

This will display a graphic which links to Google.com, like this:

Search provided by

There are two versions of the Google logo, one for dark backgrounds and one for light backgrounds.

<a href="http://www.google.com"><img src="/Library/google-dark.gif" width="50" height="20" border="0" align="absmiddle" />
<a href="http://www.google.com"><img src="/Library/google-logo.gif" width="50" height="20" border="0" align="absmiddle" />

[Toolkit]   [ Publishing Help]   [Publisher Forum]   [Web Policies]  [Web Security]   [Brown Home]   [CIS Home]   [Home]


Page Last Modified: Wednesday, 16-Nov-2005 16:52:21 EST by CIS