On 3 Jan 2012, at 19:18, Chris Tregenza wrote:
I wish to use a helper plugin across several syntax plugins. However the DokuWiki_Syntax_Plugin class extends Doku_Parser_Mode class and not the DokuWiki_Plugin so the loadHelper method is not available.What is the recommend way of either: Adding the loadHelper and other necessary methods to syntax plugin
I just have: class syntax_plugin_mtplugin extends DokuWiki_Syntax_Plugin ... $this->helper = plugin_load ( 'helper', 'my-helper' ); if ( !$this->helper ) { die ( "Failed to load my-helper plugin" ); } in the constructor for my syntax plugins. Can then just call in to it: $this->helper->SharedFunction();
orSetting up an alternative way to use shared coded across different syntax plugins
Chris Tapp opensource@xxxxxxxxxxxx www.keylevel.com -- DokuWiki mailing list - more info at http://www.dokuwiki.org/mailinglist