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)

JJR512 07-27-2002 04:37 AM

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.

JJR512 07-27-2002 04:53 AM

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.

Sparkz 07-27-2002 06:22 AM

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...

JJR512 07-27-2002 06:37 AM

I read them, I just don't understand them enough to know that, lol. :D

Sparkz 07-27-2002 06:43 AM

LOL :)

FWC 07-27-2002 08:14 AM

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. :)

Hotte 07-27-2002 12:36 PM

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.

nuno 07-27-2002 04:29 PM

Can we have a live demo please?
I can't get this to work :=(
All i get is a search result blank page :confused:

Kars10 07-27-2002 04:47 PM

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! ;)

Hotte 07-27-2002 05:22 PM

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";

nuno 07-27-2002 05:31 PM

BINGO :)
You have to edit your php.ini file and check include-path.

nuno 07-27-2002 05:34 PM

Very nice *hack* Hotte, thanks :)

Hotte 07-27-2002 05:38 PM

there is no need to edit the php.ini for the include_path. this is done by the script. but i wonder why a missing pear-class doesn´t produce errors. hmmm

JJR512 07-27-2002 05:45 PM

I've been getting some emails, instant messages, etc. from people asking me how I got this to work. Some are asking me how, exactly, I setup the pear/soap/etc. files. All I can say is, I setup all those files exactly as Hotte described earlier with his directory tree diagram, and edited the path to those files into websearch.php, and after that, it worked fine. Make sure the path you put into websearch.php is an absolute path, like /home/accountname/pear, not a URL-type path. That's really all I can say; I can't explain it any better than that, because I followed that tree precisely and followed the other directions precisely, so if I tried to explain how I got it to work for me I'd just be repeating what Hotte has already said. Sorry to anyone else who can't get it to work. :(

Kars10 07-27-2002 06:07 PM

He Guys it works......i cant stand it it works!!!
This is bringing me down!! :)

Hotte 07-27-2002 06:11 PM

Ok, for all who have problems getting this hack working (blank page after submitting a search):
Download all the required PEAR-Classes at http://pear.php.net or get this attachment.
Upload the pearclasses where you want on your server. I suggest to put them outsite the document-root. After you uploaded the pearclasses, you must have the following structur of you peardirectory:
Code:

|- OS
  |- Guess.php
|- Net
  |- DIME.php
|- PEAR
  |- Builder.php
  |- Installer.php
  |- Dependency.php
  |- Remote.php
  |- Config.php
  |- Command
      |- Remote.php
      |- Config.php
      |- Build.php
      |- Registry.php
      |- Common.php
      |- Install.php
      |- Package.php
      |- Auth.php
  |- Frontend
      |- Gtk.php
      |- CLI.php
  |- Registry.php
  |- Packager.php
  |- Autoloader.php
  |- Common.php
  |- Command.php
|- SOAP
  |- Parser.php
  |- Type
      |- dateTime.php
      |- duration.php
      |- hexBinary.php
  |- test
      |- 5.2.simpletypes.php
      |- 5.2.1.simpletypes.multiref.php
      |- all.php
      |- xmethods.php
      |- 5.2.1.simpletypes.string.php
      |- smtp.php
      |- test.utility.php
  |- tools
      |- genproxy.php
  |- Server
      |- Email_Gateway.php
      |- Email.php
  |- Value.php
  |- Fault.php
  |- Transport.php
  |- example
      |- email_gateway.php
      |- email_server.php
      |- server.php
      |- client.php
      |- stockquote.php
      |- smtp.php
  |- Server.php
  |- WSDL.php
  |- Client.php
  |- Base.php
  |- Transport
      |- SMTP.php
      |- HTTP.php
  |- interop
      |- client_round2.php
      |- server_round2_base.php
      |- server_round2_groupB.php
      |- server_round2_groupC.php
      |- client_round2_run.php
      |- client_round2_interop.php
      |- client_round2_params.php
      |- interopB.wsdl
      |- readme.txt
      |- server_round2_test.php
      |- index.php
      |- echoheadersvc.wsdl
      |- interop.wsdl
      |- client_round2_results.php
      |- database_round2.sql
      |- server_round2.php
|- package.dtd
|- System.php
|- PEAR.php
|- SOAP_Google.php

Make sure you entered the absolut path to the peardirectory in websearch.php. i.e. /www/<your site>/pear (depends on your host). Do not enter an URL (http://.....). Then should all working.

nuno 07-27-2002 06:58 PM

Working flawlessly with search.php, there's no need to have a websearch.php file :)
Something like:
1st table - Forum Search Engine
2nd table - Search Options
3rd table - Websearch Engine - Powered by Google

maligno 07-27-2002 08:54 PM

could you explain the steps?

Hotte 07-27-2002 09:12 PM

i can explain the steps how to integrate the google-search into the regular search. but for now, i´m enjoying my beer.

Sparkz 07-27-2002 09:28 PM

Cheers!

nuno 07-27-2002 09:40 PM

It's Hotte's hack, and i'll not do anything without his permission :)

Hotte 07-27-2002 10:00 PM

nuno: feel free to explain the steps how to integrade the google-search into the regular search. it should nothing more than add the actions to search.php + a small template modification :)
Myself prefer hacks that are as most compatlible to upgrades as possible :)

