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

Reply
 
Thread Tools
CFM: Google AdSense for Search Integration Details »»
CFM: Google AdSense for Search Integration
Version: 1.0, by Throtex Throtex is offline
Developer Last Online: May 2011 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 3.6.1 Rating:
Released: 09-02-2006 Last Update: 09-29-2006 Installs: 145
Uses Plugins Template Edits
Additional Files  
No support by the author.

Title: "CFM: Google Search Results"
-------------------------------------------------
Author: Sal Bezos (webmaster@carforummisfits.com)
Date of Creation: September 3, 2006
Version: 1.0 (9/30/2006)
Home: http://www.carforummisfits.com/
-------------------------------------------------

Purpose:
--------
This product for vBulletin creates a target page for providing Google Search Results within your vBulletin forums. The Google Search Results (AdSense for Search) will appear in a vBulletin page.

Unlike the previous revision of this product, you will now be able to enter code for a Google Search Box for placement in the Search drop-down menu (or anywhere else you would like to place it). Please make sure that your search box code includes a <form> tag that states something along the lines of action="http://<yourhostname>/forums/cfmgoogle.php".


Tested:
-------
This product has been tested on a vBulletin 3.6.1 installation. There is no reason why it should not work in the same manner on any 3.6.x or 3.5.x installation, but it has not and will not be tested by the author.


Included Files:
---------------
- README.txt
- cfm-live-demo.png (screenshot)
- cfmgoogle.php
- product-cfm_google_search_results.xml


Installation:
-------------
1. Upload the cfmgoogle.php file to your forum root, usually located at http://<yourhostname>/forums.

