Martin Tschofen wrote:
The way search is structured you would have to define the function outside of the plugin class, but it could still be defined within the same file and used as a paramter for search.This is more of a php question. In the search function we pass in the name of the function to call from within search. I want to pass a function that is local to the plugin I'm working on. Is it possible to pass in a reference to the search function that refers back to the plugin space? Or do I have to copy the search function into my plugin instead?
Thanks...martin
e.g.
class action_plugin_myindex extends Doku_Action_Plugin {
function getInfo() { ... } function register() { ... }
function hook() { search(..., 'mysearch', ... ); }
} // end class action plugin myindex
function mysearch(&$data, $base, $file, $type, $lvl, $opts) { ... } -- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist