DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:labeled

Labeled Plugin

Compatible with DokuWiki

  • 2017-02-19 "Frusterick Manners" unknown
  • 2016-06-26 "Elenor Of Tsort" unknown
  • 2015-08-10 "Detritus" unknown
  • 2014-09-29 "Hrun" yes

plugin Add labels to wiki pages

Last updated on
2016-07-06
Provides
Admin, Action
Repository
Source
Requires
sqlite

Similar to tagging

Tagged with tags

A CosmoCode Plugin

Installation

:!: External requirements: This plugin requires the following additional components that must be installed separately:

Install the plugin using the 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

Available Labels can be defined admin-page of the labeled plugin.

Embed in Template

You can add the labeled component directly into your template's main.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();
        }
    }
?>

Users of the dokuwiki template could also put above code in a newly created file conf/sidebarfooter.html.

Using with Vector Template

Users of the vector template could also put following to dokuwiki/lib/tpl/vector/user/boxes.php (NOT dokuwiki/lib/tpl/vector/conf/boxes.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();
        }
    }
}

Development

Known Bugs and Issues

Please refer to the issue tracker for reporting issues.

plugin/labeled.txt · Last modified: 2016-07-21 09:14 by andi