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
Search The Internet v1.0 (Major Engines) Details »»
Search The Internet v1.0 (Major Engines)
Version: 1.00, by tHE DSS tHE DSS is offline
Developer Last Online: Oct 2004 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 08-09-2002 Last Update: Never Installs: 66
 
No support by the author.

Search The Internet Hack - (Copyright 2002+), tHE DSS
V1.0 (10th August 2002)

Additional code (enhanced by tHE DSS) used from Freddie's Quick Stats Hack at https://vborg.vbsupport.ru/showthrea...threadid=37193


As with anything of this nature, I will not be held responsible for any damage that may be caused during installation of this hack, or in the future during usage of this hack. Although steps have been taken to ensure a smooth installation, and smooth usage, you install and use this hack entirely at your own risk.

// #######################
// #######################

This hack gives your visitors an excellent quick and easy way of finding information on the Internet, without having to leave your site.

5 search engines are included at the moment (google, yahoo, alta vista, excite & lycos). A search "bar" is present on every page on your forum site, in the footer by default - your visitors simply type in a search, select the engine to search on (from a drop down box), and that's that.

A new window will open up, with the seach results displayed.

It gets even better, because this hack can optionally keep search logs on who is searching what from where, and when. A great help for webmasters interested in their visitors wants and needs.

Webmasters can quickly track down information from the search logs via the vB AdminCP. In-fact, webmasters can control the logs completely, from the AdminCP.

It gets better yet, as this hack is so easy to install.

// #######################
// #######################

I will no doubt be adding features to this hack as and when I get a spare half hour - the "upgrades" will simply entail uploading a replacement file (no vB scripts will need replacing).

Cheers.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 08-10-2002, 02:52 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just installed. I have 2 questions:

1-what is the purpose of the second template search_the_internet_window ?

2-How do I get rid of the java error from a search result? Whether google's , yahoo etc... the search engine website always comes up with a java error.
Reply With Quote
  #13  
Old 08-10-2002, 03:03 PM
VietSoil VietSoil is offline
 
Join Date: Mar 2002
Location: California, US
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack. Could be useful to my forum. Thanks.
Reply With Quote
  #14  
Old 08-10-2002, 03:19 PM
tHE DSS's Avatar
tHE DSS tHE DSS is offline
 
Join Date: Jun 2002
Location: UK
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cheers for the input.

