DOCUMENTATION WebHints 1.00 by Darryl C. Burgdorf (burgdorf@awsd.com) http://awsd.com/scripts/webhints/ =========================================== WebHints allows you to easily set up and maintain a "Hint (Quote/Tip/ Joke/Whatever) of the Day" page. Addition of new entries is simple, and the script automatically "turns over" the display the first time it is referenced each day. Old entries are kept on file and may be searched and displayed, as well. =========================================== The files that you need are as follows: hints.pl: The main script, which both displays the current daily hint and allows searching and display of older hints. hints_add.pl: The script which allows you to add new hints. hints_pop.pl: A supplemental script which can be set to run automatically every day. It will ensure that the display is updated each and every day, even on low-traffic sites, and will also notify you when your stock of new hints starts to run low. As with any CGI scripts, you of course need to be sure that the first line of each of these scripts points correctly to the location of Perl on your system, and set them all world-executable. In addition, the following variables will each need to be defined in one or more of the scripts: $HintsDir: This variable should be defined with the full path to the directory in which current and old hints will be stored. Be sure to create the directory and set it world-writable! $NewHintsDir: This variable should be defined with the full path to the directory in which those hints which have not yet been displayed will be stored. (Two separate directories are used so that searches can easily include hints already shown but exclude those which have not.) This directory, too, must be created and set world-writable. $DataFile: This variable should be set with the full path to a file which will be used as a "placekeeper" so the script can remember with what date to start adding hints each time you add to the database. This file can and should be created with a null value, and set world-writable. $CGIURL: This variable should be defined with the URL of your hints.pl script. $AddURL: This variable should be defined with the URL of your hints_add.pl script. $HintsTitle: This is the title of your page. $BodySpec: This variable defines any attributes you want attached to the BODY tag on pages created by the scripts. $HeaderFile: This variable should be defined with the full path to an (optional) text file containing any HTML codes and text which should appear at the top (directly after the BODY tag) of those pages created by the scripts. $FooterFile: This variable should be defined with the full path to an (optional) text file containing any HTML codes and text which should appear at the bottom of those pages created by the scripts. $MailProg: This variable should be defined with the full path to your system's copy of the "sendmail" program. $MailAddress: This variable should be defined with the e-mail address to which you want notifications sent when your supply of new hints is running low. (Be sure to "escape" the @ sign.) To see the hint of the day, simply type into your browser the URL address of your hints.pl script. To add more hints to the database, type in the URL address of the hints_add.pl script. The hints_pop.pl script should be set to run automatically every day (via cron). It doesn't matter when it runs; if someone accesses the hint of the day prior to this script's run, they'll still see the right hint. This script will simply ensure that the current day's script gets moved from the "new hints" directory to the "old hints" directory each day even if nobody actually comes along to look at the page. It will also send you an e-mail note whenever you have less than a week's worth of hints remaining in your "new hints" directory. =========================================== This documentation assumes that you have at least a general familiarity with setting up Perl scripts. If you need more specific assistance, check with your system administrators, consult the WebScripts FAQs (frequently-asked questions) file , or ask on the WebScripts Forum . -- Darryl C. Burgdorf