[ZDP] Counter

Tom Deprez tom.deprez@uz.kuleuven.ac.be
Wed, 09 Feb 2000 11:21:37 +0100


Ok, I've placed a ZCounter of Stephan onto the Zope Main page.

* I've turned cookies off, because it gave some strange results when
reloading a page (ie. turned back to 0). Maybe Stephan can have a look at
its class again?

* One main problem of the counter is that, when Zope is restarted, it
looses it's value :-(. Perhaps, we need to find another solution to
ZCounter. Is it possible to save the value to a place on a hard-disk? And
that the Class always looks at this value?

* We can extend ZCounter to a text-based (what-it-is-now) and graphical
counter (what it isn't yet). We could make it so, like ZCalendar-Tag, where
the pictures of the calendar-parts are placed in a directory. Thus changing
these pictures also changes the look of the calendar! -> In ZCounter, we
add 10 pictures, named (0 .. 9) which are then used to build the counter.
Does somebody knows how to write in Python something that takes the
count-value and changes it to a string. Then takes the first char of the
string and looks for a file named this char?

This can't be that hard for Python-gurus. And it would improve my
Python-knowledge :-) (which is none at the moment)

Tom.