Friday, October 3, 2008

Getting google search box on your sharepoint site

Found an easy way to get the google search box on the home page of my site
http://www.heathersolomon.com/blog/archive/2005/07/18/1023.aspx

I followed the directions but made a few slip ups, my path is different (I'm using WSS not MOSS i guess). This is how I got it working for me :

Steps:

1. Create the directory and call it external in
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS
2. Create a text file called google.html in this external directory and put the following code in it

The following code was placed in blogger by this great utility
http://francois.schnell.free.fr/tools/BloggerPaste/BloggerPaste.html




<center>
<FORM method=GET action="http://www.google.com/search"
target="_blank">
<A HREF="http://www.google.com/" target="_blank">
<IMG SRC="http://www.google.com/logos/Logo_25wht.gif" border="0"
align="middle"></A><br>
<INPUT TYPE=text name=q size=17 maxlength=225 value=""><br>
<INPUT type=submit name=btnG VALUE="Search" style="font-
size:5px font-family:Verdana"><br>

<select name="sitesearch" style="font-
size:5px font-family:Verdana" >
<option value=""></option>
<option value="www.test.com">test</option>
</select>
</FORM>
</center>



3. On your home page drop in a Page Viewer web part and set it to point at a web page and
put the link as /sites/Portal/_layouts/external.html or whatever your equivalent is.
I intially put in my full path htt://servername/sites/portal/_layouts/external.html and it changed it to a relative path itself which is much preferable.

4. To alter the size of the google box mess around with the google.html file input box size and the height and width of the web part itself , ideally we do not want scroll bars either side. Also set it so there is no title on the web part.

Customising the look and feel....this site



has a good overview for changing look and feel of the google box

No comments: