hlp */ $this->hlp = plugin_load('helper', 'autolink4'); } /** * return sort order for position in admin menu */ public function getMenuSort() { return 140; } /** * handle user request */ public function handle() { global $INPUT; if ($INPUT->post->has('aldata')) { if (!$this->hlp->saveConfigFile($INPUT->post->str('aldata'))) { msg('Failed to save data', 1); } else { // Break the cache, so that all pages are regenerated. touch(DOKU_CONF."local.php"); } } } /** * output appropriate html */ public function html() { global $lang; $config = $this->hlp->loadConfigFile(); $lines = preg_split('/\r?\n/', $config); $allTt = 'checked'; $allOnce = 'checked'; foreach ($lines as $line) { if (!preg_match('/^\s*$/', $line)) { if (!preg_match('/^.*,.*,.*,.*\btt\b.*/', $line)) { $allTt = ''; } if (!preg_match('/^.*,.*,.*,.*\bonce\b.*/', $line)) { $allOnce = ''; } } } echo $this->locale_xhtml('admin_help'); if (!plugin_isdisabled('autotooltip') && plugin_load('helper', 'autotooltip')) { echo '

'; } echo '

'; echo '
'; echo ''; echo ''; echo '

'; echo ''; echo '
'; } }