The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Replace search with Google Custom Search Details »» | |||||||||||||||||||||||||||||
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 |
#102
|
||||
|
||||
Thank you, I already did all that, but the code in the navbar is the problem. I need to know exactly which code to replace with the google code??
Thanks again! |
#103
|
||||
|
||||
Quote:
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.puritanboard.com/google.php" id="cse-search-box"> <input type="hidden" name="cx" value="partner-pub-XXXXX:XXXX" /> <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> |
#104
|
||||
|
||||
Man!! Thank you so much works perfectly on the vbulletin default skin.
Only have a problem on my default skin, when you type something into the search box, you cannot see it. Obviously because the font is set to white. Is there something I can do about that? Thanks again!! |
#105
|
||||
|
||||
Quote:
|
#106
|
||||
|
||||
Quote:
Don't know if there is a way to only change the font color for search box though. |
#107
|
|||
|
|||
For some reasons, When I click search, It logged me out and shows results from other sites.
Google watermark is showing up in the navbar - - - 406 what should be the problem ? |
#108
|
||||
|
||||
I can't duplicate your problem. I assume we're talking about creativex.net/forums.
When I look at the two dark themes, the search box is black and I cannot read the Google Custom Search in either dark theme but when I click on the search box it is a black background with white text. I can read it fine. There's nothing in this mod that is changing font colors, you'll have to go into the Style Variables for each skin to mess with how that looks if you don't like white text on a black background for your search field. |
#109
|
||||
|
||||
Because I did not do the google integration on those themes. I cannot for the problem I mentioned.
|
#110
|
||||
|
||||
I guess I'm completely lost as to what your question is. If you only implemented it in the Vbulletin Default style then it is working as it should. It shows the Google Custom Search until you click on it and start typing black letters on a white background. It's supposed to do that.
If you integrate it with the other styles then it will work there too. Go look at how it works on my site on my dark themes. There's nothing to change in any of the code. The font colors are not changed by this theme change. |
#111
|
||||
|
||||
Now I am lost also. Because when I implement it on my dark skins, then the moment I type something in the search box, the font is obviously white, and you cannot see what you are typing.
Thanks for all your effort here mate. I really appreciate it. I would even pay you to get this figured out! EDIT: You have the exact same issue on your BP-Brown skin. Just type something into the search field. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|