PDA

View Full Version : MEGA SEARCH v1.0 (navbar, WOL, CMPS & search.php)


yoyoyoyo
08-04-2005, 10:00 PM
MEGA SEARCH v.1.0
by yoyoyoyo

NEW PHRASES: up to 4 (depending on which options you choose)
TEMPLATES TO EDIT: up to 3
NEW TEMPLATE: 1 (if you add the CMPS module)
NEW FILES: 2 (search.cgi, mega.jpg)

This hack gives you a new MEGAsearch engine on your site, that can access dozens or hundreds of other search engines (as many or as few as you want). The search engine opens the results in a new window, keeping your visitors on your site! You can even easily add your own sites to the search!

The search engine can be placed in the navbar, on the search page, below the "Who's Online" box on your forum home, and also in a VBadvanced CMPS module, or all of the above (or any combination you see fit). (SEE SCREENSHOTS)

Included in the megasearch are the following sites:
Google
Ask Jeeves
Dogpile
Galaxy
Altavista
Yahoo
Lycos
Metacrawler
Wikipedia
weather.com
clipart.com
eBay
Internet Movie Database
The Smoking Gun
AlltheWeb
About
AOL
GoPile
Netscape
Teoma
CompuServe
Mamma
DMOZ
HotBot
MSN
Looksmart
Dictionary.com
Thesaurus.com
Creative Commons
mininova bittorrent search
BBC News
CNN News
Disinfopedia
National Public Radio
Big Cartoon Database
CultureBuffs
Beer in the Evening
MemoryAlpha
Ticketmaster
Comingsoon.net
Kids-In-Mind.com
GameSpy
FilePlanet
UFOpsi
Webtender
recipesource
AllRecipes.com
Foodnetwork.com
Abbreviationz.com
Fark.com
googlism.com
Wired News
G4 Tech TV
Blogdex
Blog Search Engine
wtc7.net
Centers for Disease Control
Snopes.com Urban Legends
CPAN Perl Archive
download.com
Internet Archives: Movies
Internet Archives: Text
Internet Archives: Audio
Internet Archives: Software
Internic WHOIS Search
subgenius.com
vbulletin.org

...AND YOU CAN ADD YOUR OWN!

REQUIREMENTS: Perl 4.0 or better installed on a web server. Contact your server administrator if you are unsure (most servers are running version 5.8.X, so this should not be a problem if your server offers cgi access). If you do not have perl installed then read a little further below about perlsp (http://%20http://2n-com.de/perlsp/%20%20).

INSTALLATION
(more detailed install info is in the zip file and in the first post of this thread)

1) Create 4 new phrases as indicated in the install instructions

2) Upload 'mega.jpg' to your forum/images/misc folder.

3) Edit the .cgi file: Open search.cgi and replace "www.yoursite.com" with the URL of your site. Edit the top of the script to point to perl. Save & Upload search.php to your CGI-BIN folder on your server, and CHMOD to 755.

4) Edit the templates 'navbar,' 'FORUMHOME,' and 'search_forums' (depending on which searches you want to appear) as indicated in the install instructions.

5) Create a new template called 'adv_portal_megasearch' (without the quotes), with the contents of the megasearch_cmps.txt file and activate it.

6) That's it! PLEASE CLICK INSTALL (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=93707) IF YOU FIND THIS USEFUL!

yoyoyoyo
08-05-2005, 08:46 PM
REQUIREMENTS: Perl running on your server, and a cgi-bin folder and vbulletin 3.0.X

INSTALLATION

1) Create new GLOBAL phrases:
Go to your ADMIN CP -> LANGUAGES & PHRASES -> PHRASE MANAGER -> ADD NEW PHRASE and create these phrases:

FIRST PHRASE:
Phrase Type:GLOBAL
varname: megasearch
text:<form action="../cgi-bin/search.cgi" target="top">
Search terms: <input type="text" name="search" value="">&nbsp;&nbsp;
search engine:
<SELECT NAME="engine">
<OPTION>Google</OPTION>
<OPTION>Ask Jeeves</OPTION>
<OPTION>Dogpile</OPTION>
<OPTION>Galaxy</OPTION>
<OPTION>Altavista</OPTION>
<OPTION>Yahoo</OPTION>
<OPTION>Lycos</OPTION>
<OPTION>Metacrawler</OPTION>
<OPTION>Wikipedia</OPTION>
<OPTION>weather.com</OPTION>
<OPTION>clipart.com</OPTION>
<OPTION>eBay</OPTION>
<OPTION>Internet Movie Database</OPTION>
<OPTION>The Smoking Gun</OPTION>
<OPTION>AlltheWeb</OPTION>
<OPTION>About</OPTION>
<OPTION>AOL</OPTION>
<OPTION>GoPile</OPTION>
<OPTION>Netscape</OPTION>
<OPTION>Teoma</OPTION>
<OPTION>CompuServe</OPTION>
<OPTION>Mamma</OPTION>
<OPTION>DMOZ</OPTION>
<OPTION>HotBot</OPTION>
<OPTION>MSN</OPTION>
<OPTION>Looksmart</OPTION>
<OPTION>Dictionary.com</OPTION>
<OPTION>Thesaurus.com</OPTION>
<OPTION>Creative Commons</OPTION>
<OPTION>mininova bittorrent search</OPTION>
<OPTION>BBC News</OPTION>
<OPTION>CNN News</OPTION>
<OPTION>Disinfopedia</OPTION>
<OPTION>National Public Radio</OPTION>
<OPTION>Big Cartoon Database</OPTION>
<OPTION>CultureBuffs</OPTION>
<OPTION>Beer in the Evening</OPTION>
<OPTION>MemoryAlpha</OPTION>
<OPTION>Ticketmaster</OPTION>
<OPTION>Comingsoon.net</OPTION>
<OPTION>Kids-In-Mind.com</OPTION>
<OPTION>GameSpy</OPTION>
<OPTION>FilePlanet</OPTION>
<OPTION>UFOpsi</OPTION>
<OPTION>Webtender</OPTION>
<OPTION>recipesource</OPTION>
<OPTION>AllRecipes.com</OPTION>
<OPTION>Foodnetwork.com</OPTION>
<OPTION>Abbreviationz.com</OPTION>
<OPTION>Fark.com</OPTION>
<OPTION>googlism.com</OPTION>
<OPTION>Wired News</OPTION>
<OPTION>G4 Tech TV</OPTION>
<OPTION>Blogdex</OPTION>
<OPTION>Blog Search Engine</OPTION>
<OPTION>wtc7.net</OPTION>
<OPTION>Centers for Disease Control</OPTION>
<OPTION>Snopes.com Urban Legends</OPTION>
<OPTION>CPAN Perl Archive</OPTION>
<OPTION>download.com</OPTION>
<OPTION>Internet Archives: Movies</OPTION>
<OPTION>Internet Archives: Text</OPTION>
<OPTION>Internet Archives: Audio</OPTION>
<OPTION>Internet Archives: Software</OPTION>
<OPTION>Internic WHOIS Search</OPTION>
<OPTION>subgenius.com</OPTION>
<OPTION>vbulletin.org</OPTION>
</SELECT>&nbsp;&nbsp;
<input type="submit" value="Search the Web">
</form>

SECOND PHRASE:
Type: GLOBAL
Varname: megasearch_title
text:Mega Search

