Version: 1.0.0
Author: Stoker
MOD description: With this phpBB3 mod installed the standard searchbar in the header will be replaced with a google sitesearch with adsense in the search result page.
Note! Prosilver only
Demo: This site
Attached file: Download, unzip and upload the files the their right location.
Installation instructions: The first thing to do is to create a search engine with your adsense account.
If you don't have an adsense account, you can create one here: http://www.google.com/coop/cse/ Its free
You need the code generated by google
Open language/en/common.php
Find:
Code: Select all
'GO' => 'Go',
Code: Select all
'GOOGLESEARCH' => 'Google Search',
Find:
Code: Select all
<form action="{U_SEARCH}" method="post" id="search">
<fieldset>
<input name="keywords" id="keywords" type="text" maxlength="128" title="{L_SEARCH_KEYWORDS}" class="inputbox search" value="<!-- IF SEARCH_WORDS-->{SEARCH_WORDS}<!-- ELSE -->{L_SEARCH_MINI}<!-- ENDIF -->" onclick="if(this.value=='{LA_SEARCH_MINI}')this.value='';" onblur="if(this.value=='')this.value='{LA_SEARCH_MINI}';" />
<input class="button2" value="{L_SEARCH}" type="submit" /><br />
<a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}">{L_SEARCH_ADV}</a> {S_SEARCH_HIDDEN_FIELDS}
</fieldset>
</form>
Code: Select all
<form action="http://www.your_domain.com/googlesearch.php" id="cse-search-box">
<fieldset>
<input type="hidden" name="cx" value="partner-pub-3346231937490093:rf17b3yseht" />
<input type="hidden" name="cof" value="FORID:9" />
<input type="hidden" name="ie" value="UTF-8" />
<input type="text" class="inputbox search" name="q" maxlength="128" value="<!-- IF SEARCH_WORDS-->{SEARCH_WORDS}<!-- ELSE -->{L_SEARCH_MINI}<!-- ENDIF -->" onclick="if(this.value=='{LA_SEARCH_MINI}')this.value='';" onblur="if(this.value=='')this.value='{LA_SEARCH_MINI}';" /><br />
<a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}">{L_SEARCH_ADV}</a> {S_SEARCH_HIDDEN_FIELDS}
</fieldset>
</form>
Change your domain name in this:
Code: Select all
<form action="http://www.your_domain.com/googlesearch.php" id="cse-search-box">
Code: Select all
<input type="hidden" name="cx" value="partner-pub-3346231937490093:rf17b3yseht" />
Code: Select all
<input type="hidden" name="cof" value="FORID:9" />
Save, upload and refresh template