Getcomments Control Fields

The hidden control fields are those of the form <INPUT TYPE=hidden NAME=name VALUE=value>. These are used by getcomments to control its behavior much as command-line arguments are used to control the behavior of programs invoked on UNIX command-lines. If the field is not present a default is used. The following pages contain a list of recognized fields and the meaning of their values as well as some examples. Please note that in the following, "commenter" and "comments" should be taken to mean "the person who submits the form" and "the values/fields of the form."
o Controlling the display
These fields control what is sent back to the commenter. One can return a HTML document containing fields that were entered on the form, or return a document specified by an arbitrary URL.
o Controlling the appending to a file
These control parameters apply to what is appended to a log file when a comment is made. What file is appended to and what is appended is controllable and the fields of the form can be referenced.
o Controlling the sending of electronic mail
These fields control what e-mail is sent when a comment is made. The e-mail can be to sent to anyone or no one. The subject line and body can contain arbitrary text and may contain references to the fields of the form. Arbitrary mail headers can also be used.
o Controlling the reporting of configuration errors
You can even have Getcomments e-mail you the error!

True Values

The following values are "true" when used in the control fields:
o a number other than 0
o "true"
o "doit"
o "Led Zepplin rules"

Variable Encoded Format (VEF)

This encoding is used in output format specification and allows run-time values to be referenced. The following replacements are done, in order:
o $$ is replaced with $ and $field is replaced with the form field "field"
o %% is replaced with % and %var is replaced with the environmental variable "var"

Symbol Encoded Format (SEF)

This encoding is used in inline output formatting and allows symbols used in HTML to be quoted. The following replacements are done:
o &gt; is replaced with >
o &lt; with <
o &dquote; with "
o &amp; with &

There is now a perl script, tosef.pl, that will take some HTML text in and output the equivalent text, but in symbol encoded format. Input is to standard input and output is to standard output. Here is the free distribution of tosef.pl.


Environmental Variables

Environmental variables are variables passed from your server to the Getcomments program. Here is a partial list of common environmental variables from NCSA. Select this to see what variables come from your browser and this server. In addition, I have added three more. "%date" refers to the time at which the form is submitted. "%RHOST" refers to "%REMOTE_HOST" is available otherwise "%REMOTE_ADDR". "%count" refers to the count of forms submitted, if available; to be available, the "_comment_dir" field must be filled out with a writable directory and a file "count" must exist in that directory and be readable and writable. If this is not the case, an error will be reported, but processing will continue with "%count" set to 0.


[GC Home] [Jim's Home Page] [Please comment]
Copyright © by James Hoagland
www.hoagland.org | webmaster@hoagland.org
25 June 1995