THIRD PHRASE:
(NOTE: You only need to add this phrase if you want to have the search appear in the navbar)
Type: GLOBAL
Varname: megasearch_navbar
text:<td class="alt2" valign="top" nowrap="nowrap">
<div class="smallfont"><form action="../cgi-bin/search.cgi" target="top">
Search terms: <input type="text" name="search" value=""><br>
search engine:
<SELECT NAME="engine">
<OPTION>Google</OPTION>
<OPTION>Ask Jeeves</OPTION>
<OPTION>Dogpile</OPTION>
<OPTION>Galaxy</OPTION>
<OPTION>Altavista</OPTION>
<OPTION>Yahoo</OPTION>
<OPTION>Lycos</OPTION>
<OPTION>Metacrawler</OPTION>
<OPTION>Wikipedia</OPTION>
<OPTION>weather.com</OPTION>
<OPTION>clipart.com</OPTION>
<OPTION>eBay</OPTION>
<OPTION>Internet Movie Database</OPTION>
<OPTION>The Smoking Gun</OPTION>
<OPTION>AlltheWeb</OPTION>
<OPTION>About</OPTION>
<OPTION>AOL</OPTION>
<OPTION>GoPile</OPTION>
<OPTION>Netscape</OPTION>
<OPTION>Teoma</OPTION>
<OPTION>CompuServe</OPTION>
<OPTION>Mamma</OPTION>
<OPTION>DMOZ</OPTION>
<OPTION>HotBot</OPTION>
<OPTION>MSN</OPTION>
<OPTION>Looksmart</OPTION>
<OPTION>Dictionary.com</OPTION>
<OPTION>Thesaurus.com</OPTION>
<OPTION>Creative Commons</OPTION>
<OPTION>mininova bittorrent search</OPTION>
<OPTION>BBC News</OPTION>
<OPTION>CNN News</OPTION>
<OPTION>Disinfopedia</OPTION>
<OPTION>National Public Radio</OPTION>
<OPTION>Big Cartoon Database</OPTION>
<OPTION>CultureBuffs</OPTION>
<OPTION>Beer in the Evening</OPTION>
<OPTION>MemoryAlpha</OPTION>
<OPTION>Ticketmaster</OPTION>
<OPTION>Comingsoon.net</OPTION>
<OPTION>Kids-In-Mind.com</OPTION>
<OPTION>GameSpy</OPTION>
<OPTION>FilePlanet</OPTION>
<OPTION>UFOpsi</OPTION>
<OPTION>Webtender</OPTION>
<OPTION>recipesource</OPTION>
<OPTION>AllRecipes.com</OPTION>
<OPTION>Foodnetwork.com</OPTION>
<OPTION>Abbreviationz.com</OPTION>
<OPTION>Fark.com</OPTION>
<OPTION>googlism.com</OPTION>
<OPTION>Wired News</OPTION>
<OPTION>G4 Tech TV</OPTION>
<OPTION>Blogdex</OPTION>
<OPTION>Blog Search Engine</OPTION>
<OPTION>wtc7.net</OPTION>
<OPTION>Centers for Disease Control</OPTION>
<OPTION>Snopes.com Urban Legends</OPTION>
<OPTION>CPAN Perl Archive</OPTION>
<OPTION>download.com</OPTION>
<OPTION>Internet Archives: Movies</OPTION>
<OPTION>Internet Archives: Text</OPTION>
<OPTION>Internet Archives: Audio</OPTION>
<OPTION>Internet Archives: Software</OPTION>
<OPTION>Internic WHOIS Search</OPTION>
<OPTION>subgenius.com</OPTION>
<OPTION>Ask Jolene: pictures</OPTION>
<OPTION>Ask Jolene: movies</OPTION>
<OPTION>Booble</OPTION>
<OPTION>OnlyBestSex.com</OPTION>
<OPTION>vbulletin.org</OPTION>
</SELECT>&nbsp;&nbsp;
<input type="submit" value="Search the web">
</form></div>
</td>

