...

guestbook ( log)

If you don't know the program, you better see it in action first.

Introduction

'guestbook' consists of a bunch of perl scripts that took me three evenings to write. so don't expect to see elegant, or even structured code ;-)

The whole thing is available under the GNU General Public License. I do accept chocolate donations though ;-)

Requirements

To run guestbook on your Webserver you need:
  • perl (I use Revision 4.0.1.8)
  • formlib.pl (for handling FORMs)
  • Maps (you can use 'mine' - I stole them from Brandon Plewes Virtual Tourist, and he said he doesn't mind.)
  • the pnm library (for painting the x'es on the maps)
    (ask archie for pbmplus)
  • dblookup (from netfind - not really necessary, just for guessing peoples location from their hosts domain name)
  • slightly changed imagemap script
    [this is not really necessary]

Getting guestbook

You can get the files (tar'ed and gzipp'ed) from our ftp-server ftp.cosy.sbg.ac.at/pub/people/bjelli/webscripts/guest/.

You need the file guest-bin.0.0.tar.gz and guest-doc.0.0.tar.gz

Installation

You will be needing two directories: one for executable (guest-bin), and one for the resulting maps and documents (guest-doc).

Unzip the files (gunzip guest-bin.0.0.tar.gz), then untar them (tar xf guest-bin.0.0.tar). You get the two directories.

Now move these directories to someplace convenient on your server. The default URLs are /cgi-bin/guest-bin and /rec/guest-doc, but you can change that of course.

guest-bin

this file does not yet contain executables. First you have to edit 'config.pl' and 'config.sh' . These files will be prepended to all perl scripts / all shell scripts respectively. Then make all

Remember : Never edit the executables ! Edit the config.* or the *stump files instead, and then make the exectuables.

guest-doc

The file World.html is the entry-point for the web documents

Edit the file footer.htinc: put your name and email address in. This file is appended to all the other html files.

Change the html files to make them complie with your local web-standards.

In guest-bin execute updatemap World. This should create a file guest-doc/World.gif. Do the same for Europe, NAmerica and Australia. Set up the imagemap script (see The Improved imagemap Script if you're using httpd), the names should be GB_World,GB_Europe,... , the mapfiles are guest-doc/World.map, guest-doc/Europe.map,...

You should now be able to click on the world map to get to the submaps.

Now try to make an entry on one of the Maps.

Maintainance

You can always edit the file guest-bin/log.txt by hand, removing or changing entries. After making a change concerning a certain map (e.g. Europe) be sure to run updatelog Europe to bring the *.htinc and *.map file up to date, and updatemap Europe to bring the map (*.gif) up to date.

Adding a New Map

Say you want to add a map of Tasmania. First decide on a name - 'Tasmania' would be a good idea. Now change the variable $allmaps in config.pl: It should now be ':World:NAmerica:Europe:Australia:Tasmania:'. now make all again (you'll probably better touch all the *.plstump files first)

Next you need a picture of the Map in ppm format. put it in guest-bin/Null_Tasmania.ppm. Now run updatemap Tasmania to create a first gif.

Now write a first *.map file for Tasmania: There won't be any submaps of Tasmania for now, so the file needs only contain the line '-*- end of submaps -*-'. But you want Tasmania to be a Submap of Australia: enter an appropriate line in Australia.map. You should also inicate that there is a submap, by drawing a rectangle in the Map of Australia (I use xpaint for drawing in ppm files).

to be continued


last modified: Fri, Feb 25 1994 17:26 MET