| International Vegetarian Union | |
![]() |
Technical Support
Simple Search |
|
We have installed search engine script - Simple Search from Matt's Script Archive. This allows users to search in English (ascii) only and lists results 'in no particular order'. This has obvious limitations but could be very useful for a local group site in English. You can see it in action, and try it for yourself, by going to the IVU search page - search ivu.org) - and go to the 'specialist search' section. If you want to set this up for your own sub-directory you can download the search.zip file which is already set up for use on ivu.org You just need to put in your sub-directory name at the 'define variables' section, it currently reads:
# Define Variables
$basedir = '/home/ivu/your-org/';
$baseurl = 'http://www.ivu.org/your-org/';
@files = ('*.html','*.htm','articles/','global/');
$title = "Your Vegetarian Society";
$title_url = 'http://www.ivu.org/your-org/';
$search_url = 'index.html';
When altering this be careful not to change any of the quotes, commas etc.
You can now upload your file via telnet or ftp - if using ftp make sure you are using 'ascii' mode. Permissions You have to set the 'permissions' for cgi scripts so that they can be used by readers. If you are using telnet then you should see an option for setting permission, allow all options - read/write/execute. If you using ftp you should be able to set the permissions from your ftp program, this is how to do it on 'ws_ftp95' - other should be similar:
Your search.cgi file should be working. Now you need to put a box on your page so that readers can type in what they're looking for and hit 'search'. Copy/paste the HTML below onto your page. It assumes that you are putting it into the same sub-directory as the 'search.cgi' file: <FORM METHOD="POST" ACTION="search.cgi"> <center> <b>Search this site:</b><br> <INPUT TYPE="text" NAME="terms" VALUE="" SIZE=35> <INPUT TYPE="submit" VALUE="Search!"> <INPUT TYPE="hidden" NAME="boolean" VALUE="AND"> <INPUT TYPE="hidden" NAME="case" VALUE="Insensitive"> </center> </form>The result will look like this: [the above will actually work but will only search this 'tech' section of ivu.org - try the word 'form'] For a more detailed explanation of Simple Search see the ReadMe file on Matt's Script site. |