*/ // must be run within Dokuwiki if(!defined('DOKU_INC')) die(); class admin_plugin_farmer_info extends DokuWiki_Admin_Plugin { /** * @return bool admin only! */ public function forAdminOnly() { return false; } /** * Should carry out any processing required by the plugin. */ public function handle() { } /** * Render HTML output, e.g. helpful text and a form */ public function html() { global $conf; /** @var helper_plugin_farmer $helper */ $helper = plugin_load('helper', 'farmer'); $animal = $helper->getAnimal(); $config = $helper->getConfig(); echo ''; $this->line('thisis', $animal ? $this->getLang('thisis.animal') : $this->getLang('thisis.farmer')); if($animal) { $this->line('animal', $animal); } $this->line('confdir', DOKU_CONF); $this->line('savedir', $conf['savedir']); $this->line('baseinstall', DOKU_INC); $this->line('farm host', $config['base']['farmhost']); $this->line('farm dir', DOKU_FARMDIR); $this->line('animals', count($helper->getAllAnimals())); foreach($config['inherit'] as $key => $value) { $this->line('conf_inherit_'.$key, $this->getLang($value ? 'conf_inherit_yes' : 'conf_inherit_no')); } echo '
'; } protected function line($langkey, $value) { echo ''; echo ''.$this->getLang($langkey).''; echo ''.$value.''; echo ''; } } // vim:ts=4:sw=4:et: