Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
Google search in Navbar Details »»
Google search in Navbar
Version: 1.00, by attroll attroll is offline
Developer Last Online: Mar 2023 Show Printable Version Email this Page

Version: 3.0.1 Rating:
Released: 06-29-2005 Last Update: Never Installs: 2
Template Edits
 
No support by the author.

At the request from a couple others I am posting this. This hack that lets you put a Google search bar in your navagation bar. It gives you the options of Google searching your site or the intire web.

To add your site you will have to replace "your-site.com" with your sites domain name in the code that you need to add below.

Go to navagation / breadcrumb templates and go to navbar.

Find:
Code:
<div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php?$session[sessionurl]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
</if>
</td>
After that add:
Code:
<!-- SiteSearch Google -->
<td class="alt2" valign="top" nowrap="nowrap">
<div class="smallfont">
<form method="get" action="http://www.google.com/custom" target="google_window">
<table border="2" cellspacing="0" cellpadding="0" style="border-collapse: collapse" height="1" width="100%" bgcolor="#F0F0F0" bordercolor="#336600">
<td bgcolor="#D6D6D6"><center>
<input type="hidden" name="domains" value="your-site.com"></input>
<input type="text" name="q" size="40" maxlength="255" value=""></input>
<input type="radio" name="sitesearch" value="" checked="checked"></input>
<font size="-1" color="#000000">Web</font>
<input type="radio" name="sitesearch" value="your-site.com"></input>
<font size="-1" color="#000000">your-site.com</font>
<input type="submit" name="sa" value="Google"></input>
<input type="hidden" name="client" value="pub-2871740088182458"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="ISO-8859-1"></input>
<input type="hidden" name="oe" value="ISO-8859-1"></input>
<input type="hidden" name="safe" value="active"></input> 
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1;"></input>
<input type="hidden" name="hl" value="en"></input>
</center>
</td>
</TABLE>
</form>
</div>
</td>
<!-- SiteSearch Google -->

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 06-30-2005, 08:23 PM
Cixxtynine Cixxtynine is offline
 
Join Date: Jun 2005
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's just on the main page, how to put it on every page?
Reply With Quote
  #3  
Old 07-01-2005, 05:40 AM
attroll's Avatar
attroll attroll is offline
 
Join Date: Jan 2003
Location: Litchfield, Me
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Cixxtynine
It's just on the main page, how to put it on every page?
If you put it in your Navagation/Breadcrumb Template in the NAVBAR template like I posted it should be showing up in you navbar on every page.
Reply With Quote
  #4  
Old 07-15-2005, 09:18 PM
kregger kregger is offline
 
Join Date: Jul 2005
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm. The site search goes to google. Is it supposed to search my forum just like the regular search does?
Reply With Quote
  #5  
Old 07-16-2005, 07:11 AM
attroll's Avatar
attroll attroll is offline
 
Join Date: Jan 2003
Location: Litchfield, Me
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kregger
Hmmm. The site search goes to google. Is it supposed to search my forum just like the regular search does?
There is a option you have to pick one is to search the web abd the other is to search your web site. Maybe you have the option set of the Web.
Reply With Quote
  #6  
Old 07-16-2005, 11:56 AM
kregger kregger is offline
 
Join Date: Jul 2005
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I triple checked that. Every search opens a Google window though. In the code it says,
Code:
<form method="get" action="http://www.google.com/custom" target="google_window">
That sounds like its supposed to always do that instead of being like a regular forum search. Of course, I don't know very much about code. hehe I'm just a beginner.
Reply With Quote
  #7  
Old 07-17-2005, 03:33 AM
attroll's Avatar
attroll attroll is offline
 
Join Date: Jan 2003
Location: Litchfield, Me
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kregger
I triple checked that. Every search opens a Google window though. In the code it says,
Code:
<form method="get" action="http://www.google.com/custom" target="google_window">
That sounds like its supposed to always do that instead of being like a regular forum search. Of course, I don't know very much about code. hehe I'm just a beginner.
Ok here is what you do:
Find the following code:
Code:
<input type="radio" name="sitesearch" value="" checked="checked"></input>
<font size="-1" color="#000000">Web</font>
Remove the following code:
Code:
 checked="checked"
Now find this code:
Code:
<input type="radio" name="sitesearch" value="your-site.com"></input>
<font size="-1" color="#000000">your-site.com</font>
Now put the following code in this line:
Code:
 checked="checked"
It should now look like this
Code:
<input type="radio" name="sitesearch" value="your-site.com" checked="checked"
></input>
<font size="-1" color="#000000">your-site.com</font>
This should make it so that it defaults to do the search of your web site.
Reply With Quote
  #8  
Old 07-17-2005, 05:07 AM
kregger kregger is offline
 
Join Date: Jul 2005
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nope, it just makes the radio button for my site default. Still jumps to Google though. Nothing on my site that Google would find other than if I searched for the name of my site.
Reply With Quote
  #9  
Old 07-17-2005, 02:43 PM
attroll's Avatar
attroll attroll is offline
 
Join Date: Jan 2003
Location: Litchfield, Me
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kregger
Nope, it just makes the radio button for my site default. Still jumps to Google though. Nothing on my site that Google would find other than if I searched for the name of my site.
I just registered on your site and tried it. I set the radio button to WPLH and typed the word "work" and it came up with the gollowing:

Work Place Like Home :: Work Place Like Home Forum Index, Work Place Like Home ... Search: Search at:. Work Place Like Home, Google. Advanced Forum Search ...
www.workplacelikehome.com/board/ - Similar pages


This is a search result for your web site.

What this hack does is not search your web site. It searches Google for items that are from your web site (if you set the radio button to WPLH). If google has not been crawling and searching your web site then it will not bring anything up. So if your site is still fairly new it will take a while got google to build up a search data base. If you have the search spyders turned off that will keep google from searching your site also.
Reply With Quote
  #10  
Old 07-25-2005, 07:17 PM
kregger kregger is offline
 
Join Date: Jul 2005
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oooh. Well that's the prob. hehe No, I'm not listed on Google or have spyders. I have 4195 members, but its all from word of mouth. As a result, I have very little problem with spammers.

Okay, so I just need to get rid of the WPLH part. Thanks for the info!

Craig
Reply With Quote
Reply

Thread Tools

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 11:29 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04287 seconds
  • Memory Usage 2,295KB
  • Queries Executed 23 (?)
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
  • (9)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete