$Id: README,v 1.4 2000-06-14 11:51:58-06 vdanen Exp $ webfeed 1.5 Author: Vincent Danen <vdanen@linux-mandrake.com> Homepage: www.freezer-burn.org/scripts/webfeed.php3 What it does... --------------- webfeed is a perl CGI script to make web forms nice and clean. Installation ------------ Place webfeed in your /cgi-bin/ directory and the supplied webfeed.conf configuration file into a directory called /etc/webfeed/. This directory needs to be world-readable. If you use Sendmail, you must install the Mail::Sendmail perl module. The CGI module is required as well, but it should come with Perl. You can get Mail::Sendmail from CPAN or (if you use Linux Mandrake) you can download the RPM at www.freezer-burn.org/rpm.php3?rpm=perl. How to use it... ---------------- Include something similar to the following in your feedback web page: <form METHOD="GET" ACTION="/cgi-bin/webfeed"> <center> <b>Your comments</b> <br> <table> <tr> <td COLSPAN="2"> <textarea NAME="feedback" ROWS="5" COLS="50" WRAP="virtual"></textarea> </td> </tr> <tr><td><b>Name</b></td><td><input name="Name" type="text" size="40" maxlength="40" length="40" value></td></tr> <tr><td><b>City</b></td><td><input name="City" type="text" size="40" maxlength="40" length="40" value></td></tr> <tr><td><b>State</b></td><td><input name="State" type="text" size="40" maxlength="40" length="40" value></td></tr> <tr><td><b>Country</b></td><td><input name="Country" type="text" size="40" maxlength="40" length="40" value></td></tr> <tr><td><b>E-Mail</b></td><td><input name="email" type="text" size="40" maxlength="60" length="60" value></td></tr> <input name="conf" type="hidden" value="webfeed.conf"> </table> <br> <center> <input NAME="OK" TYPE="submit" VALUE="Submit"> <input NAME="OK" TYPE="reset" VALUE="Reset"> </center> </form> Configuration ------------- Edit /etc/webfeed/webfeed.conf. This is the default configuration file. It is well commented and should be enough to help you understand what all of the configuration directives are. All keywords are required except for the LOG keyword (logging is optional, it's only useful in debugging situations), and the KEEPFILE keyword (which is only useful if KEEPEMAIL=1, ie. you have multiple concurrent forms and don't want to keep asking the user for their email address). Currently webfeed only supports Sendmail and Qmail. You will need to set the MAILER keyword to "qmail" or "sendmail" depending on what MTA is installed on your system. If you use Sendmail, you will need the perl Mail::Sendmail module installed. If you use Qmail in a different path setting than /var/qmail, change the paths in the script (line 150). The way required fields are checked has changed. It is now part of the configuration file so you will need to update your forms appropriately if you were using versions 1.2 or earlier. See the config file for details. As well, the hidden fields "location", "locerror", "sendto", and "subject" are now specified in the config file. The only fields required in the form now are "email" and "conf". You *must* specify both fields. "conf" can be any file you want, but it must exist in the /etc/webfeed configuration directory. The "email" field can either be a user-supplied field or if you are spanning multiple pages for a form (which will also result in multiple emails), but don't want to ask the user on each page for their email address, make a hidden entry with a name of "email" and a value of "tmpfile". This tells webfeed to store the email address retrieved from the first page and to re-use it when the value of "email" is "tmpfile" (as specified in the form). In order for this to work, KEEPEMAIL must be set to 1 in the configuration file and KEEPFILE must point to a file that can be written to by user nobody (preferably in /tmp or another directory that is world writeable/readable). License ------- webfeed is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. webfeed is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with webfeed; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.