Media-wiki:GoogleSearch: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(11 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Also includes sites listed on [[friendly Organizations]] and other related sites. To see results ''from this wiki only'', click on '''Wiki''' at the top of the search results. See [[OSE Custom Search Instructions|instructions]]. | |||
<Googlecoop></Googlecoop> | |||
<html><!--Googlecoop></Googlecoop--> | |||
<script src="http://www.google.com/jsapi" type="text/javascript"></script> | |||
<script type="text/javascript"> | |||
google.load('search', '1', {language : 'en'}); | |||
google.setOnLoadCallback(function() { | |||
var customSearchOptions = {}; | |||
var imageSearchOptions = {}; | |||
imageSearchOptions['layout'] = google.search.ImageSearch.LAYOUT_POPUP; | |||
customSearchOptions['enableImageSearch'] = true; | |||
customSearchOptions['imageSearchOptions'] = imageSearchOptions; | |||
var customSearchControl = new google.search.CustomSearchControl( | |||
'010823241464583136657:h3lzpyuunqm', customSearchOptions); | |||
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET); | |||
var options = new google.search.DrawOptions(); | |||
options.setAutoComplete(true); | |||
// options.enableSearchboxOnly("http://opensourceecology.org/wiki/Open_Source_Ecology:GoogleSearch"); | |||
customSearchControl.draw('cse', options); | |||
function parseParamsFromUrl() { | |||
var params = {}; | |||
var parts = window.location.search.substr(1).split('\x26'); | |||
for (var i = 0; i < parts.length; i++) { | |||
var keyValuePair = parts[i].split('='); | |||
var key = decodeURIComponent(keyValuePair[0]); | |||
params[key] = keyValuePair[1] ? | |||
decodeURIComponent(keyValuePair[1].replace(/\+/g, ' ')) : | |||
keyValuePair[1]; | |||
} | |||
return params; | |||
} | |||
var urlParams = parseParamsFromUrl(); | |||
var queryParamName = "q"; | |||
if (urlParams[queryParamName]) { | |||
customSearchControl.execute(urlParams[queryParamName]); | |||
} | |||
}, true); | |||
</script> | |||
<link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" /> | |||
<div id="cse" style="width:100%;"></div> | |||
</html> | |||
You can add the '''OSE Custom Search Engine''' gadget [http://www.gmodules.com/ig/creator?url=http://www.google.com/cse/api/010823241464583136657/cse/h3lzpyuunqm/gadget&synd=open&w=320&h=75&title=Open+Source+Ecology&border=%23ffffff%7C3px%2C1px+solid+%23999999 to your web page] or to your [http://www.google.com/ig?hl=en Google home page]: <html><a href="http://fusion.google.com/add?hl=en&moduleurl=http://www.google.com/cse/api/010823241464583136657/cse/h3lzpyuunqm/gadget"><img style="vertical-align: bottom;" src="http://gmodules.com/ig/images/plus_google.gif" border="0" alt="Add to iGoogle"/></a></html> |
Latest revision as of 21:17, 9 April 2012
Also includes sites listed on friendly Organizations and other related sites. To see results from this wiki only, click on Wiki at the top of the search results. See instructions.
You can add the OSE Custom Search Engine gadget to your web page or to your Google home page: