[Zope-PTK] Search engine woes solved, sorta

Mike Pelletier mike@digicool.com
Wed, 8 Mar 2000 10:40:12 -0500 (EST)


    Sorry, I didn't read closely enough.  Let's take another crack at it.

> I'm designing a portal site in a community whose members change very
> often, maybe twice a year. Right now I have /Members/nolan where I'll
> write all of my personal articles for our newsletter, meeting
> information, etc. But, when I leave the organization, we may wish to
> delete /Members/nolan to free up space/resources, etc. So, I'm not
> concerned with the publication mechanism; instead, I'm concerned about
> how a community member's content can a) remain after he leaves and b)
> be indexed in the Z catalog.

    I think that the best solution would be to set up a containment tree
outside /Members, giving the appropreate people the appropreate
permissions to add items.  Items could either be added directly, or added
and composed in the Member's home area and them 'committed' to the
perminant location.  The second method gives you an opportunity to reduce
the contributor's rights to the object to prevent dead links, etc.

> So, I'm trying to determine if it is somehow possible to a) create
> PortalContent in the same manner that DTML Documents/Methods are
> created

    I'm not 100% sure what you mean by this, but I believe the answer is
yes, you sould be able to instantiate PortalContent-derived objects in the
same manner as any other object.

> or b) add specific, trusted, non-PortalContent objects into the Z
> catalog? For some reason I can't get any of my non-PortalContent
> objects to index.

    While you might get lucky with this, this is probably a Bad Thing to
do.  Many reports are going to assume any object it pulls out of the
catalog will provide certain basic services that non-PC objects won't.

    It's not difficult to make an arbitrary Zope object portal-manageable.  
Theoretically, if you're using ZClasses, you can just mash the two
together, and it'll "just work".  (Let me know if you try this and find it
actually works!!)

    I've been sitting on an example which mixes Zope's File object and
PortalContent.  It's a Python class.  I've just committed it.  I haven't
finished tweaking it, so I haven't made it available yet.  It can be made
available by importing it in the __init__ module, so it has a chance to
register itself.  It does work, and can serve as a decent guide.  Later
today, I'll have commentified it better.

    If some subtle (I'm being kind to myself) detail has yet escaped my
understanding, let me know and I'll try again.  ;-)

Mike.

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