FOURTH PHRASE:
(NOTE: You only need to add this phrase if you want to have the search appear as a module in your VBadvanced CMPS)
Type: GLOBAL
Varname: megasearch_cmps
text:<center><form action="../cgi-bin/search.cgi" target="top">
Search terms: <input type="text" name="search" value="">&nbsp;&nbsp;
search engine:
<SELECT NAME="engine">
<OPTION>Google</OPTION>
<OPTION>Ask Jeeves</OPTION>
<OPTION>Dogpile</OPTION>
<OPTION>Galaxy</OPTION>
<OPTION>Altavista</OPTION>
<OPTION>Yahoo</OPTION>
<OPTION>Lycos</OPTION>
<OPTION>Metacrawler</OPTION>
<OPTION>Wikipedia</OPTION>
<OPTION>weather.com</OPTION>
<OPTION>clipart.com</OPTION>
<OPTION>eBay</OPTION>
<OPTION>Internet Movie Database</OPTION>
<OPTION>The Smoking Gun</OPTION>
<OPTION>AlltheWeb</OPTION>
<OPTION>About</OPTION>
<OPTION>AOL</OPTION>
<OPTION>GoPile</OPTION>
<OPTION>Netscape</OPTION>
<OPTION>Teoma</OPTION>
<OPTION>CompuServe</OPTION>
<OPTION>Mamma</OPTION>
<OPTION>DMOZ</OPTION>
<OPTION>HotBot</OPTION>
<OPTION>MSN</OPTION>
<OPTION>Looksmart</OPTION>
<OPTION>Dictionary.com</OPTION>
<OPTION>Thesaurus.com</OPTION>
<OPTION>Creative Commons</OPTION>
<OPTION>mininova bittorrent search</OPTION>
<OPTION>BBC News</OPTION>
<OPTION>CNN News</OPTION>
<OPTION>Disinfopedia</OPTION>
<OPTION>National Public Radio</OPTION>
<OPTION>Big Cartoon Database</OPTION>
<OPTION>CultureBuffs</OPTION>
<OPTION>Beer in the Evening</OPTION>
<OPTION>MemoryAlpha</OPTION>
<OPTION>Ticketmaster</OPTION>
<OPTION>Comingsoon.net</OPTION>
<OPTION>Kids-In-Mind.com</OPTION>
<OPTION>GameSpy</OPTION>
<OPTION>FilePlanet</OPTION>
<OPTION>UFOpsi</OPTION>
<OPTION>Webtender</OPTION>
<OPTION>recipesource</OPTION>
<OPTION>AllRecipes.com</OPTION>
<OPTION>Foodnetwork.com</OPTION>
<OPTION>Abbreviationz.com</OPTION>
<OPTION>Fark.com</OPTION>
<OPTION>googlism.com</OPTION>
<OPTION>Wired News</OPTION>
<OPTION>G4 Tech TV</OPTION>
<OPTION>Blogdex</OPTION>
<OPTION>Blog Search Engine</OPTION>
<OPTION>wtc7.net</OPTION>
<OPTION>Centers for Disease Control</OPTION>
<OPTION>Snopes.com Urban Legends</OPTION>
<OPTION>CPAN Perl Archive</OPTION>
<OPTION>download.com</OPTION>
<OPTION>Internet Archives: Movies</OPTION>
<OPTION>Internet Archives: Text</OPTION>
<OPTION>Internet Archives: Audio</OPTION>
<OPTION>Internet Archives: Software</OPTION>
<OPTION>Internic WHOIS Search</OPTION>
<OPTION>subgenius.com</OPTION>
<OPTION>vbulletin.org</OPTION>
</SELECT><BR><BR><CENTER>
<input type="submit" value="Search the Web">
</form></CENTER>

2) Upload 'mega.jpg' to your forum/images/misc folder (you only need to upload the picture if you are going to add a search area below the "Who's Online" box). You can substitute any picture you see fit, just make sure it fits in the area defined (30x30)

3) Open search.cgi and replace "www.yoursite.com" with the URL of your site. Edit the top of the script to point to perl:#!/usr/bin/perlThis must point to the Perl version on your server. If you don't know it, ask your host. In most cases #!/usr/bin/perl or #!/usr/bin/perl5 works OK. If you do not have Perl installed on your server all is not lost! You can try a file called perlsp (http://%20http//2n-com.de/perlsp/%20%20) that provides an ASP/PHP/JSP like environment for Perl on all servers, dedicated or virtual, with everything that you expect from a web programming environment (and before only knew from PHP or ASP). Save & Upload to your CGI-BIN folder on your server, and CHMOD to 755. If you don't know what CHMOD is or how to do it READ HERE (http://showpost.php?p=742750&postcount=43).

4) DO THIS STEP ONLY IF YOU WANT THE MEGASEARCH TO APPEAR ON YOUR FORUMHOME, BELOW THE "WHO'S ONLINE" AREA!

Go to your ADMIN CP -> STYLES & TEMPLATES -> STYLE MANAGER -> EDIT TEMPLATES and click on the "<< >>" button to expand the template groups. Click on the FORUMHOME template to edit it and search for:<if condition="$show['birthdays']">
and add BEFORE:<!-- megasearch -->
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('megasearch')"><img id="collapseimg_megasearch" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_megasearch].gif" alt="" border="0" /></a>
$vbphrase[megasearch_title]
</td>
</tr>
</tbody>
<tbody id="collapseobj_megasearch" style="$vbcollapse[collapseobj_megasearch]">
<tr>
<td class="alt2"><img src="$stylevar[imgdir_misc]/mega.jpg" alt="$vbphrase[megasearch_title]" border="0" /></td>
<td class="alt1" width="100%">
<div class="smallfont">
<div>$vbphrase[megasearch]</div>
</div>
</td>
</tr>
</tbody>
<!-- end megasearch-->
5) DO THIS STEP ONLY IF YOU WANT THE MEGASEARCH TO APPEAR ON YOUR SEARCH.PHP PAGE, BELOW THE SEARCH AREA!