2. Register for a Google AdSense for Search account.
----a. Register for a Google AdSense account if you don't have one.
----b. Visit "http://www.google.com/adsense/".
----c. Login with your e-mail and password.
----d. Click on the "AdSense Setup" tab.
----e. Select "AdSense for Search".
----f. Configure your search box.
--------f1. Select either "Google WebSearch" or "Google WebSearch + SiteSearch" depending on whether you want users to be able to Google search your site or not. If you select "Google WebSearch + SiteSearch", enter the URL of sites you wish to be able to search.
--------f2. For Logo Type, I recomment selecting "Google Logo" and checking the "Logo above text box" option.
--------f3. For "Opening of search results page" select "Open results within my own site." Enter the URL of your cfmgoogle.php file (e.g. http://<yourhostname>/forums/cfmgoogle.php)
--------f4. Click "Continue >>".
----g. Configure the appearance of the results page, then click "Continue >>"
----h. You should now receive two sets of code from Google labeled "Your search box code" and "Your search results code".

3. In your forum's admin panel, go to Plugins & Products/Manage Products

4. Click on Add/Import Product

5. Click "Browse..." and select the "product-cfm_google_search_results.xml" product file. If this is your first installation of this product, select the "No" radio button in the "Allow Overwrite" option. If you are upgrading or reinstalling, select the "Yes" radio button. Click the "Import" button.

6. Go to vBulletin Options/vBulletin Options. Scroll through the list and select "CFM: Google Search Results".

7. In the "Google Search Box Code" option, paste the code provided by Google titled "Your search box code".

7. In the "Google Search Results Code" option, paste the code provided by Google titled "Your search results code".

8. In Styles & Templates/Style Manager go into Edit Templates for your style. Open the "Navigation / Breadcrumb Templates" template group and open the "navbar" template.

9. Find the following:
Code:
		<form action="search.php?do=process" method="post">
		<table cellpadding="4" cellspacing="1" border="0">
And replace with:
Code:
		<table cellpadding="4" cellspacing="1" border="0">
		<form action="search.php?do=process" method="post">
Find the following:
Code:
		</table>
		</form>
	</div>
	<!-- / header quick search form -->
And replace with:
Code:
		</form>
		<tr>
			<td class="thead">Search Google</td>
		</tr>
                <tr>
                        <td class="vbmenu_option" title="nohilite">$vboptions[cfmgsr_googlesearch]</td>
		</tr>
		</table>
	</div>
	<!-- / header quick search form -->
10. Pull up a forum page and look under your search drop-down menu for the search box.

11. Enjoy!


FAQ:
----
Q. My search results window is too tall. What's wrong with it?
A. This appears to be a bug in the Google Search Results code. If my assumption is incorrect, please let me know.

Q. Why are the colors all wonky on my search results?
A. The colors of the search results are provided by the search box. Make sure the colors in the search box code are correct.

Q. The background color of the Google search box doesn't match my page -- what can I do about it?
A. If Google's TOS allows it, play around with the settings in the code you pasted in the "Your search box code" option.


Revisions:
----------
1.0 - 09/30/2006 - Adding instructions and support for the Google search box in the search drop-down menu
0.1 - 09/03/2006 - Initial release


Support:
--------
Any questions and problems should be reported to the modification's thread on http://www.vbulletin.org. No warranty, express or implied, is granted with this software. Use is at your own risk.


License:
--------
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991

Show Your Support

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

Comments
  #72  
Old 11-05-2007, 01:24 AM
mmmender's Avatar
mmmender mmmender is offline
 
Join Date: Sep 2002
Location: toronto
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by clearchannel View Post
I fixed this in 3.67 by ignoring the first edit required in the navbar, it's already set correctly in 3.6.7 the second edit should be done as follows:
Find the following:
Code:
  </table>
 </div>
 <!-- / header quick search form -->
and replace with:
Code:
  <tr>
   <td class="thead">Search Google</td>
  </tr>
                <tr>
                        <td class="vbmenu_option" title="nohilite">$vboptions[cfmgsr_googlesearch]</td>
  </tr>
  </table>
 </div>
 <!-- / header quick search form -->
Quote:
Originally Posted by TomJames View Post
Does not seem to work on 3.6.8, any ideas?
I used the above suggestion and now it works fine for me in 3.6.8
Reply With Quote
  #73  
Old 11-12-2007, 04:22 AM
nyunyu nyunyu is offline
 
Join Date: Dec 2004
Location: Malaysia
Posts: 253
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have problem with sql database while importing xml.

Database error in vBulletin 3.5.4:

Invalid SQL:

### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO plugin
(`active`, `executionorder`, `title`, `hookname`, `phpcode`, `product`)
VALUES
('1', '5', 'CFM Google Search Results - Who\'s Online? (OLP)', 'online_location_process', 'if ($filename == \'cfmgoogle.php\')\r\n{\r\n$userinfo[\'activity\'] = \'Google Search Results\';\r\n}', 'cfm_google_search_results');

MySQL Error : Unknown column 'executionorder' in 'field list'
Error Number : 1054
Date : Monday, November 12th 2007 @ 02:20:40 PM
Script : http://nyunyu.info/animeproject/admincp/plugin.php
Referrer : http://nyunyu.info/animeproject/admi...?do=productadd
IP Address : xxx.xxx.xxx.xxx
Username : nyunyu
Classname : vb_database
Reply With Quote
  #74  
Old 11-30-2007, 05:30 PM
hipgirl hipgirl is offline
 
Join Date: Sep 2007
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mmmender View Post
I used the above suggestion and now it works fine for me in 3.6.8
Me too. Thank you all.

Michelle
Reply With Quote
  #75  
Old 05-24-2008, 01:40 PM
imported_silkroad imported_silkroad is offline
 
Join Date: Dec 2003
Posts: 563
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works great! thanks!
Reply With Quote
  #76  
Old 05-28-2008, 03:01 PM
archonus archonus is offline
 
Join Date: Jul 2005
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

work 100%, thx you
Reply With Quote
  #77  
Old 07-01-2008, 09:45 PM
Gipskopf Gipskopf is offline
 
Join Date: Dec 2006
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

work not in 3.7.2 ?

I´m not find the code of installations Point 9

Can help me ?
Reply With Quote
  #78  
Old 07-14-2008, 08:27 PM
ShackMaster ShackMaster is offline
 
Join Date: Apr 2006
Posts: 252
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It works in 3.7.2 just fine.

The first part of the installation in #9 is already done for you now because 3.7.2 added Tag Searching.

Add the red code below in your Navbar template:

Code:
<if condition="$show['popups']">
<!-- NAVBAR POPUP MENUS -->

	<if condition="$show['searchbuttons']">
	<!-- header quick search form -->
	<div class="vbmenu_popup" id="navbar_search_menu" style="display:none" align="$stylevar[left]">
		<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]" />
					<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
					<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>
		<if condition="$vboptions[threadtagging]">
		<tr>
			<td class="vbmenu_option"><a href="tags.php$session[sessionurl_q]" rel="nofollow">$vbphrase[tag_search]</a></td>
		</tr>
		</if>
		<tr>
			<td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
		</tr>
            	<tr>
			<td class="thead">Search Google</td>
		</tr>
             	<tr>
           		<td class="vbmenu_option" title="nohilite">$vboptions[cfmgsr_googlesearch]</td>
		</tr>

		$template_hook[navbar_search_menu]
		</table>
	</div>
	<!-- / header quick search form -->
	</if>
Reply With Quote
  #79  
Old 02-08-2009, 08:50 PM
HabboForum HabboForum is offline
 
Join Date: May 2003
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any chance of updating this for vBulletin 3.8? We could do with this as we emptied our search index and we're not able to rebuild it without crashing MySQL.
Reply With Quote
  #80  
Old 07-08-2009, 12:57 PM
macbooking's Avatar
macbooking macbooking is offline
 
Join Date: Jan 2009
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i'm running vb 3.8.2
i uploaded/imported the files from customadplacement.zip
& added the red code from above!

working ...lucky boy iam

thx @ shackmaster
Reply With Quote
  #81  
Old 11-24-2009, 01:50 PM
Jah-Hools Jah-Hools is offline
 
Join Date: Jul 2007
Posts: 214
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK

I have been running this for several years now...

I have just (must be crazy) paid to renew the ad free version..

And got this message:

To get started with GSS and to get your code, please use the following instructions to begin:

1. Go to http://google.com/sitesearch
2. Click on 'Manage my account'
3. You should see your search engine(s) listed under "Google Site Search - search engines I've created"
4. Go to the control panel to start managing your search engine and to get your code to embed within your website.


Well of course, I already have it running!

So - do I need to generate new code? Or do I just leave it and carry on (it seems to be working) Of course its impossible to get in contact with Google...

Does anyone have any tips for further customizing the look of the results? Or how to tweak settings?

OK 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 08:51 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05053 seconds
  • Memory Usage 2,328KB
  • 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
  • (7)bbcode_code
  • (3)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
  • (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
  • (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