
How to Use Your Counter
This file contains information which
should help you use your counter. If you have more questions, see the FAQ Page. If you are having problems
with your counter, please see our Troubleshooting Page.
[ Basic | Option Usage | Available Options | Image Size | Character Sets | Font | Colors ]
To install a counter into your page you first
must create a counter with the form on the creation page. Afterwards, you can
insert something like the following into your HTML code:
<IMG SRC="http://counter.digits.com/wc/name">
(基本的計數器設定敘述)
This is the basic way to use your counter. The name
string at the end of the above HTML code should be replaced with the name of
the counter that you have created.
NOTE: If you are using our free counter servers, we ask you to credit
the WebCounter system somewhere on your home-page by using its name or logo.
Please also put a link to the following URL.
http://www.digits.com/
For instance, you might use the
following:
(您可以參考以下的句子,來放您的計數器)
The page's WebCounter count
says that you are visitor number
Or, feel free to use something a bit more inventive like the following:
Mr. Web Counter says you're
only visitor
... Keep trying!
The WebCounter transporter logs
indicate that you are life-form number
to beam aboard
this page.
(選擇性的參數)
There are many other options which
control the look of the resulting counter number. To use these additional
options, you insert them into your IMG SRC entry by separating them from your
counter-name and from each other with the / or ``forward slash''
character. Some options are accompanied by values -- these values are also
separated with the / character. For instance, the -d option
requires a number argument -- in our example this argument is 4. So your HTML
code will go from:
<IMG SRC="http://counter.digits.com/wc/name">
To:
<IMG SRC="http://counter.digits.com/wc/-d/4/name">
(設計數器為四位數)
NOTE: The name string at the end of the above
HTML code should be replaced with the name of the counter that you have created.
Notice that the name string is separated from the -d option
with a / and that the -d is separated from its argument 4
by another /.
Now that we are using the -d/4 option and argument, we might wish to
add the -r and -z options as well. Neither of these two
options require arguments so your HTML code will go from:
<IMG SRC="http://counter.digits.com/wc/-d/4/name">
To:
<IMG SRC="http://counter.digits.com/wc/-d/4/-r/-z/name">
NOTE: The name string at the end of the above
HTML code should be replaced with the name of the counter that you have created.
Notice that the / character separates each of the options as well as
any of their required arguments. Also, see that the 4 argument is still
right next to the -d option (still separated by a /). This
should be true for all options which have an argument.
(有效用的參數)
The following is a list of the
available options that can be used with your counter.
- -d/number
(計數器位數)
- Returns an image with a certainly specific number of digits. The number
string here should be replaced by a decimal number such as 4 or 6. See the
Image Size section below
for more details.
You may also want to use the -r (right-face) and
-z (zero-fill)
options below depending on how you want your counter to display.
- -c/number (計數器字型樣式)
- Selects a different character set for your digits. The number
string here should be replaced by a decimal number from 0 to 27
(currently). See the Character
Set Page for more details.
- -R (隨機設定計數器字型樣式)
- Selects a random character set for your digits. See the Character Set Page for more
details.
- -f/color (前景顏色)
- Specifies the foreground color of your image. The color string here
should be replaced with a 6 position hexadecimal value. See the Colors Page below for more
details.
- -b/color (背景顏色)
- Specifies the background color of your image. The color string here
should be replaced with a 6 position hexadecimal value. See the Colors Page for more details.
- -e/color (空的顏色)
- Specifies the empty space color of your image. The color string
here should be replaced with a 6 position hexadecimal value. See the Colors Page for more details.
- -h (是否不顯示計數器,隱藏起來)
- Hides the digits and only return a blank image. This is useful if you want
to count the number of hits on your page but not show this count to others.
- -n (只傳回計數器內容,並不對計數器做累加一的動作)
- Only return your count -- your count is not incremented. This should only
be used in special circumstances.
- -r (向右靠齊)
- Specifies that the digits returned will be right-face. If your counter
value is 12 and you request 4 digits with the -d/4 option, then
the system will by default return 12__ (12 followed by 2 transparent
spaces). Use this option if you want it to be __12 (2 spaces then the
number.
- -z (位數不足,補0這個數字)
- Fills any empty spaces with zeros. If your counter value is 12 and you
request 4 digits with the -d/4 option, then
the system will by default return 12__ (12 followed by 2 transparent
spaces). Use this option if you want it to be 0012 (2 zeroes then the
number). Note that for any zeros to be seen, you must specify a
larger number of digits than in your counter value.
Please see the above Option Usage section for
more information about the proper usage of these options.
Image Size
(一個位數約15pixels寬,20pixels長)
By specifying the number of digits with the
-d/number option
you know the size of the image that will be returned. With this information, you
can specify WIDTH and HEIGHT information in the IMG entry. These values allow Netscape
Enhanced clients to reserve space for the image while drawing the page so
you don't have to wait for the image to be loaded before seeing all of page's
text. All of your image entries should contain these options.
The HEIGHT of the returned image is always 20 (pixels). The WIDTH is
calculated as 15 times the number of digits specified. So if you are
using the d/4 option, the WIDTH should be set to 4 * 15 or 60 (pixels).
<IMG SRC="http://counter.digits.com/wc/-d/4/name" WIDTH=60
HEIGHT=20>
10 digits will have a WIDTH of 10 * 15 or 150,
etc.. The HEIGHT is always 20.
NOTE: If you wish your counter to be a different size, you can
certainly tune the HEIGHT and WIDTH of the IMG and the browsers should scale the
image appropriately. The image may look better if the WIDTH and HEIGHT values
are scaled evenly. For instance, instead of a 4 digit image having a WIDTH of 60
and a HEIGHT of 20 you can set it to a WIDTH of 120, HEIGHT 40. This should
double the size of your counter. Understand that some character sets will scale
better than others.
Additional Information
[ Basic | Option Usage | Available Options | Image Size | Character Sets | Fonts | Colors ]
Net Digits® Web Counter Copyright
1996,1999,2000 by Computer Networking Services, Inc. All Rights Reserved.
For
comments or questions, please see the Feedback Page.
http://www.digits.com/