This mod assumes you have an adsense account and are using Google Custom Search.
You want to make sure your results page is named something other than the vb default search.php, this leaves the vb option open to those who click "advanced search"
Open your template navbar
find
replace with the form line of the google supplied code
example:
find
replace with the first 3 hidden input types in your google code
example:
find
replace with
find
replace with
find
add this after
You want to make sure your results page is named something other than the vb default search.php, this leaves the vb option open to those who click "advanced search"
Open your template navbar
find
PHP:
<form action="search.php?do=process" method="post" id="navbar_search">
example:
PHP:
<form action="http://www.ahfb2000.com/google.php" id="cse-search-box">
PHP:
<input type="hidden" name="s" value="{vb:raw session.sessionurl}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="do" value="process" />
example:
PHP:
<input type="hidden" name="cx" value="partner-pub-xxxxxxxxxxxxxxxxxxxxxxx" />
<input type="hidden" name="cof" value="FORID:10" />
<input type="hidden" name="ie" value="ISO-8859-1" />
PHP:
<input type="text" value="" name="query" class="textbox" />
PHP:
<input type="text" value="" name="q" class="textbox" />
PHP:
<input type="image" class="searchbutton" src="{vb:stylevar imgdir_button}/search.png" name="submit" onclick="document.getElementById('navbar_search').submit;" />
PHP:
<input type="image" class="searchbutton" src="{vb:stylevar imgdir_button}/search.png" name="sa" onclick="document.getElementById('navbar_search').submit;" />
PHP:
</form>
PHP:
<script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&lang=en"></script>