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

Reply
 
Thread Tools
Google Search In Navbar Details »»
Google Search In Navbar
Version: 1.00, by SuperTaz SuperTaz is offline
Developer Last Online: Mar 2022 Show Printable Version Email this Page

Category: Add-On Releases - Version: 3.8.x Rating:
Released: 09-04-2009 Last Update: 09-06-2009 Installs: 25
Template Edits
Re-useable Code  
No support by the author.

/*================================================= =====================*\
|| ################################################## ################## ||
|| # 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 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 Now

File Type: txt gsearch.txt (1.5 KB, 171 views)

Screenshots

File Type: png gsearch.PNG (6.5 KB, 0 views)

Show Your Support

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

Comments
  #12  
Old 09-07-2009, 07:56 AM
s-p0k's Avatar
s-p0k s-p0k is offline
 
Join Date: Jun 2009
Location: S1n C1ty
Posts: 199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sphinx View Post
no problem and thanks
same here....ty
Reply With Quote
  #13  
Old 10-11-2009, 10:51 PM
joyboy2001 joyboy2001 is offline
 
Join Date: Nov 2008
Location: New Delhi, India
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great ... it works ... but how do I get this to come up on all pages, not just forumhome ?
Reply With Quote
  #14  
Old 10-11-2009, 11:53 PM
SuperTaz's Avatar
SuperTaz SuperTaz is offline
 
Join Date: Apr 2007
Location: Pennsylvania
Posts: 744
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Put this code on any page you want:

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>
Reply With Quote
  #15  
Old 10-11-2009, 11:59 PM
Brandon Sheley's Avatar
Brandon Sheley Brandon Sheley is offline
 
Join Date: Mar 2005
Location: Google Kansas
Posts: 4,678
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by LilPimp View Post
when they use the google search to search on ur forum only? do you get paid?
You'll have to use the search code google gives you in your adsense control panel
Reply With Quote
  #16  
Old 10-12-2009, 12:48 AM
joyboy2001 joyboy2001 is offline
 
Join Date: Nov 2008
Location: New Delhi, India
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Warden-B- View Post
Put this code on any page you want:

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>
Thanks, but I think this is not the answer I was looking for ...
I get the results on the results page alright ... My question was, since navbar appears on all pages, and the code has been changed in the navbar template, how come the search box comes up only on forumhome and not on any other pages where the navbar appears ?
Reply With Quote
  #17  
Old 10-12-2009, 12:49 AM
joyboy2001 joyboy2001 is offline
 
Join Date: Nov 2008
Location: New Delhi, India
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by LilPimp View Post
when they use the google search to search on ur forum only? do you get paid?
you get paid when someone clicks on the ads in the results page ...
Reply With Quote
  #18  
Old 10-12-2009, 07:16 AM
Log on Log on is offline
 
Join Date: Aug 2009
Location: KSA
Posts: 91
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank u
Reply With Quote
  #19  
Old 10-12-2009, 07:12 PM
joyboy2001 joyboy2001 is offline
 
Join Date: Nov 2008
Location: New Delhi, India
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by joyboy2001 View Post
Thanks, but I think this is not the answer I was looking for ...
I get the results on the results page alright ... My question was, since navbar appears on all pages, and the code has been changed in the navbar template, how come the search box comes up only on forumhome and not on any other pages where the navbar appears ?
correction, this does not appear on forumhome but only on forum index (http://example.com/forum/index.php) ... How do I get this to come up on all pages where navbar appears ?
Reply With Quote
  #20  
Old 10-15-2009, 03:54 AM
SuperTaz's Avatar
SuperTaz SuperTaz is offline
 
Join Date: Apr 2007
Location: Pennsylvania
Posts: 744
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What other pages do you want it to show on?
Reply With Quote
  #21  
Old 10-15-2009, 12:11 PM
realdx realdx is offline
 
Join Date: Mar 2009
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice, does this open results in a new page/tab? thanks!!
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 07:53 PM.


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.09882 seconds
  • Memory Usage 2,338KB
  • 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
  • (5)bbcode_code
  • (5)bbcode_quote
  • (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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (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
  • 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_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