The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Use Google Custom Search In Navbar - Step By Step Details »» | |||||||||||||||||||||||||||||||
Use Google Custom Search In Navbar - Step By Step
Developer Last Online: Jan 2016
This mod will replace vb search in navbar with google custom search.. you can still use advance search from navbar. google search provide much better result when you try to search word under 4 letters..
1. First download google.php upload in your forum root 2. Go to your AdminCP Go to Styles & Templates -> Style Manager select Style then click Create New Template rename Template to GOOGLE Paste this code in google Template : Code:
{vb:stylevar htmldoctype} <html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html"> <head> <title>{vb:raw vboptions.bbtitle}</title> {vb:raw headinclude} </head> <body> {vb:raw header} {vb:raw navbar} <div id="pagetitle"> <h1>{vb:raw pagetitle}</h1> </div> <h2 class="blockhead">Google Custom Search</h2> <div class="blockbody"> <div class="blockrow"> <div id="cse-search-results"></div> <script type="text/javascript"> var googleSearchIframeName = "cse-search-results"; var googleSearchFormName = "cse-search-box"; var googleSearchFrameWidth = 800; var googleSearchDomain = "www.google.com"; var googleSearchPath = "/cse"; </script> <script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"></script> </div> </div> {vb:raw footer} </body> </html> Code:
<form action="http://www.mobilephonetalk.com/google.php" id="cse-search-box"> <input type="hidden" name="cx" value="partner-pub-8038994048300561:7c8fy7cujxg" /> <input type="hidden" name="cof" value="FORID:9" /> <input type="hidden" name="ie" value="ISO-8859-1" /> <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.png" name="sa" onclick="document.getElementById('navbar_search').submit;" /> </span></span> </form> <script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&lang=en"></script> Replace partner-pub-8038994048300561:7c8fy7cujxg with your won adsense code... Download Now
Screenshots
Show Your Support
|
3 благодарности(ей) от: | ||
appsfinder, daviet, KILLERMG |
Comments |
#22
|
|||
|
|||
Works fine on 4.1.4
BUT is there a way, how and where to change/remove the "google custom search gif" in the search field. Users THINK that its ONLY a regular google search.... I would like my own text like "Search the forum" "<input type="text" class="textbox" name="q" value="" style="border: 1px solid rgb(126, 157, 185); padding: 2px; background: url("[url]http ://www.google.com/cse/intl/en/images/google_custom_search_watermark.gif" ) no-repeat scroll left center rgb(255, 255, 255);">" |
#23
|
|||
|
|||
Error:
404. Thats an error. The requested URL /cse?cx=partner-pub-xxxxxxxxxxxxxxxxxxx was not found on this server. Thats all we know. what can i do now....? |
#24
|
|||
|
|||
another error:
400. That’s an error. Your client has issued a malformed or illegal request. That’s all we know. |
#25
|
|||
|
|||
did you activate AdSense for search from www.google.com/adsense ?
|
#26
|
||||
|
||||
Quote:
TIA. |
#28
|
||||
|
||||
Done all that now, thanks for your help but this unfortunatley does not work with 4.1.4.
All I get is this (pic). the closest I get is if I replace the pub ID with the actual snippit from google but then I have 2 search boxes. I am pretty good when it comes to installing template mods so I dont know why this isn't working for me?. |
#29
|
||||
|
||||
Got it working, I was putting the wrong pub id in.
I was using the one in the top right hand corner when signed into adsense instead of the one in the code given Installed. |
#30
|
||||
|
||||
While looking at your site as a demo (http://www.mobilephonetalk.com), I did a search but results on pages past the first tended to have buggy results.
I'm using Google Chrome, and there were gaps and white spaces between results but then I highlighted the text and it appeared. kinda wonky? |
#31
|
|||
|
|||
the search result should be blend in with forum style, not as a google page.
cheers |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|