WEBMASTERS: Counter Documentation

This counter will only work on sites housed at Shamash.

[Count Release 2.4]

Steps to use a counter at Shamash

  1. You will need to decide on a filename for your counter datafile. The counter stores the "hits" in this file. The name should end in ".dat" and not duplicate anyone else's data file name. Therefore your datafile.dat must have part your ftp login name in it.

    For example if you own the list bajor-bytes, a good counter name for your index.html web page would be bajor-bytesindex.dat Your links.html page data file could then be called bajor-byteslinks.dat If eveyone does this, we will prevent duplicating counter file names on Shamash. Please do not create a datafile which is a simple word, this will cause a problem because if someone else uses the same word, then the counter will reflect hits to BOTH of your pages.

  2. Decide on a set of options for your counter and create a command line for it. The most simple command line is:
    <img src="http://shamash.org/cgi-bin/Count.cgi?df=example.dat">
    where you would change the example.dat file to your datafile.

==============================================================================
*FYI Note from a shamash member who recently added a counter to his website.

"When making changes to our home page (index.html) using Netscape
Composer (4.05),  I found that it had wiped out part of the counter script. I
had to go into the source file with a text editor and re-code the counter. I
suggest you mention this problem (may occur with other web page editors
too) in your documentation as a warning to others. I would suggest that
page developers save a copy of the script they create in a seperate
text file."
==============================================================================

[NEW] Please note this document reflects a change in our previous policy (prior to Dec 1996). You can now add your own counter files directly. The first time you load a page with a counter, a file will be created to keep track of all future hits to your web p age. If you want your counter to begin at a number other than "1", use st= option when you originally create your counter URL.

Counter Options

Options for the counter can be divided into several catagories:

  1. Datafile options (datafile)
  2. Digit options (digit directory, max digits, padding with 0's, show digits)
  3. Digit colors (transparent, negate the color)
  4. Frame options (frame thickness, frame color, rotation)
  5. Counting options (increment count, display literal)
  6. Clock and Date options (display, timezone, date format)
[This table of options and parameters was adapted and "borrowed" from both the author's, Muhammad A Muquit's, page and Kevin's page]

Counter Options Table

Name Description Default
Datafile Options
Datafile to store count Specifies the name of the file for storing the count in. The file must be allocated to you as was mentioned in the section above. Unlike all other WWWcounter parameters, the file name provided is case-sensitive.

You can use df=random to diaplay a random number.

df=random
if no datafile is specified
Start Count This parameter is used to set the initial value of the counter to some number X. Note that this parameter has no effect if the datafile already exists. st=157
Count starts at 157
Digit Options
Digit Directory Denotes directory of a specific styles of digits. Five styles of digits are suppiled. They are kept at the directories A,B,C D,E respectively. Styles A,D,E can be used with the clock and date, but style B,C cannot.
Style A styleA
Style B styleB
Style C styleC
Style D styleD
Style E styleE
dd=A
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 number of digits specified. md=6
Without padding
Padding with 0's Turn padding on/off in conjunction with md= setting. Valid values for the parameter are Y or N. pad=N
Without specification of a md=value

pad=Y
With specification of a md=value

Show digits Used to turn display of digits on or off. When sh=T, counter will be displayed and incremented, this is the default behavior.

If sh=F no digits will show, but the counter will still increment; instead of digits a transparent 1x1 GIF is displayed.

sh=Y
Digit Colors
Transparency On/Off You can specify if your counter image will have a transparent color. To make a one of the colors of the digits transparent, you must specify trgb= and a rgb or hex color code.

In RGB format, each color component, R, G, and B is specified as a value between 0 and 255. The color can be also specified as hex string. Look at the color name mapping database for some hints.

No Transparency
Negate the color Makes it possible to negate the color of the counter digits. Note that the Frame is exempted from negating. If negate=T then the digit colors are negated. negate=F
Do not negate
Frame Options
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=6
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.

The color can be also specified as hex string. Do not use a # before the hex string as Netscape. For example, if you want to specify white in hex, you do frgb=ffffff. Look at the color name mapping database for some hints.

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.

frgb=100;139;216 or
frgb=648bd8
Rotate X degrees Makes it possible to rotate the counter image X degree. The possible values of X is 90, 180, 270 and 360.

Please note that this is the best way to rotate the counter, although older counter versions used a different method that is still supported.

degrees=360
No rotation
Counting Options
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. If incr=F the count is displayed without incrementing it.

incr=T
Increment the counter on each invocation
Display literal Makes it possible to display a given, predetermined value. The command is lit=X, where X is the predetermined value. None
Date and Clock Options
Specifies what to display. A valid string can be specified with display= parameter to display counter, clock or date. The valid value for the string parameter is clock or date. Note: clock and date will only work with digit style A, D and E.

Since the default is the counter, do not use this parameter if you want a counter.

display=counter
Specifies timezone. The parameter timezone= is only significant with display=clock or display=date. Use this parameter if you want to display time or date of another timezone. For example, for eastern time with daylight saving time, timezone=EST-5EDT, central time with daylight saving time, timezone=CST-6CDT, mountain time with daylight saving time, timezone=MST-7MDT, pacific time with daylight saving time, timezone=PST-8PDT. for GMT, timezone=GMT. An offset from GMT can be used as well, timezone=GMT+6. Note, the GMT offset method may not work properly with SYSV type OS. Look at the manpage for ctime, localtime for your machine.

If the clock displays your local time wrong, you must specify your timezone with that parameter in order to display the correct time.

None.
Specifies date format. This parameter is only significant with display=date. The valid value for the string parameter X is any combination of MMDDYY (Month-Day-Year). For example, dformat=ddmmyy, dformat=YYMMDD. dformat=MMDDYY

o This counter program used by Shamash was written by: Muhammad A Muquit
o The original documentation of the counter for system administrators is located here

For questions not answered here, send e-mail to help@shamash.org

o This page has been accessed [counter] times since January 1, 1997.
o This version of the counter documentation was adapted for Shamash by: David Rosenthal. Feel free to email him with questions, comments and suggestions.

Last modified: Thursday, 02-Oct-2003 13:07:54 EDT

SHAMASH
Pay Shamash with PayPal!
[ Search | Help ]          Bookmark and Share

Copyright © 1990-2010 Shamash: The Jewish Network. All rights reserved.
http://shamash.org