tagentry plugin

Compatible with DokuWiki

2008-05-05, and newer

plugin assign tags using checkboxes

Last updated on
2009-09-12
Provides
Action
Requires
tag

The tagentry plugin displays a set of tag-name checkboxes just below the edit form and automatically adds or modifies {{tag>}} in the wiki-text using JavaScript when a checkbox is activated.

see http://mir.dnsalias.com/wiki/tagentry for further information.

Download and installation

Download and install the plugin using the Plugin Manager using the following URL. Refer to Plugins on how to install plugins manually.

Bugs

"+" or "-" appears before tags

When we use {{topic>}} syntax with ”+” or ”-” before tags in order to select results, labels of checkboxes appears with this ”+” or ”-”, as if they were part of the tag (although this is not the case). I suppose it is because of {{topic>}} accept parameters in its syntax. — Ner0lph 2010-02-11 16:59 (Europe/Paris timezone)

Tagentry checkboxes vanished when using the Dokuwiki "Anteater" Release 2010-11-07

Just like the plugin was no more active in the edit page.

Had the same problem… Here is a quick and dirty fix; someone with more experience can probably provide a better solution. In lib/plugins/tagentry/action.php comment out the following in the function handle_editform_output:
if (   !empty($event->data->_hidden['prefix'])
    || !empty($event->data->_hidden['suffix'])) return;
if ($event->data->findElementByType('wikitext')===false) return
tmul - 2010-11-18
Thanks, the fix worked for me, using Anteater. If I experience any inconvenience, I'll post them.
2011-03-23
Thanks tmul.
This fix worked also for me with the “Rincewind” release.
BidiX - 2011-06-14

Discussions

it doesn't work with Opera — tested with 9.64
JavaScript is enabled and other scripts (e.g. show/hide contents) is working


Tag tables formatting

Phi - 2010/08/25

Good plugin as far as I have used it. But the screen formatting was not very exciting.
The very simple / basic modification below is done in order to get a better formatting of the XML tables of tags:
  • uniform width for the columns of the table
  • one line for each box + tag label item.
Around line 250 in action.php of the plugin replace the three following lines:
    $rv.='<div class="'.$options['class'].'">';
    $rv.=' <div><label>'.$this->getLang('assign').'</label></div>';
    $rv.=' <div class="taglist"'.$dstyle.'>';
with the following
    $rv.='<div class="'.$options['class'].'">';
    if (!$options['tagboxtable']) $rv.=' <div><label>'.$this->getLang('assign').'</label></div>';
    $rv.=' <div><label>&#160</label></div>';
    $rv.=' <div class="taglist"'.$dstyle.'>';
    if ($options['tagboxtable']) {
       $rv.='<table>';
       $rv.='<thead><tr>';
 
       $i=0;
       $ls=0;
       $lsmax=0;
       natcasesort($alltags);
       foreach ($alltags as $t) {
          if (is_array($options['blacklist']) 
              && $this->_in_casearray($t, $options['blacklist'])) 
            continue;
          $i++;
          $ls = strlen($t);
          if ($ls > $lsmax) $lsmax=$ls;
       }
 
       For ($j=1;$j<=$options['tablerowcnt'];$j++) {
            $rv.='<th>';
            if ($j == 1) $rv.="Liste&#160des&#160tags&#160".str_repeat("&#160",$lsmax-8);
            if ($j > 1) $rv.=str_repeat("_",$lsmax+1);
            $rv.='</th>';
       }
       $rv.='</tr></thead>';
       $rv.='<tbody><tr>';
    }
    else {
       $rv.='  <div>';
    }

Note: The title Liste des tags is in french but can be changed by whatever you want. Take care to use the &#160 “no-break space” characters to replace your space characters in the title.



I tried this edit, but my website wouldn't load when I made the change. Once I reverted back to the original code, my website ran normally. -JC


plugin/tagentry.txt · Last modified: 2011/06/14 07:43 by 82.231.159.23
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsGitXRefTranslate