Re: story save plugins

Joe Stewart <[email protected]> Fri, 7 Nov 2003 15:53:46 -0600
Newsgroups gmane.comp.cms.phpslash.devel
Message-ID <[email protected]>
On Fri, Nov 07, 2003 at 03:09:49PM -0500, Matthew Leingang wrote:
> On Fri, 2003-11-07 at 11:31, Joe Stewart wrote:
> > I've been working to change the text modifiers ( plaintext, exttrans) into
> > a general plugin system that could easily support wiki text, etc.
> 
> Good idea.
> 
> > My thoughts are to provide a plugin script in the module/story directory
> > instead of incorporating it in the Story class.  I'm not set on either
> > yet.  The plugins would be in a subdirectory much as blocktypes.
> 
> OK, so what form does the data take in the database, though?  If it's
> entered as wiki does it stay as wiki?  
> 
> > There exists the ability to have the same ability for display time plugins
> > too.  Where the text would be as submitted but modified for display.
> > Should these plugins be in the same directory and designated some other
> > way?
> 
> Maybe different directory.  Is there where we could do "smart links"?  I
> mean like if a story mentions a user, the plugin would insert the link
> to his story page?
>

Yes, we could annotate like this either on the front end when saving or at
display time.

Same for wiki markup.  

Mike or Peter - Does Back-End apply the wiki transformation and then save
the result?

Makes me think they should be in a common directory.  The we can give
input and output choices.

> > Care has to be made if these are installed in a web accessible directory
> > that they will be safe if called directly.  Phorum had a security flaw in
> > this regard.
> 
> What about an OO approach?  We could have StoryRenderer classes or
> something, and each plugin could extend one of those.  executing a class
> file wouldn't have any security problems because it just declares the
> class.
> 

yeah.  Its worked well for blocks.  And we could minimize code
duplication.  The first plugins that I've thought about are just text
filters.  No other smarts.

Joe


-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/