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

Reply
 
Thread Tools
Google/Adsense Site Search Navbar Integration Details »»
Google/Adsense Site Search Navbar Integration
Version: 1.00, by davidw davidw is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Add-On Releases - Version: 3.6.7 Rating:
Released: 10-03-2006 Last Update: 06-15-2007 Installs: 102
 
No support by the author.

Since the vbadvanced google/adsense integration I came out with a while back I had wanted to think of a way to do this to the navbar, but I didn't really care for the old navbar's search - until the 3.6 version came out. I like this new version and I've now decided to come write my own based on what I did with my original for vbadvanced.

It's fairly simple...

Go to your admincp => Styles & Templates => Style Manager => look for your style to do this to and under All Style Options click Edit Templates

In your navigation bar, find

Code:
<!-- header quick search form -->
	<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
		<table cellpadding="4" cellspacing="1" border="0">
		<tr>
			<td class="thead">$vbphrase[search_forums]</td>
		</tr>
		<tr>
			<td class="vbmenu_option" title="nohilite">
				<form action="search.php?do=process" method="post">
					<input type="hidden" name="do" value="process" />
					<input type="hidden" name="quicksearch" value="1" />
					<input type="hidden" name="childforums" value="1" />
					<input type="hidden" name="exactname" value="1" />
					<input type="hidden" name="s" value="$session[sessionhash]" />
					<div><input type="text" class="bginput" name="query" size="25" tabindex="1001" /><input type="submit" class="button" value="$vbphrase[go]" tabindex="1004" /></div>
					<div style="margin-top:$stylevar[cellpadding]px">
						<label for="rb_nb_sp0"><input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />$vbphrase[show_threads]</label>
						&nbsp;
						<label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />$vbphrase[show_posts]</label>
					</div>					
				</form>
			</td>
		</tr>
		<tr>
			<td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
		</tr>
		$template_hook[navbar_search_menu]
		</table>
	</div>
	<!-- / header quick search form -->
and replace with

Code:
<!-- header quick search form -->
	<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
		<table cellpadding="4" cellspacing="1" border="0">
		<tr>
			<td class="thead">$vbphrase[search_forums]</td>
		</tr>
		<tr>
			<td class="vbmenu_option" title="nohilite">
				<form action="search.php?do=process" method="post">
					<input type="hidden" name="do" value="process" />
					<input type="hidden" name="quicksearch" value="1" />
					<input type="hidden" name="childforums" value="1" />
					<input type="hidden" name="exactname" value="1" />
					<input type="hidden" name="s" value="$session[sessionhash]" />
					<div><input type="text" class="bginput" name="query" size="25" tabindex="1001" /><input type="submit" class="button" value="$vbphrase[go]" tabindex="1004" /></div>
					<div style="margin-top:$stylevar[cellpadding]px">
						<label for="rb_nb_sp0"><input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />$vbphrase[show_threads]</label>
						&nbsp;
						<label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />$vbphrase[show_posts]</label>
					</div>					
				</form>
			</td>
		</tr>
		<tr>
			<td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
		</tr>
		<tr>
			<form action="http://www.google.com/custom" type="hidden" method=GET name="search"><td class="thead">Search Site / Google</td>
		</tr>
		<tr>
			<td class="vbmenu_option" title="nohilite">
                	<input type="hidden" name="client" value="pub-0252500186462625">
                	<input type="hidden" name="forid" value="1">
                	<input type="hidden" name="ie" value="ISO-8859-1">
                	<input type="hidden" name="oe" value="ISO-8859-1">
                	<input name="cof" type="hidden" 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;LH:50;LW:250;L:http://www.christianboards.org/images/logo.gif;S:http://;FORID:1">
                	<input name="domains" type="hidden" value="www.yoursite.com">
                	<input type="hidden" name="hl" value="en">
                	<input type="text" class="bginput" name="q" size="25" maxlength="255" />$gobutton<br />
                	<input name="sitesearch" type="radio" value="www.christianboards.org" checked> Christianboards.org<br />
                	<input name="sitesearch" type="radio" value=""><a href="http://www.google.com/search"><img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle"></A>
                	</td></form>
        	</tr>
		$template_hook[navbar_search_menu]
		</table>
	</div>
	<!-- / header quick search form -->
