WWW Page Access Counter at Rootsweb

Plainspeak Abstract

How to put stuff into your Web-pages so you can use Rootsweb's counter.

Introduction

A service is available for the Rootsweb community access counts for WWW pages. Complete details of the program are provided by the author, Muhammad A Muquit, in www.muquit.com/muquit/software/Count/Count.html. The program, called Count.cgi, provides very nice on-the-fly graphics to show the counts, such as , or the display can be hidden.

Creating, Modifying and Querying Counters

Scripts are provided so that you can create, modify and query your own counter.

Create a counter Allows you to create a counter. It will tell you the code to insert into your page to activate the counter.
Currently OfflineChange a counter  Allows you to reset the count for an existing counter.
Query a counter Allows you to check the various counter information.

Precautions

Access and specifications are unfortunately subject to change without prior notification. The count value itself can only be considered approximate, as it is not possible to account for cached access of pages, bad access to the counter itself, and other tough luck. Too much use of counters in your documents slows down access. This document has dozens, which is why it loads so slowly.

Simplest Form

Put a line like this in your HTML document:

<img src="/img/spacer.gif">

Use the file name given to you in the "Authorization" step above instead of sample_count.

How to Get Really Fancy Digits

This counter makes use of the average Web browser's ability to display embedded graphic images, and neat gizmos on many servers known as the cgi-bin programs.

So you must use the HTML markup for embedded graphics,

<IMG src="/img/spacer.gif"> image_comes_from>

In which case do this to use the Rootsweb counter:

<IMG src="/img/spacer.gif"> parms">

in which one of the parms must be

df=sample_count

or the name you were authorized with instead of sample_count. Each of the parameters specified must be separated with a verticle bar, the | symbol, or by an amperstand, the & symbol. The params can be any or all of the following:

Parameter Name Description Examples Default
ft=X Frame Thickness You can wrap the counter in an ornamental frame of X pixels thick. Use 0 for no frame. Values over 5 make a nice 3-D effect.
ft=7
ft=4
No frame
frgb=R;G;B Frame Color Specifies the color of the frame in RGB (red/green/blue) format. Each color component, R, G, and B is specified as a value between 0 and 255. If you use ft=# without a frgb= param, the default color is used.

If you specify a frgb= without a ft=#, then the frame thickness defaults to 5. All the examples show ft=5.

Knowing the RGB sequence for a given color is not always for most of us regular folks, but Count.cgi does provide a way to find the values for a given color. Refer to the rgb.txt paragraph in the Additional Tricks section below.


frgb=69;139;50

frgb=255;0;0

Default
frgb=100;139;216
Cyan
tr=B Transparency On/Off You can specify if your counter image will have a transparent color with the Boolean B. So tr=Y means there will be a transparent color; and tr=N means there will not. It does not matter if the GIF files used for the digits are "transparent"; as is shown next, you must specify explicitly which color to make transparent.

If you specify a trgb=, then you do not need to specify tr=Y.

Valid values for B are Y, N, T, F, 1, or 0.


tr=N

tr=Y
tr=N
No transparency
trgb=R;G;B Transparent Color Here you specify the color to render as transparent, given in red/green/blue format.

When you provide a trgb=, you can skip the tr=Y; it is automatically turned on for you.


trgb=0;255;0
(green)

trgb=0;0;0
(black)
frgb=0;0;0
Black
md=X Max Digits Defines maximum number of digits to display. Any value between 5 and 10 inclusive are permitted. Padding with leading zeros is automatically done for you; longer counts are truncated to the given X.
md=5

md=5
Truncation of 9 digit value
md=10
Without padding
pad=B No Padding Turn padding on/off in conjunction with md= setting.

Valid values for the Boolean parameter B are Y, N, T, F, 1, or 0.

(There are some bugs in the padding feature, as shown in the examples. These will be fixed shortly.)


pad=Y
With default md=10

md=5&pad=N
No padding value shorter than max 5.

md=5&pad=N
Truncation of 9 digit value without padding.
pad=N
Without specification of a md= value


pad=Y
With specification of a md= value

dd=A Digits Dir Denotes what style digits will be used. The examples show all those currently installed.
dd=A

dd=B

dd=C

dd=D

dd=E
dd=A
sh=B Show digits Used to turn display of digits on or off according to the Boolean B. When sh=T, digits are shown as in most of the examples given here. If sh=F no digits will show, but the counter will still increment; instead of digits a transparent 1x1 GIF is displayed.

Valid values for the Boolean parameter B are Y, N, T, F, 1, or 0.


An invisible counter is above!
sh=Y
Display digits
df=file Data File for counting Specifies the name of the file for storing the count in. The file must be allocated to you as was mentioned in the "Authorizations" section above. You can use df=sample_count for testing and so on, but of course the value in it is not reliable.

One special use of the parameter is df=RANDOM. This returns a random number using the fractional portion of the host's time of day clock as a seed for the generator.

Unlike all other WWWcounter parameters, the file name provided is case-sensitive, except for the value random. Or Random, or rANDOM, etc.


A random number
df=RANDOM
Roll of the dice!
incr=B Increment count Makes it possible to display the current count without incrementing the count. This can be used to examine the count for reporting or other purposes without adding to the count.

Valid values for the Boolean parameter B are Y, N, T, F, 1, or 0.


incr=F&df=sample_count

incr=F&df=sample_count
The count does not go up, unless due to someone else accessing the counter at the same time as you are.
incr=T
Increment count on each invocation.
lit=X Display literal Makes it possible to display a given, predetermined value.

Valid values for the string X are digit.


lit=123
Almost all the examples on this page are made with lit=X
None

Additional Tricks: Alignment

Alignment of the GIF image into your text is pretty random looking unless you control placement with the ALIGN= attribute of the <IMG> markup. You can check www8.netscape.com/assist/net_sites/html_extensions.html for details on how image alignment might be done in HTML-3, being as it looks like what Netscape did is going to become the standard.

Or you could skip looking at it and just try:

<IMG src="/img/spacer.gif"> stuff shown above" ALIGN=ABSMIDDLE>

It aligns the image with the middle of the current line of text, which is what you'll probably want to do.

This page is based on a page originally developed by kevin@njit.edu /KJW


gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.