DestyNova, no, not really - 1 template will be pulled in to each page (for the search bar, which won't give any performance loss), but apart from that, no. If you opt to use the logs, then 1 query will be added (only if somone searches), but it's very small... again, you won't notice a loss in performance.

Lionel, the purpose of the 'search_the_internet_window', is to keep the results of any search "clean". It's the new window that pops up to display your search results.

And, which JavaScript error are you getting? Is it the one telling you that you cannot be auto. re-directed, because you have no javscript support (or have it disabled), or does the search engine page with the results come up, but you have JavaScript errors?

If it's the latter of those two, the JavaScript errors will be from the search engine site itself.

Again, cheers everyone for the input.

... ps : oops.. I forgot to say earlier... if the "error" is the one saying you cannot be re-directed because of no JavaScript support, then don't worry, that's normal... the script takes this into account, and outputs a URL for you to click on, which will take you to the search results.

Lionel... i've used this add-on/hack at your site, and i'm not getting any errors.

What browser are you using?
Reply With Quote
  #15  
Old 08-10-2002, 03:28 PM
hypedave's Avatar
hypedave hypedave is offline
 
Join Date: Nov 2001
Location: Dallas, Tx
Posts: 320
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works like a charm hasnt installed for a complete hour yet, and my users are already using it like mad

http://www.ochroma.net/forums

my users are wanting to know if there is a way to add www.ditto.com search engines, it some search engine that lets you search for avatars I believe.
Reply With Quote
  #16  
Old 08-10-2002, 03:34 PM
tHE DSS's Avatar
tHE DSS tHE DSS is offline
 
Join Date: Jun 2002
Location: UK
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep, search engines can be added easily, i'll go through a little tutorial here in a moment, using your www.ditto.com as an example.

Watch this space.
Reply With Quote
  #17  
Old 08-10-2002, 03:37 PM
DestyNova DestyNova is offline
 
Join Date: Jun 2002
Posts: 244
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

tHE DSS

thanks for answer my QQ, I m going to install this one :thumbup: good job
Reply With Quote
  #18  
Old 08-10-2002, 04:13 PM
tHE DSS's Avatar
tHE DSS tHE DSS is offline
 
Join Date: Jun 2002
Location: UK
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Adding more search engines to this hack is really quick and easy. Just follow this guide.

First thing to do, is get the URL and parameters that the new search engine needs/takes.

Using hypedave's suggestion for Ditto.com as an example, I went to http://www.ditto.com, and did a search for footballs... this gave me the results, and from the address bar, I took the URL of :

http://ditto.com/search_results.asp?ss=footballs&viewstyle=compact

Look for your search string in the URL to get the search string parameter for that search engine.

Here, I looked in the URL for footballs. I see ss=footballs, so, the search string parameter for Ditto.com, is ss=

You may need to re-arrange the URL to work with this hack, as the search string parameter in this hack, needs to be the very last parameter in the URL. So, i've just moved this one, so the URL now looks like this (I did this in Notepad) :

http://www.ditto.com/search_results.asp?viewstyle=compact&ss=

... the search string parameter (ss=), is now the last parameter.

There is another parameter for Ditto.com, for viewstyle... I chose the "compact" for this example. You can see that in the URL.

Now, open up the 'websearch.php' script, and find the following :

PHP Code:
switch ($engine) {
    case 
"google" :
        
doSearch("http://www.google.com/search?q=");
        break;
    case 
"yahoo" :
        
doSearch("http://search.yahoo.com/bin/search?p=");
        break;
    case 
"altaVista" :
        
doSearch("http://www.altavista.com/sites/search/web?pg=q&kl=XX&q=");
        break;
    case 
"excite" :
        
doSearch("http://srch.excite.com/d/search/p/excite/?c=web&qcat=web&s=");
        break;
    case 
"lycos" :
        
doSearch("http://search.lycos.com/default.asp?query=");
        break;
    default :
        
outputStatus(-1);

... after the last engine (lycos here), add this :

PHP Code:
case "ditto" :
    
doSearch("http://www.ditto.com/search_results.asp?viewstyle=compact&ss=");
    break; 
... do ensure that you insert that underneath the 'break;' statement of the previous case statement, or you will have problems.

Save the 'websearch.php' file.

Now, you need to edit the 'search_the_internet' template.

In this template, find this :

Quote:
<select name="engine">
<option value="google" selected>Search -> Google
<option value="yahoo">Search -> Yahoo
<option value="altaVista">Search -> Alta Vista
<option value="excite">Search -> Excite
<option value="lycos">Search -> Lycos
</select>
... after the last engine option (lycos here), add this :

Quote:
<option value="ditto">Search -> Ditto
Save the template, and it works from that point.

==========
==========

The only other thing to do, is if you are keeping search logs.

In this case, the statistics script won't recognise your new engine (ditto.com here).... it's not a problem whilst searching for logs, but the main stats page, where you get a count by engine, counts will show up as (Unknown Engine ... so, if you want it to actually tell you it's Ditto.Com, open up your 'stistats.php' file, and find the following :

PHP Code:
$engineName_array = array('google','yahoo','altaVista','excite','lycos');
$engineCount_array = array(0,0,0,0,0); 
.. then basically, add the search engine name, and set it's count to 0, by adding a new element to each array. For the above, we'll replace the above, with this :

PHP Code:
$engineName_array = array('google','yahoo','altaVista','excite','lycos''ditto');
$engineCount_array = array(0,0,0,0,0,0); 
... we've added 'ditto' to the engine name array, and set it's default count to 0, by adding a 0 to the engine count array. The script tallies up the counts as it reads them, at run-time... they should always be 0 in the script.

That's it... that's all you got to do.

Just make sure that when adding engines, you keep the engine's 'key value' consistent through-out each change... here, the keyword is simply 'ditto'... like in :

$engineName_array = array('google','yahoo','altaVista','excite','lycos ', 'ditto');

option value="ditto">Search -> Ditto

case "ditto" :
doSearch("http://www.ditto.com/search_results.asp?viewstyle=compact&ss=");
break;

I find that the most damndest part, is getting the search engines needed parameters... as somtimes, the only effective way of doing it, is viewing their page source, and looking at their HTML FORM keys.

Doing it the URL way though, should be fine for most of the time.

Happy searching.
Reply With Quote
  #19  
Old 08-10-2002, 04:50 PM
DestyNova DestyNova is offline
 
Join Date: Jun 2002
Posts: 244
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wow, great can you update your hack?
Reply With Quote
  #20  
Old 08-10-2002, 04:58 PM
tHE DSS's Avatar
tHE DSS tHE DSS is offline
 
Join Date: Jun 2002
Location: UK
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hiya, DestyNova.

I would update the hack, but i'm not sure that the majority of people would like Ditto.com as part of the default installation.

If I was to be told otherwise, then yeah, i'd certainly update it.

If it is the Ditto.com engine that you would like, but feel that you might not be able to follow the above guide fully, then PM me an email address, and i'll send you an edited copy, with the Ditto.com added.
Reply With Quote
  #21  
Old 08-10-2002, 05:33 PM
Schorsch's Avatar
Schorsch Schorsch is offline
 
Join Date: Jul 2002
Location: Germany
Posts: 345
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works great thank you very much "tHE DSS" !!
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 12:16 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05032 seconds
  • Memory Usage 2,326KB
  • 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
  • (4)bbcode_php
  • (2)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
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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