![]() |
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|
|
|
CFX_COUNT page hit counterHow to make use of the multi-featured CFX_COUNT page hit counter.Copyright Albedo Systems Ltd 1997-2004 CONTENTS
SUMMARYCFX_COUNT is an extension tag to Allaire's Cold Fusion active web page language, written in C++, that allows the use of easily tailored graphic counters within Cold Fusion web pages. As such it makes use of Tom Boutell's excellent GD1.2 GIF graphics library - for more information on this see http://www.boutell.com/. Please try to credit, or link to the boutell.com site somewhere, because they really deserve it. It is recommended that the tag designation be CFX_COUNT. NEW FEATURESNote: If you have previously downloaded version 1.0 of this program, released in August 1997, you may still wish to install this version. Besides a number of new features, its performance has been enhanced to put less strain on your server.
CONDITIONSCfx_count is freeware. As such, it may be freely distributed in the form of this zip file, provided this readme file is retained. All technical queries, bug reports etc. with regard to its use should be addressed to admin@albedo.co.uk. We'd, of course, appreciate it if you credited us/linked to us, but you know you don't have to. We'll be doing more stuff soon, so please do drop by our website at http://www.albedo.co.uk/ INSTALLATIONThe zip file that contains this file should contain:
USAGEHere's an example, with all the attributes on separate lines to make it clear... (Bear in mind that not all of these parameters are mandatory). <CFX_COUNT COUNT="f:\webs\mysite/data/mycount.txt" FONT="f:\webs\mysite/fonts/CNT_tn24/" GIF="f:\webs\mysite/htdocs/art/mygif.gif" LOG="f:\webs\mysite/data/mylog.txt" IP_ADDRESS=#CGI.REMOTE_ADDR# DIGITS=6 BGCOLOR=##0000FF FGCOLOR=##FFFF00 TRANSPARENT="NO" ZEROS="YES" > ...which can then be followed some time later with, for example... <CFOUTPUT> <IMG SRC="../Art/mygif.gif" WIDTH=#count_width# HEIGHT=#count_height# BORDER=0 ALT="#count_total# accesses since 1 Jan 1901"> </CFOUTPUT> ...depending on where your site root directory is. Taking the last first, note that #count_width# and #count_height# are variables returned by the tag that hold the true width/height of the output gif. If you are using these names they will be overwritten. Similarly, #count_total# is the count itself. But to the parameters... COUNT (mandatory) path specification for the text file containing your access count. This is just a simple ascii file containing the number. FONT (mandatory) points to the directory containing your chosen numeric font. Don't forget the trailing slash. GIF (mandatory) is the path specification for the output GIF. LOG (optional, defaults to nothing). If you choose to keep a forbid log, this is the path specification for it. The log keeps a list of IP addresses that have accessed the page with the current hour - the program will not increment the counter for the same IP address twice within that hour. IP_ADDRESS (optional, defaults to nothing). The current user IP address, for use in the log. DIGITS (optional, defaults to 6) Simply the maximum number of digits in the count. BGCOLOR (optional, defaults to 000000 (black)). Background colour for the text, expressed as ##rrggbb hex value. Note the Cold Fusion double hash. FGCOLOR (optional, defaults to FFFFFF (white)). Foreground colour for the text, expressed as ##rrggbb hex value. Note the Cold Fusion double hash. TRANSPARENT (optional, defaults to "NO"). If set to "YES" makes the gif's background colour transparent. You may still want to set the BGCOLOR to something similar to your page background, as this will give your text better anti-aliasing. ZEROS (optional, defaults to "YES"). If you wish to suppress leading zeros, just put "NO" here. A WORD ON FONTSBear the following in mind.
OTHER ALBEDO TAGSIf you liked this, check out our CFX_FONT tag, downloadable from http://www.albedo.co.uk/goodies/cfusion.cfm. It allows you to create masses of anti-aliased text graphics and has oodles of options. Use and enjoy. Fin Fahey Fiona Daly January 31 2004 LEGAL DISCLAIMERNeither Albedo Systems Ltd. nor anyone else who has been involved in the creation, production or delivery of this product shall be liable for any direct, indirect, consequential or incidental damages (including damages for loss of business profits, business interruption, loss of business information, and the like) arising out of the use or inability to use this product even if Albedo Systems Ltd. has been advised of the possibility of such damages. |