diff --git a/action.php b/action.php
index 8c2f418..54e09f6 100644
--- a/action.php
+++ b/action.php
@@ -19,7 +19,7 @@ function getInfo() {
return array(
'author' => 'Gina Häußge, Michael Klier, Esther Brunner',
'email' => 'dokuwiki@chimeric.de',
- 'date' => '2010-11-12',
+ 'date' => '2011-03-20',
'name' => 'Tag Plugin (ping component)',
'desc' => 'Ping technorati when a new page is created',
'url' => 'http://www.dokuwiki.org/plugin:tag',
@@ -33,6 +33,7 @@ function register(&$contr) {
$contr->register_hook('IO_WIKIPAGE_WRITE', 'BEFORE', $this, 'ping', array());
$contr->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, '_handle_act', array());
$contr->register_hook('TPL_ACT_UNKNOWN', 'BEFORE', $this, '_handle_tpl_act', array());
+ if($this->getConf('toolbar_icon')) $contr->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_toolbar_button', array ());
}
/**
@@ -114,5 +115,19 @@ function _handle_tpl_act(&$event, $param) {
print '
' . $lang['nothingfound'] . '
';
}
}
+
+ /**
+ * Inserts the tag toolbar button
+ */
+ function insert_toolbar_button(&$event, $param) {
+ $event->data[] = array (
+ 'type' => 'format',
+ 'title' => $this->getLang('toolbar_icon'),
+ 'icon' => '../../plugins/tag/images/tag-toolbar.png',
+ 'open' => '{{tag>',
+ 'close' => '}}'
+ );
+ }
}
-// vim:ts=4:sw=4:et:enc=utf-8:
+
+// vim:ts=4:sw=4:et:
diff --git a/conf/default.php b/conf/default.php
index 952752c..68aa876 100644
--- a/conf/default.php
+++ b/conf/default.php
@@ -7,5 +7,6 @@
$conf['sortkey'] = 'title'; // sort key for topic lists
$conf['sortorder'] = 'ascending'; // ascending or descending
$conf['pagelist_flags'] = 'list'; // formatting options for the page list plugin
+$conf['toolbar_icon'] = 0; // enables/disables the toolbar icon
-//Setup VIM: ex: et ts=2 enc=utf-8 :
+//Setup VIM: ex: et ts=2 :
diff --git a/conf/metadata.php b/conf/metadata.php
index 36212f1..414d4b4 100644
--- a/conf/metadata.php
+++ b/conf/metadata.php
@@ -13,5 +13,6 @@
$meta['sortorder'] = array('multichoice',
'_choices' => array('ascending', 'descending'));
$meta['pagelist_flags'] = array('string');
+$meta['toolbar_icon'] = array('onoff');
-//Setup VIM: ex: et ts=2 enc=utf-8 :
+//Setup VIM: ex: et ts=2 :
diff --git a/images/tag-toolbar.png b/images/tag-toolbar.png
new file mode 100644
index 0000000..4b274d2
Binary files /dev/null and b/images/tag-toolbar.png differ
diff --git a/lang/de/lang.php b/lang/de/lang.php
index 0af6b15..d0347ac 100644
--- a/lang/de/lang.php
+++ b/lang/de/lang.php
@@ -10,7 +10,8 @@
$lang['tags'] = 'Tags';
$lang['topic'] = 'Thema';
$lang['rebuildindex'] = 'Tagindex neu aufbauen';
+$lang['toolbar_icon'] = 'Tag-Syntax einfügen';
$lang['missing_pagelistplugin'] = 'Ohne Pagelist Plugin können Themenlisten nicht angezeigt werden.';
-//Setup VIM: ex: et ts=2 enc=utf-8 :
\ No newline at end of file
+//Setup VIM: ex: et ts=2 :
diff --git a/lang/de/settings.php b/lang/de/settings.php
index ca87338..f5ff7af 100644
--- a/lang/de/settings.php
+++ b/lang/de/settings.php
@@ -9,6 +9,7 @@
// for the configuration manager
$lang['namespace'] = 'Standard-Namensraum für Tags';
$lang['pingtechnorati'] = 'Technorati anpingen';
+$lang['toolbar_icon'] = 'Toolbar-Symbol anzeigen (data/cache/* und den Browser-Cache löschen, wenn das Symbol nicht angezeigt wird)';
$lang['sortkey'] = 'Themenlisten sortieren nach:';
$lang['sortkey_o_cdate'] = 'Erstellungsdatum';
diff --git a/lang/en/lang.php b/lang/en/lang.php
index 079ed04..586f1d8 100644
--- a/lang/en/lang.php
+++ b/lang/en/lang.php
@@ -10,9 +10,10 @@
$lang['tags'] = 'Tags';
$lang['topic'] = 'Topic';
$lang['rebuildindex'] = 'Rebuild Tagindex';
+$lang['toolbar_icon'] = 'Insert Tag-Syntax';
$lang['missing_pagelistplugin'] = 'The Pagelist Plugin must be installed for topic lists.';
$lang['menu'] = 'Tagindex Manager';
-//Setup VIM: ex: et ts=2 enc=utf-8 :
\ No newline at end of file
+//Setup VIM: ex: et ts=2 :
diff --git a/lang/en/settings.php b/lang/en/settings.php
index db84639..eaaf939 100644
--- a/lang/en/settings.php
+++ b/lang/en/settings.php
@@ -9,6 +9,7 @@
// for the configuration manager
$lang['namespace'] = 'Default namespace for tags';
$lang['pingtechnorati'] = 'Ping Technorati';
+$lang['toolbar_icon'] = 'Show toolbar icon (clear data/cache/* and browser cache if it\'s not displayed)';
$lang['sortkey'] = 'sort topic lists by';
$lang['sortkey_o_cdate'] = 'creation date';
@@ -23,4 +24,4 @@
$lang['pagelist_flags'] = 'Formatting flags for the taglist (comma-separated, for available flags see the documentation of the pagelist plugin)';
-//Setup VIM: ex: et ts=2 enc=utf-8 :
+//Setup VIM: ex: et ts=2 :
diff --git a/plugin.info.txt b/plugin.info.txt
index 662a503..060e229 100644
--- a/plugin.info.txt
+++ b/plugin.info.txt
@@ -1,7 +1,7 @@
base tag
author Gina Häussge, Christopher Smith, Michael Klier, Esther Brunner
email dokuwiki@chimeric.de
-date 2010-11-12
+date 2011-03-20
name tag plugin
desc tag wiki pages
url http://dokuwiki.org/plugin:tag