The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
vB Google Adsense for Search plus Integration Details »» | |||||||||||||||||||||||||||
vB Google Adsense for Search plus Integration
Developer Last Online: Nov 2023
Since the hooks came out in the navigation bar, I had been working on a new release as seen in my previous modification. I have recently pushed myself to finish this hack but I have plans for addons to it .
This is under the assumption you have your key information: 1) Your pub (your pub ID/property information - usually starts with pub- and then some numbers) 2) Your cof usually found in your adsense code here: Code:
<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"> Code:
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:11 Upload searchresults.php to your site's root. Example: http://www.yoursite.com/searchresults.php Step 2: Install the product Go to Admincp => Plugins & Products => Manage Products => [Add/Import Product] => Browse for product-davidw_vb_google_search.xml => Import Step 3: Configure your Admincp options Go to Admincp => vBullitin Options => vBulletin Options => Find vB Google Search (Adsense) then click [Edit Settings] Edit your Pub ID, Cof, and your desired width of the iframe for your results. I use 800 in the screenshot, but you can change this based on your needs. Step 4: If you are using Version [s]1.2[/s] 1.3, or higher you must edit (or at least check) the searchresults.php to ensure it is correct for your site. vBAdvanced Optional Step 5: Go to Admincp => vBA CMPS => Default Settings => Under Options Portal Output Global Variables Add (or make sure they are present) these varaiables: template_hook google_navadsearch google_label_site google_label_web homeurl Step 6: Click on Edit Modules. Click on Search Forums (module). Under Module Tools, find Select Action (very top) and choose Copy. In your new (copy) of the Search Forums Module, change the name of your module to whatever you want (I chose "Search"). Under the Template Module Options heading, edit the adv_portal_ area. Change it from search to search_google Next, Under Module Shell Template Options, in the Form Code box, Change Code:
<form action="{$vbulletin->options[bburl]}/search.php" method="post" name="search"> <input name="s" type="hidden" value="" /> <input name="do" type="hidden" value="process" /> <input name="sortby" type="hidden" value="lastpost" /> <input name="forumchoice" type="hidden" value="0" /> Code:
<form method="get" action="http://www.yoursite.com/searchresults.php" type="hidden" name="search" target="_blank"> LEGACY VERSION - Applies to [s]vb_google_legacy_1_2.zip[/s] vb_google_legacy_1_3.zip(or higher) only - Very similar to Version [s]1.2[/s] 1.3 and higher except instead of using a hook this will work for previous 3.6 versions (should work with any 3.6 version). -- -- Admincp => Styles & Templates => Style Manager => Edit Templates (on your style) => Navigation / Breadcrumb Templates => navbar => find Code:
$vbphrase[advanced_search]</a></td> </tr> -- Admincp => Styles & Templates => Style Manager => Edit Templates (on your style) => Search Templates => search_forums => under $navbar, add $google_siteadsearch Also, you must ensure that $google_navadsearch does not go in between <form> tags. If your navbar is a modified old-style template, you will have an extended <form> section. Make changes similar to this... change this: Code:
<form action="search.php?do=process" method="post"> <table cellpadding="4" cellspacing="1" border="0"> <tr> <td class="thead">$vbphrase[search_forums]</td> </tr> Code:
<table cellpadding="4" cellspacing="1" border="0"> <tr> <form action="search.php?do=process" method="post"> <td class="thead">$vbphrase[search_forums]</td> </tr> Code:
</tr> $google_navadsearch $template_hook[navbar_search_menu] </table> </form> </div> <!-- / header quick search form --> Code:
</form> </tr> $google_navadsearch $template_hook[navbar_search_menu] </table> </div> <!-- / header quick search form --> Changelog Version 1.4 - Added support for vBAdvanced module (rather than going to my hack on vBAdvanced.com) Version 1.3 - Added missing template cache plugins from XML file (had the template cache in the file, just lost it along the way in the XML). Version 1.2 - Allows you to put your searchresults.php file in any directory, but you must edit the path in the searchresults.php file to the location of searchresults.php. - Removed unnecessary xml information. - Fixed a small bug in the product - Added search.php functionality -- Admincp => Styles & Templates => Style Manager => Edit Templates (on your style) => Search Templates => search_forums => under $navbar, add $google_siteadsearch - Set default values so that it is easier to configure. You must still edit these values. Version 1.1 - Change default "site" to your site's name or put a link to a small logo there. - Change default "web" to "Google" or put their logo in there. Code:
<img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle"> - Only added the ability to allow you to easily add your own logos or change the text from the admincp. Version 1.0 - Original Show Your Support
|
Comments |
#72
|
|||
|
|||
Quote:
user:mod pass:mod http://www.mdcdeve.com/forums/ http://www.mdcdeve.com/forums/search.php |
#73
|
||||
|
||||
Ok, that's really weird - which version of 1.2 are you using? search or legacy? if legacy, can you post a snippet where you've added the code?
|
#74
|
|||
|
|||
I am running 3.6.8., also having a prob with the searchresults file, when trying to search I get the error below.
The file searchresults.php and global.php is in the same directory, both in /forum on the domain. Quote:
|
#75
|
||||
|
||||
Did you edit the searchresults.php file and mark the location in your admincp options?
|
#76
|
|||
|
|||
Quote:
Hiya, i'm using the legacy version. Here's where i placed the code. Navbar Code:
<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> </tr> <!-- Post Thanks Hack --> $template_hook[navbar_search_menu] <!-- / Post Thanks Hack --> $google_navadsearch </table> </form> </div> <!-- / header quick search form --> </if> <if condition="$show['member']"> <!-- user cp tools menu --> <div class="vbmenu_popup" id="usercptools_menu" style="display:none"> <table cellpadding="4" cellspacing="1" border="0"> Code:
<title>$vboptions[bbtitle] - <if condition="$show['searchthread']">$vbphrase[search_thread]<else />$vbphrase[search_forums]</if></title> </head> <body> $header $navbar $google_siteadsearch <if condition="$show['errors']"> <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> |
#77
|
|||
|
|||
Quote:
Hi I think I am missing you somewhere. I have entered the 3 values in AdminCP for PUB, COF and Frame width. I placed a copy of the searchresults.php in the same directory as the forum (/forum on my domain), but I noticed now that it was looking for it in root. I now edited the search results page to change the path for the global.php file to ./forum/global.php but still getting the same error. You mention "mark the location in AdminCP", how do you mean? Where must this be marked? |
#78
|
||||
|
||||
I'm sorry but I am extremely confused. The installation instructions for this are very hard to follow and there are a lot of files.
Assuming I want to install version 1.2 on a 3.6.8 site: 1. Which file(s) should I download? 2. Should I generate my own cof information from Adsense? 3. After I've installed and configured the 1.2 site, are there any templates I should modify or is that for the legacy version? |
#79
|
||||
|
||||
Quote:
Quote:
2. You can try generating your own cof information but some have success, other have not. If yours does not work, use what I have supplied, that will work - and you should still be able to play with the hex colors to change it to your desire. 3. The templates to modify are only for the legacy version. |
#80
|
|||
|
|||
Which version should I install on 3.6.7? I tried 2 different versions. One I got a blank page and the other I got an error 406 page.
|
#81
|
|||
|
|||
I got it to work. The GALT code google is generating does not have two "1" at the end of the code like yours does. Its ony producing one "1" and not two "1"'s. I placed an addition 1 on the end and it works. You can see it here if you wanna check it out. Custom Golf Carts
Thanks for the great MOD. Clicked installed. 3.6.7 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|