customize footer
with a google search bar embedded
2008-03-06 add a google search form
based on the script given by google/adsense and template from portal_skins/plone_templates/global_searchbox/
Note: in zope page template, for empty tag, the close tag should be removed. <input type="hidden" name="domains" value="banyan.usc.edu"></input> is ok in html. But in zpt/dtml, it has to be <input type="hidden" name="domains" value="banyan.usc.edu"/>.
The form added is like this:
<form name="searchform"
action="search"
target="_top"
tal:define="livesearch site_properties/enable_livesearch|nothing"
tal:attributes="action string:http://www.google.com/custom;
onsubmit python:test(livesearch==True,'return liveSearchSubmit()','')"
style="white-space:nowrap">
<table border="0" align="center">
<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" align="middle"/></a>
</td>
<td nowrap="nowrap">
<input type="hidden" name="domains" value="banyan.usc.edu"/>
<input id="sbi"
tabindex=""
name="q"
type="text"
size="31"
maxlength="255"
value=""
title="Search Site"
accesskey="4"
i18n:attributes="title title_search_site;"
tal:attributes="value request/SearchableText|nothing"
class="visibility:visible" />
<input class="searchButton"
type="submit"
name="sa"
tabindex=""
value="Search"
id="sbb"
i18n:attributes="value label_search;" />
</td>
</tr>
<table align="center">
<tr>
<td>
<input type="radio" name="sitesearch" value="" id="ss0"/>
<label for="ss0" title="Search the Web"><font>Web</font></label></td>
<td>
<input type="radio" name="sitesearch" value="banyan.usc.edu" checked id="ss1"/>
<label for="ss1" title="Search banyan.usc.edu"><font size="-1">banyan.usc.edu</font></label></td>
</tr>
</table>
<tr>
<td>
<input type="hidden" name="client" value="pub-8163596901457583"/>
<input type="hidden" name="forid" value="1"/>
<input type="hidden" name="ie" value="ISO-8859-1"/>
<input type="hidden" name="oe" value="ISO-8859-1"/>
<input type="hidden" name="safe" value="active"/>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1"/>
<input type="hidden" name="hl" value="en"/>
</td></tr>
</table>
<div class="LSResult" id="LSResult" style=""><div class="LSShadow" id="LSShadow"></div></div>
</form>