Smart Search (v4.34) Setup Instructions

Setup If you're installing new or upgrading from a version of Smart Search earlier than 4.0, follow the standard installation directions. If upgrading from version 4.0 or later, follow these instructions.

Installation Directions

With Remote Shell (Telnet) Access:

  1. Upload setup.pl and setup.dat to your server (ASCII mode) in the directory where you want Smart Search to store its files
  2. Open a Telnet (or other remote shell) connection to your server
  3. Change to the directory which contains setup.pl and setup.dat
  4. Type "which perl" and hit enter - this will tell you where Perl is located on your server. You will need to give setup.pl this information.
  5. Run "perl setup.pl"
  6. Type in the server path to Perl and hit enter.
  7. Confirm that you've entered the proper path
  8. setup.pl will create all necessary directories and files with the appropriate file permissions, and will automatically write the path to Perl that you've entered in CGI files that need it
  9. You can now close Telnet
  10. Finish upgrading or complete the installation

Without Remote Shell Access:

  1. On all .cgi files in the main directory, put the path to Perl on your server at the top of the file, using your favorite text editor. On most servers the path is either /usr/bin/perl (this is the default - all necessary files in the .zip already have this) or /usr/local/bin/perl - the line at the top needs to have a #! before the server path, so if your directory is /usr/bin/perl, the line you need to put at the top of the main .cgi files is "#!/usr/bin/perl" (without the quotes). You do not need to do this to any .cgi files in the include directory.
  2. Open include/functions.cgi in your editor. The first three lines will look like:

    $accounts_dir = 'accounts';
    $data_dir = 'data';
    $adminkey = 'qxxopz';

    Let me explain. Those who are familiar with the Smart Search directory structure could open your data directory in their browsers and open the file containing your admin password and attempt to crack it. To avoid this, you can (and should) create random directories for "accounts" and "data" and at the same time you should set a new value for $adminkey (this is used for some encryption on your site). To do this, change the variable values to a random value of the form 'accounts-asdfls' for accounts and 'data-eriuas' for data (use whatever random string you want), and change adminkey to any random string (should be between 6-8 characters, containing only letters and numbers). Make sure you remember the values you gave to $accounts_dir and $data_dir, as you will later have to create directories with these names.

    Do not change anything else in functions.cgi

  3. Upload all files except setup.pl and setup.dat to your server in the appropriate directory. When uploading files, recreate the directory structure on your server. Many FTP programs can do this easily - simply select all Smart Search files and directories and select upload (ASCII mode).
  4. Rename the accounts and data directories to whatever you placed in functions.cgi earlier.
  5. Now it's time to change some file permissions. For the following instructions, if your program uses checkboxes, use the following:

    Permission setting: 755
    OwnerGroupOther
    ReadXXX
    WriteX
    ExecuteXXX
             
    Permission setting: 777
    OwnerGroupOther
    ReadXXX
    WriteXXX
    ExecuteXXX

  6. CHMOD the main Smart Search directory to 755, so your scripts can run
  7. CHMOD directories "accounts", "data" (both of these have random names now), "cached", "keywords", "templates", and "translations" to 777.
  8. CHMOD subdirectories "a"-"z" and "misc" in directory "keywords" to 777 (if the program you use for .zip files doesn't extract empty directories, you may also need to create this directories before changing the permission)
  9. CHMOD directory "include" and all .cgi files inside it to 755
  10. CHMOD all .cgi files in the main directory to 755
  11. CHMOD rebuild.pl and update.pl (in the main directory) to 755
  12. CHMOD the following data files to 777:

  13. Finish upgrading (directly below) or complete the installation

Upgrade from a version earlier than 4.0

Smart Search v4.xx stores some data files in a slightly different format, so it will be necessary for you to perform the following steps to upgrade from previous versions of Smart Search:

Complete the Installation

Searchfeed and Smarter Scripts promotion! Did you know that we worked out a deal with Searchfeed to pay YOU an extra 5% commission over their regular payout rate? If you don't know what Searchfeed is: it's a search engine which pays YOU every time you refer a visitor who clicks on the search results. Smart Search can display their listings on YOUR search results pages, making it easier to generate clicks. Just signup by clicking here and you will make more money than their other affiliates!

What setup.pl Does:

Special Notes on Editting Templates:

The ability to control every aspect of Smart Search's output is a very powerful feature, but you need to be made aware of a few things:

Take some time to customize the look and feel of your site. The default templates are very bare and minimal, but they should give a good idea of how to use the template system.

Upgrading an Existing Installation

Upgrading from Smart Search v4.17-v4.33

Upgrading from Smart Search v4.11-v.4.16

Upgrading from Smart Search v4.0 or v4.10

General Instructions:

<!--#include virtual="/path/to/cgi/include.cgi?keywords=your_keyword&show=show_number" -->

Replace your_keyword with the keyword you want to show listings for. Replace show_number with the number of listings you want to display (default is 5).

This will display the listings according to the templates for include.cgi. See admin.cgi to change these templates.

If you want to use a Javascript tag instead of SSI, just add "&java=1" to the end and put it in a tag like the following:

<script src="http://www.mysite.com/include.cgi?keywords=your_keyword&java=1"></script>

SSI: <!--#include virtual="/path/to/cgi/include.cgi?pop=pop_number" -->

JavaScript: <script src="http://www.mysite.com/include.cgi?pop=pop_number&java=1"></script>

SSI: <!--#include virtual="/path/to/cgi/include.cgi?keywords=your_keyword&username=my_username" -->

Java: <script src="http://www.mysite.com/include.cgi?keywords=your_keyword&username=my_username&java=1"></script>

tech/hardware/computers/computer accessories/monitors
tech/hardware/computers/computer accessories/printers
tech/hardware/computers/computer accessories/scanners
tech/hardware/computers/ibm
tech/hardware/computers/compaq
tech/hardware/computers/mac
tech/hardware/laptops
tech/hardware/keyboards
tech/software

Now I'll explain... You can put as many directories as you want. You don't have to list the main directories, just the deepest sub-directory. In the example above I don't need to put:

tech
tech/hardware
tech/hardware/computers
tech/hardware/computers/computer accessories
tech/hardware/computers/computer accessories/monitors

I only need to put:

tech/hardware/computers/computer accessories/monitors

The CGI can figure out by itself the directories above that one. Also, DO NOT repeat any directories in another group, the CGI will just match the keyword to the first one it finds. For example, if you have:

software/downloads
music/news
music/mp3/downloads

The "downloads" is repeated, that's not good. What you should put is something like this:

software/software downloads
music/news
music/mp3/mp3 downloads

You wouldn't get an error message if you didn't do this, but the CGI would simply take the first directory it finds. In the above example (the red one), if someone searched for "downloads", the CGI would tell them they are in the "software/downloads" category.

If this was too confusing, you will figure it out as you test the directories out :)

