The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
![]() |
|||||||||||||||||||||||||||||
Replace search with Google Custom Search
![]() Developer Last Online: Dec 2018 ![]() ![]()
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 PHP Code:
replace with the form line of the google supplied code example: PHP Code:
find PHP Code:
replace with the first 3 hidden input types in your google code example: PHP Code:
find PHP Code:
replace with PHP Code:
find PHP Code:
replace with PHP Code:
find PHP Code:
add this after PHP Code:
Screenshots
Show Your Support
|
Comments |
#132
|
||||
|
||||
![]() Quote:
|
#133
|
|||
|
|||
![]()
thanks , gonna test it
|
#134
|
|||
|
|||
![]()
I got the script you posted installed in my navbar template. I still get a white screen. Thanks for your help sir. SGT Larson US Army, USMC Vet
|
#135
|
|||
|
|||
![]()
added a empty google.php file to the forum when searching something getting a white page withour the google.php it works but opens without forum on a new page - any ideas pleasE?
|
#136
|
|||
|
|||
![]()
What is the problem might me when I got this error
Quote:
? |
#137
|
||||
|
||||
![]()
I tried to solve problems in vb4.1.1 following by step:
- Find in the navbar template for this code: Code:
<form action="search.php?{vb:raw session.sessionurl}do=process" method="post" id="navbar_search" class="navbar_search"> <vb:comment><input type="hidden" name="s" value="{vb:raw session.sessionurl}" /></vb:comment> <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" /> <input type="hidden" name="do" value="process" /> <span class="textboxcontainer"><span><input type="text" value="" name="query" class="textbox" tabindex="99"/></span></span> <span class="buttoncontainer"><span><input type="image" class="searchbutton" src="{vb:stylevar imgdir_button}/search.<vb:if condition="(is_browser('ie') AND !is_browser('ie', 7) AND !is_browser('ie', 8))">gif<vb:else />png</vb:if>" name="submit" onclick="document.getElementById('navbar_search').submit;" tabindex="100"/></span></span> </form> Code:
<form action="http://www.yoursite.com/google.php" id="cse-search-box"> <input type="hidden" name="cx" value="xxxxxxxxxxxxxxxxxxxxx:xxxxxxxxxxx" /> <input type="hidden" name="cof" value="FORID:9" /> <input type="hidden" name="ie" value="utf-8" /> <span class="textboxcontainer"><span><input type="text" value="" name="q" class="textbox" /></span></span> <span class="buttoncontainer"><span><input type="image" class="searchbutton" src="{vb:stylevar imgdir_button}/search.<vb:if condition="(is_browser('ie') AND !is_browser('ie', 7) AND !is_browser('ie', 8))">gif<vb:else />png</vb:if>" name="submit" onclick="document.getElementById('navbar_search').submit;" tabindex="100"/></span></span> </form> <script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&lang=th"></script> * xxxxxxxxxxxxxxxxxxxxx:xxxxxxxxxxx=your Google AdSense Publisher ID Demo: http://www.baanfarsang.com |
#138
|
|||
|
|||
![]()
Not Work with vb 4.1.1 ??
|
#139
|
||||
|
||||
![]()
Works just fine. All this does is replace a form in the Navbar. The only thing that will change in major versions hereafter is the template for a page but that will be a while.
|
#140
|
|||
|
|||
![]()
If I put a word in the search field gives me a blank page.
Why? Thx |
#141
|
|||
|
|||
![]()
Works great... now only if I could figure how to add some skyscraper ads on the left hand side it would be PERFECT!
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|