Back to vBulletin 3.8 Template Modifications

Google Search In Navbar
Mod Version: 1.00, by SuperTaz

vB Version: 3.8.x Rating: (1 vote - 5.00 average) Installs: 25
Released: 05 Sep 2009 Last Update: 07 Sep 2009 Downloads: 167
Not Supported Template Edits Re-usable Code External Content  

/*======================================================================*\
|| #################################################################### ||
|| # Google Search In Navbar
|| # Version 1.00
|| # Author: Warden
|| # This mod may only be used from vbulletin.org
|| # DO NOT display this mod on any other modification site without my permission
|| # You can alter this code and re-display it here on vbulletin.org
|| #################################################################### ||
\*======================================================================*/

Description: This mod adds the Google Search to your navbar.

Install: Less than 1 minute.

Instructions:

1. Go to https://www.google.com/adsense and click on Adsense For Search and create a Search for your site. All you will need is your PUB ID and your site URL.

2. Find:

Code:
<div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
Directly below that add:

Code:
<!-- Google Search ------------------>
<td class="alt2">
<DIV ALIGN=RIGHT>
<form action="YOUR SITE HERE" id="cse-search-box">
  <div>
    <input type="hidden" name="cx" value="partner-pub-PUB ID HERE:afpnnc-ej87" />
    <input type="hidden" name="cof" value="FORID:10" />
    <input type="hidden" name="ie" value="UTF-8" />
    <input type="text" name="q" size="50" />
    <input type="submit" name="sa" value="Search" />
  </div>
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script>
</DIV>
</td>
<!-- Google Search ------------------>
Now paste this code on a page where you would like your results to appear:

Code:
<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>
Enter your site URL where it says "YOUR SITE HERE" (blue code).
Enter your PUB ID where it says "PUB ID HERE" in the code (red code).

Click Save and all Done. Refresh.

If you want support, click INSTALL!

Download

File Type: %1$s gsearch.txt (1.5 KB, 173 downloads)

Screenshots

Click image for larger version
Name:	gsearch.PNG
Views:	1140
Size:	6.5 KB
ID:	104092  

Similar Mods

Mini Mods Google Search in Navbar vBulletin 3.7 Add-ons
Google Search in navbar vBulletin 3.5 Template Modifications
Google search of your site in navbar vBulletin 3.0 Template Modifications
Google search in Navbar vBulletin 3.0 Full Releases

vblts.ru supports vBulletin®, 2022-2024