The Official EHTML Page - Code COUNTER

To Maintain Visitor Counts For Your Page


The <COUNTER> code under EHTML is used to maintain a "visitor count". A visitor count is a counter is incremented by one (1) every time your page is loaded by a client.


Attributes

ADD
Specifies that the <COUNTER> code is to increment a counter by 1 when this page is loaded. This cannot be used simultaneously with the DISPLAY attribute.
DISPLAY
Specfies that the <COUNTER> code is to display the current value of a counter within your page. This cannot be used simultaneously with the ADD attribute.
filename
The name of the file in your "html/ehtml" directory that is to hold your counter, without any extension. A default file extension of ".count" will be added for you.


Setup

Since the <COUNTER> code maintains the count of the number of visitors to a page in a file, it must be able to access that file. This means that the "html/ehtml" directory, where the counters are stored, must be both "readable" and "writable".

To begin the setup for the <COUNTER> code, you must access a UNIX prompt by either logging in to "alpha.vaxxine.com" using a terminal emulator program or by using a "telnet" program running over SLIP/PPP.

After logging in, you must set your "html/ehtml" directory so that it can be fully accessed by the EHTML server. To do so, enter the following commands under UNIX.

cd ~/html/ehtml          ; # Enter your EHTML data directory under UNIX
chmod a+rw .             ; # This lets the EHTML server access counters

After your directories are setup in the way specified above, you must add the code to your document in order to maintain the counter. To create a counter called "eh_counter", you use the format <COUNTER ADD eh_counter> Note that by convention you should not use spaces in your counter name. If you wish, you can then use the <COUNTER DISPLAY eh_counter> code format in your page to show the current value of the counter.


[ EHTML Overview | EHTML Setup | EHTML Codes | EHTML Problems ]
Please Report Problems With This Page To: Vaxxine Web Development, vaxxweb@vaxxine.com


Original EHTML documentation by RK. EHTML originally designed by JP, updates by RK.