[dokuwiki] Re: [DokuWiki][Patch] new event ACTION_XHTML_EXPORT

  • From: Michael Klier <chi@xxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Tue, 26 Aug 2008 22:54:25 +0200

On Tue, Aug 26, 2008 at 09:37:36PM +0200, Michael Klier wrote:
> Hi everyone,
> 
> at the FroSCon weekend we discussed the html export functions (also in regard
> to the htmlPage function used in the XMLRPC interface) and the drawback that
> action plugins, which are currently using TPL_ACT_RENDER to append/prepend
> HTML to the page output are not triggered on neither export nor xmlrpc - take
> the discussion plugin as an example (hope everyone's still following me :)).
> 
> Attached is a patch which introduces a new event ACTION_XHTML_EXPORT. It's
> triggered in the act_export() function, as well as in the htmlPage() function
> of the XML-RPC interface. With this event, the discussion plugin is able to
> work also for normal page export, as well as with the XMLRPC interface. Like
> on TPL_ACT_RENDER, PHP output buffering is active during this event. The to be
> exported page ID is the event data.

Ok, answering myself :). Chris pointed out that it would be desireable to have
other export formats (renderer plugins) triggering equivalent events. So I am
going to rework this patch. I plan to make the event "dynamic" ala
ACTION_<FORMAT>_EXPORT. The patch against the XMLRPC interface is still valid
though.

I also try to keep the patch size smaller next time. Sometimes I really wonder
why darcs does this sometimes (I worked on a fresh copy I checked out via
darcs get --partial).

Cheers,
        Chi

-- 
Michael Klier

www:    http://www.chimeric.de
jabber: chi@xxxxxxxxxxxxxxxxxx
key:    http://downloads.chimeric.de/chi.asc
key-id: 0x8308F551

Other related posts: