Custom Google Search Instructions

From Web Developer Network Wiki
Jump to: navigation, search

How To add a custom google search page for a department.

Basic instructions

  1. Go to http://google.com/coop/cse/ and log in as unlwdn (Brett has the password)
  2. Create a custom search engine matching the departments site and servers they want
  3. Under the Look and Feel section, change the colors title:#c60202 and visited link:#990000
  4. Under the Code section, select the Watermark option for the display
  5. Under the Code section, copy the api javascript and send it to the users, after fixing things below.

In the following bit of code from the api javascript:

<!-- Google CSE Search Box Begins -->
     Stuff goes here.
<!-- Google CSE Search Box Ends -->

You'll need to change this line

    <input type="hidden" name="cof" value="FORID:N" />

to

    <input type="hidden" name="cof" value="FORID:11" />


In the following bit of code from the api javascript:

<!-- Google Search Result Snippet Begins -->
     Stuff goes here.
<!-- Google Search Result Snippet Ends -->

You'll need to change this line

    var googleSearchFrameWidth = N;

to

    var googleSearchFrameWidth = 680;
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox