Lexer->addSpecialPattern('\{\{graveclock\}\}', $mode, 'plugin_graveknowledgecountdown'); } public function handle($match, $state, $pos, Doku_Handler $handler) { // Safely pull config instances directly from your main action plugin configuration $action_plugin = plugin_load('action', 'graveknowledge'); $start_hour = $action_plugin ? (int)$action_plugin->getConf('night_start_hour') : 1; $end_hour = $action_plugin ? (int)$action_plugin->getConf('night_end_hour') : 5; return array($start_hour, $end_hour); } public function render($mode, Doku_Renderer $renderer, $data) { if ($mode !== 'xhtml') return false; list($start_hour, $end_hour) = $data; // Generate a random ID suffix so multiple clocks can exist on one page safely $rand_id = rand(1000, 9999); // Raw, left-aligned, production HTML string template wrapper output $html = '
'; $renderer->doc .= $html; return true; } }