PowerWeb Counters
 

No CGI Required! - Works with ALL Web Browsers!

PowerWeb Server++ has Automatic Fast Page Access Counters with customisable text or graphic display output.

PowerWeb counters work regardless of whether the user has graphics switched on or not (unlike most other counter implementations) and regardless of which Internet protocol is used to access the file, and are very fast with almost zero performance impact (achieved through usage of an API hook which eliminates the CGI overhead of common add-on solutions).

The Counter macro outputs the current page access count, either in text format, or graphical. If the macro is referencing the current page, then counting is auto-enabled for that page (provided no "service" attribute is specified). If the macro references another specific page, which does not have access counting enabled, then the macro outputs nothing. To test whether a page has access counting enabled, you can use the #if Web Macro.

To enable or disable tracking of specific documents or files which do not contain HTML, use the Counter Tree. In this way you can keep access counts of download files or images even though they aren't HTML files. In that case, you could use the "file" or "virtual" attribute of this "Counter" macro to access the count of that specific page.

You will prefer the summary view of all of your pages with access counts, for editing purposes and for a quick overview of all of your counts.

Access Counters are stored in a separate file that is flushed at least every 15 seconds, so your access counts are preserved across operating system crashes. You can change the name of the database file, which is stored in the setting "CounterFile".

Automatic Anti-Counter-Terrorism

PowerWeb automatically protects against "Counter-Terrorism" which affects other implementations. With PowerWeb, a user cannot artificially inflate the access counters simply by calling a CGI program. PowerWeb counts only genuine accesses of pages or files - there is no way a user can bypass this protection. WebMasters can be assured of accurate counters.


You can output any text, not just page counters!

Custom Digit Sequence0123456789
Custom Time Format12:34:56P


Styles of Counters Packaged with PowerWeb - Add Your Own!

These images have been borrowed from publicly accessible sites on the Internet, and were not created by CompuSource. Their copyright (where appropriate) rests with their original owners.

You can fetch more images by visiting the site http://www.datasync.com/waidsoft/wsnumbers.html amongst others.

Put your own digit GIFs into a directory named "icons/digits" underneath your server root directory. In this way, your own new GIFs will not be deleted or ignored when you upgrade to a new version of PowerWeb. PowerWeb installs an alias "/art/" which refers to your own "/icons/" sub-directory, instead of the distribution's "/icons/" directory, which aids you in referring to your own artwork.

To refer to your own GIFs, add the attribute-value pair image=/art/digits to your #Counter Web Macro. For example, use:

<!--#Counter style=gif digits=my.gif image=/art/digits -->

StyleImageCopy and Paste this HTML Into Your Document
Text<!--#counter -->
Default<!--#counter style=gif -->
tiny1<!--#counter style=gif digits=tiny1.gif width=3 charset=time -->
digital2<!--#counter style=gif digits=digital2.gif width=3 charset=time -->
digital1<!--#counter style=gif digits=digital1.gif width=3 charset=time -->
meter1<!--#counter style=gif digits=meter1.gif width=3 -->
meter3<!--#counter style=gif digits=meter3.gif width=3 -->
meter2<!--#counter style=gif digits=meter2.gif width=3 -->
toyblock<!--#counter style=gif digits=toyblock.gif width=3 -->
casino<!--#counter style=gif digits=casino.gif width=3 -->


Counter
Attributes:
file = (file)
Defines the filename for which to show the access count. If neither this attribute nor "virtual" is defined, the current document is used.

virtual = (uri)
Defines the virtual document (uri) for which to show the access count. If neither this attribute nor "file" is defined, the current document is used.

service = (http/ftp/etc...)
Defines which service to extract an access count for. If this is undefined or '*', a total count across all services is displayed.

attrib = (count/date)
Defines whether to show the access count (the default if this attribute is not specified) or the date on which the counter was last reset. The config WebMacro determines the date format.

style = (text/gif/xbm/jpg)
Defines the output style of the counter. "Text" is simply a number in text format, whereas "gif", "xbm" and "jpg" make use of images contained in the "Image" attribute directory to construct the page counter image. The default is "text". The use of "jpg" files is discouraged because they are slower to process than "gif" or "xbm".

image = (uri)
Defines a local URI location for the images to use when "style" is one of gif, xbm or jpg. The default value is "/icons/digits". If "jpg" is used, the location specified must provide 11 files - named '0' to '9' for the 10 digits, with a file extension equal to that of the "style" attribute.

If "gif" or "xbm" is used, then the 10 digit images must be combined into a single graphic file, where each character has exactly the same width. The filename is specified by the "digits" attribute.

digits = (graphic file within "image" directory)
Defines a single file which contains the digits 0-9 as a single combined image. Counter graphics defined in this way run much faster, because of the reduced disk activity. In this case, the "style" must be either gif or xbm.

width = (number)
Specifies the minimum number of digits to use in the display. If set to 0 (the default), the minimum possible number of digits is used. If it is larger than 0, then the number is zero-padded at the left, if necessary. Numbers longer than the width allowed automatically overflow the specified width.

hspace = (number)
Specifies the hspace attribute to use for the HTML img tag when displaying the counter GIF.

vspace = (number)
Specifies the vspace attribute to use for the HTML img tag when displaying the counter GIF.

charset = (digits/time/ibm)
Specifies the character set defined by the "digits" file.
If the value is "digits", then "0123456789" is expected.
If the value is "time", then "0123456789-:AP" is expected, where "A" means AM, and "P" means PM.
If the value is "ibm", then the full 256 character standard IBM PC character set is assumed.

Examples:
Show a simple page access count with its datestamp:
This page has been accessed <!--#counter --> times since <!--#counter attrib=date -->.

Show a customised graphic counter:
You are visitor number <!--#counter style=gif width=6 image=/icons/digits/custom -->

Combining Date and Time with Counters:
Have a look at this section of the Guided Tour.