WebHints Documentation

 

THE PERL SCRIPTS ARE NO LONGER BEEING SUPPORTED - PLEASE GO TO TETRABB.COM FOR THE NEWEST VERSION OF THE WEBBBS FORUM

WebHints Download: webhints_files.zip

* 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.

* Compressed Archives: All of the above files in one easy download. Take your pick!
o webhints_files.zip

 

 

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.

 

$SSI:  If you set this to 0, the script will generate an entire page,
in accordance with your specifications, when referenced.  If it is set
to 1, the script will assume that it’s being called with an SSI tag
rather than via a direct reference, and will *only* send the daily
hint itself.

 

$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.  (Or call it via an SSI tag on one of
your pages.)  To add more hints to the database, type in the URL address
of the hints_add.pl script.

 

If WebHints is generating the entire page, then the user, in addition
to seeing the hint of the day, will have options to list all hints (or
just those from the past month) or to search for specific keywords.  If
the hint was called via an SSI tag, those options will not exist; the
SSI version of the script *only* displays the appropriate daily hint.

 

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.

 

Note that if you run out of new hints, your users won’t just see a blank
page.  Any time that WebHints can’t find a designated “new hint” for the
day, the oldest existing hint will be removed from the bottom of the
stack, so to speak, and redated with the current date.  (The “popper”
script will still send you an e-mail nastygram, though, so you’ll know
what’s happening.)

Script Ad