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


All times are GMT. The time now is 04:58 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.01204 seconds
  • Memory Usage 1,745KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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