1<?php 2 3class action_plugin_docsearch_confmanager extends DokuWiki_Action_Plugin { 4 5 public function register(Doku_Event_Handler $controller) { 6 $controller->register_hook('CONFMANAGER_CONFIGFILES_REGISTER', 'BEFORE', $this, 'addConfigFile', array()); 7 } 8 9 public function addConfigFile(Doku_Event $event, $params) { 10 if(class_exists('ConfigManagerTwoLine')) { 11 $config = new ConfigManagerTwoLine($this->getLang('confmanager title'), $this->getDescription(), DOKU_PLUGIN . 'docsearch/conf/converter.php'); 12 $event->data[] = $config; 13 } 14 } 15 16 private function getDescription() { 17 $fn = $this->localFN('confmanager_description'); 18 if(!@file_exists($fn)) { 19 return ''; 20 } 21 $content = file_get_contents($fn); 22 return $content; 23 } 24 25} 26