Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Google-Search Details »»
Google-Search
Version: 1.00, by Hotte Hotte is offline
Developer Last Online: Jan 2006 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 07-24-2002 Last Update: Never Installs: 28
 
No support by the author.

Hi
with this hack you can get your own google-search from your vbulletin. This hack needs some PEAR-Classes and you need a google-account.

Requirements:
- you need the following PEAR-Classes:
- SOAP (available at http://cvs.php.net)
- Net/Dime (available at http://cvs.php.net)
- SOAP_Google (available at http://www.sebastian-bergmann.de/?page=google)
- Google-Account (free at http://www.google.com/apis/)

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.

Comments
  #42  
Old 07-27-2002, 04:37 AM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Two issues.

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.
Reply With Quote
  #43  
Old 07-27-2002, 04:53 AM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was able to solve Issue #2 by making the following changes to your websearch.php.

Near the bottom, find this line:
PHP Code:
$pagenav getpagenav($treffer,"$PHP_SELF?action=$action&suche=".urlencode($suche)); 
Below it, on a new line, add this:
PHP Code:
$suche addslashes(htmlspecialchars($suche)); 
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.
Reply With Quote
  #44  
Old 07-27-2002, 06:22 AM
Sparkz's Avatar
Sparkz Sparkz is offline
 
Join Date: Nov 2001
Posts: 544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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...
Reply With Quote
  #45  
Old 07-27-2002, 06:37 AM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I read them, I just don't understand them enough to know that, lol.
Reply With Quote
  #46  
Old 07-27-2002, 06:43 AM
Sparkz's Avatar
Sparkz Sparkz is offline
 
Join Date: Nov 2001
Posts: 544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LOL
Reply With Quote
  #47  
Old 07-27-2002, 08:14 AM
FWC's Avatar
FWC FWC is offline
 
Join Date: Oct 2001
Location: Ontario, CA
Posts: 821
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.
Reply With Quote
  #48  
Old 07-27-2002, 12:36 PM
Hotte Hotte is offline
 
Join Date: Oct 2001
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.
Reply With Quote
  #49  
Old 07-27-2002, 04:29 PM
nuno's Avatar
nuno nuno is offline
 
Join Date: Oct 2001
Posts: 469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can we have a live demo please?
I can't get this to work :=(
All i get is a search result blank page
Reply With Quote
  #50  
Old 07-27-2002, 04:47 PM
Kars10's Avatar
Kars10 Kars10 is offline
 
Join Date: Jun 2002
Location: Germany/Franken
Posts: 748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #51  
Old 07-27-2002, 05:22 PM
Hotte Hotte is offline
 
Join Date: Oct 2001
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Code:
$ipath.=":$pearpath";
to
Code:
$ipath=".:$pearpath";
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 10:31 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.04878 seconds
  • Memory Usage 2,316KB
  • 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
  • (2)bbcode_code
  • (2)bbcode_php
  • (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
  • (4)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