Ok, you have your homepage up and running, and everything looks pretty neat. All
you need now is one of those nifty counters to tell everybody how many times
someone has looked at your page.
Somewhere in the text for your page, put an HTML tag like this:
Notice the words username, datafile, and style. These are variables and will be different on
everyone's pages, they MUST be there for your counter to work. Look
at the colon between the username and the datafile, and the question mark between the
datafile and the style. These MUST be there for your counter to work also.
Now lets look at the username, datafile, and the style. The
counter program needs these so it knows who you are and where your stuff is at.
- username:
- username should be your YHTI username, the same one you use
to check your mail. This is case sensitive, it must be in lower case letters.
- datafile:
- You will need a file in your /public_html directory that will contain the count
that is displayed on your homepage. Initially this file should contain only the number
zero (0), and the name of this file should be used for the variable datafile.
- Creating a count.txt file.
- Use your favorite text editor to create a file with the number zero (0) in it.
Windows notepad or the DOS edit command are good choices. DO NOT use a word processor to
create this file, most word processors include formatting characters in the files they
create, and these will confuse the counter program. You can name the file anything you
wish, but we suggest using the name 'count.txt'.
After you have created the file, connect to YHTI computer with your ftp
software, and place this file in your /public_html directory. This is done the same way
you upload your actual homepage files.
No matter how you create the data file, you should use the name of the file for the
datafile variable in the HTML tag for your counter.
- style:
- style should be one of the predefined styles listed below. This determines what
your counter will look like. These are case sensitive also and must be spelled exactly
like they are listed. You can click on the names below to see what the digits look like.
- 57chevy - old Chevy style odometer
- a - smaller odometer
- blueodo - odometer with a blue tint
- cb - looks like children's building blocks
- emboss - look at the top of this page
- grnyelo - white numbers, green and yellow background
- invsuns - inverse sunset
- odb - black odometer
- odw - white odometer
- pchalk - looks like purple chalk
- rainbow - all different colors
- redball - little red balls
- reflect - numbers with a reflection
- sdgs - small green digital looking
- spooky - you know, spooky looking
- steel - tin foil stitched on a white background
- sunset - looks like a sunset
- techgo - green over black
- trumpet - big over white
- turquois - kinda green and blue
- yllwgld - yellow over gold with a shadow
Here is a sample HTML tag to show how this all fits together:
- If your username is jdoe, and
- your datafile is named 'count.txt', and
- you like the emboss style numbers, add a tag like this:
<img src="/usr-cgi/usercount/jdoe:count.txt?emboss">