Go to your ADMIN CP -> STYLES & TEMPLATES -> STYLE MANAGER -> EDIT TEMPLATES and click on the "<< >>" button to expand the template groups. Click on the "search_forums" template to edit it and search for:$footer

Add BEFORE:<br><div align=center>$vbphrase[megasearch]</div><br>
6) DO THIS STEP ONLY IF YOU WANT THE MEGASEARCH TO APPEAR ON YOUR NAVBAR!

Go to your ADMIN CP -> STYLES & TEMPLATES -> STYLE MANAGER -> EDIT TEMPLATES and click on the "<< >>" button to expand the template groups. Click on the "navbar" template to edit it and search for:<div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php?$session[sessionurl]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions</strong></div>
</if>
</td>
Add AFTER:$vbphrase[megasearch_navbar]
7) [b]DO THIS STEP ONLY IF YOU WANT THE MEGASEARCH TO APPEAR AS A MODULE ON YOUR VBADVANCED CMPS!

Create a new template called 'adv_portal_megasearch' (without the quotes), with the following contents:$vbphrase[megasearch_cmps]
Go to your ADMIN CP -> VBa CMPS -> ADD MODULE -> TEMPLATE -> and create a CMPS module with the following properties:
Module Title: MegaSearch
Column: Center (I designed the layout to go across the middle, but you can re-design it to fit in a sidebox if you want)
Display Order: Your Choice (last is best)
ACTIVE: YES
Template to include: adv_portal_megasearch (the 'adv_portal_' part is implied, so only enter 'megasearch' in the text box)
Use Module Shell Template: NO

8) That's it! Please click INSTALL if you find this useful!

OPTIONAL: ADD MORE ENGINES TO SEARCH

You can add your own search engines to the end of the list in search.cgi, just before:'print "Location: $url\n\n";'
Simply add your own search string using this formula:
if ($engine eq "The Website") {
$url = "http://website.com/search?query=$search";
}

Just replace the name of the website with "The Website" (keeping the quotes) and replace the search string. Replace your search term with '$search' in the string. Then add it to your megasearch phrases inbetween an option tag like this example:<option>The Website</option>
This list and your list in your template do NOT need to be in the same order, just as long as they both reflect the same search engine options.

FIND NEW SEARCH STRINGS

To find new search strings simply go to your favorite site and locate their "search" box, and enter any term, and remember what that term is. Sumbit the search and look in the URL address area of your browser- highlight the url and copy it and paste it to a text editor. Look for the term you searched for and replace it with $search

"CREATE" NEW SEARCH ENGINES

If your favorite site does not have a search engine installed, or if it is not visible in the URL area of your browser after you submit a search then you can easily create your own using the following formula:http://www.google.com/search?q=$search&btnG=Google+It%21&domains=www.website.com&sitesearch=www.website.com
Simply replace both instances of www.website.com with the URL to the site you wish to include in the search. NOTE: This does not actually search the site, but rather the pages that are already indexed by GOOGLE (or whichever search engine you choose). You can use any search engine you want to use that allows advanced searches like this, such as Metacrawler, etc..

You can also use the 'more engines.txt' file that is included with this zip file. It has several more search engines listed, and the search variable has already been substituted with $search for you. Simply cut and paste the URL in to your search.cgi following the directions at the top of the script, and also add the name of the engine between <option></option> tags in the search options that are included in the phrases. Be sure to use the exact same spelling, capitalization etc. for the name of the option and also the search engine option on the search.cgi script.

Hornstar
08-06-2005, 07:23 AM
This is perfect for what i was looking for, ill be installing this now, thanks

yoyoyoyo
08-06-2005, 01:44 PM
This is perfect for what i was looking for, ill be installing this now, thanksI am glad you like it- please remember to click INSTALL (vborg_miscactions.php?do=installhack&threadid=93707) if you find this useful :D

I decided to post more thorough install info in the first post of this thread so folks will not have to download the zip file if they don't want to, so refer to that post (or the text file in the zip) for install info.

yoyoyoyo
08-14-2005, 12:17 AM
zip file updated with better instructions

T3MEDIA
10-25-2005, 04:07 PM
Question... How do I go about having this search them all. I do not want the user to pick an option.

Thanks!