[dokuwiki] Re: Action Plugins

  • From: "Martin Tschofen" <martin.tschofen@xxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Fri, 21 Apr 2006 22:25:21 -0500

On 4/15/06, Chris Smith <chris@xxxxxxxxxxxxx> wrote:
> Somethign similar would be required to replace the standard index
> function.  With one change, the action dispatch handler should alter
> $ACT to a non-standard dokuwiki value. e.g. it will come in as "index",
> it should leave as "graphiz index".  This is because (currently) the
> ACTION_TEMPLATE event fires when dokuwiki doesn't recognise the $ACT
> value - if it did  recognise it (e.g. if it was 'index') it would
> generate its own index and never fire the ACTION_TEMPLATE event.  This
> is different from ACTION_DISPATCH which occurs before Dokuwiki does any
> of its own processing.

I'm stuck with this. I've got two different action plugins. One that
overrides "index" and the other a new command all together called
"collect".

In my "index" command I don't mess with the $ACT variable and
everything works just as it should. So do I need to change $ACT at
all?

In the "collect" action plugin, dokuwiki complains that it doesn't
recognize the 'collect' command. I'm not clear about the right way to
register the command itself. I think I need to do it with the
ACTION_DISPATCH event:
    $controller->register_hook('ACTION_DISPATCH', $this, 'collect', NULL);
    $controller->register_hook('TPL_ACTION_HTML', $this, 'find_pages', NULL);

  function collect($param, &$event){
    if ($event->data != 'collect') return;
  }

That doesn't work. Thanks in advance...martin
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: