Using ChocoboNet's Web Page Counter


ChocoboNet provides a page counter that can be used by both users of ChocoboNet and by remote web sites.


Web pages on ChocoboNet

There are two counter versions available to ChocoboNet's users: a text-only one, and one that will display graphics on a graphical browser and text on a text-based browser. To use the counter, include one of these tags in your HTML file at the point where you want the counter to appear:

<!--#exec cgi="/cgi-bin/tcounter" -->
for the text-only counter, or

<!--#exec cgi="/cgi-bin/mcounter" -->
for the graphics-or-text counter.

Note: Unlike other HTML tags, this is case sensitive; the entire tag must be in lower case.


Using the same counter on multiple pages:

Normally, the counter uses the filename of your page to form a "counter name", i.e. a unique string that corresponds to the access count for the page. However, if you want to use the same counter on multiple pages, you can give an explicit counter name to the counter scripts. For example, if you wanted to display your homepage's counter on another of your pages, and your homepage's URL was http://www.chocobo.org/~username/home.html, you would use one of these lines (the first for text-only, the second for graphics-and-text):

<!--#exec cgi="/cgi-bin/tcounter?/~username/home.html" -->
<!--#exec cgi="/cgi-bin/mcounter?/~username/home.html" -->

Note that the "http://www.chocobo.org" is stripped from the URL, since the counter and your page are both on ChocoboNet. Also note that if you use a URL of http://www.chocobo.org/~username/ to access your page (because you named your page index.html or index.htm), the default counter name for the page will include the filename (e.g., /~username/index.html).

If you're mirroring a counter, then usually you will want to have only one page that actually increments the counter, and have the rest just report the current value without changing it. The next section explains how to do that.


Keeping the counter from incrementing (a "static" counter):

If you want to prevent the counter from incrementing when a page is accessed, then add "-static" to the name of the CGI script, but before any counter name. For example:

<!--#exec cgi="/cgi-bin/mcounter-static?/~username/home.html" -->
would report (graphically, if possible) the current value of the /~username/home.html counter, but would not change its value.


Changing the graphical counter font:

If you want to use a different font than the default digital font, you can tell the counter script so by adding "?font=N" to the end of the counter request. If you also want to specify a counter name, then use an ampersand (&) before the "font=N" string instead of a question mark (?). Examples:

<!--#exec cgi="/cgi-bin/mcounter?&font=1" -->
<!--#exec cgi="/cgi-bin/mcounter?/user/home.html&font=3" -->

A list of the currently available fonts can be seen here.


Creating your own font:

Designing a font of your own to use with the counter is a fairly simple process. Note, however, that by submitting a font for use with the counter, you are automatically giving permission for the images which comprise the font to be freely distributed. Also note that we only accept original fonts. So don't try to submit a font stolen from www.digits.com or any other place.

Use your favorite graphics editor to create an image for each digit, zero through nine, as well as a comma (if you want to use a comma in the font). The images must be in GIF format, must all be the same height, and must use the same palette of colors (up to 256); if you want to use a transparent color, its color index must also be consistent across the images. Once you finish the images, pack them all into a ZIP file (or LhA or tar, if those are more convenient) and mail that file to counters@chocobo.org. If all goes well and the graphics are successfully converted into a counter font, you'll receive a reply giving a font number to be used in the "font=" line described above, and you can start using it. Otherwise, you'll be told what the problem was with converting the images. Please note that we are currently backlogged with submissions, so if you don't hear from us at all for awhile, in all likelihood we simply haven't gotten to your font yet.


Pages on remote sites

If you are on a remote site but still want to use the counter, you're not entirely out of luck. There is a third version of the counter that works for both local and remote pages, but can only output graphical images (those using text-based browsers will not be able to see the counter). To access it, you use an <img> tag like the following:

<img src="http://www.chocobo.org/cgi-bin/counter?your-URL">

where your-URL is the URL of your page (e.g., http://www.foo.com/~jdoe/index.html). The information above regarding static counters and fonts is still applicable.

To change fonts:

If you want to use a different font than the default digital font, you can tell the counter script so by adding "?font=N" to the end of the counter request. If you also want to specify a counter name, then use an ampersand (&) before the "font=N" string instead of a question mark (?). Example:

<img src="http://www.chocobo.org/cgi-bin/counter?http://www.foo.com/~jdoe/index.html&font=28">

Make sure the whole tag goes on one line, though it may appear broken up in this example. Again, note also that unlike other HTML tags, this is case sensitive; the entire tag must be in lower case.


Last updated 9 July 1998
webstaff@chocobo.org

Based on a page by Andy Church.