Smart.Net's Public Guestbook
Webpage guestbooks are almost common place now. Unfortunately, these
guestbooks require not only an HTML form to allow users to enter data, but a
CGI program to decipher and manipulate the data.
Fortunately, Smart.Net's WebMaster has
created a guestbook that not only has features not found in any other
webpage guestbooks (including commercial guestbooks), but is also incredibly easy to use. No knowledge of HTML or PERL is
required to use it!
Installing The Guestbook
At any UNIX shell prompt, type in the following command:
web.guestbook
This is an installation script designed to make the guestbook available as soon as possible.
There are quite a few changes that have been made or are being made to the new release of the guestbook. Some of the more
attractive features are:
- New entries inserted at the top of the file
- The older guestbook simply added the entries at the end of the file. This version adds the newest entry at the top
of the file.
- Completely configurable messages
- Almost everything about the guestbook is configurable - what to display before & after the comments,
how to display the comments,
- One configuration file
- A single configuration file stores all of your settings - no more passing data through the HTML form!
- User-defined language rating (Coming Soon)
- Some language may be inappropriate for certain visitors -- an update is being made to determine what words can and
cannot be used in the guestbook.
- HTML Tags (Coming Soon)
- An update is being made to limit the use of HTML tags in the guestbook.
- Mailback Feature (Coming Soon)
- An update is being made to allow the use of a "mailback" - after a user signs the guestbook, an e-mail will be
sent to them (optionally) thanking them or telling them about other sites they might want to visit.
- More "professional" name
- The older guestbook was named gb-generic.cgi. This version is named guestbook.cgi.
- Add variables "on the fly"
- The guestbook now supports adding variables on the fly.
Configuration Options
The new guestbook is almost completely configurable -- this is the main difference between SmartNet's guestbook
and other guestbooks. Here is a run-down of the different options available in this release (v2.3). Please note that
NONE of these options have ANY defaults as of this release! Please note that since the entire output of the guestbook is configurable,
editing guestbook.cgi should not be done.
- OUTPUT: <FULL PATH>
- The full path to the "signatures" file. This file is, by default, named "guestbook.html". If your username was
"kevinr", the full path (again, by default) would be "/home/kevinr/www/gbook/guestbook.html".
- SENDTO: <Your E-Mail Address>
- Your e-mail address. If you would rather have guestbook entries e-mailed to you, leave out the "OUTPUT=" setting
and enter a value for this setting. If neither SENDTO or OUTPUT are defined, the guestbook will not work. If both
are defined, you will receive an e-mail after a user enters something in your guestbook.
- GOTOURL: <FULL URL>
- This is where the users will be sent after signing the guestbook. It should be a FULLY QUALIFIED URL. For instance,
if your username was "kevinr" and your guestbook file was in "/home/kevinr/www/gbook/guestbook.html", this could
be set to "http://www.smart.net/~kevinr/gbook/guestbook.html" to send users to the signatures page after signing your
guestbook.
- COMMENTHEADER: <What to put before the user's comments>
- This line of text will be placed prior to each user's comments in the guestbook. This variable accepts !xxxx
codes.
- COMMENTFOOTER: <What to put after the user's comments>
- This line of text will be placed after each user's comments in the guestbook. This variable accepts !xxxx
codes.
- COMMENTS: <How to display the comments>
- This option tells the guestbook how to display the comments. For instance, if you wanted the text to appear EXACTLY
the way it did when the user typed it, you could enter "<PRE>!COMMENTS<PRE>". The !COMMENTS
variable MUST be present!
- HTMLHEAD: <Coming Soon!>
- Coming Soon!
- MAILBACK: <Coming Soon!>
- This feature will allow you to send a pre-written e-mail back to users who sign the guestbook.
- WRAPPING: <Coming Soon!>
- Coming soon!
- RATING: <Coming Soon!>
- This option will determine what language is allowed in the guestbook. It vaguely resembles the movie-rating system.
Without getting too graphic, here is a run-down of the to-be-added options:
- G = No obscene language at all.
- PG = Minor obscene words.
- R = Teenagers (15+) should be able to view this.
- NC-17 = Teenagers (18+) should be able to view this.
- X = Guestbook is meant for adult purposes only. Children should not be looking at this.
- BREAKER: <How to split a "signature block">
- This option determines how a user's signature should end. I recommend putting a <HR> tag here -- that will
display a horizontal line between each user's comments.
- ALLOWHTML: <Coming Soon!>
- This setting will allow you to limit the use of HTML tags in your guestbook.
- VARIABLES: <Variable Names>
- This is a list of all your non-standard variables you want to include. For instance, if you wanted to record
a person's age in addition to the other items on the guestbook, you could enter VARIABLES: age. Please read the
section on adding variables.
!xxxx Variables
- !DAY
- This will be replaced with the current NUMERIC day of the month (usually 1-31).
- !DAYSTRING
- This will be replaced with the current day of the week (ie: Mon, Tues, Weds, etc)
- !MONTH
- This will be replaced with the current NUMERIC month of the year (1-12).
- !MONTHSTRING
- This will be replaced with the current month of the year (ie: January, February, March, April, etc)
- !MONTHABBREV
- This will be replaced with the current month of the year in abbreviated form (ie: Jan, Feb, Mar, Apr, etc)
- !YEAR
- This will be replaced with the current year (ie: 1996)
- !NAME
- This will be replaced with the user's name as entered in the HTML form
- !EMAIL
- This will be replaced with the user's e-mail address as entered in the HTML form
- !HOMEPAGE
- This will be replaced with the user's homepage as entered in the HTML form
- !IP
- This will be replaced with the user's IP address (ie: 206.27.242.4)
- !HOST
- This will be replaced with the user's hostname (ie: webmaster.smart.net)
- !BROWSER
- This will be replaced with the user's browser type (ie: "Mozilla/2.02 (X11; I; Linux 1.2.13 i586)")
- !COMMENTS
- This will be replaced with the user's comments. It can only be used in the
COMMENTS=<Format Options> setting.
- !LIKEDWHAT
- What page(s)/part of your webpage the user enjoyed the most.
- !xxxxxxxx
- Replace "xxxxx" with a variable from your HTML form. Please read the section on creating your own variables.
HTML Form "Fields"
The HTML form (by default named "gbook/form.html") holds all the information for the user. Here is a list of
valid field names for the form. Please note that only two fields are required to operate the guestbook - a user name and
their comments. Anything other fields are optional.
- <INPUT NAME="config" TYPE="HIDDEN" VALUE="<Path to your configuration file>">
- This is the path to your guestbook configuration file.
- <INPUT NAME="name" TYPE="TEXT">
- The user's name (REQUIRED)
- <INPUT NAME="email" TYPE="TEXT">
- The user's e-mail address (OPTIONAL)
- <INPUT NAME="userurl" TYPE="TEXT">
- The user's "homepage" (OPTIONAL)
- <INPUT NAME="comments" TYPE="TEXTAREA">
- The user's comments (REQUIRED).
- <INPUT NAME="likedwhat" TYPE="TEXT">
- What the user liked the most in your pages (OPTIONAL)
- <INPUT NAME="xxxxx" TYPE="TEXT">
- Any other variables you'd like to add into the form.
Adding Variables To Your Form
Due to the mass amount of mail I've received, I decided to include support for adding variables "on the fly". As
long as you specify the variable name (ie: age) in the configuration file, everything should work 100%.
Let's have a "real-life" example. Alot of users would like to know the person's age, so we'll include that in our
"form.html" file:
<INPUT NAME="age" TYPE="text">
Now, in our configuration file, we'll include something to have this variable print in the signatures page:
COMMENTS: !NAME (!AGE years old) said: <PRE>!COMMENTS<PRE>
And, ofcourse, the VARIABLES statement:
VARIABLES: age
To have more than one variable, your configuration file should say:
VARIABLES: age, job, city, state, zipcode
The !xxxx codes that would correspond to these variables are !AGE, !JOB, !CITY,
!STATE, and !ZIPCODE.
Sample Configuration File
Here is a sample configuration file and it's output:
Configuration File:
OUTPUT: /home/web/www/gbook/guestbook.html
GOTOURL: http://web.smart.net/~web/gbook/guestbook.html
COMMENTHEADER: <FONT COLOR="#FF00FF>!NAME surfed in from !HOST using !BROWSER to say:</FONT>
COMMENTFOOTER: E-mail <A HREF="mailto:!EMAIL">!NAME</A> or visit their <A HREF="!HOMEPAGE">web site</A>.
HTMLHEAD: NULL
MAILBACK: NULL
RATING: NULL
ALLOWHTML: NO
COMMENTS: <PRE>!COMMENTS</PRE><BR>
WRAPPING: NULL
BREAKER: <HR>
Output:
Webmaster surfed in from webmaster.smart.net using Mozilla/2.02 (X11; I; Linux 1.2.13 i486) to say:
Welcome to version 2 of SmartNet's guestbook!
Please e-mail me if you have any problems!
E-mail Webmaster or visit their website.
If you have a personal PPP or SLIP account, your guestbook form will be
http://www.smart.net/~yourname/gbook/form2.html
and any signatures from other users will be
http://www.smart.net/~yourname/gbook/guestbook2.html
If you have a business PPP or SLIP account, your guestbook form will be
http://www2.smart.net/~yourname/gbook/form2.html
and any signatures from other users will be
http://www2.smart.net/~yourname/gbook/guestbook2.html
You are free to customize the look of the form.html and guestbook.html files.
Any questions regarding the guestbook, it's features, or any other information should be directed to the
WebMaster (WebMaster@Smart.Net).
Technical Support: support@smart.net
Billing: billing@smart.net
Webmaster: webmaster@smart.net