Media-wiki:GoogleSearch: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
(Reverted contents)
(Fixed query parsing)
Line 2: Line 2:


<html><!--Googlecoop></Googlecoop-->
<html><!--Googlecoop></Googlecoop-->
<div id="cse-search-form" style="width: 100%;">Loading</div>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">google.load('search', '1', {language : 'en'});
<script type="text/javascript">  
  google.load('search', '1', {language : 'en'});
   google.setOnLoadCallback(function() {
   google.setOnLoadCallback(function() {
     var customSearchOptions = {};
     var customSearchOptions = {};
 
     var imageSearchOptions = {};
     var imageSearchOptions = {};
     imageSearchOptions['layout'] = google.search.ImageSearch.LAYOUT_POPUP;
     imageSearchOptions['layout'] = google.search.ImageSearch.LAYOUT_POPUP;
     customSearchOptions['enableImageSearch'] = true;
     customSearchOptions['enableImageSearch'] = true;
     customSearchOptions['imageSearchOptions'] = imageSearchOptions;
     customSearchOptions['imageSearchOptions'] = imageSearchOptions;
 
 
    var customSearchControl = new google.search.CustomSearchControl(
var customSearchControl = new google.search.CustomSearchControl(
       '010823241464583136657:h3lzpyuunqm', customSearchOptions);
       '010823241464583136657:h3lzpyuunqm', customSearchOptions);
    customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);


    customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
     var options = new google.search.DrawOptions();
     var options = new google.search.DrawOptions();
    options.setSearchFormRoot('cse-search-form');
     options.setAutoComplete(true);
     options.setAutoComplete(true);
    options.enableSearchboxOnly("http://opensourceecology.org/wiki/Open_Source_Ecology:GoogleSearch");
     customSearchControl.draw('cse', options);
     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);
   }, true);
</script>
</script>
<link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />
<link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />
<div id="cse" style="width:100%;"></div>  
<div id="cse" style="width:100%;"></div>
</html>
</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&amp;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>
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&amp;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>

Revision as of 14:30, 28 March 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.

You can add the OSE Custom Search Engine gadget to your web page or to your Google home page: Add to iGoogle