4. Adding a customised Google Search to your site

The Google appliance has the ability to allow customisation of the search form and the results it sends back. This allows searches to be restricted to a given domain e.g. oucs.ox.ac.uk. In order to take advantage of this facility a few of the parameters set in the Oxford-wide search need to be altered. The code lines that need to be amended are:

  1. <input type="hidden" name="as_sitesearch" value="ox.ac.uk">
  2. <input name="UnitPicture" value="http://www.oucs.ox.ac.uk/googlesearch/radcliffe.jpg" type="hidden">

The first input box needs to be replaced with:

<input type="hidden" name="as_sitesearch" value="your url">

This will make the search look at your own URL instead of being an Oxford-wide search.

To restrict the search to Physics for instance, the input code should look like:

<input type="hidden" name="as_sitesearch" value="physics.ox.ac.uk">

You may restrict the search even further by adding a trailing / to the end of the url. The search is then restricted to only that folder.

e.g. <input type="hidden" name="as_sitesearch" value="physics.ox.ac.uk/admin/">

You should then insert the following code:
<input name="Unit" value="Your Department Name Here" type="hidden">
This input box needs to have the correct department name added. So, for the Physics Department, you should replace 'Your Department Name Here' with 'Physics' as the value parameter. The name Physics will now appear as part of the results page heading.

Finally you can change the image that appears to the left of the search box. Change the URL so that it references your chosen image instead of the default Oxford image. Please make your image no wider than 75px to prevent CSS problems. Test your changes to make sure that you now see your chosen image, the search title states your unit name and finally that the results are coming from your chosen Oxford domain.

Physics search results

Please note: You cannot specify more than one domain using the as_sitesearch parameter. However multiple web sites within that domain are all searched. For instance, public facing pages of both www.magd.ox.ac.uk and jcr.magd.ox.ac.uk can be searched together using this method but www.magd.ox.ac.uk and oucs.ox.ac.uk cannot. If you wish to include more domains in your search results a search 'collection' needs to be used. 'Collections' are created for you by the InfoDev Team. See 5. Google Customised Search Collections for more information.

Up: Contents Previous: 3. Adding the Standard Oxford Google Search to your site Next: 5. Google Customised Search Collections