Replace appdb search with a Google Custom Search Engine
This commit is contained in:
@@ -43,11 +43,23 @@ function global_sidebar_menu()
|
|||||||
|
|
||||||
function app_search_box($q = '')
|
function app_search_box($q = '')
|
||||||
{
|
{
|
||||||
$str = "</span><form method=\"get\" action=\"".BASE."search.php\">\n";
|
// google custom search dialog
|
||||||
$str .= "<input type=text name=sSearchQuery value='$q' size=11 class=searchfield>";
|
// used in place of appdb specific search engine code
|
||||||
$str .= "<input type=submit value='Search' class=searchbutton>\n";
|
// Chris Morgan <cmorgan@alum.wpi.edu> maintains
|
||||||
$str .= "</form>\n<span>";
|
// the search engine settings
|
||||||
return $str;
|
$sSearchStr = '
|
||||||
|
<!-- Google CSE Search Box Begins -->
|
||||||
|
<form id="searchbox_013271970634691685804:bc-56dvxydi" action="http://www.google.com/cse">
|
||||||
|
<input type="hidden" name="cx" value="013271970634691685804:bc-56dvxydi" />
|
||||||
|
<input type="hidden" name="cof" value="FORID:0" />
|
||||||
|
<input name="q" type="text" size="20" />
|
||||||
|
<input type="submit" name="sa" value="Search" />
|
||||||
|
</form>
|
||||||
|
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_013271970634691685804%3Abc-56dvxydi"></script>
|
||||||
|
<!-- Google CSE Search Box Ends -->
|
||||||
|
';
|
||||||
|
|
||||||
|
return $sSearchStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user