* License: GPL2 * */ if ( !defined( 'DOKU_INC' ) ) die(); if ( !defined( 'DOKU_PLUGIN' ) ) define( 'DOKU_PLUGIN', DOKU_INC . 'lib/plugins/' ); require_once( DOKU_PLUGIN . 'action.php' ); class action_plugin_textmodule extends DokuWiki_Action_Plugin { public function register(Doku_Event_Handler $controller) { $controller->register_hook('HTML_EDITFORM_OUTPUT', 'BEFORE', $this,'handle_editform_output'); } /* Create the div-containers for the textmodules */ function _format_modules() { if (file_exists('data/meta/modules.txt')) { $t = file_get_contents('data/meta/modules.txt'); $t = explode("\n[TEXT MODULE DELIMITER]\n",$t); $r = ''; foreach ($t as $m) { $m = explode(PHP_EOL,trim($m)); if (count($m)>1) { $title = trim($m[0]); if (strlen($title)==0) $title = $this->getLang("text module"); $r .= '