There is an update for this with the latest (v2) version of google custom search. I really like the google cse in vbulletin. It's much faster and with some styling in the css even the Google cse v2 will work in vbulletin 4.2
This short instruction will help if you use a
two-page CSE as shown in the documentation at
Multiple search boxes and results sections.
Already mentioned here:
1. Create the google.php file as mentioned on page 3 in this thread.
2. Create the GOOGLE template as mentioned on page 3 in this thread.
Now the new stuff.
1. headinclude template
copy the script-snippet at the bottom of your headinclude template.
Code:
<!-- google cse -->
<script>
(function() {
var cx = '00000000000000:aaaaaaaaaaa'; ///////////////CHANGE THIS TO YOUR OWN ID ////
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>
<!-- / google cse -->
This will "enable" the searchform and searchresults in general in your forum.
2. navbar template
Display the search form in the navigation
Search for <form action="search.php ....
comment the normal search form
Code:
<vb:comment><form action
.... a few lines
</form></vb:comment>
Enter the new google search form under the global search div.
Code:
<div id="globalsearch" class="globalsearch">
<gcse:searchbox-only></gcse:searchbox-only>
Now you have the search form in your forum and yes, styling will follow.
but first edit the
3. GOOGLE Template
Should look like this:
Code:
<div class="blockrow">
<gcse:search></gcse:search>
</div>
Not the long and old version mentioned in this thread. Only the <gcse:search></gcse:search> is used to display the search results and the search bar.
If you only want to show the search results you can use <gcse:searchresults-only></gcse:searchresults-only>
4. additional.css template
The search form will look broken at first.
You should modify at least the following styles:
Code:
input.gsc-input {
font-size:11px !important;
}
#globalsearch .gsc-input-box {
border:none !important;
height:22px !important;
}
#globalsearch input.gsc-search-button-v2 {
padding:4px 20px !important;
margin-top:1px !important;
}