The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Google/Adsense Site Search Navbar Integration Details »» | |||||||||||||||||||||||||||
Google/Adsense Site Search Navbar Integration
Developer Last Online: Nov 2023
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> <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 --> 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> <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 --> 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
|
Comments |
#32
|
||||
|
||||
What does this have to do with google adsense? I mean? It's just a google search performed on your site, isn't it?
|
#33
|
||||
|
||||
You could look at it that way, however, you have both options - search your site OR search the web with your adsense information. Adsense does not have to be a box with ads in it. This is called Adsense for Search.
Here's an overview: https://www.google.com/adsense/ws-overview |
#34
|
||||
|
||||
Aah, now I get it .
I thought of the box with ads yes . And where do I find the GELT? |
#35
|
||||
|
||||
the GALT, from what I understand is how the results display on your page. Much like properties of <td> and <div> tags, it appears to define the properties. It is displayed initially when you sign up for the adsense code. For example, here is mine
PHP Code:
PHP Code:
PHP Code:
|
#36
|
||||
|
||||
Aah... So I really do need an adsense account?
|
#37
|
||||
|
||||
Yes, to make money off the searches (you need the pub-#). Of course, you could always use mine :P
|
#38
|
|||
|
|||
What if making money off of the searches isn't necessarially a concern?
If I just wanted a google search feature for the forum. Is that possible with this mod or do I need to look elsewhere? |
#39
|
||||
|
||||
Exactly..
|
#40
|
||||
|
||||
This works either way If you just wanted to search the site rather than search the web, you could remove the ability to search the web. (the radio button).
Edit: Find: PHP Code:
PHP Code:
Find and Remove: PHP Code:
|
#41
|
|||
|
|||
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 so, this would probably end up working much better. We're finding that the search feature that's built in doesn't work very well. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|