The HTML for this is:

<form method="POST" action="smartsearch.cgi">
<div align="left"><p><input type="text" name="keywords" size="10"><select name="crawlsite"
size="1">
<option selected value="1">Dmoz.org</option>
<option value="2">MSN.com</option>
<option value="3">SearchFeed.com</option>
<option value="4">AltaVista.com</option>
<option value="5">RevenuePilot.com</option>
<option value="0">None</option>
</select><input type="submit" value="Search" name="submit"></p>
</div>
</form>

This is done by passing on the variable "crawlsite" with the appropriate number. 1 is Dmoz.org, 2 is MSN, etc. and 0 (zero) is none (no external search results). If you don't use this type of form, the default one will be used (as set via admin.cgi).

 

Note: Generally this CGI and its data files should not use up too much space on your server, except for the click logs which might add up if you have a heavily used site. For most people 5 MB would be more than enough for this CGI.

 

If you experience any problems with the results pulled from any of the other search engines (LWP module feature), e-mail webmaster@smarterscripts.com

 

Special Notice to Resellers:

You can use this script on any site of yours, but if you sell one of these sites, you are required to FIRST purchase a new copy for the new owner. If you don't, it's considered copyright infringement and we will prosecute any offenders. WE MONITOR EBAY.COM AUCTIONS, SO BEWARE. Reseller prices are very low, for more information, go to: http://www.smarterscripts.com/resellers.shtml

 

Support:

Go to http://www.smarterscripts.com/contact.shtml for support issues.


Check out http://www.smarterscripts.com for updates to the CGI.
Send suggestions for future versions to webmaster@smarterscripts.com