May 09, 2008 .
Menu

My Account
Services
 - Internet Accounts
 - Domain Hosting
 - Web Site Utilities
      - Guestbook
      - Mail Form
      - Counter
Help
 - Connecting
 - Email
 - FTP
 - Error Messages
 - Virus Info
 - Spam Assassin
 - Problem Report
FAQs
 - CommunityNet FAQs
 - Connecting FAQs
 - Email FAQs
 - Hosting FAQs
 - Virus FAQs
About Us
 - Mission Statement
 - Policies
 - Board of Directors
 - AGMs
 - Partnerships
Hamilton Links
Bits & Bytes
Web Email
Telnet
Contact Us
Site Map
Home

Partnerships
Trillium Foundation Child Connect
myhamilton.ca
St. Leonard's Society
Hamilton FoodShare
Hamilton Public Library
Web Site Utilities > Guestbook :: 

Guestbook

Having a guestbook allows your visitors to post information or comments directly to your site and have other vistors see them. There are only a few of steps that you must take to put a guestbook on your site.

Note:

You must have some knowledge of creating forms in HTML (and/or Cascading Style Sheets) in order to have a guestbook on your site.

This counter will only work on the CommunityNet server.

  1. Create the Web page containing your form.

    This page can be designed any way you want provided that you use the following attributes in your <FORM> tag:

    <FORM ACTION="your_thankyou_page.html" METHOD="get">

    Also remember to name your form fields which will make the email you receive from this form easier to read. For example:

    <INPUT NAME ="Name" TYPE="text" SIZE="30"> would be appropriate for the field asking for the name of the person.

  2. Create the area where your guestbook entries will appear.

    Either on an entirely different page, or directly below the form you just created, insert the following line at the absolute left side of your code:

    <!-- HWCN GUESTBOOK INSERT AFTER THIS LINE -->

    This line must appear exactly as shown and must contain no characters or spaces before it. If it is not to the absolute left of your coding, the guestbook will not work.
Note:

<!-- HWCN GUESTBOOK INSERT AFTER THIS LINE --> will place the newest entries first

<!-- HWCN GUESTBOOK INSERT BEFORE THIS LINE --> will place the newest entries last

  1. Create your Thank You page.

    Your Thank You page is the page that does all the work. You can name the page anything you want, but remember that you type the identical name in your ACTION attribute of your <FORM> tag (1st page).

    Place the following SSI codes on your Thank You page replacing xxxxxxxx.html with the name of the page that holds the line <!-- HWCN GUESTBOOK INSERT AFTER THIS LINE -->:

    <!--#set var="GUESTBOOK" value="xxxxxxxx.html" -->
    <!--#include virtual="/cgi-bin/hwcnguestbook" -->

  2. Use the CHMOD option in your FTP program.

    In order to execute the SSI, we need to set the file's 'owner execution' permission flag, so that the server will know to look for these commands hidden in the HTML comments.

    In WS-FTP_LE, right click on the name of your web page in the Remote (HWCN side) directory display, and a menu will pop up with chmod (UNIX) listed. Click on that, and you will see a dialog box with permissions checkboxes. Check the box for Execute box under the heading Owner OR change the Numeric value to 744. Click on OK.

You now have a basic guestbook for your site! When a user submits an entry using the form they will get a page that says "Thank you for your submission" and then list the fields that they entered. Their entry will appear in the area where you placed
<!-- HWCN GUESTBOOK INSERT AFTER THIS LINE -->

Additional Features

You can 'fine tune' your guestbook by adding additional SSI command(s) ABOVE the initial SSI commands above.

 
The SSI command:

<!--#set var="REQUIRED" value="fieldname1,fieldname2,..." -->

What it does:
By entering the field names of your form in the value attribute, they now become required. The form will not submit unless the user puts something in those fields.
 
The SSI command:
<!--#set var="SHOWDATE" value="YES" -->
What it does:
Writes the date and time into your guestbook when it adds an entry.
 
The SSI command:
<!--#set var="BLOCK" value="LINKS" -->
What it does:
Blocks submission of guestbook entries which contain web page links (URL's).
(Useful for blocking spam ads from being posted to your guestbook)
 
The SSI command:
<!--#set var="CENSOR" value="NO" -->
What it does:
Disables the default filter that censors a few common profanities.
 
The SSI command:
<!--#set var="MAIL" value="YES" -->
What it does:
Sends copy of the submitted form emailed to the web page owner each time someone submits a guestbook entry.
 
The SSI command:

<!--#set var="MAILTO" value="emailaddress" -->

What it does:
When emailing a copy of the entry, by default, the script emails the account where the guestbook resides. The above SSI will email the entry to the email address in the value attribute.
 
The SSI command:
<!--#set var="SUBJECT" value="Your Subject Here" -->
What it does:
By default, the script enters the Subject of the email you receive as "Form Data". The above SSI will use the Subject specified in the value attribute.
 
The SSI command:
<INPUT TYPE="checkbox" name="PRIVATE" value="YES">
What it does:
When your visitor clicks this checkbox, the form will be mailed and not added to the guestbook.
 
The SSI command:
<!--#set var="THANKS" value="Your Text Here" -->
What it does:
By default, the script produces the message "Thank you for your submission" on the Thank You page. The above SSI allows you to customize your own in the value attribute.
 
The SSI command:
<!--#set var="FORMAT" value="NONAMES" -->
What it does:
The above SSI will eliminate the Field Names in the guestbook entry
 
The SSI command:
<!--#set var="FORMAT" value="NOECHO" -->
What it does:
By default, the script 'echos' the information, entered in the form, on the Thank You page. The above SSI will eliminate that.