DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:labeled

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:labeled [2015-02-24 20:53] – version upped andiplugin:labeled [2024-01-08 17:01] (current) Aleksandr
Line 1: Line 1:
-====== labeled Plugin ======+====== Labeled Plugin ======
  
 ---- plugin ---- ---- plugin ----
-description: Add labels to wiki pages.+description: Add labels to wiki pages
 author     : Dominik Eckelmann author     : Dominik Eckelmann
 email      : dokuwiki@cosmocode.de email      : dokuwiki@cosmocode.de
 type       : action, admin type       : action, admin
-lastupdate : 2013-12-15 +lastupdate : 2016-07-06 
-compatible : hrun+compatible : Hrun
 depends    : sqlite depends    : sqlite
 conflicts  conflicts 
 similar    : tagging similar    : tagging
-tags       : +tags       : tags
  
 downloadurl: https://github.com/cosmocode/dokuwiki-plugin-labeled/archive/master.zip downloadurl: https://github.com/cosmocode/dokuwiki-plugin-labeled/archive/master.zip
Line 20: Line 20:
 screenshot_img :  screenshot_img : 
 ---- ----
-[[http://www.cosmocode.de/en/open-source/dokuwiki-plugins/|{{ http://cosmocode.de/static/img/dokuwiki/dwplugins.png?recache|A CosmoCode Plugin}}]]+ 
 +[[https://www.cosmocode.de/en/open-source/dokuwiki-plugins/|{{ https://www.cosmocode.de/static/img/dokuwiki/dwplugins.png?recache|A CosmoCode Plugin}}]]
  
 ===== Installation ===== ===== Installation =====
 +
 :!: **External requirements:** This plugin requires the following additional components that must be installed separately:  :!: **External requirements:** This plugin requires the following additional components that must be installed separately: 
-  * [[plugin:sqlite]]+  * [[plugin:sqlite|SQLite plugin]]
  
 Install the plugin using the [[plugin:extension|Extension Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually. Install the plugin using the [[plugin:extension|Extension Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually.
 +
 ===== Examples/Usage ===== ===== Examples/Usage =====
  
 Available Labels can be defined admin-page of the labeled plugin. Available Labels can be defined admin-page of the labeled plugin.
  
 +==== Embed in Template ====
  
-===== Development =====+You can add the labeled component directly into your template's ''main.php'':
  
 +<code php>
 +<?php
 +    //show labels only if user has access to page. Works on wikis with disabled acl too.
 +    if (auth_quickaclcheck(getID()) >= AUTH_READ) {
 +        //check if sqlite plugin exists, labeled plugin requires it.
 +        if (!plugin_isdisabled('sqlite')) {
 +            //Labeled
 +            $labeled = plugin_load('helper','labeled');
 +            if($labeled) echo $labeled->tpl_labels();
 +        }
 +    }
 +?>
 +</code>
 +
 +Users of the [[template:dokuwiki]] template could also put above code in a newly created file ''conf/sidebarfooter.html''.
 +
 +=== Using with Vector Template ===
 +
 +Users of the [[template:vector]] template could also put following to ''dokuwiki/lib/tpl/vector/**user**/boxes.php'' (**NOT** ''dokuwiki/lib/tpl/vector/**conf**/boxes.php''):
 +
 +<code php>
 +//show labels only if user has access to page. Works on wikis with disabled acl too.
 +if (auth_quickaclcheck(getID()) >= AUTH_READ) {
 +    //check if sqlite plugin exists, labeled plugin requires it. if it doesn't exist or is disabled, vector template won't render
 +    if (!plugin_isdisabled('sqlite')) {
 +        $labeled = plugin_load('helper','labeled');
 +        if($labeled ) {
 +        $_vector_boxes["labeled"]["headline"] = "Labeled";
 +     $_vector_boxes["labeled"]["xhtml"] = $labeled->tpl_labels();
 +        }
 +    }
 +}
 +</code>
 +
 +===== Development =====
  
 {{rss>https://github.com/cosmocode/dokuwiki-plugin-labeled/commits/master.atom date}} {{rss>https://github.com/cosmocode/dokuwiki-plugin-labeled/commits/master.atom date}}
Line 40: Line 79:
  
 Please refer to the [[https://github.com/cosmocode/dokuwiki-plugin-labeled/issues|issue tracker]] for reporting issues. Please refer to the [[https://github.com/cosmocode/dokuwiki-plugin-labeled/issues|issue tracker]] for reporting issues.
- 
- 
  
plugin/labeled.1424807601.txt.gz · Last modified: 2015-02-24 20:53 by andi

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