This MOD uses the Google API to allow searching of your site or the web with Google.
This is a bit difficult to explain, so you can see a live demo by going to pentapenguin.com and trying it out there.
FAQs
Q. Why do I get this error: "You must enter your Google license key in search.php!"
A. You must get a free license key from Google (see next FAQ for more details).
Then open search.php
Find:
Code: Select all
$google_key = '';
Code: Select all
$google_key = 'my_google_license_key_here';
A. It's free, fast, and easy. Just go to the Google API page and register.
Q. Why do I get odd results?
A. The Google API is still in beta so occasionally you may get unexpected results.
Q. Why do I get 27,000 matches but only 100 pages (instead of 2700 pages)?
A. Sorry, but the Google API will only return a maximum of 1000 results and thus 100 pages.
Q. What is the NuSOAP thing bundled with this?
A. NuSOAP is a PHP class for accessing SOAP (Simple Object Access Protocol).
Including this saves me from reinventing the wheel.

Q. Where can I learn more about the Google API?
A. Tons more info here.
Q. Is there a limit of how many searches I can do?
A. Unfortunately, Google only lets you do 1000 searches per day. However, this is plenty for most boards.
Q. How come I'm not getting any results from my site?
A. Several things: first, install the Guest Sessions MOD which will help the Google bot index your forum.
Second, I recommend reading up on SEO (search engine optimization).
Q. How do I search my entire site and not just the forums?
A. Find this line in search.php:
Code: Select all
$google_query = ( $search_where == 'site' ) ? $search_keywords . ' site:' . $board_config['server_name'] . $board_config['script_path'] : $search_keywords;
Code: Select all
$google_query = ( $search_where == 'site' ) ? $search_keywords . ' site:' . $board_config['server_name'] : $search_keywords;

Code: Select all
##############################################################
## MOD Title: Google Integrated Search
## MOD Author: pentapenguin < pentapenguin@bluebottle.com > (n/a) http://www.pentapenguin.com
## MOD Description: This MOD uses the Google API to allow searching of your site or the web with Google.
## MOD Version: 0.1.0
##
## Installation Level: Easy
## Installation Time: 5 Minutes
## Files To Edit: 3
## search.php
## language/lang_english/lang_main.php
## templates/subSilver/search_body.tpl
##
## Included Files: 2
## templates/subSilver/google_search_results.tpl
## includes/nusoap.php
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
## Support for this MOD may be found at http://www.phpbb.com/phpBB/viewtopic.php?t=282881 or at
## http://www.pentapenguin.com/forum/viewtopic.php?t=633
##
## This MOD is EasyMOD friendly! (http://area51.phpbb.com/phpBB/viewtopic.php?sid=&f=17&t=15391)
##
## Optional step: if you have CyberAlien's eXtreme Styles MOD (http://www.phpbb.com/phpBB/viewtopic.php?t=125251),
## you can copy the file in contrib/admin/xs_google_integrated_search.cfg to admin/xs_google_integrated_search.cfg and you will
## be automatically notified if there's an update available when you use the "check for updates" function.
##
## IMPORTANT NOTE: You ***MUST*** obtain a free Google API key by going to http://www.google.com/apis/
## Then you must enter it in the search.php file.
## Make this line $google_key = ''; look like this: $google_key = 'your_google_key_here';
##
## This MOD is bundled with NuSOAP.
## For more information, see http://dietrich.ganx4.com/nusoap/ or http://sourceforge.net/projects/nusoap/
##
## Recommended additional MOD: I suggest you use the Guest Sessions MOD to help the Google bot index your
## forum more easily. It may be found here: http://www.phpbbstyles.com/viewtopic.php?t=357
##
## Additional style support is included for the Aphrodite style.
## For full directions, see styles/style_aphrodite.txt
##############################################################
## MOD History:
##
## 2005-04-18 - Version 0.1.0
## - First Public Beta
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################