You need Perl to run the cgi driver of the sign-in (guest.cgi), and
also to run "gbmaint", the database maintainer.
There are four pieces of code that make up my guestbook:
The guestbook.html file is the actual page with guest entries and various
links to other pages. It has the link in it to the guest.html page
which is the form for signing the guestbook.
The data from the form is
input for the guest.cgi Perl program which massages it and puts it into a
"dbm" database for use in another Perl program, gbmaint.
gbmaint is
a small database interface and page generator that deals with the database
used by guest.cgi, it is run from the UNIX command line, not
through a web interface. gbmaint lets you look through guest records,
delete records, generate a "test" page of guest records (in case you
can't visualize what the guestbook entries will look like), and move
records into the guestbook.
Steps for using the guestbook code:
- Tell me about it (I'll sign it when you get it working!).
- Open the two html pages and save the source in whatever directory you
want to keep the guestbook in. Remove the placeholder entries, and
change the navbar to point to your own pages in the copy of
guestbook.html.
- Open guest.cgi and save it into the same directory, name it guest.cgi.
- Open gbmaint and save it into the same directory, name it gbmaint.
- Read the top parts (at least) of the Perl programs so you know which
variables to change.
- Make changes to whichever variables you deem necessary in the two Perl
programs for them to work on your system, in your directory.
- Change the look and feel of the guestbook and signing page if you
feel like it.
- Test it out.
Some notes to keep in mind:
- Don't forget to change the "$Mailto" variable to be your
address so you'll get the mail from the forms, etc.
- gbmaint needs to be run initially with dbmopen permissions of 0644
($Perms) to create the database, until this happens, nothing will
work. And, this needs to happen before you start
entering guestbook records.
- The guestbook "database" is saved in the guestbook.html page itself,
not in a separate dbm. (Don't go looking for a separate dbm that holds
the guestbook, it ain't there.)
- If you use gbmaint to generate a testbook or new guestbook, you
need to exit gbmaint for the changes to take effect!