Replace pub-1234567890123456 with your pub- number
In the line <input name="cof" type="hidden" value="GALT:">, Replace value="GALT:" with your information (this contains information that controls how your search results are displayed - this won't necessarily start with GALT.
Replace www.yoursite.com with your website in both places
Replace Yoursite.com with your website

I have updated this for 3.6.7 - there is a small change, but enough for an update.
There is a hook as well, $template_hook[navbar_search_menu], which I have a product that you can just install, but for some reason ibproarcade is conflicting with this new product.

Show Your Support

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

Comments
  #42  
Old 02-16-2007, 01:35 PM
davidw's Avatar
davidw davidw is offline
 
Join Date: Jul 2005
Location: Arkansas
Posts: 2,815
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RedGTiVR6 View Post
So then this would just allow a google style search on the site it's self. No need to have an ad sense account?
If using it with the changes I made in my last post - then that would be correct.
Reply With Quote
  #43  
Old 02-16-2007, 01:57 PM
RedGTiVR6 RedGTiVR6 is offline
 
Join Date: Dec 2006
Location: Little Elm, TX
Posts: 817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sweet!

thanks 100x!

Going to go give it a try and click install!
Reply With Quote
  #44  
Old 02-16-2007, 06:47 PM
RedGTiVR6 RedGTiVR6 is offline
 
Join Date: Dec 2006
Location: Little Elm, TX
Posts: 817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works very well!
Reply With Quote
  #45  
Old 02-22-2007, 08:17 PM
masterross's Avatar
masterross masterross is offline
 
Join Date: Nov 2005
Location: Bulgaria
Posts: 315
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good job man!

can you help me to switch place of "Search Forums" and "Search Site / Google" ?

I want "Search Site / Google" to be above

thanks
Reply With Quote
  #46  
Old 02-22-2007, 08:38 PM
davidw's Avatar
davidw davidw is offline
 
Join Date: Jul 2005
Location: Arkansas
Posts: 2,815
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If I follow you correctly, this is probably what you want...

PHP Code:
<!-- header quick search form -->
    <
div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
        <
table cellpadding="4" cellspacing="1" border="0">
        <
tr>
            <
form action="http://www.google.com/custom" type="hidden" method=GET name="search"><td class="thead">Search Site Google</td>
        </
tr>
        <
tr>
            <
td class="vbmenu_option" title="nohilite">
                <
input type="hidden" name="client" value="pub-1234567890123456">
                <
input type="hidden" name="forid" value="1">
                <
input type="hidden" name="ie" value="ISO-8859-1">
                <
input type="hidden" name="oe" value="ISO-8859-1">
                <
input name="cof" type="hidden" value="GALT:                      ">
                <
input name="domains" type="hidden" value="www.yoursite.com">
                <
input type="hidden" name="hl" value="en">
                <
input type="text" class="bginput" name="q" size="25" maxlength="255" />$gobutton<br />
                <
input name="sitesearch" type="radio" value="www.yoursite.com" checkedYoursite.com<br />
                <
input name="sitesearch" type="radio" value=""><a href="http://www.google.com/search"><img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Googlealign="middle"></A>
                </
td></form>
        </
tr>    
        <
tr>
            <
form action="search.php?do=process" method="post"><td class="thead">$vbphrase[search_forums]</td>
        </
tr>
        <
tr>
            <
td class="vbmenu_option" title="nohilite">
                <
input type="hidden" name="do" value="process" />
                <
input type="hidden" name="quicksearch" value="1" />
                <
input type="hidden" name="childforums" value="1" />
                <
input type="hidden" name="exactname" value="1" />
                <
input type="hidden" name="s" value="$session[sessionhash]/>
                <
div><input type="text" class="bginput" name="query" size="25" tabindex="1001" /><input type="submit" class="button" value="$vbphrase[go]tabindex="1004" /></div>
            </
td>
        </
tr>
        <
tr>
            <
td class="vbmenu_option" title="nohilite">
                <
label for="rb_nb_sp0"><input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />$vbphrase[show_threads]</label>
                &
nbsp;
                <
label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />$vbphrase[show_posts]</label>
            </
td>
        </
tr>
        <
tr>
            <
td class="vbmenu_option"><a href="search.php$session[sessionurl_q]accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td></form>
        </
tr>        
        </
table>
    </
div>
    <!-- / 
header quick search form --> 
Reply With Quote
  #47  
Old 02-22-2007, 09:18 PM
masterross's Avatar
masterross masterross is offline
 
Join Date: Nov 2005
Location: Bulgaria
Posts: 315
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes
that's it!

rate added

BR
Reply With Quote
  #48  
Old 02-23-2007, 04:30 PM
subzero06 subzero06 is offline
 
Join Date: Dec 2006
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This works for the 3.6.4 ?
Reply With Quote
  #49  
Old 02-23-2007, 05:21 PM
davidw's Avatar
davidw davidw is offline
 
Join Date: Jul 2005
Location: Arkansas
Posts: 2,815
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why yes, it does
Reply With Quote
  #50  
Old 02-24-2007, 10:29 AM
rapsearch's Avatar
rapsearch rapsearch is offline
 
Join Date: Aug 2002
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Call me stupid but i can't find the template to edit.. which one is it?
Reply With Quote
  #51  
Old 02-24-2007, 11:44 AM
davidw's Avatar
davidw davidw is offline
 
Join Date: Jul 2005
Location: Arkansas
Posts: 2,815
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Go to your admincp => Styles & Templates => Style Manager => look for your style to do this to and under All Style Options click Edit Templates => scroll down and find Navigation / Breadcrumb Templates => navbar
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 03:17 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.06405 seconds
  • Memory Usage 2,374KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_code
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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
  • (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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete