Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Use Google Custom Search In Navbar - Step By Step Details »»
Use Google Custom Search In Navbar - Step By Step
Version: 1.00, by rajubd rajubd is offline
Developer Last Online: Jan 2016 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.x.x Rating:
Released: 05-10-2011 Last Update: Never Installs: 97
Template Edits
 
No support by the author.

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>
3. Then Open Navigation / Breadcrumb Templates Click Collapse button click navbar Template find <div id="globalsearch" class="globalsearch"> and <ul class="navbar_advanced_search"> remove all code between this with

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&amp;lang=en"></script>
Note : Replace http://www.mobilephonetalk.com with your won website name
Replace partner-pub-8038994048300561:7c8fy7cujxg with your won adsense code...

Download Now

File Type: php google.php (1.2 KB, 992 views)

Screenshots

File Type: jpg Capture.jpg (91.4 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
3 благодарности(ей) от:
appsfinder, daviet, KILLERMG

Comments
  #52  
Old 09-29-2011, 04:17 AM
appsfinder appsfinder is offline
 
Join Date: Apr 2007
Posts: 137
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi how can i add this to the advanced search

all the best
Reply With Quote
  #53  
Old 10-09-2011, 12:59 PM
ngocol ngocol is offline
 
Join Date: Jul 2011
Location: Indonesia
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

instaled thanks
Reply With Quote
  #54  
Old 10-25-2011, 03:59 PM
ahobilam's Avatar
ahobilam ahobilam is offline
 
Join Date: Aug 2011
Location: Chennai, India
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried this
in VB 4.1.7
No luck?!
Reply With Quote
  #55  
Old 10-28-2011, 07:31 PM
Gn_Snake Gn_Snake is offline
 
Join Date: Feb 2006
Location: Italy
Posts: 358
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does it work for 4.1.7?
Reply With Quote
  #56  
Old 11-26-2011, 03:33 AM
K!nG K!nG is offline
 
Join Date: Dec 2010
Location: United States
Posts: 477
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just installed on 4.1.8 & working just fine Thanks
Reply With Quote
  #57  
Old 12-01-2011, 12:58 PM
datoneer datoneer is offline
 
Join Date: Jul 2011
Posts: 453
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I cannot find this (vb version 4.1.5)

3. Then Open Navigation / Breadcrumb Templates Click Collapse button click navbar Template find <div id="globalsearch" class="globalsearch"> and <ul class="navbar_advanced_search"> remove all code between this with
Reply With Quote
  #58  
Old 12-04-2011, 08:00 AM
GTX2 GTX2 is offline
 
Join Date: May 2006
Posts: 118
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any chance of not showing ads in navbar when search is done?
Just like i have conditionals for register and login script page, how can i add this one here?

Code:
<vb:if condition="THIS_SCRIPT != 'register'">
<vb:if condition="THIS_SCRIPT != 'login'">
<vb:if condition="THIS_SCRIPT != 'google'">
This last one not working...
Reply With Quote
  #59  
Old 12-07-2011, 08:40 PM
zeus_r6 zeus_r6 is offline
 
Join Date: Jun 2007
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm seeing little to no search results where I got plenty using the vb search...ideas?
Reply With Quote
  #60  
Old 12-07-2011, 08:50 PM
zeus_r6 zeus_r6 is offline
 
Join Date: Jun 2007
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's almost like it's not searching my site
Reply With Quote
  #61  
Old 12-26-2011, 01:07 PM
ecitizen's Avatar
ecitizen ecitizen is offline
 
Join Date: Nov 2011
Location: iran
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

but dont work with persiton langueg
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:07 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08124 seconds
  • Memory Usage 2,330KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (3)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete