Mailing List Archive

[Zope-PTK] Publishing and expiration of content
Hi,

One thing that is probably worth considering is the automatic publishing
and expiration of content. Automatic release of news stories at a specific
time is a feature of KM|Net News that I use all the time. I don't know if
anyone else thinks this type of feature would be useful. (If not, I can
always just make my own portal class that has those features).

Will it be easy to subclass an existing portal class (such as News Item)
and then add your own properties?

Kevin
Re: [Zope-PTK] Publishing and expiration of content [ In reply to ]
Kevin Dangoor wrote:
> One thing that is probably worth considering is the automatic publishing
> and expiration of content. Automatic release of news stories at a specific
> time is a feature of KM|Net News that I use all the time. I don't know if
> anyone else thinks this type of feature would be useful. (If not, I can
> always just make my own portal class that has those features).

I think this is a natural fit. Kevin, do you think this should be
pushed down into the common PTK architecture? We certainly get asked
about it all the time on the consulting side.

Can you explain, both from the user's perspective and under the hood,
how it works in KM|Net News?

Also, if you could please read the bullet in the "PTK Architecture"
section that talks about reviewing, and see if this model could be
extended to include automatic publishing. Meaning, the idea of
status-matched-to-role could be extending to automatic publishing as
well. Thus, a piece of content might be visible to a Reviewer on one
date but not a Member or a Guest until a later date.

> Will it be easy to subclass an existing portal class (such as News Item)
> and then add your own properties?

Uhh, dunno. Mike won't be answering emails until later today (he's
travelling).

--Paul
Re: [Zope-PTK] Publishing and expiration of content [ In reply to ]
----- Original Message -----
From: "Paul Everitt" <paul@digicool.com>
To: "Kevin Dangoor" <kid@kendermedia.com>
Cc: <zope-ptk@zope.org>
Sent: Monday, January 17, 2000 8:31 AM
Subject: Re: [Zope-PTK] Publishing and expiration of content


> Kevin Dangoor wrote:
> > One thing that is probably worth considering is the automatic
publishing
> > and expiration of content. Automatic release of news stories at a
specific
> > time is a feature of KM|Net News that I use all the time. I don't know
if
> > anyone else thinks this type of feature would be useful. (If not, I can
> > always just make my own portal class that has those features).
>
> I think this is a natural fit. Kevin, do you think this should be
> pushed down into the common PTK architecture? We certainly get asked
> about it all the time on the consulting side.

I think there are many uses for this type of thing. If every type of PTK
document/whatever had this sort of thing, that would be useful. (For
example, you could set up a survey to start at a particular time and end at
a particular time...)

> Can you explain, both from the user's perspective and under the hood,
> how it works in KM|Net News?

The implementation in KM|Net News is really trivial. I only implemented a
"release" time, not expiration. Basically, there is a property called
"release" (type Date). The form used to submit an article does not list the
release, but the reviewer's form does. The reviewer just enters when the
article should be released. The article is actually visible at its URL
before the release time. This has been handy along the way, but I could see
many people preferring that the article is not visible until its release
time.

The code the produces the article listing (like what you see on the front
page of byproducts.com) basically just picks up all of the articles marked
as being "top" articles from the Catalog. Then, inside the <dtml-in> there
is:

<dtml-if "release.isPast()">
...list the article...
</dtml-if>

If release was in the index, you could certainly make that a condition of
the Catalog query.

> Also, if you could please read the bullet in the "PTK Architecture"
> section that talks about reviewing, and see if this model could be
> extended to include automatic publishing. Meaning, the idea of
> status-matched-to-role could be extending to automatic publishing as
> well. Thus, a piece of content might be visible to a Reviewer on one
> date but not a Member or a Guest until a later date.

As you can see from the above, my implementation is quite simple. It may be
possible to create a permission that is "View Unreleased/expired Documents"
so that the administrators can easily choose which people can view content
that has not yet been released or has expired. Without a scheduler, I'm not
sure if there's really any other way to make things automatically come and
go on the site. Even with a scheduler, this may still be the best way to go.

BTW, I use essentially the same technique for giveaways and specials on
byproducts.com. There are hooks so that the event will automatically start
and end at a specific time.

Kevin
Re: [Zope-PTK] Publishing and expiration of content [ In reply to ]
Kevin Dangoor wrote:
> If release was in the index, you could certainly make that a condition of
> the Catalog query.

Perhaps it could be released for some audiences (roles) and not others.

> As you can see from the above, my implementation is quite simple. It may be
> possible to create a permission that is "View Unreleased/expired Documents"
> so that the administrators can easily choose which people can view content

Please keep thinking about this thread...

> that has not yet been released or has expired. Without a scheduler, I'm not
> sure if there's really any other way to make things automatically come and
> go on the site. Even with a scheduler, this may still be the best way to go.

These "heartbeats" are pretty easy to implement externally. You can
either have a cron job or, as we looked at doing, add it to the shell
script that forks the zserver. The heartbeat just makes an HTTP
connection at a regular interval.

> BTW, I use essentially the same technique for giveaways and specials on
> byproducts.com. There are hooks so that the event will automatically start
> and end at a specific time.

Got it.

--Paul
Re: [Zope-PTK] Publishing and expiration of content [ In reply to ]
On Sun, 16 Jan 2000, Kevin Dangoor wrote:

> Hi,
>
> One thing that is probably worth considering is the automatic publishing
> and expiration of content. Automatic release of news stories at a specific
> time is a feature of KM|Net News that I use all the time. I don't know if
> anyone else thinks this type of feature would be useful. (If not, I can
> always just make my own portal class that has those features).
>
> Will it be easy to subclass an existing portal class (such as News Item)
> and then add your own properties?

Scheduled publishing is definitely going to be in there (maybe by
noon). PortalObjects have a Date method. That method returns the last
modification time, OR an explicitly set time. The portal (meaning the
catalog and the objects themselves) will not reveal to untrusted Members
objects which have a futuristic Date.

Expiration could be added in a similar fashion, but I don't plan to
ATM.

--
Mike Pelletier email: mike@digicool.com
Mild mannered software developer icq: 7127228
by day, super villain by night. phone: 519-884-2434