[dokuwiki] Re: Syntax Filters: Passing-Through to the Next Handler?

B.J. Black wrote:
Well, not exactly nothing.  My code does run (and the page gets
NOCACHE), but the code block itself doesn't.  I assume that this is
because my plugin has "consumed" the tag and so it's not to be processed
any longer (and therefore DW's native PHP handling mechanism never gets
a chance to run).
You may not be sending the php code back to the page.

        preg_match('/<php>(.*?)<\/php>/', $match,$matches);
       $match - '~~NOCACHE~~<PHP>' . $matches[1] . '</PHP>';
       return array( $state, $match);

In the render() function:

   if($mode == 'xhtml'){
           list($state, $match) = $data;
           $renderer->doc .= $match;
           return true;
        }


I think that should work, but if not try writing an action plugin which checks the page content for <php> and ~~NOCACHE~~. If php appears on the page and ~~NOCACHE~~ doesn't, then add the ~~NOCACHE~~. Or else you could write an action plugin which prevents caching for all php pages. You can check the dokuWiki Events at

      http://wiki.splitbrain.org/wiki:events_list

I've written an Event Handler HOW-TO at:

       http://www.mturner.org/htmlOKay/doku.php?id=wiki:event_handlers

There are examples of how to implement both of the above suggestions at:

  http://www.mturner.org/htmlOKay/doku.php?id=wiki:event_handlers_code

Myron

--

_____________________
Myron Turner
http://www.room535.org
http://www.mturner.org/XML_PullParser/


--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: