vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Google-Search (https://vborg.vbsupport.ru/showthread.php?t=41511)

Hotte 07-24-2002 10:00 PM

Google-Search
 
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

Hotte 07-25-2002 01:55 PM

Screenshot

ULTIMATESSJ 07-25-2002 01:57 PM

kewl hack, nice work

Webmasta XT 07-25-2002 01:58 PM

hey very nice..

dgessler 07-25-2002 06:25 PM

I think it's sort of neat also, never knew you could imbed google results on your site.

Erwin 07-25-2002 07:35 PM

Cool. :)

Itworx4me 07-25-2002 09:58 PM

Would be nice if there were a little better detailed information on which pear files you need. Plus where do you put them. Instructions said nothing to the sort of where they go. Overall this looks to be a good hack. Would even be better if the instructions were more CLEAR.

Floris 07-25-2002 10:53 PM

Shame pears are not independable.

JJR512 07-26-2002 07:10 AM

Quote:

Originally posted by Itworx4me
Would be nice if there were a little better detailed information on which pear files you need. Plus where do you put them. Instructions said nothing to the sort of where they go. Overall this looks to be a good hack. Would even be better if the instructions were more CLEAR.
I agree. I've downloaded the files, but what do I do with them? I
ve got SOAP_Google.php, Net_DIME-0.2.tgz, and SOAP-0.6.2.tgz. But now what?

Is this something that someone with a shared hosting account can use, or do I have to have root access to the server?

Chris M 07-26-2002 11:04 AM

Indeed...I would like to know this:)

Satan

Hotte 07-26-2002 11:37 AM

Unzip the PEAR-Classes and upload them in the following format on your webserver:
Code:

/pear
|
+-> SOAP_Google.php
|
+-> /pear/Net
  |
  +-> Dime.php
|
+-> /pear/SOAP
  |
  +-> <files from the SOAP-0.6.2.tgz>

Then enter the absolut path to the pear-dir in the websearch.php

JJR512 07-26-2002 11:56 AM

And I don't need root access to do this? I read somewhere that all this should be above the web root, to prevent people from executing some of the scripts over the Internet.

Let me just make sure I got this straight.

I'm on a shared server. My webroot is: /home/jjr512/public_html (That's where I put the vB root, too.) So I could put all this starting in /home/public/pear, correct?

Hotte 07-26-2002 12:00 PM

Quote:

Originally posted by JJR512
I'm on a shared server. My webroot is: /home/jjr512/public_html (That's where I put the vB root, too.) So I could put all this starting in /home/public/pear, correct?
Why /home/public/pear? Upload pear to /home/jjr512/public_html/pear or /home/jjr512/pear if you don?t want the classes accessable from the browser.

JJR512 07-26-2002 12:02 PM

Sorry, misspoke... /home/jjr512/pear is what I meant. Other than that, it's all good? I'm about to upload it all, so I guess I'll find out in a moment...

Hotte 07-26-2002 12:05 PM

Don´t forget to enter "/home/jjr512/pear" in websearch.php

JJR512 07-26-2002 12:06 PM

Hey! It works! Woohoo! :D

Next time you need a nomination for Hack of the Month...let me know!

My only suggestion would be to find a way so that on the initial page, before you do a search, the search box only appears once. I understand you have it twice so that after someone does a search, the search box will appear both above and below the results, but before there are any results, having the exact same thing twice, one above the other, looks a little silly. :)

Link14716 07-26-2002 06:00 PM

At first, when I saw this, I asked myself how to get the pear things, noow that I know, I will install. Thanks. :)

Link14716 07-26-2002 06:16 PM

I need to get the SOAP class, but I'd have to download the files 1 by 1. Where can I get a zipped (or tgz) forms of it? I can't find it anywhere.

Nice hack, BTW. :)

Hotte 07-26-2002 06:35 PM

Quote:

Originally posted by Link14716
I need to get the SOAP class, but I'd have to download the files 1 by 1. Where can I get a zipped (or tgz) forms of it? I can't find it anywhere.

