A Simple Guest Book

For Windows NT/95

Version 1.5

Table Of Contents


What's New...

...in version 1.5 ...in verison 1.0

Back to TOC


Downloading

Download book.zip.

If you are upgrading from version 1.0, you will need to erase any current book.cfg you have.

Proceed to Installation.

Back to TOC


Installation

  1. Unzip book.zip in your /cgi-bin or /cgi-shl directory. The following files are created:
    /cgi-bin (or /cgi-shl)          <--server's CGI directory
       |
       |--book.exe                  <--the CGI script
       |--book.html                 <--Guest Book
       |--bookform.html             <--The form people fill in
       |--book.cfg                  <--configuration file
       |--book_instructions.html    <--this document
       |--book.readme               <--Read this
    
    The guest book program creates files called book.dat where it keeps track of how many people have signed in. It also uses the file lock.boo as a semaphore. Windows NT users note: the guest book must have read/write permissions in the /cgi-bin directory, as well as any directory where you want guest books kept.
  2. Move the files bookform.html and book.html to your HTML document root directory.
  3. Edit the file bookform.html to your liking (see Usage below).
  4. Edit the file book.html so that instead of saying "My Guest Book" everywhere, it says what you want it to say. You should not add anything after the final <hr>.
  5. Edit the file book.cfg. Under the [Bookmaster] section, put your e-mail address. Under the [Guest_Book_URL] section, put the URL to the file book.html. Under the [Guest_Book_Filename] section, put the full path to the file book.html. And finally, under [Homepage_URL] put your homepage's URL. Sample book.cfg files are provided below.
  6. Proceed to Usage.
Back to TOC

Usage

It is very simple to use the guest book (thus the name :)). On your homepage, put something like the following: ...blah blah blah... <a href="/bookform.html">Sign my guest book!</a> ...blah blah blah... The ...blah blah blah... are optional, of course.

You should not attempt to edit the bookform.html file too much. Everything before the <FORM ACTION=...> and after the </FORM> is OK to edit, but in between, there really are only two things you should change:

You should try signing the guest book first to make sure it is functioning. Go to the bookform.html page, fill it in (note that people only need to leave their names and cities) and press the "Sign the book" button. You should get a message like:

Thank You!

Thank you for taking the time to sign our guest book.

You were the 1st person to sign in.

Click here to read the guest book.

Return to homepage

Click where it says "click here". You should see something like:

My Guest Book


Name: Ryan Terry Sammartino
E-mail:
samm@cs.ubc.ca
City: Vernon, BC
Homepage: http://www.cs.ubc.ca/spider/samm/
Found us by: Dumb luck
Comment: Cool Guest Book

Signed on: Sun Mar 03 10:48:28 1996

Back to TOC


Troubleshooting

P: I tried to sign my guest book, but one of the following happened: P: It is not keeping separate books like your example

S: Double check all the book.cfg files you have and make sure that they correctly identify the URL and filename of the guest book you are trying to keep. P: Something else went wrong.

S: E-mail me. Please include as much information as you can about your problem.

Back to TOC


FAQ

Q: Can people put HTML tags in any of the fields?

A: No. This is to prevent the guest book from getting screwed up by people sticking in poorly written HTML or worse, poorly written JavaScript. Some people also sign guest books and for the comment they put in <img src="..."> where ... is the URL of a XXX JPG. I'm sure you don't want that.

Q: How can I tell how many people have signed my book?

A: Look at the book.dat file.

Q: I want to remove someone from the guest book

A: Simply edit the file book.html. If you remove someone, you should also edit book.dat by decreasing the number there by one.

Q: How can I get the book to put newest signatures first?

A: You can download the source code and make that change yourself. Doing so myself would have caused me more grief than it's worth to me (it wouldn't be a very simple guest book then). Back to TOC


Credits

Back to TOC