*/ // must be run within Dokuwiki if(!defined('DOKU_INC')) die(); class admin_plugin_jstweak extends DokuWiki_Admin_Plugin { /** * Should carry out any processing required by the plugin. * Not needed here. Admin Component is for information output only. public function handle() { } */ /** * Render HTML output: Show list of replacement scripts or display an error. */ public function html() { global $ID; $tweak_dir = $this->getConf('local_script_dir'); // check if dir is set in config if (empty($tweak_dir)) { echo '

'.$this->getLang('error').'

'; echo '

'.$this->getLang('please_set_local_script_dir').'

'; } // check if tweak_dir is a directory in the filesystem elseif (!is_dir(DOKU_CONF . $tweak_dir)) { echo '

'.$this->getLang('error').'

'; echo '

'.$this->getLang('please_create_local_script_dir').'
'; echo ''.DOKU_CONF.$tweak_dir.'

'; } // list all plugin names with tweak scripts available else { echo '

'.$this->getLang('menu').'

'; if (!str_ends_with($tweak_dir, '/')) { $tweak_dir .= '/'; } $count = 0; echo '