register_hook( 'TPL_METAHEADER_OUTPUT', 'BEFORE', $this, 'head' ); } public function head(Doku_Event $event, $param) { global $ACT; global $ID; if ($ACT === 'admin') return; $base = DOKU_BASE . 'lib/plugins/xmppsupport/'; $track = false; if ($ACT === 'show' && $ID && function_exists('auth_aclcheck')) { $track = auth_aclcheck($ID, '', []) >= AUTH_READ; } $event->data['link'][] = [ 'rel' => 'stylesheet', 'type' => 'text/css', 'href' => $base . 'style.css?v=10', ]; $event->data['script'][] = [ 'type' => 'text/javascript', '_data' => 'window.XMPPSUPPORT_TRACK=' . ($track ? 'true' : 'false') . ';', ]; $event->data['script'][] = [ 'type' => 'text/javascript', 'src' => $base . 'script.js?v=11', '_data' => '', ]; } }