I know that there is a google custom search plugin by sama55, but with only 1 core hack you are able to setup Google Custom Search. It took me a while to figure out the steps, that's why I help you save some time! This is how I did:
1. go to q2a: >Admin >Pages and click "Add Page" Button, name your page e.g. "gsearch" (for the URL)
2. Edit Page and insert code from google search engine which should look like this:
<script>
(function() {
var cx = 'partner-pub-6400847838975858:9506492080';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//www.google.com/cse/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:searchbox></gcse:searchbox>
<!-- add this extra line (!) -->
<gcse:searchresults></gcse:searchresults>
3. Core hack: Open /qa-include/qa-page.php
find line:
'form_tags' => 'METHOD="GET" ACTION="'.qa_path_html('search').'"',
replace it with:
'form_tags' => 'METHOD="GET" ACTION="'.qa_path_html('gsearch').'"',
4. upload file to server
done!
additional steps:
- Create your search engine, i.e. go to http://www.google.com/cse/ click on New search engine, enter your domain
- Go to "Look and feel", choose "Two column" layout, click "Save and Get Code"
- Copy javascript code displayed