Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
[2.0.17.8] : How to integrate Google Site Search instead of Vanilla Search?
ntuyelik
New
Comments
<div id="Search">
content in your theme's default.master.php with:<div class="Google-Search">Google Search</div> <div id="cse" style="width: 100%;">Loading</div> <script src="http://www.google.com/jsapi" type="text/javascript"></script> <script type="text/javascript"> google.load('search', '1', {language : 'en', style : google.loader.themes.SHINY}); google.setOnLoadCallback(function() { var customSearchControl = new google.search.CustomSearchControl('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET); customSearchControl.draw('cse'); }, true); </script> </div>
and then add a 'Google-Search' styling to your custom.css file to pretty it up. Be sure to replace the hidden google search id with yours.
library/vendors/SmartyPlugins/function.searchbox.php , and just change the main div in the template
http://vanillaforums.org/addon/vanoogle-plugin
There was an error rendering this rich post.
where do you find your theme's default.master.php ? mine hasnt got one?
do you mean dashboard/veiws/master?
I would like to add google custom search through the embedded theme's search box. So...In the above file, do I replace it's contents:
with the code tjforsythe mentioned?
Then, what do I do regarding "changing the main div in the template"?
I could use the Vanoogle plugin, but I do not want a floating search box. I would like it to use the templates search box.
Thanks for the help!