|
Advanced Free For All Link List CGI
Introduzione
Lo script è stato progettato per essere installato via FTP su un server remoto che usa PERL 5 o superiore. Progettato per una facile configurazione e AFFA è in grado di filtrare considerevolmente links sgraditi che non si vogliono.
Download e Installazione
Per installare AFFA, cliccate sul metodo di download che desiderate, sul formato del file (vedi sotto) e scaricatelo sul Vostro computer. Dovrete decomprimere i files che sono contenuti nell'archivio AFFA. Potete modificare l'inizio del file affa.pl per riflettere la directory al vostro compilatore perl e sendmail script.
Then edit the affa.cfg file to reflect the settings you need to run AFFA.
Pay particular attention to the directory paths for the required files.
| Method | File format | Type | Command used to extract |
| HTTP | affa.zip | Compressed Zip | unzip affa.zip |
|---|
It is advised that you place all the files in the one directory. You must ensure
that the directory chosen is permitted to run CGI or PERL scripts. The email.txt file
must be placed in the same directory as the affa.pl and affa.cfg files (the affanow.gif file
should also be in this directory if used). The db.txt, header.htm and footer.htm
files may be placed in any directory as long as the directory path is set in the affa.cfg file.
When the files are in place on your server, you must CHMOD the affa.pl file to 755. The db.txt file
must then be set to CHMOD 666.
The script can be loaded in your web browser in one of 2 ways. The first is calling the affa.pl file
directly. For example:
http://www.yourdomain.com/directory/affa.pl
In which case, do not supply a target file in the affa.cfg file.
Or you can load a page created by AFFA, like this:
http://www.yourdomain.com/directory/links.htm
To install the script like this, you must specify a target file in the affa.cfg file and the program
will automatically generate the links page. The first method (directly loading the script) is recommended.
Customizing AFFA
AFFA automatically generates an HTML file by first pre-pending a header HTML
file, then formatting and laying-out the database file of links and finally by
appending a footer HTML file. Sample header and footer HTML files are supplied
with this distribution.
The main things you may wish to change are the Administrator email and the
TextReject field, which lists words that the script will not accept in a posting.
You can use AFFA as-is straight away (you should put your email address in the
Administrator field in the affa.cfg file however), or customize nearly every aspect of its
operation. AFFA is configured through a configuration file (`AFFA.cfg') that you
can edit with a text editor. The file itself contains comments (any line
starting with a `#') that describe each of the options. In summary, the
following configuration options are available:
- The location (path) of any of the files; in particular,
- TargetFile - the HTML file to create
- HeaderFile - the HTML header to pre-pend to target
file
- FooterFile - the HTML footer to append to target file
- DatabaseFile - the database file of links
- LogFile - the log file for postings
- Administrator - the e-mail address to send notifications
to.
- CategoryTemplate - the template used for displaying each
of the categories.
- LinkTemplate - the template used for displaying each
of the links.
- TextReject - a list of keywords which, if contained in the
posting, should cause a rejection.
- TextRejectMessage - the message to display when a
TextReject occurs.
- CaseTransform - whether to automatically drop second and
subsequent letters in a word to lower-case to prevent `shouting' (all caps)
- CaseReject - the number of words posted in all-caps to
cause a rejection.
- CaseRejectMessage - the message to display when a
CaseReject occurs.
- DuplicateURLReject - whether to reject duplicate URLs
(based on path, not just on filename).
- DuplicateURLRejectMessage - the message to display when a
DuplicateURLReject occurs.
- MaximumCount - the maximum number of links to hold; oldest
links are moved where necessary.
- MaximumSize - the maximum size of the database file (in
Kb); oldest links are moved where necessary.
- DomainReject - which domains to reject postings for.
- DomainRejectMessage - the message to display when a
DomainReject occurs.
- Lifespan - the maximum lifespan (in days) of a posting,
before it is automatically removed.
- TestURL - whether to automatically testing URLs during
posting, to ensure that it is valid.
- TestURLTimeout - how long to wait before deciding that a
URL is invalid during testing.
- TestURLMessage - the message to display if a URL is tested
false.
- SortOrder - whether to display new postings at the end,
at the start or in alphabetical order.
- SubstituteList - how to alter the posting before it gets
tested or posted.
- Categories - which categories to permit and to display,
and in which order.
- CategoryRejectMessage - message to display if an unknown
category is posted.
- CategoryParam - the name of the supplied category
parameter for posting.
- TitleParam - the name of the supplied title parameter for
posting.
- UrlParam - the name of the supplied URL parameter for
posting.
- DescriptionParam - the name of the supplied description
parameter for posting.
- MaxTitleLen - the maximum length of title (longer than
this will be truncated).
- MaxDescriptionLen - the maximum length of description
(longer than this will be truncated).
- RejectIfTooLong - reject postings where the title or
description exceed MaxTitleLen and MaxDescriptionLen respectively, rather
than merely truncating.
- MaxURLLen - maximum allowed length for the URL.
- RejectIfTooLongMessage - message to display if a rejection
occurs based on length of URL, title or description.
- MinTitleLen - the minimum length of title allowed.
- MinDescriptionLen - the minimum length of description
allowed.
- MinURLLen - the minimum length of URL allowed.
- RejectIfTooShortMessage - message to display if a
rejection occurs based on length of URL, title or description.
- AcceptMessage - message to display when a posting is
accepted.
- URLPrefixAccept - URL prefixes (such as http:// or ftp://)
to accept.
- Delimiter - the character(s) to split lists of items in
the config file.
Troubleshooting
System Errors
- System Error 1
- AFFA was unable to open the database file for updating; this is almost
always caused by incorrect permission settings on the database file.
- System Error 2
- You have enabled automatic URL-testing, however AFFA could not find the
necessary library (PERL library Socket.pm) to achieve this. Check your
PERL installation, or disable automatic URL-testing.
- System Error 3
- You have configured an invalid substitution in theconfig file
(SubstituteList). Please check the
substitution format carefully.
- System Error 4
- AFFA was unable to open the target HTML file for updating; this is almost
always caused by incorrect permission settings on the target HTML file
file.
- System Error 5
- AFFA was unable to open the log file for updating; this is almost always
caused by incorrect permission settings on the log file.
- System Error 6
- The config file could not be opened for
reading. The config file should be named `AFFA.cfg' in the same directory
as AFFA, unless otherwise in the header of AFFA (edit the script to modify).
- System Error 7
- The config file contains an error at the line
given. Check for syntax errors and typos.
|