|
Filename |
Size |
|
 |
.. |
- |
Higher Dir |
 |
icons |
- |
Dir |
# $
# $ (Cougaindex version 2.6)
# $
# $ Simple script with no administration which is used as a default indexer, allows you
# $ to customize the layout of directories say for downloading purposes... because the
# $ files are generated on the fly it will only display the contents of what is in the
# $ specific directory.
# $
# $ This code is distributed in the hope that is will be useful but WITHOUT ANY
# $ WARRANTY. ALL WARRANTIES, EXPRESSED OR IMPLIED ARE HEREBY DISCLAMED. This includes
# $ but isn't limited to warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# $ PURPOSE. The RESELLING of this code is STRICTLY PROHIBITED.
# $
# $ $Revision: 2.6
# $ $Author: Paul Williams
# $ $Email: paul@rainbow.nwnet.co.uk
# $ $URL: http://www.cougasoft.org/
# $ $Created: 05/12/1996 11:01
# $ $Last Modified: 01/04/2000 18:12
# $
# $ Copyright 1996, 1997, 1998, 1999, 2000 Cougasoft. All rights reserved.
# $
-- ' I am not sure about other HTTPD web servers but I know this works on
-- ' Apache™ HTTPd. If you are running apache and it doesn't recognise
-- ' index.cgi as a default index file add the following to a .htaccess
-- '
-- ' DirectoryIndex index.html index.htm index.cgi
Ok, you should of recieved the following files to get this script up and running :-
1. index.cgi
2. README
3. anon.gif
4. audio.gif
5. compress.gif
6. dir.gif
7. exe.gif
8. html.gif
9. image.gif
10. move.gif
11. script.gif
12. text.gif
If you don't have these please go back to
- http://www.cougasoft.org/
README CONTENTS
---------------
1. Installation
------- Change perl location(s)
------- Change $imgloc variable
------- Upload + Chmod
N.B. If you have any problems with getting this script to work please :-
1. Exhaust this README file. [No Luck ?]
2. Email me with the problem (Be as specific as possible) [No Luck?]
3. Go to my site and fill in the 'Paul Install' form.
I should then hopefully be able to install the script for
you. I don't charge anything for this service but please
bear in mind I will be using my spare time to help you and
any contribution would go a long way with me ;)
Register the script ;-
Please Visit : http://www-register.cougasoft.org/register.cgi
#
########## ------------------------------ #####################################################
#
# I N S T A L L A T I O N
#
########## ------------------------------ #####################################################
#
Change the first line -[ #!/usr/bin/perl ]- to the path your perl
interpreter is located on your server. This is the most common location.
If you don't know where it is you can either :-
1. Type -[ which perl ]- on the telnet screen.
2. E-mail admin and ask where perl is located.
3. If you are admin, go rent a movie ! ;)
#
########## ------------------------------ #####################################################
#
########## ------------------------------ #####################################################
#
Change the variable -[ $imgloc ]- to where you have placed the GIF's
on your server.
It should look something like this :-
$imgloc = '/_icons/';
or the full URL (So you don't make any mistakes)
$imgloc = 'http://www.mydomain.com/_icons/';
The variable requires a trailing slash but no matter how many times I
remind people they sometimes forget so the script forces a slash when
you forget to :)
You might also be wondering why there is an underscore before the name
icons ? well this is because the apache people have beaten me to that
directory (damn apache with their cool directory name allocations ;)
Therefore I needed another directory to give ya ! I bet your thinking
"wow, now I know this my life is now complete...."
#
########## ------------------------------ #####################################################
#
########## ------------------------------ #####################################################
#
Upload the following files:-
No. Script|GIF Where Chmod to
---- ---------- ----- --------
1. index.cgi /SEE BELOW/ 755
2. anon.gif /_icons/ -
3. audio.gif /_icons/ -
4. compress.gif /_icons/ -
5. dir.gif /_icons/ -
6. exe.gif /_icons/ -
7. html.gif /_icons/ -
8. image.gif /_icons/ -
9. move.gif /_icons/ -
10. script.gif /_icons/ -
11. text.gif /_icons/ -
- index.cgi location depends which directroy you would like to index.
once you have set the variables it won't matter which directory this
script is placed. e.g. you may want to place this in your :-
/imx/
/download/
/info/
directories. Remember to keep the script called INDEX.CGI, hopefully
the server you are running lets you execute scripts in any DIR :)
NOTE: - Make sure the indexed DIR is chmodded to AT LEAST 755 (after all,
we need to be able to read the directory huh ? ;)
[Ques. So Paul, how do you upload your scripts ? ].
[Ans. Good question :) here is how and what I use :-
1. I open WS_FTP95 [http://www.ipswitch.com]
2. Log on to my server
3. Upload script|data files to my directory in ASCII mode.
N.B. If you upload in binary the script may not work.
4. Chmod the script|data file to the correct permission.
Follow these stages to chmod :-
- Got to the DIR with the script in.
- Right mouse click in the white box on the right under 'Mkdir'
- Click on FTP Commands
- Select 'SITE'
- It should then ask you to enter a 'SITE STRING'
Type there chmod 755 index.cgi
5. Check the script in my browser for any errors.
6. Log off.
7. Have a nice cup of coffee and bask in my uploading glory :)
#
########## ------------------------------ #####################################################
#
########## - END INSTALLATION [] -------- #####################################################
#
Once these stages have been completed correctly the script should
work ! One thing I would like to add here though is the possibility
of this being ported to C, I will do it and I guess if I did, the
script would execute rapidly and you won't get those moaning system
administrators on your back :)
Apologies to the placid system administrators ;)
#
########## ---------------------- #############################################################
#
########## - EXIT(0) ------------ #############################################################
#