nuno 07-27-2002 10:27 PM

Ok
Lemme know what you think then
enjoy :)

Hotte 07-27-2002 10:31 PM

edited the first post with a link to your post nuno

nuno 07-27-2002 10:36 PM

Okie dokie, thanks Hotte :)
Waiting to hear some feedback from you guys. :banana:

Kars10 07-28-2002 09:59 AM

Hello Guys!!
My Serach works great, and my users love it!!
Is there any way to put this options in the websearch??
See Attachment!!
Thanx!! :D

maligno 07-28-2002 10:08 AM

Thank you nuno, very kind

CJi 07-28-2002 11:43 AM

Hmm, I just seem to get the DIME CVS log when I submit a search?

CJi 07-28-2002 12:30 PM

ok, found the problem.

Doesn't work with php version below 4.1 :(

CJi 07-29-2002 07:56 PM

Updated php... works GREAT :)

Nice hack, well done.

tkeil69575 07-30-2002 06:00 PM

Hi all,

im getting the following error (using php 4.2.1)

Fatal error: Call to undefined function: xml_parser_create() in /bla/bla/pear/SOAP/Parser.php on line 93

any Ideas?

Tina

Sparkz 07-30-2002 07:15 PM

You need to configure your PHP with xml support.
You can find more info here: http://www.php.net/manual/en/ref.xml.php

tkeil69575 07-30-2002 07:41 PM

Hi Sparkz,
thanks for the info. I thought that would be it but wasnt sure.

got it working now - great stuff!

Regit 08-18-2002 02:23 PM

How can make the result can display chinese or japanese ....
those asian language ...
my return result all that name become "?" ....

any idea ? thanks

Regit 08-21-2002 08:28 AM

no one know how to dispaly the chinese in the result page ??
because all the asian language become "?" in my forum !

Regit 08-27-2002 08:43 AM

hey , why no body answer my question ??
really no one know the answer ??

Brad 09-16-2002 05:44 AM

it "works" however i get this above the header template when i get the search results

Quote:

Notice: Undefined variable: pagenumber in /home/kousetsu/public_html/kan/websearch.php on line 15

Notice: Undefined property: URL in /home/kousetsu/public_html/kan/websearch.php on line 35

Notice: Undefined property: snippet in /home/kousetsu/public_html/kan/websearch.php on line 36

Notice: Undefined property: title in /home/kousetsu/public_html/kan/websearch.php on line 38

Notice: Use of undefined constant template - assumed 'template' in /home/kousetsu/public_html/kan/admin/functions.php on line 1140

Notice: Undefined variable: searchbit in /home/kousetsu/public_html/kan/websearch.php(40) : eval()'d code on line 1

Notice: Undefined variable: pagenumber in /home/kousetsu/public_html/kan/websearch.php on line 45

Notice: Undefined variable: curpage in /home/kousetsu/public_html/kan/admin/functions.php on line 36

Notice: Undefined variable: pagenav in /home/kousetsu/public_html/kan/admin/functions.php(46) : eval()'d code on line 1

Notice: Undefined variable: firstlink in /home/kousetsu/public_html/kan/admin/functions.php(52) : eval()'d code on line 1

Notice: Undefined variable: prevlink in /home/kousetsu/public_html/kan/admin/functions.php(52) : eval()'d code on line 1

Notice: Use of undefined constant template - assumed 'template' in /home/kousetsu/public_html/kan/admin/functions.php on line 1140

Notice: Use of undefined constant template - assumed 'template' in /home/kousetsu/public_html/kan/admin/functions.php on line 1140

Notice: Undefined variable: debug in /home/kousetsu/public_html/kan/admin/functions.php on line 593

Mike11212 09-28-2002 11:07 AM

Quote:

Originally posted by Link14716
I did, but I still couldn't find it :(

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

Go to where you find the SOAP_Google.php file at theres a tar of SOAP there

corn 11-04-2002 03:39 PM

When I try to use the search, I see the following message:

Warning: open_basedir restriction in effect. File is in wrong directory in /www/htdocs/joost/forum/websearch.php on line 13

Warning: open_basedir restriction in effect. File is in wrong directory in /www/htdocs/joost/pear/SOAP_Google.php on line 18

Warning: open_basedir restriction in effect. File is in wrong directory in /www/htdocs/joost/pear/SOAP/Client.php on line 23

Warning: open_basedir restriction in effect. File is in wrong directory in /www/htdocs/joost/pear/SOAP/Value.php on line 22

Warning: open_basedir restriction in effect. File is in wrong directory in /www/htdocs/joost/pear/SOAP/Base.php on line 37

What's that means

Xyphen 02-23-2003 02:43 PM

This hack is awesome, but I want to see a Live Demo before installing it, also a new version a bug-free version would be GREAT! :nervous:


All times are GMT. The time now is 04:17 AM.

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.01437 seconds
  • Memory Usage 1,830KB
  • 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
  • (3)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