summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwushin <pasekei@gmail.com>2014-12-16 02:52:36 -0600
committerwushin <pasekei@gmail.com>2014-12-16 02:52:36 -0600
commita672ab12ed30aa6e8b778338804ba15d78ba1e15 (patch)
tree51aa68a440f65c462a45552eaa4992f841b3bf66
parentf9094642f5e39b93a0a0a3e69c532ff91d76ed4e (diff)
downloadwebsite-a672ab12ed30aa6e8b778338804ba15d78ba1e15.tar.gz
website-a672ab12ed30aa6e8b778338804ba15d78ba1e15.tar.bz2
website-a672ab12ed30aa6e8b778338804ba15d78ba1e15.tar.xz
website-a672ab12ed30aa6e8b778338804ba15d78ba1e15.zip
Refined results from Site Search
-rw-r--r--extensions/GoogleSiteSearch/GoogleSiteSearch.content.default.html16
1 files changed, 14 insertions, 2 deletions
diff --git a/extensions/GoogleSiteSearch/GoogleSiteSearch.content.default.html b/extensions/GoogleSiteSearch/GoogleSiteSearch.content.default.html
index 7cb654e..4724818 100644
--- a/extensions/GoogleSiteSearch/GoogleSiteSearch.content.default.html
+++ b/extensions/GoogleSiteSearch/GoogleSiteSearch.content.default.html
@@ -3,9 +3,21 @@
<script type="text/javascript">
google.load('search', '1', {language : _GSS_LANG_});
google.setOnLoadCallback(function() {
- var customSearchControl = new google.search.CustomSearchControl(_GSS_CSE_ID_);
+ var customSearchOptions = {};
+ var orderByOptions = {};
+ orderByOptions['keys'] = [{label: 'Relevance', key: ''} , {label: 'Date', key: 'date'}];
+ customSearchOptions['enableOrderBy'] = true;
+ customSearchOptions['orderByOptions'] = orderByOptions;
+ var googleAnalyticsOptions = {};
+ googleAnalyticsOptions['queryParameter'] = 'search';
+ googleAnalyticsOptions['categoryParameter'] = '';
+ customSearchOptions['googleAnalyticsOptions'] = googleAnalyticsOptions;
+ customSearchOptions[google.search.Search.RESTRICT_EXTENDED_ARGS] = {"filter" : "1"};
+ var customSearchControl = new google.search.CustomSearchControl(_GSS_CSE_ID_, customSearchOptions);
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
- customSearchControl.draw('cse');
+ var options = new google.search.DrawOptions();
+ options.setAutoComplete(true);
+ customSearchControl.draw('cse', options);
customSearchControl.execute(_GSS_TERM_ESCAPE_);
}, true);
</script>