Moved conf file to DOKU_CONF

This commit is contained in:
Simon DELAGE 2015-06-20 09:58:39 +02:00
parent fea7d0d0ac
commit 3c083eea64
2 changed files with 6 additions and 4 deletions

View file

@ -39,9 +39,10 @@ class action_plugin_tagalerts extends DokuWiki_Action_Plugin{
// Get an array of page's tags
$this->pagetags = explode(',', $meta['content']);
}
}
}
// Load special messages from ...tagalerts/conf/tagalerts.conf to global conf
$specAlertsFile = dirname(__FILE__).'/conf/tagalerts.conf';
// $specAlertsFile = dirname(__FILE__).'/conf/tagalerts.conf';
$specAlertsFile = DOKU_CONF.'tagalerts.conf';
if (@file_exists($specAlertsFile)) {
$conf['plugin']['tagalerts']['specAlerts'] = confToHash($specAlertsFile);
}
@ -116,7 +117,8 @@ class action_plugin_tagalerts extends DokuWiki_Action_Plugin{
// Register the plugin conf file in ConfManager Plugin
public function addConfigFile(Doku_Event $event, $params) {
if (class_exists('ConfigManagerTwoLine')) {
$config = new ConfigManagerTwoLine('Tag Alerts', $this->getLang('description'), DOKU_PLUGIN . 'tagalerts/conf/tagalerts.conf');
// $config = new ConfigManagerTwoLine('Tag Alerts', $this->getLang('confdescription'), DOKU_PLUGIN . 'tagalerts/conf/tagalerts.conf');
$config = new ConfigManagerTwoLine('Tag Alerts', $this->getLang('confdescription'), DOKU_CONF . 'tagalerts.conf');
$event->data[] = $config;
}
}

View file

@ -1,7 +1,7 @@
base tagalerts
author Simon Delage
email simon.geekitude@gmail.com
date 2015-06-14
date 2015-06-20
name Tag Alerts
desc Throw alerts when some tags are detected (based on Dokuwiki system messages) or just styling tag list links
url https://www.dokuwiki.org/plugin:tagalerts