DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:tagentry

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:tagentry [2020-06-06 03:50] trailjeepplugin:tagentry [2023-10-30 23:10] (current) Klap-in
Line 2: Line 2:
  
 ---- plugin ---- ---- plugin ----
-description : Assign tags using checkboxes+description : Assign tags by clicking from list
 author      : Trailjeep author      : Trailjeep
 email       : trailjeep@gmail.com email       : trailjeep@gmail.com
 type        : action type        : action
 lastupdate  : 2019-10-17 lastupdate  : 2019-10-17
-compatible 2008-05-05, Mulled Wine, Lemming, Anteater, Rincewind, Angua, 2014-09-29 "Hrun", Frusterick Manners, hogfather+compatible  : Lemming, Anteater, Rincewind, Angua, Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, Greebo, Hogfather, !Igor, !Jack Jackrum
 depends     : tag depends     : tag
 conflicts   : fckg, codemirror conflicts   : fckg, codemirror
Line 17: Line 17:
 ---- ----
  
-The //tagentry// plugin displays a set of //tags// just below the edit form and automatically adds or modifies %%{{tag>}}%% in the wiki-text using JavaScript when a tag is clicked.+The //tagentry// plugin displays a set of //tags// just below the edit form and automatically adds or modifies ''{{tag>}}'' in the wiki-text using JavaScript when a tag is clicked.
  
 ===== Previous Authors ===== ===== Previous Authors =====
Line 34: Line 34:
 ===== Bugs ===== ===== Bugs =====
  
-Moved to [[plugin:phpwikify:bugs]]+Moved to [[plugin:tagentry:bugs]]
  
 +===== Discussion =====
  
-===== Discussions ===== +Moved to [[plugin:tagentry:discussion]]
- +
-> 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: +
-<code php> +
-    $rv.='<div class="'.$options['class'].'">'; +
-    $rv.=' <div><label>'.$this->getLang('assign').'</label></div>'; +
-    $rv.=' <div class="taglist"'.$dstyle.'>'; +
-</code> +
- +
-> with the following +
-<code php> +
-    $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>'; +
-    } +
- +
-</code> +
- +
-**__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// +
- +
----- +
- +
-==== Use Heading of tag page ==== +
- +
-When the tag entry is a page in the namesapce **tag** (default [[plugin:tag|tag]] plugin setting) you can display the first heading of the page (if [[config:useheading|useheading]] setting is checked) with this modifications in **tagentry/action.php** : +
- +
-<code php> +
-    /** +
-     * Return Header title or tag name +
-     * @param $tagname The name of tag without namespace +
-     * @return Title of the tag page or tag name formatted +
-     */ +
-    function _getTagTitle($tagname){ +
-        global $conf; +
-        if( $conf['useheading'){ +
-            $tagplugin = plugin_load('helper', 'tag'); +
-            if ( plugin_isdisabled('tag') || !$tagplugin ) { +
-                //msg('The Tag Plugin must be installed to display tagentry.', -1); +
-                return $this->clipstring($tagname); +
-            } +
- +
-            $id = $tagname; +
-            $exist = false; +
-            resolve_pageID($tagplugin->namespace, $id, $exist); +
-            if( $exist ){ +
-                return p_get_first_heading($id, false); +
-            } +
-        } +
-        return $this->clipstring($tagname); +
-    } +
-     +
-    // Replace this line (in function _format_tags) +
-    $rv.=' /> '.$this->clipstring($t).'</label>&nbsp;'; +
-    // By this +
-    $rv.=' /> '.$this->_getTagTitle($t).'</label>&nbsp;'; +
-</code> +
- +
---- [[user>sphaira|Sphaira]] //2013/12/23 14:43:26// +
- +
-----+
  
plugin/tagentry.1591408206.txt.gz · Last modified: 2020-06-06 03:50 by trailjeep

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki