installation notes
Make sure that you have the required pear-classes installed. Infos about PEAR are available at http://pear.php.net
If you receive require/include-errors edit websearch.php and add the path to pear.
Edit websearch.php and enter your google-key
Upload websearch.php to your forums-directory
add the 3 templates
create a link to websearch.php where you want
Have fun
edit: If you don?t want getting the pearclasses from cvs, take a look here
get a blank page after submitting the search? read this
want to integrade the google-search into your regular search enginge? look here
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
1. While I've been testing this and customizing the templates for my site a bit, I've been using this test search: lyrics "road to nowhere" So I could compare how the results look on my site with the real Google, I did the same search there, too. And I've noticed that my site does not have the exact same set of results that the real Google has. Check it out for yourself. You'll see that the first result is the same, but from there, they start to get more different. Why is this?
2. With the same test search as just mentioned, when the results come back, the search box is filled only with lyrics. In other words, the entire part in the quotes has been dropped out.
Note: I don't know if both addslashes and htmlspecialchars are necessary. However, as it is now, it did fix the problem I was having.
Also: Because Google limits our accounts to 1000 searches per day, this isn't something that you probably want just anybody being able to use. You have an exclusion to not allow unregistered/unlogged-in people to use it, but I've gone a step further. I've added a new usergroup setting so that you can set each usergroup to be able to use it or not. This may be useful to people who have more privilege levels than what standard vBulletin offers, such as paid members vs. non-paying members, or whatever the case may be. If you'd like instructions on how to set this up, let me know.
Originally posted by JJR512 I was getting a blank page, too, before I knew how to setup the pear stuff and the other stuff. Once Hotte explained it to me, I didn't have the problem anymore. Are you sure you have it setup exactly as he described above?
Well, if you read my posts, you'll see that execution actually stops INSIDE one of the pear scripts...
Originally posted by JJR512 Note: I don't know if both addslashes and htmlspecialchars are necessary. However, as it is now, it did fix the problem I was having.
I just used the htmlspecialchars and it seems to work fine. Thanks for the tip.
Originally posted by JJR512 1. While I've been testing this and customizing the templates for my site a bit, I've been using this test search: lyrics "road to nowhere" So I could compare how the results look on my site with the real Google, I did the same search there, too. And I've noticed that my site does not have the exact same set of results that the real Google has. Check it out for yourself. You'll see that the first result is the same, but from there, they start to get more different. Why is this?
Good Question. I think that the Google-Api works a bit diffrent compared to the "normal" webpage.
Me too. Ive tried about 4 hours, and make all step by step. Nothing appears after searching. The "websearch-Page" is there and when i search i get a blank white screen.
This sucks! What can i do. I want this hack, but i don?t know what to do....
My Forum is in the webdirectory called "forum". In this directory is the pearl-folder with the content "soap(with the classes)", "soap_google", "net (with dime.php)"....
Please help!
Try the following: Download the latest pear-base system @ http://pear.php.net/package-info.php?pacid=14 (or use the attachment)
Upload the unzipped file in your pear-directory with all subdirectories.
make sure you entered your pearpath in websearch.php
then change