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 |
#112
|
||||
|
||||
OK, hold on, I was just able to duplicate the problem on a dark skin. Am in Hawaii on business but will try to tackle this later today.
|
#113
|
||||
|
||||
OK great! Thanks!
|
#114
|
||||
|
||||
OK, I think I found it. This is a change to a CSS template and I can't guarantee this won't make other areas look differently than they did.
1. Go to Style Manager. 2. Select the Style 3. Select Edit Templates 4. Under CSS templates edit the additional.css template 5. Search for: Code:
.textbox, textarea, select { 7. Set the following values under the ".textbox, textarea, select {" line as follows: background-color: #fff; color: #000; Save and reload. It should fix the problem. |
#115
|
||||
|
||||
Thank you so much mate! That did it. I just changed the background color to a light gray, because it changes some other fields to white also. But that is something small. It works, and brings money in. That is important.
Thanks again for all your trouble and effort. |
#116
|
||||
|
||||
Man, o man! Would you perhaps be willing to help me to get this to work on my latest skin I purchased? It works on all my other skins, but this new one is a nightmare. The search box is bigger, and it uses a button also.
Also my GOOGLE page (Template you gave) is completely messed up in this skin. Please help. |
#118
|
|||
|
|||
I need some help on the edits since my custom template for vb 4.3 is different from the edits I need to make.
Code:
<div id="navbar" class="navbar"> <div class="navLeft"><div class="navRight"> <ul id="navtabs" class="navtabs floatcontainer<vb:if condition="$show['member'] AND $notifications_total"> notify</vb:if>"> {vb:raw template_hook.navtab_start} <vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search'"> <li class="selected"><a class="navtab" href="{vb:raw vboptions.forumhome}.php{vb:raw session.sessionurl_q}">{vb:rawphrase forum}</a> <ul class="floatcontainer"> {vb:raw template_hook.navbar_start} <vb:if condition="$show['searchbuttons']"> <vb:if condition="$show['member']"> <li><a href="search.php?{vb:raw session.sessionurl}do=getnew&contenttype=vBForum_Post">{vb:rawphrase new_posts_nav}</a></li> <vb:else /> <li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&contenttype=vBForum_Post">{vb:rawphrase todays_posts}</a></li> </vb:if> </vb:if> {vb:raw template_hook.navbar_after_getnew} <vb:if condition="$show['pmmainlink']"> <li><a href="private.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase private_messages}</a></li> </vb:if> {vb:raw template_hook.navbar_after_pm} <li><a rel="help" href="faq.php{vb:raw session.sessionurl_q}" accesskey="5">{vb:rawphrase faq}</a></li> {vb:raw template_hook.navbar_after_faq} <li><a href="calendar.php{vb:raw session.sessionurl_q}">{vb:rawphrase calendar}</a></li> {vb:raw template_hook.navbar_after_calendar} <vb:if condition="$show['communitylink']"> <li class="popupmenu"> <a href="javascript://" class="popupctrl" accesskey="6">{vb:rawphrase community}</a> <ul class="popupbody popuphover"> {vb:raw template_hook.navbar_community_menu_start} <vb:if condition="$show['quick_links_groups']"> <li><a href="group.php{vb:raw session.sessionurl_q}">{vb:rawphrase social_groups}</a></li> </vb:if> <vb:if condition="$show['quick_links_albums']"> <li><a href="album.php{vb:raw session.sessionurl_q}">{vb:rawphrase pictures_and_albums}</a></li> </vb:if> <vb:if condition="$bbuserinfo['userid']"> <li><a href="profile.php?{vb:raw session.sessionurl}do=buddylist"><vb:if condition="$show['friends_and_contacts']">{vb:rawphrase contacts_and_friends}<vb:else />{vb:rawphrase contacts}</vb:if></a></li> </vb:if> <vb:if condition="$show['memberslist']"> <li><a href="memberlist.php{vb:raw session.sessionurl_q}">{vb:rawphrase members_list}</a></li> </vb:if> {vb:raw template_hook.navbar_community_menu_end} </ul> </li> </vb:if> {vb:raw template_hook.navbar_after_community} <li class="popupmenu"> <a href="javascript://" class="popupctrl">{vb:rawphrase forum_actions}</a> <ul class="popupbody popuphover"> <li> <a href="forumdisplay.php?{vb:raw session.sessionurl}do=markread&markreadhash={vb:raw bbuserinfo.securitytoken}">{vb:rawphrase mark_forums_read}</a> </li> <vb:if condition="$show['member']"> <li> <a href="profile.php?{vb:raw session.sessionurl}do=editoptions">{vb:rawphrase edit_options}</a> </li> <li> <a href="profile.php?{vb:raw session.sessionurl}do=editprofile">{vb:rawphrase edit_your_details}</a> </li> </vb:if> </ul> </li> <li class="popupmenu"> <a href="javascript://" class="popupctrl" accesskey="3">{vb:rawphrase quick_links}</a> <ul class="popupbody popuphover"> <vb:if condition="$show['member']"> <vb:if condition="$show['member']"> <li><a href="search.php?do=getdaily&contenttype=vBForum_Post">{vb:rawphrase todays_posts}</a></li> <li><a href="subscription.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase subscribed_threads}</a></li> </vb:if> <li> <a href="javascript://" onclick="window.open(getBaseUrl() + 'misc.php?{vb:raw session.sessionurl}do=buddylist&focus=1','buddylist','statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=250,height=300'); return false;">{vb:rawphrase open_contacts}</a> </li> </vb:if> <vb:if condition="$vboptions['forumleaders']"> <li><a href="showgroups.php{vb:raw session.sessionurl_q}" rel="nofollow"> <vb:if condition="$vb_suite_installed"> {vb:rawphrase view_site_leaders} <vb:else /> {vb:rawphrase view_forum_leaders} </vb:if> </a></li> </vb:if> {vb:raw template_hook.navbar_quick_links_menu_pos1} {vb:raw template_hook.navbar_quick_links_menu_pos2} {vb:raw template_hook.navbar_quick_links_menu_pos3} <vb:if condition="$show['wollink']"> <li><a href="online.php{vb:raw session.sessionurl_q}">{vb:rawphrase whos_online}</a></li> </vb:if> {vb:raw template_hook.navbar_quick_links_menu_pos4} </ul> </li> {vb:raw template_hook.navbar_end} </ul> </li> <vb:elseif condition="$vboptions['selectednavtab']=='usercp'" /> <li class="selected"><a class="navtab" href="{vb:raw vboptions.forumhome}.php{vb:raw session.sessionurl_q}">{vb:rawphrase forum}</a> <ul class="floatcontainer"> {vb:raw template_hook.navbar_start} <vb:if condition="$show['searchbuttons']"> <vb:if condition="$show['member']"> <li><a href="search.php?{vb:raw session.sessionurl}do=getnew&contenttype=vBForum_Post">{vb:rawphrase new_posts_nav}</a></li> <vb:else /> <li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&contenttype=vBForum_Post">{vb:rawphrase todays_posts}</a></li> </vb:if> </vb:if> {vb:raw template_hook.navbar_after_getnew} <vb:if condition="$show['pmmainlink']"> <li><a href="private.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase private_messages}</a></li> </vb:if> {vb:raw template_hook.navbar_after_pm} <li><a rel="help" href="faq.php{vb:raw session.sessionurl_q}" accesskey="5">{vb:rawphrase faq}</a></li> {vb:raw template_hook.navbar_after_faq} <li><a href="calendar.php{vb:raw session.sessionurl_q}">{vb:rawphrase calendar}</a></li> {vb:raw template_hook.navbar_after_calendar} <li class="popupmenu"> <a href="javascript://" class="popupctrl">{vb:rawphrase community}</a> <ul class="popupbody popuphover"> {vb:raw template_hook.navbar_community_menu_start} <vb:if condition="$show['quick_links_groups']"> <li><a href="group.php{vb:raw session.sessionurl_q}">{vb:rawphrase social_groups}</a></li> </vb:if> <vb:if condition="$show['quick_links_albums']"> <li><a href="album.php{vb:raw session.sessionurl_q}">{vb:rawphrase pictures_and_albums}</a></li> </vb:if> <vb:if condition="$bbuserinfo['userid']"> <li><a href="profile.php?{vb:raw session.sessionurl}do=buddylist"><vb:if condition="$show['friends_and_contacts']">{vb:rawphrase contacts_and_friends}<vb:else />{vb:rawphrase contacts}</vb:if></a></li> </vb:if> <vb:if condition="$show['memberslist']"> <li><a href="memberlist.php{vb:raw session.sessionurl_q}">{vb:rawphrase members_list}</a></li> </vb:if> {vb:raw template_hook.navbar_community_menu_end} </ul> </li> {vb:raw template_hook.navbar_after_community} <li class="popupmenu"> <a href="javascript://" class="popupctrl">{vb:rawphrase forum_actions}</a> <ul class="popupbody popuphover"> <li> <a href="forumdisplay.php?{vb:raw session.sessionurl}do=markread&markreadhash={vb:raw bbuserinfo.securitytoken}">{vb:rawphrase mark_forums_read}</a> </li> <vb:if condition="$show['member']"> <li> <a href="profile.php?{vb:raw session.sessionurl}do=editoptions">{vb:rawphrase edit_options}</a> </li> <li> <a href="profile.php?{vb:raw session.sessionurl}do=editprofile">{vb:rawphrase edit_your_details}</a> </li> </vb:if> </ul> </li> <li class="popupmenu"> <a href="javascript://" class="popupctrl">{vb:rawphrase quick_links}</a> <ul class="popupbody popuphover"> <li><a href="subscription.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase subscribed_threads}</a></li> <li> <a href="javascript://" onclick="window.open(getBaseUrl() + 'misc.php?{vb:raw session.sessionurl}do=buddylist&focus=1','buddylist','statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=250,height=300'); return false;">{vb:rawphrase open_contacts}</a> </li> <vb:if condition="$vboptions['forumleaders']"> <li> <a href="showgroups.php{vb:raw session.sessionurl_q}" rel="nofollow"> <vb:if condition="$vb_suite_installed"> {vb:rawphrase view_site_leaders} <vb:else /> {vb:rawphrase view_forum_leaders} </vb:if> </a> </li> </vb:if> {vb:raw template_hook.navbar_quick_links_menu_pos1} {vb:raw template_hook.navbar_quick_links_menu_pos2} {vb:raw template_hook.navbar_quick_links_menu_pos3} <vb:if condition="$show['wollink']"> <li><a href="online.php{vb:raw session.sessionurl_q}">{vb:rawphrase whos_online}</a></li> </vb:if> {vb:raw template_hook.navbar_quick_links_menu_pos4} </ul> </li> {vb:raw template_hook.navbar_end} </ul> </li> <vb:else /> <li><a class="navtab" href="{vb:raw vboptions.forumhome}.php{vb:raw session.sessionurl_q}">{vb:rawphrase forum}</a></li> </vb:if> {vb:raw template_hook.navtab_middle} <vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT == 'search'"> <vb:if condition="$show['member']"> <li class="selected"><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getnew&contenttype=vBForum_Post" accesskey="2">{vb:rawphrase getnew_tab}</a> <ul class="floatcontainer"> <li><a href="search.php?{vb:raw session.sessionurl}do=getnew&contenttype=vBForum_Post">{vb:rawphrase new_posts_nav}</a></li> <li><a href="search.php?{vb:raw session.sessionurl}do=getnew&contenttype=vBForum_SocialGroupMessage">{vb:rawphrase new_group_messages_nav}</a></li> <li><a href="search.php?{vb:raw session.sessionurl}do=getnew&contenttype=vBForum_Event">{vb:rawphrase new_events_nav}</a></li> {vb:raw template_hook.navbar_getnew_menu} <li><a href="forumdisplay.php?{vb:raw session.sessionurl}do=markread&markreadhash={vb:raw bbuserinfo.securitytoken}">{vb:rawphrase mark_forums_read}</a></li> </ul> </li> <vb:else /> <li class="selected"><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getdaily&contenttype=vBForum_Post" accesskey="2">{vb:rawphrase getnew_tab}</a> <ul class="floatcontainer"> <li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&contenttype=vBForum_Post">{vb:rawphrase todays_posts}</a></li> <li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&contenttype=vBForum_SocialGroupMessage">{vb:rawphrase daily_group_message}</a></li> <li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&contenttype=vBForum_Event">{vb:rawphrase daily_events}</a></li> {vb:raw template_hook.navbar_getdaily_menu} <li><a href="forumdisplay.php?{vb:raw session.sessionurl}do=markread&markreadhash={vb:raw bbuserinfo.securitytoken}">{vb:rawphrase mark_forums_read}</a></li> </ul> </li> </vb:if> <vb:elseif condition="$show['member']" /> <li><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getnew&contenttype=vBForum_Post" accesskey="2">{vb:rawphrase getnew_tab}</a></li> <vb:else /> <li><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getdaily&contenttype=vBForum_Post" accesskey="2">{vb:rawphrase getnew_tab}</a></li> </vb:if> {vb:raw template_hook.navtab_end} </ul> <vb:if condition="$vboptions['enablesearches']"> <div id="searchBox" class="searchBox"> <form action="search.php?do=process" method="post"> <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" /> <span class="searchBox_container"><input type="text" value="" class="textbox" name="query" tabindex="99"/></span> <span class="searchBox_button"><input type="image" src="images/styles/BlueDemon/buttons/search.png" name="submit" onclick="document.getElementById('navbar_search').submit;" tabindex="100"/></span> </form> <ul class="searchBox_advanced_search"> <li><a href="search.php{vb:raw session.sessionurl_q}" accesskey="4">{vb:rawphrase advanced_search}</a></li> </ul> </div> </vb:if> </div></div> </div> <div id="header" class="floatcontainer doc_header"><div class="headerWrap"> {vb:raw ad_location.ad_header_logo} <div><a name="top" href="{vb:raw vboptions.forumhome}.php{vb:raw session.sessionurl_q}" id="logo"><img src="{vb:stylevar titleimage}" alt="{vb:rawphrase x_powered_by_vbulletin, {vb:raw vboptions.bbtitle}}" /></a></div> <div class="bannerBox"> <script type="text/javascript"><!-- google_ad_client = "pub-2906218701361472"; /* 468x60, created 10/26/10 */ google_ad_slot = "4662250360"; google_ad_width = 468; google_ad_height = 60; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div> {vb:raw ad_location.ad_header_end} </div></div> </div><!-- closing div for above_body --> <div id="contentMain"> <div id="contentBox"> <div class="contentBoxLeft"><div class="contentBoxRight"> <div class="body_wrapper"> <div id="breadcrumb" class="breadcrumb"> <div class="bcLeft"><div class="bcRight"> <ul class="floatcontainer"> <li class="navbithome"><a href="index.php{vb:raw session.sessionurl_q}" accesskey="1"><img src="{vb:stylevar imgdir_misc}/navbit-home.png" alt="{vb:rawphrase home}" /></a></li> {vb:raw navbits.breadcrumb} {vb:raw navbits.lastelement} </ul> <hr /> </div></div> </div> {vb:raw ad_location.ad_navbar_below} {vb:raw ad_location.global_below_navbar} <vb:if condition="$show['notices']"> <form action="profile.php?do=dismissnotice" method="post" id="notices" class="notices"> <input type="hidden" name="do" value="dismissnotice" /> <input type="hidden" name="s" value="{vb:raw session.sessionurl}" /> <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" /> <input type="hidden" id="dismiss_notice_hidden" name="dismiss_noticeid" value="" /> <input type="hidden" name="url" value="{vb:raw return_link}" /> <ol> {vb:raw notices} </ol> </form> </vb:if> Thanks, |
#119
|
||||
|
||||
I think this should work (replace siteurl.com with yours, make sure you made a google.php file, and use your google code as opposed the the X's):
Replace Code:
<form action="search.php?do=process" method="post"> <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" /> <span class="searchBox_container"><input type="text" value="" class="textbox" name="query" tabindex="99"/></span> <span class="searchBox_button"><input type="image" src="images/styles/BlueDemon/buttons/search.png" name="submit" onclick="document.getElementById('navbar_search').submit;" tabindex="100"/></span> </form> Code:
<form action="http://www.siteurl.com/google.php" id="cse-search-box"> <input type="hidden" name="cx" value="partner-pub-xxxxxxxxxxx:xxxxxx-xxxx" /> <input type="hidden" name="cof" value="FORID:9" /> <input type="hidden" name="ie" value="ISO-8859-1" /> <span class="searchBox_container"><input type="text" value="" class="textbox" name="q" tabindex="99"/></span> <span class="searchBox_button"><input type="image" src="images/styles/BlueDemon/buttons/search.png" name="submit" onclick="document.getElementById('navbar_search').submit;" tabindex="100"/></span> </form> <script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&lang=en"></script> |
#120
|
|||
|
|||
Is there a demo or better screenshot? Thanks!
|
#121
|
||||
|
||||
I have added this modification on my members request and it's working fine however it's not displaying any search result..I always gets:
Quote:
my search site URL in google adsense is: www.pakgamers.com/forums and search results page URL is: http://www.pakgamers.com/forums/google.php |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|