Timothy Wilson <[EMAIL PROTECTED]> wrote:
> Hey everyone,
> I was looking at linux.com the today and I noticed their "Daily Photo." I
> occurred to me that that would be a fun addition to the school's page that
> I'm developing. My first thought would be to:
> * inherit from Image
> * add caption, date taken, etc. properties
> * create an archive of past photos
> What I'm not sure about is how to have Zope automatically display the photo
> for a day, then archive it. Would a boolean property of the ZClass work? Is
> it possible to have Zope set the property of a ZClass instance at certain
> time? Any thoughts on how this would be designed?
This kind of thing is a "query-on-metadata" application; I would
put all these images into a single folder (maybe chunked into
subfolders by month?), mark them each with an 'effective' property
(of type 'Date'), and then select the appropriate image via a
catalog query, e.g.::
<dtml-in "Catalog( meta_type='Image'
, effective=( ZopeTime().earliestTime(),
# other query parms here, including any sorting...
<dtml-var "Catalog.getobject( data_record_id_ )">
Or you could just have the catalog fetch the images sorted by
effective/descending, and then pick off the first one; this would
keep an image around until supplanted by a newer one.
Tres Seaver [EMAIL PROTECTED]
Digital Creations "Zope Dealers" http://www.zope.org
Zope maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -