dokuwiki-2012-10-13でtagentryを使用する方法
既存のタグを編集画面で表示
Dokuwikiのプラグインの話です.
tagプラグインplugin:tag [DokuWiki]で使用したタグを編集画面で表示する. dokuwiki-2012-10-13版では編集画面でTagが表示できないので以下の様に編集した. -が削除行で,+が追加行です.
diff -u lib/plugins/tagentry/action.php.orig lib/plugins/tagentry/action.php
--- action.php.orig 2013-03-04 22:12:48.000000000 +0900
+++ action.php 2013-03-04 22:15:45.000000000 +0900
@@ -55,9 +55,6 @@
$pos = $event->data->findElementByAttribute('type','submit');
if(!$pos) return; // no button -> source view mode
#echo "DEBUG: <pre>".print_r($event->data,true).'</pre>';
- if ( !empty($event->data->_hidden['prefix'])
- || !empty($event->data->_hidden['suffix'])) return;
- if ($event->data->findElementByType('wikitext')===false) return;
}elseif(!$event->data['writable']){
return;
}
@@ -71,10 +68,10 @@
}
}
- if ($this->getConf('tagsrc') == 'All tags' && $thlp) {
- $alltags=$this->_gettags($thlp);
- } else {
- $alltags=$this->_getpages($tagns);
+ if ($this->getConf('tagsrc') == 'All tags') {
+ $alltags=array_map('trim', idx_getIndex('subject', '_w'));
+ } else {
+ $alltags=$this->_getpages($tagns);
}
// get already assigned tags for this page
参考URL