Nice hack, BTW. :)

Take a look at the last line of my first post

Link14716 07-26-2002 06:55 PM

I did, but I still couldn't find it :(

EDIT: I just saw the search box and found it :)

Link14716 07-26-2002 07:14 PM

I just installed it but when I submit a search, it gives me a blank page. :(

Hotte 07-26-2002 07:24 PM

Quote:

Originally posted by Link14716
I just installed it but when I submit a search, it gives me a blank page. :(
do you have the templates added?

Link14716 07-26-2002 07:45 PM

yes, otherwise I wouldn't been able to see the front page of the search.

EDIT: I just double checked. All 3 are there.

Hotte 07-26-2002 07:51 PM

Quote:

Originally posted by Link14716
yes, otherwise I wouldn't been able to see the front page of the search.

EDIT: I just double checked. All 3 are there.

Try replacing
Code:

<form method="get" action="$PHP_SELF">
with
Code:

<form method="get" action="websearch.php">
in the template "websearch"
This must be done 2 times (for the searchboxes at the top and the bottom)

Sparkz 07-26-2002 07:55 PM

I am having the same problem.
It seems like the script terminates inside
PHP Code:

    $result $google->search(
        array(
            
'query' => $search,
            
'start' => $limitlower,
            
'maxResults' => $perpage,
            
'ie' => "UTF-8",
            
'oe' => "UTF-8"
        
)
    ); 

Any debug-text I put after this will not show up.

Hotte 07-26-2002 07:56 PM

Sparkz: And when you put debug-text above that? Will that show up?

Sparkz 07-26-2002 08:01 PM

My debug text... :)
I'm getting a blank page like Link up here... Tried debugging my way through the script and that's where I ended up.

Hotte 07-26-2002 08:03 PM

hmmm
you have the google-key entered?

Sparkz 07-26-2002 08:11 PM

yup.
In any case, if I didn't, I'd expect to get a reply back telling me about this :)

Sparkz 07-26-2002 08:18 PM

Looks like it dies while trying to execute
PHP Code:

$result $this->_soapClient->call($apiCall$parameters'urn:GoogleSearch'); 

inside _performAPICall()

Hotte 07-26-2002 08:22 PM

is your webserver behind some kind of firewall that makes trouble?

Sparkz 07-26-2002 08:25 PM

It is behind a firewall, but I don't think traffic originating from the inside is restricted...

Hotte 07-26-2002 08:26 PM

or try these pear-classes. they are the same that i´m using. perhaps we have diffrent versions or something like that.

Sparkz 07-26-2002 08:26 PM

Just spoke with the sysadmin there. Shouldn't be any restrictions on outgoing traffic at all.

Sparkz 07-26-2002 08:29 PM

Trying your pear stuff now... I downloaded mine fresh from CVS 30 minutes or so ago

Hotte 07-26-2002 08:32 PM

perhaps this helps. which php-version are you using? as modul or cgi? linux or windows?

Sparkz 07-26-2002 08:40 PM

No luck..
PHP-4.2.2 as DSO, apache-1.3.26 on a RH7.1
PHP and apache (and most everything else too, for that matter) compiled from scratch by me.

Hotte 07-26-2002 08:50 PM

hmmm
i?ve the same config. strange.
don?t know why it doesn?t work on your forum.
but... hmmm... last chance: perhaps there is an old pear-version in the includepath from the php.ini.
at line 10 in websearch.php change
Code:

$ipath.=":$pearpath";
to
Code:

$ipath=".:$pearpath";
and make sure that you have entered the path to your uploaded pearclasses at line 4 ($pearpath)

Sparkz 07-26-2002 09:14 PM

No luck... Weird...
I have tried juggling with the include_path too... Search the system for pear-related stuff too...
Only the standard stuff that comes with the PHP-install

JJR512 07-27-2002 02:48 AM

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?


All times are GMT. The time now is 04:46 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.01280 seconds
  • Memory Usage 1,816KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete