<ot> Counters?
Roger Oberholtzer
roger
Tue Jan 18 08:03:18 PST 2005
FSCounter. It works fine. See it on www.johannes-ff.org (a Plone site)
It understands repeat visits and address to ignore.
The help.txt file is:
Original product by Andy McKay, October 8, 2000.
This is a simple product to allow you to add a counter to a web page.
Some
ideas are based on ZCounter, but that uses a Zope object to store the
data.
Using a file is much more efficient.
***** Options *****
* Reset to zero:Resets the value back to zero.
* New Value:Sets the value to the number entered.
* IP Tracking?:Do you want this to track IP's (server-side) so that
people
hitting the page repeatedly do not get counted (reset per day).
* Cookie?:Do you want this to use cookies, so that people hitting
the page
repeatedly do not all get counted. See next option.
* Cookie Name:So this doesn't conflict with other cookies, the
cookie name
can be changed.
* Number of zeros to pad:Make's the number this many digits extra
eg:
00001 for 5.
* Default Value:How to show this number.
o Number text: 123
o Padded text: 00123
o Worded text: one hundred and twenty three
o Worded text - sentence: One hundred and twenty three
o Number image: (image)123
o Padded image: (image)00123
o Nothing (no display): Nothing, no output
* Images Folder:If you want images to show, you have to load some
in. This
is the folder they are located in, and it looks for images of the
type
1.gif, 2.gif and so on in this folder. This is just a simple URL
to the
images. As of version 1.2, FSCounter came with some images loaded
by
default. To use these, set this folder to misc_/FSCounter.
* Addresses to ignore:You ignore certain address and Ip masks if you
wish,
for example internal address...
o Example:
192.168.0.0:255.255.255.0
127.0.0.0:255.0.0.0
***** Usage *****
* To call the FSCounter object:
<dtml-var >
* To call the FSCounter object with a different view than default:
<dtml-var ".get_images">
<dtml-var ".get_padded_images">
<dtml-var ".get_value">
<dtml-var ".get_padded_value">
Only the default view will automatically increment the counter.
* To increment the FSCounter object by one:
<dtml-var ".increment">
* To use the counter from static HTML (ie. outside of Zope):
<img src="/pic?position=6">
<img src="/pic?position=5">
<img src="/pic?position=4">
<img src="/pic?position=3">
<img src="/pic?position=2">
<img src="/pic?position=1">
Increase to as many positions as necessary (6 is probably a good
number)
Remove any white space between the <img> tags if you don't want a
space
between the images
On Mon, 2005-01-17 at 19:46, Bill Campbell wrote:
> On Mon, Jan 17, 2005, Roger Oberholtzer wrote:
> >I know a very simple one if you used the Zope web server. But, alas, no
> >one in these parts does, do they?
>
> I do. Pointers would be welcome.
>
> FWIW: We started moving most of the sites we host to Zope and
> Plone early in 2004. One of the best technical books I've ever
> found is Andy McKay's ``The Definitive Guide to Plone''.
>
> Bill
> --
> INTERNET: bill at Celestial.COM Bill Campbell; Celestial Software LLC
> UUCP: camco!bill PO Box 820; 6641 E. Mercer Way
> FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676
> URL: http://www.celestial.com/
>
> ``Unix is simple. It just takes a genius to understand its simplicity'' --
> Dennis Ritchie
> _______________________________________________
> Linux-users mailing list
> Linux-users at linux-sxs.org
> http://mail.linux-sxs.org/cgi-bin/mailman/listinfo/linux-users
>
> Need to chat further on this subject? Check out #linux-users on irc.linux-sxs.org !
+????????????????????????????+???????????????????????????????+
? Roger Oberholtzer ? E-mail: roger at opq.se ?
? OPQ Systems AB ? WWW: http://www.opq.se/ ?
? Nybrogatan 66 nb ? Phone: Int + 46 8 314223 ?
? 114 41 Stockholm ? Mobile: Int + 46 733 621657 ?
? Sweden ? Fax: Int + 46 8 314223 ?
+????????????????????????????+???????????????????????????????+
More information about the Linux-users
mailing list