[Zope-CMF] Question on Disscusable Content Types
Tres Seaver
tseaver@palladion.com
Thu, 14 Jun 2001 17:58:47 -0400
Chris Withers wrote:
> Tres Seaver wrote:
>
>>At the moment, there is no user interface for managing the
>>collection of discussion items. You could implement one using
>>DTML and ExternalMethods, or wait for CMF 1.2, which will have
>>one "built in". (Patches accepted, of course :)
>>
>
> It will? Is anyone working on this yet? Only asking 'cos I'll be writing a
> discussion to do just this for Swishdot :-)
Having just grubbed in that code all day, here are a couple of
tips:
- Start with an external method which can be called via
skinning on the offending message. Suppose you call it
'delete_reply'. It should do something like:
def delete_reply( self, transitive=1 ):
"""
Delete a DiscussionItem from its talkback; if 'transitive'
then delete all replies to it, as well.
"""
if transitive:
for reply in self.talkback.getReplies():
reply.delete_reply( 1 )
del self.talkback._container[ self.getId() ]
- Wire up this method to a workflow action using Shane's
nifty new TTW workflow. Set the permissions on it pretty
tightly; I think people would be quite unpleasantly surprised
in most cases if their replies could be removed "lightly".
Tres.
--
===============================================================
Tres Seaver tseaver@digicool.com
Digital Creations "Zope Dealers" http://www.zope.org