|
Basics - Uploading and naming your pages
Scripts - Overview of Web Server Programs and Scripts
Imagemaps - How to use Imagemaps
Forms - Handling Forms
Counters - Setting up Counters
Guestbook - Adding A Guestbook
- Intro
-
This page for exit109 members who have developed their own home
pages and wish to place them on our server. Information is given
on how to transfer your files to the web server from your computer
using FTP, and about using some of the enhanced features
of our web server.
This page does not talk about how to write HTML. Some documents
that can teach you HTML are located at our Homepage Info page.
- Basics - Uploading your file
-
You can upload your home pages to our Unix server, hiway1.exit109.com
using FTP. When you start your FTP program, enter hiway1.exit109.com
as the host name, and use your exit109 username and password.
You will then be connected to our server, and placed in your personal
directory.
The next thing to do is to change to a directory on our server called
public_html. This directory is the place where your home pages
must be placed. Once you're there, you can upload the HTML files
created on your computer to their final resting place.
Your main home page must be called "index.html" or "index.htm". (There
is one exception for use with Counters which is discussed later.) Your
other pages can have any name, but they must also
end in ".html" or ".htm". You can also have images stored in your
directory. They should be GIF or JPEG files for best compatability with
web browsers.
IMPORTANT: when you are referencing files
and images in your pages, make sure the CASE is the same as the
file on our system. Unix systems are cAsE SeNsEtIvE, and MYFACE.GIF is
not the same as myface.gif ...
IMPORTANT: when you are uploading the files
using FTP, make sure BINARY mode is set before you transfer any Images.
If it isn't set, your images may not load (but your text will still be
OK.)
- Server Programs Scripts
-
We've made some (actually, two) CGI scripts and one server side include
available for your use. One allows you to have an IMAGEMAP, a clickable
image like the one that's on the exit109 home page, and
another allows you to have the contents of a FORM emailed to yourself.
The server side include allows you to have a COUNTER of web page hits
in your pages.
- Imagemaps
-
Imagemaps consist of two items, an image such as a GIF or JPEG, and a
MAP file. The images you probably already know, but the MAP files need
to be created. The format of the MAP files are detailed here
at the NCSA but
for the most part you don't need to know the details. (In fact, that link
also talks about the compilation and installation of the imagemap program, but
don't worry, we've already taken care of that part.) All you need is a program
that can generate NCSA HTTPD format MAP files. One list of programs
can be found on
Yahoo!.
Once you've created your image and map files, you have to make a reference to them
in your HTML file. For this, let's look at this example from one of our users,
J. Geoff Malta:
<a href="/cgi-bin/imagemap/~jgeoff/mrj/bozos.imp">
<img border=0 src="bozos.gif" align=center alt="BOZOs map" ismap>
</a>
The first line starts the Anchor (the <A> field) by pointing to the
imagemap script and telling it where the map file is located. The
/cgi-bin/imagemap part refers to the imagemap program that handles the
coordinates of the mouse click and the rest of it, /~jgeoff/mrj/bozos.imp
refers to the MAP file. In this case, the map file is called bozos.imp
and is located in the mrj subdirectory in jgeoff's public_html directory. (Yes
you can have subdirectories in your public_html directory to better organize your
web pages.)
The second line within the Anchor is a common image reference, with the addition of
the ISMAP command. The ISMAP command tells the web browser (Netscape or Mosaic) to
pass back the X and Y coordinates of the click to the web server. The imagemap program
then looks at the X and Y coordinates and uses the information in the MAP file
to figure out what to do next.
- Forms
-
We've set up two action scripts on our server that allows you to take the
results of a form and have them emailed back to yourself. For a
tutorial on FORMS with some useful examples, refer again to
NCSA's
Web Site.
USERFORM
To use this script, set the form method to POST and the
action to /cgi-bin/userform.
Once your form is done, you need to add THREE hidden input fields to
make them work. Lets look at these examples:
<input type=hidden name="URL" value="/~joeuser/thanks.html">
<input type=hidden name="MAILTO" value="joeuser">
<input type=hidden name="SUBJECT" value="My form results">
The URL input field points to the page that will be displayed when the form
is submitted. It's good to have it point to a page thanking them for using
your form, or for telling them what to expect now that they've filled our your
form. In this example, it is returing the thanks.html file in joeuser's
public_html directory.
The MAILTO input field tells the script where to send the form results. In
this case it is set to joeuser. However it can just as easily be set to
anybody on the Internet. For example, setting it to jason@somewhere.net
will send the results to jason, at somewhere.net. PLEASE don't
create a form that says "Click here to submit a death threat to my ex-boyfriend..."
Form results are sent to the MAILTO address Sorted by the order of the fields
in the original form (html) file. Each line in the message body contains a
single field followed by its value, separated by a comma.
The SUBJECT input field tells the script what to place as the subject
of the email message sent to the MAILTO address above. If you
leave this blank, the subject is set to "Web Form Results". This
field is especially useful if you have multiple forms on your
web site.
FORMMAIL
To use this script, set the form method to POST and the
action to /cgi-bin/formmail. If you would like to use FormMail for a commercial domain, please e-mail us for access.
There is only one field that you must have in your form. This specifies the address that the form will be mailed to.
The format is as follows:
<input type=hidden name="recipient" value="joeuser@exit109.com">
There are many optional parameters that can be set as well. An example follows each:
- subject - Allows you to specify the subject that will appear in the e-mail sent through the form.
<input type=hidden name="subject" value="Your Subject">
- email - Allows the user to specify their return address. This will be put in the From: line of the message.
<input type=text name="email">
- realname - Allows the user to input their real name. This is useful for identification purposes and will also be put in the From: line of your message.
<input type=text name="realname">
- redirect - Specifies a URL to send the user to after they fill out the form.
<input type=hidden name="redirect" value="http://www.exit109.com/path/to/file.html">
- required - Specifies which form fields are required before the user can submit the form. Simply place all field names that you want to be mandatory into this field (comma separated). To use a customized error page, see m
issing_fields_redirect.
<input type=hidden name="required" value="email,phone">
- env_report - Allows you to have environment variables included in the e-mail message you receive. The following are some environment variables that might be useful:
REMOTE_HOST - Sends the hostname making the request.
REMOTE_ADDR - Sends the IP address of the remote host making the request.
HTTP_USER_AGENT - The browser being used by the client making the request.
<input type=hidden name="env_report" value="REMOTE_HOST,HTTP_USER_AGENT">
- sort - Allows you to choose the order in which the variables appear in the e-mail message.
Alphabetical: <input type=hidden name="sort" value="alphabetic">
Set Order: <input type=hidden name="sort" value="order:name,address,etc...">
- print_config - Allows you to specify which configuration variables, such as e-mail, subject, realname, etc., that you wish to appear in the body of the message. Normally, those fields may only appear in the header.
<input type=hidden name="print_config" value="email,subject">
- print_blank_fields - Allows you to request that all form fields are printed in the return HTML and e-mail, regardless of whether or not they were filled in. By default, unused form fields are not mailed.
<input type=hidden name="print_blank_fields" value="1">
- title - Allows you to specify the title and header that will appear on the resulting page if you do not specify a redirect URL.
<input type=hidden name="title" value="Feedback Form Results">
- return_link_url - Allows you to specify a link that will appear on the report page after the form is submitted. This is only used if the redirect field is not set.
<input type=hidden name="return_link_url" value="http://www.exit109.com/path/to/file.html">
- return_link_title - This is the title of the link that is specified with return_link_url.
<input type=hidden name="return_link_title" value="Back To Main Page">
- missing_fields_redirect - Allows you to specify a link that will appear on the report page after the form is submitted. This is only used if the redirect field is not set.
<input type=hidden name="missing_fields_redirect" value="http://www.exit109.com/path/to/file.html">
- background - Allows you to specify a background that will appear if you do not have the redirect field set. This image will appear as the background to the form results page.
<input type=hidden name="background" value="http://www.exit109.com/path/to/image.gif">
- bgcolor - Allows you to specify a background color for the form results page. This field should not be used with redirect.
<input type=hidden name="bgcolor" value="#FFFFFF">
- text_color - This field works in the same way as bgcolor, except that it will change the color of your text.
<input type=hidden name="text_color" value="#000000">
- link_color - Changes the color of links on the resulting page. Works in the same way as text_color. Should not be defined if redirect is.
<input type=hidden name="link_color" value="#FF0000">
- vlink_color - Changes the color of visited links on the resulting page. Works in the same way as link_color. Should not be set if redirect is.
<input type=hidden name="vlink_color" value="#0000FF">
- alink_color - Changes the color of active links on the resulting page. Works in the same way as link_color. Should not be set if redirect is.
<input type=hidden name="alink_color" value="#FFFF00">
- Counters
-
Everybody loves to have counters in their home pages, so we've made available both a graphical and a text only version.
There are both benefits and limitations for each version. If you would like to use the counters from a commercial domain, please e-mail us for access.
NOTE: The graphic counter allows you to set the initial value,
the text counter does not. E-mail us at
webmaster@exit109.com if you need a counter value initialized.
Please specify the name of your datafile and/or the page that you are calling the counter from.
TEXT ONLY
At the simplest level, just enter the following code onto any page...
<!--#exec cgi="/cgi-bin/counter"-->
When you add the counter statement above, it inserts the number right into your
web page.
The counter function actually has many options. You specify the options by adding a -option to the end of the command.
For example, to tell the counter to display ordinal values and to not increment, you would type:
<!--#exec cgi="/cgi-bin/counter-ord-nc"-->
The following is a detailed description of each counter parameter:
- ord - Ordinalize the count. For example, 1st, 2nd, 3rd...
- nc - No increment. This option is useful if you want to include the counter in serveral places on one page, or on a separate page than you are counting.
- nd - No display. Makes the counter invisible. Only useful if you are checking your counter values from a different page.
- doc=documentname - This overrides the counter's idea of what page is calling it. This is not necessary, but if you add it, you will be able to check the value of any counter from any page by referring to its do
cumentname.
IMPORTANT NOTE: Web pages that include text counters must have the ending ".shtml"
or ".sht" which stands for Scripted HTML. A counter statement in a
".html" or ".htm" file is ignored. Note: your home page can be called "index.x-cgi" -
this is the only exception to the ".html" or ".htm" extention requirement. You do not need
to change the extension in order to use graphic counters.
GRAPHIC COUNTERS
At the simplest level, just enter the following code onto any page...
<img src="/cgi-bin/count.cgi?df=pagename.dat" align="absmiddle">
When you add the counter statement above, it inserts the graphic right into your
web page.
Please Note: The counter does not increment twice in a row for the same IP address. This means that if you reload your page, it may appear as if the counter is not incrementing. This is not a bug, just a better way to keep t
rack of how many people are actually visiting your site since the same person is not counted twice in a row (unless someone else has visited the page since).
The graphic counter also has many options, including displaying the time or date instead of a counter.
Counter parameters can be added on to the tag by separating each with an &, for example:
<img src="/cgi-bin/count.cgi?df=pagename.dat&st=1000&ft=5" align="absmiddle">
The following is a detailed description of each counter parameter:
- df=documentname.dat - Specifies the name of the file to store the count in.
- st=X - This parameter is used to set the initial value of the counter. This will only work the first time you set the count.
- dd=X - Specifies which digit style to use. Replace X with the name of the digit style you wish to use. Click here to view the digits available for use.
- display=X - You can set X to "clock" or "date" to display the time or date. If you just want a counter, you can leave this parameter off.
- timezone=X - This option is only useful with "display=clock" or "display=date". Use this parameter if you want to display the time or date of another timezone. The timezone must be specified w
ith a negative or positive four digit offset from GMT, for example: "timezone=GMT-0500" You may have to manually account for daylight savings times. Check the values to make sure everything is correct.
- tformat=X - This parameter is only used with "display=clock" to specify 12 or 24 hour format.
- dformat=X - This parameter is only used with "display=date". The valid value for the string parameter X is any combination of Month-Day-Year, for example, "dformat=MMDDYY".
- ft=X - You can wrap the counter in an ornamental frame X pixels thick. Use 0 form no frame. Values over 5 make a nice 3-D effect.
- frgb=RRGGBB - Specifies the color of the frame in RGB (red/green/blue) format, where RRGGBB is a hexidecimal value (do not use a # before the hex string). You may also specify the colors using standard inte
gers with a format of "frgb=R;G;B". If you use ft without a frgb parameter, the default color is used. If you specify a frgc without the ft parameter, the frame thickness defaults to 5.
- md=X - Specifies the maximum number of digits to display. Values from 5 through 10 are permitted. Padding is done automatically unless you use the next parameter.
- pad=X - Turns padding on or off in conjunction with the md setting. Use "pad=Y" for padding or "pad=no" for no padding.
- comma=X - You can choose whether to display a comma after every third digit. Set "comma=Y" to display the comma, or "comma=N" to not display it. If you do display commas, left padding with zer
os is automatically turned off.
- sh=X - Show the counter. Set this to "sh=N" to make the counter invisible. Only useful if you are checking your counter values from a different page.
- incr=X - No increment. This option is useful if you want to include the counter in serveral places on one page, or on a separate page than you are counting. Set this to "incr=N" if you don't want the co
unter to increment.
- lit=X - Allows you to display a pre-determined number. Set X to whatever number you would like to display.
- Guestbook
We do not have our own Guestbook script set up, but you can use a free service like GuestWorld to easily add one to your page.
Wrapping Up
When you get your page online, why don't you add it to our
User Home Page directory. We love to
see ways people use the HTML language and find it a great way to learn more
about each other.
If you have any comments or suggestions about this page, please send
email to webmaster@exit109.com.
|