/** * for backward compatability * @see inc/DokuWiki_Plugin#getInfo() */ function getInfo() { if (method_exists(parent, 'getInfo')) { $info = parent::getInfo(); } return is_array($info) ? $info : confToHash(dirname(__FILE__) . '/plugin.info.txt'); }
/** * return prompt for admin menu */ function getMenuText($language) { if (!is_null($this->_auth)) { return parent::getMenuText($language); } return $this->getLang('menu') . ' ' . $this->disabled; }
/** * return prompt for admin menu */ function getMenuText($language) { if (!$this->disabled) { return parent::getMenuText($language); } return ''; }
/** * return some info */ function getInfo() { $a = ''; if (method_exists(DokuWiki_Admin_Plugin, "getInfo")) { $a = parent::getInfo(); /// this will grab the data from the plugin.info.txt $a['name'] = 'LaTeX plugin administration'; return $a; } else { // Otherwise return some hardcoded data for old dokuwikis return array('author' => 'Alexander Kraus, Michael Boyle, and Mark Lundeberg)', 'email' => '.', 'date' => '???', 'name' => 'LaTeX plugin', 'desc' => 'LaTeX rendering plugin; requires LaTeX, dvips, ImageMagick.', 'url' => 'http://www.dokuwiki.org/plugin:latex'); } }
/** * */ function getLang($id) { $string = parent::getLang($id); if (func_num_args() > 1) { $search = array(); $replace = array(); for ($i = 1; $i < func_num_args(); $i++) { $search[$i - 1] = '{' . $i . '}'; $replace[$i - 1] = func_get_arg($i); } $string = str_replace($search, $replace, $string); } return $string; }
function setupLocale($prompts = false) { parent::setupLocale(); if (!$prompts || $this->_localised_prompts) { return; } $this->_setup_localised_plugin_prompts(); $this->_localised_prompts = true; }
/** * return some info */ function getInfo(){ $result = parent::getInfo(); $result['desc'] = $this->getLang('desc'); return $result; }