Blog Plugin

—- plugin —-
description: Use DokuWiki as blogging tool
author : Dokufreaks (previous author: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner)
email : freaks@dokuwiki.org
type : syntax, action, helper
lastupdate : 2023-10-24
compatible : Librarian, Kaos, Lemming, Anteater, Rincewind, Angua, Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, Greebo, Hogfather, Igor, Jack Jackrum
depends : include, pagelist
conflicts :
similar : blogtng, miniblog
tags : blog, news

downloadurl: https://github.com/dokufreaks/plugin-blog/archive/master.zip
bugtracker : https://github.com/dokufreaks/plugin-blog/issues
sourcerepo : https://github.com/dokufreaks/plugin-blog


Description

The Blog Plugin makes blogs in your wiki easily possible. The blog component shows the latest entries (pages) from a namespace in reverse chronological order. In this new version, the creation date is the sort key – no longer the date of the last non-minor modification as in previous versions. The archive component lists all entries that were written (created) in the given month.

Installation

Download plugin-blog.tgz
BundleHub Configure your own DokuWiki blogsuite install package, consisting of all mandatory plugins plus any optional features you want to include:
BlogSuite BundleHub :!: The Bundle Hub is currently out of date and not updated any more, please install the plugins individually :!:
FIXME Site seems to be down for sime time, here is the archived version if you want to see possible optional plugins & features.
Tips If you intend to use this plugin be sure to take a look at the blogging tips page

Syntax

Blog

[namespace] namespace for the blog; subspaces will be searched as well; * is the whole wiki, . is the same namespace as the page lies in optional; default is the blog namespace set in the configuration
[number] number of entries to show per page optional; default is 5
[flags] flags are delimited by &
all Include plugin flags are supported optional
Form placement: topform/bottomform/noform optional, default is topform
Custom new-entry form title: newentrytitle=Custom title optional, can also be set as a configuration option
Hide paging controls: nopagingcontrols optional

This includes a specified number of most recent blog entries from the given namespace into the current page. Below the entries a link to the page (permalink), the author, the creation date and the number of comments are shown. Link, author, date and comments info can be hidden. At the end of the blog a link to older entries lets you navigate in the history of the blog. At the very end, if you have enough rights to create new pages, a form for new blog entries is displayed.

Note that when the page with the blog syntax is in the specified namespace, content my be shown twice. At some point, the loop will be detected and stopped. You should therefore make sure that either the page with the listing is in a different namespace or use the excluded_pages-option to explicitly exclude the blog page from the blog listing.


Archive

[namespace] the namespace for which you want an archive list; * is the whole wiki, . is the same namespace as the page lies in optional; default is the namespace specified in the configuration
[month] the month for the archive list in YYYY-MM format; * for all pages required
[flags] pagelist flags delimited by &, see flags optional
[username] username of an author optional


Shows a table with all pages of the given namespace that were created in the specified month.

Creates an automatic archive.

Configuration and Settings

The blog plugin can be configured using the DokuWiki configuration manager available in the admin menu.

namespace The default namespace which is used if no namespace was given in the syntax
formposition You can choose to display the new entry form either above or below the blog entries
newentrytitle Set a custom title for all new entry forms. This can also be set on individual blog forms.
dateprefix A date prefix that automatically gets added to pages created with the new entry form. You can use the options from the strftime PHP function; namespace separators work as well, e.g. %Y:%m%d
sortkey Defines how the blog entries are sorted. Available options are creation date, modification date, page name, page ID and page title (first headline)
sortorder Sort the blog entries ascending/descending
excluded_pages Exclude certain pages from the blog listing. Requires a regular expression. Use for example !(^|:)start$! in order to exclude start pages from all blog listings.
To exclude both start and rightsidebar directly below :blog use
!(^|:)blog:(start|rightsidebar)$!
showhistogram Display a histogram in normal archive mode (not for autoarchive)
max_months Maximum number of months to show in the histogram
histogram_height Height of the histogram (in pixels)

Changes

* 2013-10-20: Translation updates, fix cache handling for empty blog listings
* 2013-03-27: Better cache handling for the archive syntax

  • the syntax that lists everything till now correctly updates the cache now whenever a page is changed or a comment or linkback is added.
  • the cache is not used anymore when it contains an archive listing with a page that the current user can't access. The excluded pages won't be included again automatically unless the cache expires for other reasons, the ~~NOCACHE~~ macro can be used if this is needed.


Development

Change Log

Bugs / Feature Requests

Please report bugs or feature requests at the Bug tracker.


FAQ

Please also have a look at the blogging tips page!

My dates are shown wrong. What can I do?

Make sure you run the latest version of all required plugins and DokuWiki.

Is it possible to change the way the date is displayed?

Yes, the plugin uses the dformat option to format the date.

How can I alter the date of a blog post?

You can use the meta plugin to manually set the creation date (and modification date) in the page source, then select the modification date in the blog plugins order setting. An alternative solution would be to alter the timestamps of the created files.

Is it possible to show table of contents?

The table of contents is shown automatically (depending on the settings in DokuWiki itself) from version 2013-02-07 on.

The blog plugin assumes that in the context of a blog the header should be a link. However from version 2013-02-26 on it is possible to disable this behavior by using the nolink-flag, the blog plugin now only sets a default without overriding the nolink flag.

Is it possible to show just the first lines of each post with a 'Read more' link to view the full post?

I think I solved myself.
In the blog mark, use the following flags

This will work if you add an H2 header (in the full post) where you want to make appear the 'Read more' link.
If you don't need or want an H2 header in your post, you can add a empty H2 header, just as a delimiter for the text you want to show in the Blog's headlines


the excluded_pages does not work

In the blog mark ,use the following flags

Tag Plugin

—- plugin —- description: Assign category tags to wiki pages author : Dokufreaks (previous authors: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner) email : freaks@dokuwiki.org type : syntax, action, helper lastupdate : 2023-10-17 compatible : Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, !Greebo, Hogfather, Igor, Jack Jackrum, Kaos, Librarian depends : pagelist conflicts : similar : tags : navigation, blog, tags, listing

downloadurl: https://github.com/dokufreaks/plugin-tag/tarball/master bugtracker : https://github.com/dokufreaks/plugin-tag/issues sourcerepo : https://github.com/dokufreaks/plugin-tag


Description

The Tag Plugin lets you assign category tags to wiki pages.

Components
Tag

Add a tag to the page

{{tag>[list of tags]}}
[list of tags] a space separated list of tags that describe the content of the current page required

Allows you to categorize your wiki pages. The resulting links either point to the corresponding page in the specified tag namespace (only if it exists). If you want a link to point to a page in another namespace, you have to indicate the namespace before the tag name. If this page doesn't exist, just the list of pages with the same tag is shown when you follow one of those links.

Examples:

  • {{tag>tag1 tag2 tag3}}
  • with namespaces: {{tag>ns1:tag1 ns1:tag2 ns2:subns1:tag3}}
  • multiple word tags: {{tag>tag1_with_multiple_words tag2 tag3_part}}
  • {{tag>"tag with spaces" tag2}} – Within quotes you can use spaces. Tag is stored internally with underscores _.
Topic

List all pages with given tags.

{{topic>[tag]&[flags]}}
[tag] the category tag for which you want a list of pages required
[flags] pagelist flags delimited by &, see flags optional

This displays a list of all pages that contain the given category tag. The list is sorted alphabetically by page ID. You can also prepend the modifiers + and -:

  • If you do not prepend, it acts as a OR. A page is added if it has one of these tags.
  • + creates an intersection between the list of pages created by the already defined tags and the pages matching the tag following the + (AND), so each listed page must have this tag.
  • - removes all pages tagged with the given tag from the list of already found pages (NOT).

Example:

  • {{topic>tag1 -tag2}} – Lists all pages tagged with tag1 but not with tag2.
  • {{topic>tag1 +tag2}} – Lists all pages tagged with tag1 and tag2.
  • {{topic>tag1 tag2}} – Lists all pages tagged with either tag1 or tag2 or both.
  • {{topic>ns1?tag1 tag2}} – List all pages inside namespace ns1 tagged with either tag1 or tag2
  • {{topic>.?tag1 tag2}} – List all pages inside the current namespace tagged with either tag1 or tag2
  • {{topic>tag1 tag2 tag3&nodate&desc&sort}} (Adding pagelist options to change the design)
Searchtags

Search form for filtering by tag.

 {{searchtags&[flags]}}
[flags] pagelist flags delimited by &, see flags optional

This displays a search form with the possibility to select a namespace and to select tags from a table of all tags that should either be in- or excluded with the option to choose if the tags should be associated with AND or OR. The results are displayed as in the topic component.

This is a great feature which you should not miss. Please add a screenshot of this cool feature. FIXME

And you might check out TagFilter Plugin for similar purpose but in different scenarios.

Example:

  • {{searchtags}} – The basic syntax
  • {{searchtags&nodate&desc&sort}} – with pagelist options to change the design
  • {{searchtags&nonsform}} – hide the namespace selector
Count

Shows a list of tags and its number of occurrences.

{{count>[tag][&namespace]}}
[tags] The tag for which you want to list the occurrence. Multiple tags separated by spaces. optional
&[namespaces] Counts occurrences for given tags only at pages inside the given namespaces. Multiple namespaces separated by spaces. optional

This part allows you to display an overview of your current used tags. It prints the tag and the related occurrence (how often is the tag used) in your wiki. Either you can specify a + (or empty) as tag-name, which results in a list of all used tags or just specify some tags separated by spaces.

Example:

  • {{count>+}} – List all tags with related occurrences.
  • {{count>tag1 tag2}} – List the occurrence of tag1 and tag2.
  • {{count>tag1 tag2 tag3&. ns1 ns2}} – List all occurrences for the given tags inside the namespaces (the dot . specifies the root namespace)
  • {{count>+&ns1 ns2}} – List all tags in ns1 and ns2.
Tagpage

Make link to the tag list

 {{tagpage>[tag][&dynamic][|title]}}

This displays a link to the listing of all tags as it is done by the Tag syntax but without tagging the page with that tag. With the optional dynamic flag the link becomes red when the listing of all pages with that tag is empty for the current user. The dynamic flag automatically disables the cache of the current page in order to ensure that the link color is always correct. Optionally a title can be specified that will be used as link name.

Example:

  • {{tagpage>test_foo}} – The basic syntax
  • {{tagpage>test_foo&dynamic}} – A link with dynamic link color
  • {{tagpage>test_foo|my title}} – A link with custom title
  • {{tagpage>test_foo&dynamic|my | title}} – A link with dynamic link color and custom title (that can also contain |)
Configuration

The plugin can be configured with the DokuWiki configuration manager available in the admin menu.

namespace Namespace where the tag plugin looks for existing tag pages and links to them instead of the default tag overview. You could use the topic component {{topic>...}} to display the list of tags on such a page for example. The default value of namespace is: tag
sortkey Order in which tagged pages are sorted in the topic overview; available options are cdate as creation date, mdate as modification date, pagename, id as page ID, ns to sort pages before namespaces and title
sortorder Sort order of the topic overview (ascending or descending)
pagelist_flags Comma separated Flags of the pagelist plugin which is used to display the topic overview
toolbar_icon Show icon in page editor toolbar to add tags.
list_tags_of_subns When counting tags in specified namespaces include also tags in subnamespaces.
tags_list_css Choose tags list style between standard or optimised for top of page position.
Tagindex Rebuild

If the tag index becomes corrupted somehow (such as by using page move), then you can rebuild it by using the searchindex plugin or bin/indexer.php.

Demo / Screenshots

Topic listing: Tag overview

Tags: A page with tags

Changes
  • 2014-02-16
    • New and updated translations
    • Fixed tag searching with out of date indexes and numbers
    • Drop compatibility with DokuWiki versions older than 2013-05-10 “Weatherwax” in order to be able to use newer DokuWiki features
  • 2013-04-14
    • New sorting key “ns” which lists for each namespace first all pages in the namespace sorted by name and then all subnamespaces sorted by namespace name
    • Sort by page name (as displayed by the pagelist plugin) when no title exists and the sort key is title
    • In the topic syntax an implicit query for all pages is assumed if the query starts with a tag with “+” or “-”, this means that “+tag +tag2” is now the same as “tag +tag2” and that “-tag1” will return all pages without tag1.
    • The tagRefine-function (used by the blog plugin) now also supports tags without “+” or “-”
    • Revert the tag query change that was introduced in version 2012-08-24, before this change the query was executed as if all tags with a “+” or “-” were at the end while the documentation actually describes that the order matters. Each part of the query modifies the existing result set and either adds new pages (tag without “+” or “-”) or removes all pages with (“-”) or without a tag (“+”).
  • 2013-04-05:
    • New tagpage feature for creating a link to the list of all pages with a certain tag without tagging the page
    • Removed the Technorati ping feature as Technorati is no longer using any pings
    • zh-tw translation updated
  • 2013-02-15:
    • :!: fixed a security issue (XSS vulnerability), if you are using an older version of the tag plugin you should upgrade ASAP!
  • 2012-11-25
    • New searchtags feature, displays a search form for the topic syntax
    • Fix section edit button styles for the new dokuwiki template
    • In the topic syntax now really only namespaces and not pages are matched by namespace parameter
    • When sorting by the title the case is ignored now
    • The topic syntax of the tag plugin is now used instead of the topic syntax of the blogtng plugin when both are installed
    • Fix problems that tags could be missing when another page is rendered during the preview or when an old revision is diplayed
  • 2012-08-24
    • The tag plugin is now using the metadata index of DokuWiki instead of its own index for storing tags. Most plugins that need the tag plugin need to be adapted.
    • Tags are now normalized in the same way as page ids are normalized

Development changelog:

Sites using this Plugin

Feel free to add yours here:

FAQ
How to use tags which consist of multiple words?

Just use an “_”, it gets automatically replaced by a “ ” i.e.:

{{tag>tag_with_multiple_words}}

Also, quotes seem to work:

{{tag>"tag with multiple words"}}
How to make the tag namespace breadcrumb still work

Let's use one of the example websites.

If you go to https://wiki.psiconauti.net/tag/esperienze?do=showtag&tag=esperienze and then click in the breadcrumb “esperienze” you go to https://wiki.psiconauti.net/tag/esperienze , an empty page. To make your pages inside the tag namespace always go to the tag list, add this to the beginning of your /.htaccess

This also allows you to keep your start page to add there, for example, the list of tags If your start page is not “start”, change it to the one you use

RewriteCond %{REQUEST_URI}            !tag:start
RewriteRule ^tag.([\-_a-zA-Z0-9\ ]*)$  tag:$1?do=showtag&tag=$1
Change CSS styles depending on existing tags

This colors the background of the page to red if the keyword 'deprecated' is specified as a tag.

action.php
function _handle_keywords(&$data) {
        global $ID;
 
        // Fetch tags for the page; stop proceeding when no tags specified
        $tags = p_get_metadata($ID, 'subject', METADATA_DONT_RENDER);
        if(is_null($tags)) return;
 
        // Replace underscores with blanks
        foreach($data->data['meta'] as &$meta) {
            if($meta['name'] == 'keywords') {
                $meta['content'] = str_replace('_', ' ', $meta['content']);
 
                // add extra styling
                $t = explode(',', $meta['content']);
                if(in_array('deprecated', $t)) {
                    $data->data['style'][] = array('type'  => 'text/css',
                                                     '_data' => '.dokuwiki .page {background-color: red;}');
                }
            }
        }       
}
Customizing the breadcrumbs

If you add at pagelist/helper.php

function tpl_youarehere2_help($id){
    $result = '';
    global $conf;
    global $ID;
    global $lang;
    // check if enabled
    if(!$conf['youarehere']) return false;
    $parts = explode(':', $id);
    $count = count($parts);
    // always print the startpage
    $result .= html_wikilink(':'.$conf['start']);
    // print intermediate namespace links
    $part = '';
    for($i=0; $i<$count - 1; $i++){
        $part .= $parts[$i].':';
        $page = $part;
        if ($page == $conf['start']) continue; // Skip startpage
        // output
        $result .= ' &raquo '.html_wikilink($page);
    }
    // print current page, skipping start page, skipping for namespace index
    resolve_pageid('',$page,$exists);
    if(isset($page) && $page==$part.$parts[$i]) return $result;
    $page = $part.$parts[$i];
    if($page == $conf['start']) return $result;
    $result .= ' &raquo '.html_wikilink($page);
    return $result;
}
 
function tpl_youarehere2($id) {
    $str = $this->tpl_youarehere2_help($id);
    $pos = strrpos($str , '&raquo');
    if ($pos == -1)
    return $str;
    return substr($str, 0, $pos);
}
 
function addPage2($page) {
    $id = $page['id'];
    if (!$id) return false;
    $this->page = $page;
    $this->_meta = NULL;
    // priority and draft
    if (!isset($this->page['draft'])) {
        $this->page['draft'] = ($this->_getMeta('type') == 'draft');
    }
    $class = '';
    if (isset($this->page['priority'])) $class .= 'priority'.$this->page['priority']. ' ';
    if ($this->page['draft']) $class .= 'draft ';
    if ($this->page['class']) $class .= $this->page['class'];
    if(!empty($class)) $class = ' class="' . $class . '"';
    $this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF;
    $this->_pageCell($id);
    if ($this->column['date']) $this->_dateCell();
    if ($this->column['user']) $this->_userCell();
    if ($this->column['desc']) $this->_descCell();
    foreach ($this->plugins as $plug => $col) {
        if ($this->column[$col]) $this->_pluginCell($plug, $col, $id);
    }
    $this->doc .= DOKU_TAB.'</tr>'.DOKU_LF;
    $this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF;
    $this->doc .= DOKU_TAB.DOKU_TAB.'<td style="padding-left:19px; padding-right:15px; padding-bottom:15px; font-size:10px;">';
    $this->doc .= $this->tpl_youarehere2($id);
    $this->doc .='</td>'.DOKU_LF;
    $this->doc .= DOKU_TAB.'</tr>'.DOKU_LF;
    return true;
}

And change tag/action.php

$pagelist->setFlags($flags);
$pagelist->startList();
foreach ($pages as $page) {
    $pagelist->addPage($page);
}

to

$pagelist->setFlags($flags);
$pagelist->startList();
foreach ($pages as $page) {
    $pagelist->addPage2($page);
}

After that, the list of pages that contain the tag, except for the names of pages themselves under them will also be bread crumbs to these pages.

Bad appearance when displaying tags at top of page

:!: Integrated to main code (see tags_list_css) option

When you insert the syntax at the top of a wiki page, the output of the plugin will be displayed below the TOC (Table of Contents). To make the visual appearance more smooth, change your lib/plugins/tag/style.css to the following code:

div.dokuwiki div.tags {
  border-top: 2px dotted __border__;
  font-size: 95%;
  text-align: right;
/*  clear: both; */
}
How to change the word tag and topic to another language
Is it possible to change the word tag used in syntax to something else, like another language {{tagInMylanguage>someTag}} –damascene 2012/04/10

You need to add copy of the existing tag pattern, and modify it to

syntax/tag.php
    $this->Lexer->addSpecialPattern('\{\{tag>.*?\}\}', $mode, 'plugin_tag_tag');
    //e.g. Spanish:
    $this->Lexer->addSpecialPattern('\{\{etiqueta>.*?\}\}', $mode, 'plugin_tag_tag');
Discussion
Pagelist With Alphabetical Headers

Is there a way to group pages by the first letter of their name or header?

Something like the example in this post on the user forums? https://forum.dokuwiki.org/d/12198-alphabetical-ordered-pages-list

No.

Collapsible outline of all tags? My ideal tag “cloud” display would have an alphabetic list of all tags. Click on a tag to expand (unfold) the display, and it would show an alphabetic list of pages that include that tag. We would want typical flags, such as for specifying namespaces, and display (like nspages), plus limiting tags (perhaps with RegEx?).
–davidtango 2021-03-21

—

I want the description under the tag, is it possible to make a line brake or to get the description under the tag? Thx

Is there any tip for hierarchical tag? I try to categorize my pages. For example, there are two pages. A Persian cat page has {tag>animal:cat}. And a Dalmatian dog page has {tag>animal:dog}. If I write '{topic>animal}, I hope to see the two pages, but all I can see is blank. Yes, I can tag that {tag>animal dog}, {tag>animal cat}, but it is not fancy.

For bugs or feature requests, there is the bug tracker linked here : Bug tracker.

This plugin clashes with the include module of the mediasyntax plugin. One workaround is to disable that part of the mediasyntax plugin by renaming the include.php file.

If you have a tag name that is the same as a page name that already exists, the tag links will point to that page in the current namespace rather than the page name in the tag namespace. Is this a bug or a feature? (3-Aug-2011)?

Found the issue. If you do not specify a namespace, it defaults to whatever is defined as the default namespace (ie. root:tag). If you do specify a namespace, it makes whatever you specify as the location for the data file (ie. root:mynamespace), NOT root:tag:mynamespace.
  • Is there no way to display all used tags? This would be very useful for finding typos and (nearly) duplicate entries. (2012-02-21)
    • Sry, me stupid, it works with count… BUG except that the table-entries are empty in my wiki! Latest DW/Plugin, with ~~NOCACHE~~ Screenshot. Sry for not registering at github for this.
      • In most of my installation it works, in some not… clueless!
    • How to sort the taglist (count>+) alphabetical?

My wiki has about 7000 pages with tags. It takes 25 seconds to display ~~TAGCLOUD~~ (My server runs with latest NGINX, UBUNTU 12.04, 4 core i5 cpu with 8gb ram, intel SSD ). Anyone have any other suggestion? or Do I need SQL-based tagging solution? — S.C. Yoo 2014/04/19 06:02

Individual Search Form: I'd like a form where the user could just type in the tag name, click search, and then a list is generated below. I know you got the searchtags but its just going to get unwieldy with the amount of tags I'm envisioning having. Thanks

Structured Tags: Can this (or any other plugin) support structured tags in addition to free-form tags? – 2014-09-02

Blank pages

I'm using Dokuwiki under Debian, last version in Debian distro. I installed plugin tags, but don't work :(

All page with {{tag>name_tag}} results a blank page, including the content of the page. I don't know what don't work but, I can't use it :(

I am using Debian Wheezy and I am having the same issue.

»»»»» Hy, I think the tag should be separted by a “,”. I mean what happen if I wanna tag “New York City” ? In present is created separte tag for “new” “york” “city” and that's not really good. — A.V

Nothing was found.

Same here, get a Nothing was found page.

(2017-03-28) I had the same problem. By coincidence, I switched to the default Dokuwiki template for an unrelated reason and got a different error when I clicked a tag link: “Helper plugin pagelist is not available.” Installed the pagelist plugin and then it worked. This dependency needs to be documented.

SEO meta keywords

Does this plugin alter the meta tags of the rendered pages? If it doesn't, I would like to leave the suggestion. — Fabricio Rocha 2016-06-11 17:00

Sorting the {{count>}} results

Is there any way to sort the output of the {{count>}} command? I'd like to have a page of used tags in alphabetical order, but it seems that pagelist parameters are not supported. — Fabricio Rocha 2016-06-19 19:42

This can be achieved by editing the helper.php file of the plugin. Before the return $otag; line within the function tagOccurrences, just insert the line ksort($otags); and that's all. IMO this should be standard behavior. — Taylan

In the current version for dokuwiki “kaos”, you need to put the line ksort($tagOccurrences); just before the statement return $tagOccurrences; — Jim

Unorderd List of all tags?

Is there a way to gen an unorderd list of all tags, similar as

Tag#
1
1
1
1
1
1
1

, but without table and occurrences?

Filtering the list of Tags?

Hi, I have attempted to try an solve this but my apologies as I do not know enough about PHP. I use some tags on the site to create dynamic links and I was wondering if there is a way to have the tagsearch have the capability to ignore certain tags. In this case I start the dynamic tags with dw_ and would like to know if possible to filter out all the tags that start with dw_. Thanks for any help! Frank.

Add "*" to list all the tags under a tag namespace?

I need a function to add all the tags under a tag namespace to the tag list.
That is, when I have a ns1:tag1, ns1:tag2, …, ns1:tagN, I can use

{{topic> ns1:*}}

to show all the pages with the tag under the namespace ns1. It is quite useful because sometimes I just want to show the pages with a sub tag, but sometimes I want to show all the pages with these tags on a main page. Since the tags under ns1 may be added in the future, I do not need to change the main page code to add more tags.
Now the tag namespace cannot be managed, I hope the basic function can be added.
2021-6-28

—

Columns?

2024-12-23

Is there a way to show the countlist or topic list (or just a list of tags) in a multicolumn format? I tried using the WRAP plugin, but that did not work.

Count Table Columns

2025-05-01

I too would like to have more columns for the count list or topic list. I tried creating userstyle.css file and directly editing the columns for the tables created with the plugin, but that had no effect. I also tried editing it by accessing the ul.plugin_tag_cloud but that also had no effect.

It is rather impossible to navigate the count list when you have dozens of tags, let alone the hundreds my wiki is using.

Exclude subnamespaces

I would have think something like {{topic>:?tag1 -:ns1?tag1}} would have showed every tag1 but NOT (minus -) :ns1?tag1.
It doesn't though. Is there any way to list every tag1 pages except the ones from :ns1 ?

2026-2-5 16:38:34

2026/02/05 16:38 · jackboo
Blog Plugin

—- plugin —-
description: Use DokuWiki as blogging tool
author : Dokufreaks (previous author: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner)
email : freaks@dokuwiki.org
type : syntax, action, helper
lastupdate : 2023-10-24
compatible : Librarian, Kaos, Lemming, Anteater, Rincewind, Angua, Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, Greebo, Hogfather, Igor, Jack Jackrum
depends : include, pagelist
conflicts :
similar : blogtng, miniblog
tags : blog, news

downloadurl: https://github.com/dokufreaks/plugin-blog/archive/master.zip
bugtracker : https://github.com/dokufreaks/plugin-blog/issues
sourcerepo : https://github.com/dokufreaks/plugin-blog


Description

The Blog Plugin makes blogs in your wiki easily possible. The blog component shows the latest entries (pages) from a namespace in reverse chronological order. In this new version, the creation date is the sort key – no longer the date of the last non-minor modification as in previous versions. The archive component lists all entries that were written (created) in the given month.

Installation
Download plugin-blog.tgz
BundleHub Configure your own DokuWiki blogsuite install package, consisting of all mandatory plugins plus any optional features you want to include:
BlogSuite BundleHub :!: The Bundle Hub is currently out of date and not updated any more, please install the plugins individually :!:
FIXME Site seems to be down for sime time, here is the archived version if you want to see possible optional plugins & features.
Tips If you intend to use this plugin be sure to take a look at the blogging tips page
Syntax
Blog
[namespace] namespace for the blog; subspaces will be searched as well; * is the whole wiki, . is the same namespace as the page lies in optional; default is the blog namespace set in the configuration
[number] number of entries to show per page optional; default is 5
[flags] flags are delimited by &
all Include plugin flags are supported optional
Form placement: topform/bottomform/noform optional, default is topform
Custom new-entry form title: newentrytitle=Custom title optional, can also be set as a configuration option
Hide paging controls: nopagingcontrols optional

This includes a specified number of most recent blog entries from the given namespace into the current page. Below the entries a link to the page (permalink), the author, the creation date and the number of comments are shown. Link, author, date and comments info can be hidden. At the end of the blog a link to older entries lets you navigate in the history of the blog. At the very end, if you have enough rights to create new pages, a form for new blog entries is displayed.

Note that when the page with the blog syntax is in the specified namespace, content my be shown twice. At some point, the loop will be detected and stopped. You should therefore make sure that either the page with the listing is in a different namespace or use the excluded_pages-option to explicitly exclude the blog page from the blog listing.


Archive
[namespace] the namespace for which you want an archive list; * is the whole wiki, . is the same namespace as the page lies in optional; default is the namespace specified in the configuration
[month] the month for the archive list in YYYY-MM format; * for all pages required
[flags] pagelist flags delimited by &, see flags optional
[username] username of an author optional


Shows a table with all pages of the given namespace that were created in the specified month.

Creates an automatic archive.

Configuration and Settings

The blog plugin can be configured using the DokuWiki configuration manager available in the admin menu.

namespace The default namespace which is used if no namespace was given in the syntax
formposition You can choose to display the new entry form either above or below the blog entries
newentrytitle Set a custom title for all new entry forms. This can also be set on individual blog forms.
dateprefix A date prefix that automatically gets added to pages created with the new entry form. You can use the options from the strftime PHP function; namespace separators work as well, e.g. %Y:%m%d
sortkey Defines how the blog entries are sorted. Available options are creation date, modification date, page name, page ID and page title (first headline)
sortorder Sort the blog entries ascending/descending
excluded_pages Exclude certain pages from the blog listing. Requires a regular expression. Use for example !(^|:)start$! in order to exclude start pages from all blog listings.
To exclude both start and rightsidebar directly below :blog use
!(^|:)blog:(start|rightsidebar)$!
showhistogram Display a histogram in normal archive mode (not for autoarchive)
max_months Maximum number of months to show in the histogram
histogram_height Height of the histogram (in pixels)
Changes

* 2013-10-20: Translation updates, fix cache handling for empty blog listings
* 2013-03-27: Better cache handling for the archive syntax

  • the syntax that lists everything till now correctly updates the cache now whenever a page is changed or a comment or linkback is added.
  • the cache is not used anymore when it contains an archive listing with a page that the current user can't access. The excluded pages won't be included again automatically unless the cache expires for other reasons, the ~~NOCACHE~~ macro can be used if this is needed.


Development
Change Log
Bugs / Feature Requests

Please report bugs or feature requests at the Bug tracker.


FAQ

Please also have a look at the blogging tips page!

My dates are shown wrong. What can I do?

Make sure you run the latest version of all required plugins and DokuWiki.

Is it possible to change the way the date is displayed?

Yes, the plugin uses the dformat option to format the date.

How can I alter the date of a blog post?

You can use the meta plugin to manually set the creation date (and modification date) in the page source, then select the modification date in the blog plugins order setting. An alternative solution would be to alter the timestamps of the created files.

Is it possible to show table of contents?

The table of contents is shown automatically (depending on the settings in DokuWiki itself) from version 2013-02-07 on.

The blog plugin assumes that in the context of a blog the header should be a link. However from version 2013-02-26 on it is possible to disable this behavior by using the nolink-flag, the blog plugin now only sets a default without overriding the nolink flag.

Is it possible to show just the first lines of each post with a 'Read more' link to view the full post?

I think I solved myself.
In the blog mark, use the following flags

This will work if you add an H2 header (in the full post) where you want to make appear the 'Read more' link.
If you don't need or want an H2 header in your post, you can add a empty H2 header, just as a delimiter for the text you want to show in the Blog's headlines


the excluded_pages does not work

In the blog mark ,use the following flags

Tag Plugin

—- plugin —- description: Assign category tags to wiki pages author : Dokufreaks (previous authors: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner) email : freaks@dokuwiki.org type : syntax, action, helper lastupdate : 2023-10-17 compatible : Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, !Greebo, Hogfather, Igor, Jack Jackrum, Kaos, Librarian depends : pagelist conflicts : similar : tags : navigation, blog, tags, listing

downloadurl: https://github.com/dokufreaks/plugin-tag/tarball/master bugtracker : https://github.com/dokufreaks/plugin-tag/issues sourcerepo : https://github.com/dokufreaks/plugin-tag


Description

The Tag Plugin lets you assign category tags to wiki pages.

Components
Tag

Add a tag to the page

{{tag>[list of tags]}}
[list of tags] a space separated list of tags that describe the content of the current page required

Allows you to categorize your wiki pages. The resulting links either point to the corresponding page in the specified tag namespace (only if it exists). If you want a link to point to a page in another namespace, you have to indicate the namespace before the tag name. If this page doesn't exist, just the list of pages with the same tag is shown when you follow one of those links.

Examples:

  • {{tag>tag1 tag2 tag3}}
  • with namespaces: {{tag>ns1:tag1 ns1:tag2 ns2:subns1:tag3}}
  • multiple word tags: {{tag>tag1_with_multiple_words tag2 tag3_part}}
  • {{tag>"tag with spaces" tag2}} – Within quotes you can use spaces. Tag is stored internally with underscores _.
Topic

List all pages with given tags.

{{topic>[tag]&[flags]}}
[tag] the category tag for which you want a list of pages required
[flags] pagelist flags delimited by &, see flags optional

This displays a list of all pages that contain the given category tag. The list is sorted alphabetically by page ID. You can also prepend the modifiers + and -:

  • If you do not prepend, it acts as a OR. A page is added if it has one of these tags.
  • + creates an intersection between the list of pages created by the already defined tags and the pages matching the tag following the + (AND), so each listed page must have this tag.
  • - removes all pages tagged with the given tag from the list of already found pages (NOT).

Example:

  • {{topic>tag1 -tag2}} – Lists all pages tagged with tag1 but not with tag2.
  • {{topic>tag1 +tag2}} – Lists all pages tagged with tag1 and tag2.
  • {{topic>tag1 tag2}} – Lists all pages tagged with either tag1 or tag2 or both.
  • {{topic>ns1?tag1 tag2}} – List all pages inside namespace ns1 tagged with either tag1 or tag2
  • {{topic>.?tag1 tag2}} – List all pages inside the current namespace tagged with either tag1 or tag2
  • {{topic>tag1 tag2 tag3&nodate&desc&sort}} (Adding pagelist options to change the design)
Searchtags

Search form for filtering by tag.

 {{searchtags&[flags]}}
[flags] pagelist flags delimited by &, see flags optional

This displays a search form with the possibility to select a namespace and to select tags from a table of all tags that should either be in- or excluded with the option to choose if the tags should be associated with AND or OR. The results are displayed as in the topic component.

This is a great feature which you should not miss. Please add a screenshot of this cool feature. FIXME

And you might check out TagFilter Plugin for similar purpose but in different scenarios.

Example:

  • {{searchtags}} – The basic syntax
  • {{searchtags&nodate&desc&sort}} – with pagelist options to change the design
  • {{searchtags&nonsform}} – hide the namespace selector
Count

Shows a list of tags and its number of occurrences.

{{count>[tag][&namespace]}}
[tags] The tag for which you want to list the occurrence. Multiple tags separated by spaces. optional
&[namespaces] Counts occurrences for given tags only at pages inside the given namespaces. Multiple namespaces separated by spaces. optional

This part allows you to display an overview of your current used tags. It prints the tag and the related occurrence (how often is the tag used) in your wiki. Either you can specify a + (or empty) as tag-name, which results in a list of all used tags or just specify some tags separated by spaces.

Example:

  • {{count>+}} – List all tags with related occurrences.
  • {{count>tag1 tag2}} – List the occurrence of tag1 and tag2.
  • {{count>tag1 tag2 tag3&. ns1 ns2}} – List all occurrences for the given tags inside the namespaces (the dot . specifies the root namespace)
  • {{count>+&ns1 ns2}} – List all tags in ns1 and ns2.
Tagpage

Make link to the tag list

 {{tagpage>[tag][&dynamic][|title]}}

This displays a link to the listing of all tags as it is done by the Tag syntax but without tagging the page with that tag. With the optional dynamic flag the link becomes red when the listing of all pages with that tag is empty for the current user. The dynamic flag automatically disables the cache of the current page in order to ensure that the link color is always correct. Optionally a title can be specified that will be used as link name.

Example:

  • {{tagpage>test_foo}} – The basic syntax
  • {{tagpage>test_foo&dynamic}} – A link with dynamic link color
  • {{tagpage>test_foo|my title}} – A link with custom title
  • {{tagpage>test_foo&dynamic|my | title}} – A link with dynamic link color and custom title (that can also contain |)
Configuration

The plugin can be configured with the DokuWiki configuration manager available in the admin menu.

namespace Namespace where the tag plugin looks for existing tag pages and links to them instead of the default tag overview. You could use the topic component {{topic>...}} to display the list of tags on such a page for example. The default value of namespace is: tag
sortkey Order in which tagged pages are sorted in the topic overview; available options are cdate as creation date, mdate as modification date, pagename, id as page ID, ns to sort pages before namespaces and title
sortorder Sort order of the topic overview (ascending or descending)
pagelist_flags Comma separated Flags of the pagelist plugin which is used to display the topic overview
toolbar_icon Show icon in page editor toolbar to add tags.
list_tags_of_subns When counting tags in specified namespaces include also tags in subnamespaces.
tags_list_css Choose tags list style between standard or optimised for top of page position.
Tagindex Rebuild

If the tag index becomes corrupted somehow (such as by using page move), then you can rebuild it by using the searchindex plugin or bin/indexer.php.

Demo / Screenshots

Topic listing: Tag overview

Tags: A page with tags

Changes
  • 2014-02-16
    • New and updated translations
    • Fixed tag searching with out of date indexes and numbers
    • Drop compatibility with DokuWiki versions older than 2013-05-10 “Weatherwax” in order to be able to use newer DokuWiki features
  • 2013-04-14
    • New sorting key “ns” which lists for each namespace first all pages in the namespace sorted by name and then all subnamespaces sorted by namespace name
    • Sort by page name (as displayed by the pagelist plugin) when no title exists and the sort key is title
    • In the topic syntax an implicit query for all pages is assumed if the query starts with a tag with “+” or “-”, this means that “+tag +tag2” is now the same as “tag +tag2” and that “-tag1” will return all pages without tag1.
    • The tagRefine-function (used by the blog plugin) now also supports tags without “+” or “-”
    • Revert the tag query change that was introduced in version 2012-08-24, before this change the query was executed as if all tags with a “+” or “-” were at the end while the documentation actually describes that the order matters. Each part of the query modifies the existing result set and either adds new pages (tag without “+” or “-”) or removes all pages with (“-”) or without a tag (“+”).
  • 2013-04-05:
    • New tagpage feature for creating a link to the list of all pages with a certain tag without tagging the page
    • Removed the Technorati ping feature as Technorati is no longer using any pings
    • zh-tw translation updated
  • 2013-02-15:
    • :!: fixed a security issue (XSS vulnerability), if you are using an older version of the tag plugin you should upgrade ASAP!
  • 2012-11-25
    • New searchtags feature, displays a search form for the topic syntax
    • Fix section edit button styles for the new dokuwiki template
    • In the topic syntax now really only namespaces and not pages are matched by namespace parameter
    • When sorting by the title the case is ignored now
    • The topic syntax of the tag plugin is now used instead of the topic syntax of the blogtng plugin when both are installed
    • Fix problems that tags could be missing when another page is rendered during the preview or when an old revision is diplayed
  • 2012-08-24
    • The tag plugin is now using the metadata index of DokuWiki instead of its own index for storing tags. Most plugins that need the tag plugin need to be adapted.
    • Tags are now normalized in the same way as page ids are normalized

Development changelog:

Sites using this Plugin

Feel free to add yours here:

FAQ
How to use tags which consist of multiple words?

Just use an “_”, it gets automatically replaced by a “ ” i.e.:

{{tag>tag_with_multiple_words}}

Also, quotes seem to work:

{{tag>"tag with multiple words"}}
How to make the tag namespace breadcrumb still work

Let's use one of the example websites.

If you go to https://wiki.psiconauti.net/tag/esperienze?do=showtag&tag=esperienze and then click in the breadcrumb “esperienze” you go to https://wiki.psiconauti.net/tag/esperienze , an empty page. To make your pages inside the tag namespace always go to the tag list, add this to the beginning of your /.htaccess

This also allows you to keep your start page to add there, for example, the list of tags If your start page is not “start”, change it to the one you use

RewriteCond %{REQUEST_URI}            !tag:start
RewriteRule ^tag.([\-_a-zA-Z0-9\ ]*)$  tag:$1?do=showtag&tag=$1
Change CSS styles depending on existing tags

This colors the background of the page to red if the keyword 'deprecated' is specified as a tag.

action.php
function _handle_keywords(&$data) {
        global $ID;
 
        // Fetch tags for the page; stop proceeding when no tags specified
        $tags = p_get_metadata($ID, 'subject', METADATA_DONT_RENDER);
        if(is_null($tags)) return;
 
        // Replace underscores with blanks
        foreach($data->data['meta'] as &$meta) {
            if($meta['name'] == 'keywords') {
                $meta['content'] = str_replace('_', ' ', $meta['content']);
 
                // add extra styling
                $t = explode(',', $meta['content']);
                if(in_array('deprecated', $t)) {
                    $data->data['style'][] = array('type'  => 'text/css',
                                                     '_data' => '.dokuwiki .page {background-color: red;}');
                }
            }
        }       
}
Customizing the breadcrumbs

If you add at pagelist/helper.php

function tpl_youarehere2_help($id){
    $result = '';
    global $conf;
    global $ID;
    global $lang;
    // check if enabled
    if(!$conf['youarehere']) return false;
    $parts = explode(':', $id);
    $count = count($parts);
    // always print the startpage
    $result .= html_wikilink(':'.$conf['start']);
    // print intermediate namespace links
    $part = '';
    for($i=0; $i<$count - 1; $i++){
        $part .= $parts[$i].':';
        $page = $part;
        if ($page == $conf['start']) continue; // Skip startpage
        // output
        $result .= ' &raquo '.html_wikilink($page);
    }
    // print current page, skipping start page, skipping for namespace index
    resolve_pageid('',$page,$exists);
    if(isset($page) && $page==$part.$parts[$i]) return $result;
    $page = $part.$parts[$i];
    if($page == $conf['start']) return $result;
    $result .= ' &raquo '.html_wikilink($page);
    return $result;
}
 
function tpl_youarehere2($id) {
    $str = $this->tpl_youarehere2_help($id);
    $pos = strrpos($str , '&raquo');
    if ($pos == -1)
    return $str;
    return substr($str, 0, $pos);
}
 
function addPage2($page) {
    $id = $page['id'];
    if (!$id) return false;
    $this->page = $page;
    $this->_meta = NULL;
    // priority and draft
    if (!isset($this->page['draft'])) {
        $this->page['draft'] = ($this->_getMeta('type') == 'draft');
    }
    $class = '';
    if (isset($this->page['priority'])) $class .= 'priority'.$this->page['priority']. ' ';
    if ($this->page['draft']) $class .= 'draft ';
    if ($this->page['class']) $class .= $this->page['class'];
    if(!empty($class)) $class = ' class="' . $class . '"';
    $this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF;
    $this->_pageCell($id);
    if ($this->column['date']) $this->_dateCell();
    if ($this->column['user']) $this->_userCell();
    if ($this->column['desc']) $this->_descCell();
    foreach ($this->plugins as $plug => $col) {
        if ($this->column[$col]) $this->_pluginCell($plug, $col, $id);
    }
    $this->doc .= DOKU_TAB.'</tr>'.DOKU_LF;
    $this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF;
    $this->doc .= DOKU_TAB.DOKU_TAB.'<td style="padding-left:19px; padding-right:15px; padding-bottom:15px; font-size:10px;">';
    $this->doc .= $this->tpl_youarehere2($id);
    $this->doc .='</td>'.DOKU_LF;
    $this->doc .= DOKU_TAB.'</tr>'.DOKU_LF;
    return true;
}

And change tag/action.php

$pagelist->setFlags($flags);
$pagelist->startList();
foreach ($pages as $page) {
    $pagelist->addPage($page);
}

to

$pagelist->setFlags($flags);
$pagelist->startList();
foreach ($pages as $page) {
    $pagelist->addPage2($page);
}

After that, the list of pages that contain the tag, except for the names of pages themselves under them will also be bread crumbs to these pages.

Bad appearance when displaying tags at top of page

:!: Integrated to main code (see tags_list_css) option

When you insert the syntax at the top of a wiki page, the output of the plugin will be displayed below the TOC (Table of Contents). To make the visual appearance more smooth, change your lib/plugins/tag/style.css to the following code:

div.dokuwiki div.tags {
  border-top: 2px dotted __border__;
  font-size: 95%;
  text-align: right;
/*  clear: both; */
}
How to change the word tag and topic to another language
Is it possible to change the word tag used in syntax to something else, like another language {{tagInMylanguage>someTag}} –damascene 2012/04/10

You need to add copy of the existing tag pattern, and modify it to

syntax/tag.php
    $this->Lexer->addSpecialPattern('\{\{tag>.*?\}\}', $mode, 'plugin_tag_tag');
    //e.g. Spanish:
    $this->Lexer->addSpecialPattern('\{\{etiqueta>.*?\}\}', $mode, 'plugin_tag_tag');
Discussion
Pagelist With Alphabetical Headers

Is there a way to group pages by the first letter of their name or header?

Something like the example in this post on the user forums? https://forum.dokuwiki.org/d/12198-alphabetical-ordered-pages-list

No.

Collapsible outline of all tags? My ideal tag “cloud” display would have an alphabetic list of all tags. Click on a tag to expand (unfold) the display, and it would show an alphabetic list of pages that include that tag. We would want typical flags, such as for specifying namespaces, and display (like nspages), plus limiting tags (perhaps with RegEx?).
–davidtango 2021-03-21

—

I want the description under the tag, is it possible to make a line brake or to get the description under the tag? Thx

Is there any tip for hierarchical tag? I try to categorize my pages. For example, there are two pages. A Persian cat page has {tag>animal:cat}. And a Dalmatian dog page has {tag>animal:dog}. If I write '{topic>animal}, I hope to see the two pages, but all I can see is blank. Yes, I can tag that {tag>animal dog}, {tag>animal cat}, but it is not fancy.

For bugs or feature requests, there is the bug tracker linked here : Bug tracker.

This plugin clashes with the include module of the mediasyntax plugin. One workaround is to disable that part of the mediasyntax plugin by renaming the include.php file.

If you have a tag name that is the same as a page name that already exists, the tag links will point to that page in the current namespace rather than the page name in the tag namespace. Is this a bug or a feature? (3-Aug-2011)?

Found the issue. If you do not specify a namespace, it defaults to whatever is defined as the default namespace (ie. root:tag). If you do specify a namespace, it makes whatever you specify as the location for the data file (ie. root:mynamespace), NOT root:tag:mynamespace.
  • Is there no way to display all used tags? This would be very useful for finding typos and (nearly) duplicate entries. (2012-02-21)
    • Sry, me stupid, it works with count… BUG except that the table-entries are empty in my wiki! Latest DW/Plugin, with ~~NOCACHE~~ Screenshot. Sry for not registering at github for this.
      • In most of my installation it works, in some not… clueless!
    • How to sort the taglist (count>+) alphabetical?

My wiki has about 7000 pages with tags. It takes 25 seconds to display ~~TAGCLOUD~~ (My server runs with latest NGINX, UBUNTU 12.04, 4 core i5 cpu with 8gb ram, intel SSD ). Anyone have any other suggestion? or Do I need SQL-based tagging solution? — S.C. Yoo 2014/04/19 06:02

Individual Search Form: I'd like a form where the user could just type in the tag name, click search, and then a list is generated below. I know you got the searchtags but its just going to get unwieldy with the amount of tags I'm envisioning having. Thanks

Structured Tags: Can this (or any other plugin) support structured tags in addition to free-form tags? – 2014-09-02

Blank pages

I'm using Dokuwiki under Debian, last version in Debian distro. I installed plugin tags, but don't work :(

All page with {{tag>name_tag}} results a blank page, including the content of the page. I don't know what don't work but, I can't use it :(

I am using Debian Wheezy and I am having the same issue.

»»»»» Hy, I think the tag should be separted by a “,”. I mean what happen if I wanna tag “New York City” ? In present is created separte tag for “new” “york” “city” and that's not really good. — A.V

Nothing was found.

Same here, get a Nothing was found page.

(2017-03-28) I had the same problem. By coincidence, I switched to the default Dokuwiki template for an unrelated reason and got a different error when I clicked a tag link: “Helper plugin pagelist is not available.” Installed the pagelist plugin and then it worked. This dependency needs to be documented.

SEO meta keywords

Does this plugin alter the meta tags of the rendered pages? If it doesn't, I would like to leave the suggestion. — Fabricio Rocha 2016-06-11 17:00

Sorting the {{count>}} results

Is there any way to sort the output of the {{count>}} command? I'd like to have a page of used tags in alphabetical order, but it seems that pagelist parameters are not supported. — Fabricio Rocha 2016-06-19 19:42

This can be achieved by editing the helper.php file of the plugin. Before the return $otag; line within the function tagOccurrences, just insert the line ksort($otags); and that's all. IMO this should be standard behavior. — Taylan

In the current version for dokuwiki “kaos”, you need to put the line ksort($tagOccurrences); just before the statement return $tagOccurrences; — Jim

Unorderd List of all tags?

Is there a way to gen an unorderd list of all tags, similar as

Tag#
1
1
1
1
1
1
1

, but without table and occurrences?

Filtering the list of Tags?

Hi, I have attempted to try an solve this but my apologies as I do not know enough about PHP. I use some tags on the site to create dynamic links and I was wondering if there is a way to have the tagsearch have the capability to ignore certain tags. In this case I start the dynamic tags with dw_ and would like to know if possible to filter out all the tags that start with dw_. Thanks for any help! Frank.

Add "*" to list all the tags under a tag namespace?

I need a function to add all the tags under a tag namespace to the tag list.
That is, when I have a ns1:tag1, ns1:tag2, …, ns1:tagN, I can use

{{topic> ns1:*}}

to show all the pages with the tag under the namespace ns1. It is quite useful because sometimes I just want to show the pages with a sub tag, but sometimes I want to show all the pages with these tags on a main page. Since the tags under ns1 may be added in the future, I do not need to change the main page code to add more tags.
Now the tag namespace cannot be managed, I hope the basic function can be added.
2021-6-28

—

Columns?

2024-12-23

Is there a way to show the countlist or topic list (or just a list of tags) in a multicolumn format? I tried using the WRAP plugin, but that did not work.

Count Table Columns

2025-05-01

I too would like to have more columns for the count list or topic list. I tried creating userstyle.css file and directly editing the columns for the tables created with the plugin, but that had no effect. I also tried editing it by accessing the ul.plugin_tag_cloud but that also had no effect.

It is rather impossible to navigate the count list when you have dozens of tags, let alone the hundreds my wiki is using.

Exclude subnamespaces

I would have think something like {{topic>:?tag1 -:ns1?tag1}} would have showed every tag1 but NOT (minus -) :ns1?tag1.
It doesn't though. Is there any way to list every tag1 pages except the ones from :ns1 ?

2026-2-5 16:38:34

2026/02/05 16:38 · jackboo

====== Add New Page Plugin
Compatible with DokuWiki

2025-05-14 “Librarian”
Download
Report bugs
Donate
pluginPut ‘add new page’ forms within pages, with optional namespace selection


Last updated on
2025-09-21
Provides
Syntax
Repository
Source
Conflicts with
infomail
Similar to catlist, copypage, jsongendoc, new_page_dialog, npd, pagehere

Tagged with button, create, form

Needed for autoincludeindex

By Damien Regad, Benjamin Santalucia, Sam Wilson and other contributors
newpagetemplate cspheader authwordpress deletepagebutton
Edit
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

Edit
Description
This plugin allows you to add new-page forms to wiki pages, so that users can simply enter the title of a new page and go straight to the editing form (rather than first creating a link to the page, or typing the URL directly).

The target namespace for the new page can either be selected from a drop-down list in the new-page form, or specified in the form syntax. Only namespaces to which the user is permitted to write are shown.

The plugin can pair with the newpagetemplate Plugin to start with a predefined template instead of an empty page.

The form submit button is disabled if there is no text in the title field.

Edit
Usage
Put

anywhere in a wiki page to get a new-page-title text entry box, and a namespace selection drop-down menu. More details in the Syntax section below.

Edit
Screenshots
The default form has a drop-down with all namespaces of the wiki and a text field for the pagename.

with configuration option “Hide namespace selection” enabled.

with configuration option “Hide namespace selection” disabled.
Parent namespaces are greyed-out where the user has no access to add pages.
Edit
Edit
Syntax
Edit
Basic
The basic syntax is:


Or, to specify a namespace:


Where namespace is the target namespace for the new page. When this is specified, the namespace selection box can either be hidden (which it is by default) or set to show only sub-namespaces of the given one. This is configured in the main wiki configuration manager. If @PAGE@ (or @NS@) is given, the current page ID (or its namespace) will be used (e.g. for use in namespace templates; see below).

Edit
Creating a namespace
It is possible to use the @INPUT@ placeholder to reference the user's input in the namespace specification. For example,


will create a new namespace within the foo namespace.

Edit
Date/time-based naming
The plugin supports usage of strftime placeholders in the namespace config. This allows adding date elements to the namespace specification



When used together with the autopage option to hide the input field, a daily page can be created with a single button click:


Edit
Configuration overrides
It is possible to override the plugin's configuration for a single usage of the syntax, by specifying a ? followed by the config's name with an optional no prefix to negate it. Values for non-boolean configs can be provided with =, separated by ;. Multiple overrides can be given, separated by , or &.

General syntax:

?[no]<option_1>[=value_1[;value_2]…][,[no]<option_2>]…
Examples:

overwrite the default hide setting


custom namespace exclusion and hide root


disable subnamespace creation – with the code below, entering sub:page will create a page named sub_page instead of page page in namespace sub


Edit
Custom button labels
The submit button's label can be changed from the default Add Page, to a text of your choice using the 'label' option


Custom labels can of course be combined with other parameters, allowing for example to provide a one-click button to create a journal page.


Edit
New-page templates
This plugin is also compatible with the newpagetemplate plugin (note that this is a separate feature to the namespace templates described below). To specify a template to be used with the new page, use one of the following syntaxes:

Use the newtpl template

Present a drop-down list of newtpl1 and
newtpl2, allowing the user to choose one

The same as above, but with nicer titles
Edit
In all of these, the basic >namespace syntax can be included before the hash # character.

Edit
Multiple occurences
The

syntax may be added multiple times on the same page.

Edit
Site templates
To include an add-new-page form in a Site Template, use the following line:

<?php echo p_render('xhtml',p_get_instructions('

'),$info) ?>
Edit
Namespace Templates
Add-new-page forms can also be added to Namespace Templates. The replacement patterns @ID@ and @NS@ can be used in the plugin's namespace parameter.

Edit
Configuration and Settings
You can configure the plugin in the Config Manager of DokuWiki. There are four settings:

Excluded namespaces (exclude) — A semicolon-separated list of namespaces that should be excluded from the namespace selection list. Default: wiki;playground.
Show root namespace (showroot) — Whether to show the wiki's root namespace in the namespace selection list. Default: true.
Hide namespace selection (hide) — Hide the namespace selection list. Only applies if a namespace is given (see above). Default: true.
Hide “access denied” message (hideACL) — Do not show the “You are not allowed to add pages” message when the user doesn't have permission to create pages. Default: false (i.e. do show the message).
Hide the input box (autopage) — The preconfigured namespace is treated as a full page ID. Use with date placeholders). Default: false.
Namespace creation (createns) — When true (default), use of `:` in the page name will create a subnamespace; if false, it will be replaced by `_`, causing a page to be created.
Edit
FAQ
Why is a privileged user not allowed to add pages?
Logged in as administrator, why do I get a You are not allowed to add pages error message ?

This is a known problem, caused by caching. As a workaround, add to the page that contains the form.
Addnewpage form on the admin page?
Is there a possibility to add the plugin as a part of the admin page, like the plugins pagemove or upgrade?

Not currently, but this can be done by modifying your template and including the addnewpage form only when $ACT=='admin'
More than one form per page?
Is it possible to have more than one new-page form on a page?

Yes. Nothing special needs to be done to permit this, just add the markup wherever you want the forms to appear.
Can the textbox be pre-populated with a value? Specifically, the ID variable? (Trying to have a user search for a page, then use this plugin to create the page if they don't find what they're looking for…)
How can a add_page form add in the site template automaticaly? Where to place the php statements?
Edit
Development

2026-2-5 15:54:19

2026/02/05 15:54 · jackboo
备忘录

本站dokuwiki版本:dokuwiki-2018-04-22 3658kb

tag版本plugin-tag-2017-08-24,要配合:pagelist,版本为:plugin-pagelist-2017-08-24.zip

Helper plugin pagelist is not available or invalid.

blog版本 2013 by Michael Hamann,需要include插件

随机访问的代码: <a href=“?do=nsrandompage” >random</a> 使用:DokuWiki-randompage-what

2026-2-5 08:25:31

2026/02/05 08:26 · jackboo
安全

DokuWiki 是一种经常被使用在公共服务上的网络应用。这意味着,例如比起你桌面系统的本地应用,你要承担更多的风险接受恶意使用者的攻击。

DokuWiki 以安全的思想进行开发。我们试着在用户友好和安全之间找到一个平衡,但当无法找到满意的妥协时,更倾向于安全。

该页面对你应该关注哪些方面提供了一个概览,确保你的 DokuWiki 是安全的。

编辑 报告和通知 当你发现 DokuWiki 的安全问题时,请通知我们。你可以按以下方法进行:

提交一个bugs 发送邮件到邮件列表 发送私人邮件到andi [at] splitbrain [dot] org 前两个作为提交 bug 的首选方法,除非当您发现非常严重的错误,如果在 patch 提供之前使该 bug 公开,会危机到全世界已经安装 Dokuwiki 的使用者,那么您应该考虑第三种联系方法。

所有的以前的安全问题可以在这里找到。

根据已知安全问题的严重性,非常小的问题会在以后的版本中进行修正,又或者制作并释放 bugfix。在后一种情况下,更新检查机制会通知用户进行必要的更新。

你应该经常使用当前释放 DokuWiki 的最新版本,因为没有为旧版本发布安全修正程序。

编辑 网站访问安全 DokuWiki 使用文件来存储配置和页面数据。你必须确保这些页面绝不能直接的从网络访问。发布的压缩包里面含有一组 “.htaccess”文件,这些文件会告诉 Apache Web 服务器拒绝访问某些目录。

如果你不使用 Apache Web 服务器又或者你的 Apache 不能使用 “.htaccess” 文件,那么你需要手动设置,确保你的安装安全可靠。

以下目录不应该从网络直接访问:

data conf bin inc(尽管可访问时没有危险) 要检查你是否需要调整访问权限,你可以试着访问http://yourserver.com/data/pages/wiki/dokuwiki.txt。你应该无法以这种方法访问到该文件。

如果你的目录没有进行适当的安全设置,请阅读以下小节,它会告诉你如何做到这些。

编辑 在Apache中拒绝目录访问 最简单的方法就是在您的 Apache 配置中开启 .htaccess 支持。请参考Apache的 .htaccess 教程。

编辑 在 IIS 中拒绝目录访问 可以在 IIS 的配置设置中禁用上述目录的访问。

打开配置工具:开始 → 设置 → 控制面板 → 管理员工具 → IIS 服务 浏览到你想要保护的目录:本地计算机 → 网站 → 默认网站 → 目录的路径 右击文件夹选择属性 → 目录安全 → IP地址和域名限制 → 编辑… 选择“默认情况下,对所有计算机拒绝访问”。 在iis7配置设置中禁用上述目录的访问的方法

打开配置工具:开始 → 设置 → 控制面板 → 管理员工具 → IIS 服务 浏览到你想要保护的目录:本地计算机 → 网站 → 默认网站 →右边功能视图中找到iis里的请求筛选 在URL里添加.你需要保护的目录. 更简单的办法就是在dokuwiki的根目录下.找到web.config文件 如果没有就创建一个 打开改为以下代码

web.config <?xml version=“1.0” encoding=“UTF-8”?> <configuration>

  <system.webServer>
      <security>
          <requestFiltering>
              <filteringRules>
              </filteringRules>
              <alwaysAllowedUrls>
                  <add url="/data/media/" />
              </alwaysAllowedUrls>
              <denyUrlSequences>
                  <add sequence="/data/" />
                  <add sequence="/conf/" />
                  <add sequence="/bin/" />
                  <add sequence="/inc/" />
              </denyUrlSequences>
          </requestFiltering>
      </security>
  </system.webServer>

</configuration> 编辑 将目录移出根文档 为了避免任何对上述目录的访问,最安全的方法就是把它们从 Web 服务所谓的“根文档”中移出来。

data 目录 从根文档中移出 “data” 目录(和它所有的内容) 编辑 savedir 设置,使它指向 “data” 目录的新位置。 例如,如果把 “data” 目录移动到 “/home/yourname/data”,添加以下这一行到 “conf/local.php”:

$conf['savedir'] = '/home/yourname/data/'; conf 目录 从根文档中移出 “conf” 目录(和它所有的内容) 在 “inc” 目录内创建一个名为 preload.php 的文件,设置 “DOKU_CONF” 定义并使它指向 “conf” 目录的新地址。 例如,如果把 “conf” 目录移动到 “/home/yourname/conf”,创建以下的 “inc/preload.php”文件:

inc/preload.php <?php

define('DOKU_CONF','/home/yourname/conf/'); bin 目录 bin 目录包含了命令行工具。如果你没有 shell 可以访问你的服务器,你可以简单的删除该目录和它的内容。否则只要把它移出文档根即可。不需要更多的配置工作。

inc 目录 从文档根中移出该目录,直到目前还没有简单的方法。但是因为它不包含任何的敏感数据,所以不值得努力尝试移出它了。

编辑 DokuWiki 配置设置 DokuWiki 包含了多个配置设置,对安装的各个安全方面产生影响。请参阅每个设置文档,以了解它们能做什么以及建议的设置。

allowdebug – 禁止调试输出,以避免系统信息泄露 :!: fmode, dmode – 设置 DokuWiki 创建文件的文件权限,也可以看到关于建立权限的信息。 fetchsize – 配置外部数据缓存 fullpath – 显示页面的完整路径名 所有的 验证设置 usewordblock – 通过黑名单,防止垃圾邮件 mailguard – 避免收集邮件地址的机器人 iexssprotect – 在 IE 中防范跨站脚本问题 htmlok – 开启 HTML phpok – 开启 PHP hidepages – 在索引和搜索中隐藏特定页面 safemodehack – 解决安全模式的限制 编辑 插件安全 DokuWiki 拥有大量的社群贡献的插件。插件通过添加新的代码为 DokuWiki 提供新的功能。这意味着该代码实际上已经访问到你的服务器。此外在一个完全特设的方式下,插件与 DokuWiki 是分开发布的。它们不像 DokuWiki 的核心代码库那样得到同样的关注和审查。所以,在安装一个插件之前的安全措施是有必要的。

这里有一些提示,帮助你选择你想要安装的插件。

如果可以,在安装插件之前,你应该检阅一下插件的源代码。 如果有疑问,请在邮件列表提问。 插件安装在 DokuWiki 的 lib 目录下,它可以从外部直接访问。检查一下该插件包含哪些文件,并使用适当的 .htaccess 文件锁定对它们的访问。 插件的创作与开发与 DokuWiki 项目没有直接的关系 - 他们可能是经验不足,有恶意或可能是已经被入侵的服务器插件的源代码。小心选择你信任的插件! 回顾上述的安全警告,同时,当插件有可用的新版本时为插件进行升级。 编辑 附加阅读

https://github.com/Chris--S/dokuwiki-plugin-iframe/archive/master.zip 这里有一些更多关于安全方面的内部和外部网页。

设置访问控制 通过 Https 强行登陆 对 DokuWiki 的 php 设置 Remove ACL rules for deleted pages Apache 安全 - 第三章:PHP的锁定.

2026-2-5 06:46:08

2026/02/05 06:46 · jackboo
Tag Plugin

—- plugin —- description: Assign category tags to wiki pages author : Dokufreaks (previous authors: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner) email : freaks@dokuwiki.org type : syntax, action, helper lastupdate : 2023-10-17 compatible : Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, !Greebo, Hogfather, Igor, Jack Jackrum, Kaos, Librarian depends : pagelist conflicts : similar : tags : navigation, blog, tags, listing

downloadurl: https://github.com/dokufreaks/plugin-tag/tarball/master bugtracker : https://github.com/dokufreaks/plugin-tag/issues sourcerepo : https://github.com/dokufreaks/plugin-tag


Description

The Tag Plugin lets you assign category tags to wiki pages.

Components
Tag

Add a tag to the page

{{tag>[list of tags]}}
[list of tags] a space separated list of tags that describe the content of the current page required

Allows you to categorize your wiki pages. The resulting links either point to the corresponding page in the specified tag namespace (only if it exists). If you want a link to point to a page in another namespace, you have to indicate the namespace before the tag name. If this page doesn't exist, just the list of pages with the same tag is shown when you follow one of those links.

Examples:

  • {{tag>tag1 tag2 tag3}}
  • with namespaces: {{tag>ns1:tag1 ns1:tag2 ns2:subns1:tag3}}
  • multiple word tags: {{tag>tag1_with_multiple_words tag2 tag3_part}}
  • {{tag>"tag with spaces" tag2}} – Within quotes you can use spaces. Tag is stored internally with underscores _.
Topic

List all pages with given tags.

{{topic>[tag]&[flags]}}
[tag] the category tag for which you want a list of pages required
[flags] pagelist flags delimited by &, see flags optional

This displays a list of all pages that contain the given category tag. The list is sorted alphabetically by page ID. You can also prepend the modifiers + and -:

  • If you do not prepend, it acts as a OR. A page is added if it has one of these tags.
  • + creates an intersection between the list of pages created by the already defined tags and the pages matching the tag following the + (AND), so each listed page must have this tag.
  • - removes all pages tagged with the given tag from the list of already found pages (NOT).

Example:

  • {{topic>tag1 -tag2}} – Lists all pages tagged with tag1 but not with tag2.
  • {{topic>tag1 +tag2}} – Lists all pages tagged with tag1 and tag2.
  • {{topic>tag1 tag2}} – Lists all pages tagged with either tag1 or tag2 or both.
  • {{topic>ns1?tag1 tag2}} – List all pages inside namespace ns1 tagged with either tag1 or tag2
  • {{topic>.?tag1 tag2}} – List all pages inside the current namespace tagged with either tag1 or tag2
  • {{topic>tag1 tag2 tag3&nodate&desc&sort}} (Adding pagelist options to change the design)
Searchtags

Search form for filtering by tag.

 {{searchtags&[flags]}}
[flags] pagelist flags delimited by &, see flags optional

This displays a search form with the possibility to select a namespace and to select tags from a table of all tags that should either be in- or excluded with the option to choose if the tags should be associated with AND or OR. The results are displayed as in the topic component.

This is a great feature which you should not miss. Please add a screenshot of this cool feature. FIXME

And you might check out TagFilter Plugin for similar purpose but in different scenarios.

Example:

  • {{searchtags}} – The basic syntax
  • {{searchtags&nodate&desc&sort}} – with pagelist options to change the design
  • {{searchtags&nonsform}} – hide the namespace selector
Count

Shows a list of tags and its number of occurrences.

{{count>[tag][&namespace]}}
[tags] The tag for which you want to list the occurrence. Multiple tags separated by spaces. optional
&[namespaces] Counts occurrences for given tags only at pages inside the given namespaces. Multiple namespaces separated by spaces. optional

This part allows you to display an overview of your current used tags. It prints the tag and the related occurrence (how often is the tag used) in your wiki. Either you can specify a + (or empty) as tag-name, which results in a list of all used tags or just specify some tags separated by spaces.

Example:

  • {{count>+}} – List all tags with related occurrences.
  • {{count>tag1 tag2}} – List the occurrence of tag1 and tag2.
  • {{count>tag1 tag2 tag3&. ns1 ns2}} – List all occurrences for the given tags inside the namespaces (the dot . specifies the root namespace)
  • {{count>+&ns1 ns2}} – List all tags in ns1 and ns2.
Tagpage

Make link to the tag list

 {{tagpage>[tag][&dynamic][|title]}}

This displays a link to the listing of all tags as it is done by the Tag syntax but without tagging the page with that tag. With the optional dynamic flag the link becomes red when the listing of all pages with that tag is empty for the current user. The dynamic flag automatically disables the cache of the current page in order to ensure that the link color is always correct. Optionally a title can be specified that will be used as link name.

Example:

  • {{tagpage>test_foo}} – The basic syntax
  • {{tagpage>test_foo&dynamic}} – A link with dynamic link color
  • {{tagpage>test_foo|my title}} – A link with custom title
  • {{tagpage>test_foo&dynamic|my | title}} – A link with dynamic link color and custom title (that can also contain |)
Configuration

The plugin can be configured with the DokuWiki configuration manager available in the admin menu.

namespace Namespace where the tag plugin looks for existing tag pages and links to them instead of the default tag overview. You could use the topic component {{topic>...}} to display the list of tags on such a page for example. The default value of namespace is: tag
sortkey Order in which tagged pages are sorted in the topic overview; available options are cdate as creation date, mdate as modification date, pagename, id as page ID, ns to sort pages before namespaces and title
sortorder Sort order of the topic overview (ascending or descending)
pagelist_flags Comma separated Flags of the pagelist plugin which is used to display the topic overview
toolbar_icon Show icon in page editor toolbar to add tags.
list_tags_of_subns When counting tags in specified namespaces include also tags in subnamespaces.
tags_list_css Choose tags list style between standard or optimised for top of page position.
Tagindex Rebuild

If the tag index becomes corrupted somehow (such as by using page move), then you can rebuild it by using the searchindex plugin or bin/indexer.php.

Demo / Screenshots

Topic listing: Tag overview

Tags: A page with tags

Changes
  • 2014-02-16
    • New and updated translations
    • Fixed tag searching with out of date indexes and numbers
    • Drop compatibility with DokuWiki versions older than 2013-05-10 “Weatherwax” in order to be able to use newer DokuWiki features
  • 2013-04-14
    • New sorting key “ns” which lists for each namespace first all pages in the namespace sorted by name and then all subnamespaces sorted by namespace name
    • Sort by page name (as displayed by the pagelist plugin) when no title exists and the sort key is title
    • In the topic syntax an implicit query for all pages is assumed if the query starts with a tag with “+” or “-”, this means that “+tag +tag2” is now the same as “tag +tag2” and that “-tag1” will return all pages without tag1.
    • The tagRefine-function (used by the blog plugin) now also supports tags without “+” or “-”
    • Revert the tag query change that was introduced in version 2012-08-24, before this change the query was executed as if all tags with a “+” or “-” were at the end while the documentation actually describes that the order matters. Each part of the query modifies the existing result set and either adds new pages (tag without “+” or “-”) or removes all pages with (“-”) or without a tag (“+”).
  • 2013-04-05:
    • New tagpage feature for creating a link to the list of all pages with a certain tag without tagging the page
    • Removed the Technorati ping feature as Technorati is no longer using any pings
    • zh-tw translation updated
  • 2013-02-15:
    • :!: fixed a security issue (XSS vulnerability), if you are using an older version of the tag plugin you should upgrade ASAP!
  • 2012-11-25
    • New searchtags feature, displays a search form for the topic syntax
    • Fix section edit button styles for the new dokuwiki template
    • In the topic syntax now really only namespaces and not pages are matched by namespace parameter
    • When sorting by the title the case is ignored now
    • The topic syntax of the tag plugin is now used instead of the topic syntax of the blogtng plugin when both are installed
    • Fix problems that tags could be missing when another page is rendered during the preview or when an old revision is diplayed
  • 2012-08-24
    • The tag plugin is now using the metadata index of DokuWiki instead of its own index for storing tags. Most plugins that need the tag plugin need to be adapted.
    • Tags are now normalized in the same way as page ids are normalized

Development changelog:

Sites using this Plugin

Feel free to add yours here:

FAQ
How to use tags which consist of multiple words?

Just use an “_”, it gets automatically replaced by a “ ” i.e.:

{{tag>tag_with_multiple_words}}

Also, quotes seem to work:

{{tag>"tag with multiple words"}}
How to make the tag namespace breadcrumb still work

Let's use one of the example websites.

If you go to https://wiki.psiconauti.net/tag/esperienze?do=showtag&tag=esperienze and then click in the breadcrumb “esperienze” you go to https://wiki.psiconauti.net/tag/esperienze , an empty page. To make your pages inside the tag namespace always go to the tag list, add this to the beginning of your /.htaccess

This also allows you to keep your start page to add there, for example, the list of tags If your start page is not “start”, change it to the one you use

RewriteCond %{REQUEST_URI}            !tag:start
RewriteRule ^tag.([\-_a-zA-Z0-9\ ]*)$  tag:$1?do=showtag&tag=$1
Change CSS styles depending on existing tags

This colors the background of the page to red if the keyword 'deprecated' is specified as a tag.

action.php
function _handle_keywords(&$data) {
        global $ID;
 
        // Fetch tags for the page; stop proceeding when no tags specified
        $tags = p_get_metadata($ID, 'subject', METADATA_DONT_RENDER);
        if(is_null($tags)) return;
 
        // Replace underscores with blanks
        foreach($data->data['meta'] as &$meta) {
            if($meta['name'] == 'keywords') {
                $meta['content'] = str_replace('_', ' ', $meta['content']);
 
                // add extra styling
                $t = explode(',', $meta['content']);
                if(in_array('deprecated', $t)) {
                    $data->data['style'][] = array('type'  => 'text/css',
                                                     '_data' => '.dokuwiki .page {background-color: red;}');
                }
            }
        }       
}
Customizing the breadcrumbs

If you add at pagelist/helper.php

function tpl_youarehere2_help($id){
    $result = '';
    global $conf;
    global $ID;
    global $lang;
    // check if enabled
    if(!$conf['youarehere']) return false;
    $parts = explode(':', $id);
    $count = count($parts);
    // always print the startpage
    $result .= html_wikilink(':'.$conf['start']);
    // print intermediate namespace links
    $part = '';
    for($i=0; $i<$count - 1; $i++){
        $part .= $parts[$i].':';
        $page = $part;
        if ($page == $conf['start']) continue; // Skip startpage
        // output
        $result .= ' &raquo '.html_wikilink($page);
    }
    // print current page, skipping start page, skipping for namespace index
    resolve_pageid('',$page,$exists);
    if(isset($page) && $page==$part.$parts[$i]) return $result;
    $page = $part.$parts[$i];
    if($page == $conf['start']) return $result;
    $result .= ' &raquo '.html_wikilink($page);
    return $result;
}
 
function tpl_youarehere2($id) {
    $str = $this->tpl_youarehere2_help($id);
    $pos = strrpos($str , '&raquo');
    if ($pos == -1)
    return $str;
    return substr($str, 0, $pos);
}
 
function addPage2($page) {
    $id = $page['id'];
    if (!$id) return false;
    $this->page = $page;
    $this->_meta = NULL;
    // priority and draft
    if (!isset($this->page['draft'])) {
        $this->page['draft'] = ($this->_getMeta('type') == 'draft');
    }
    $class = '';
    if (isset($this->page['priority'])) $class .= 'priority'.$this->page['priority']. ' ';
    if ($this->page['draft']) $class .= 'draft ';
    if ($this->page['class']) $class .= $this->page['class'];
    if(!empty($class)) $class = ' class="' . $class . '"';
    $this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF;
    $this->_pageCell($id);
    if ($this->column['date']) $this->_dateCell();
    if ($this->column['user']) $this->_userCell();
    if ($this->column['desc']) $this->_descCell();
    foreach ($this->plugins as $plug => $col) {
        if ($this->column[$col]) $this->_pluginCell($plug, $col, $id);
    }
    $this->doc .= DOKU_TAB.'</tr>'.DOKU_LF;
    $this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF;
    $this->doc .= DOKU_TAB.DOKU_TAB.'<td style="padding-left:19px; padding-right:15px; padding-bottom:15px; font-size:10px;">';
    $this->doc .= $this->tpl_youarehere2($id);
    $this->doc .='</td>'.DOKU_LF;
    $this->doc .= DOKU_TAB.'</tr>'.DOKU_LF;
    return true;
}

And change tag/action.php

$pagelist->setFlags($flags);
$pagelist->startList();
foreach ($pages as $page) {
    $pagelist->addPage($page);
}

to

$pagelist->setFlags($flags);
$pagelist->startList();
foreach ($pages as $page) {
    $pagelist->addPage2($page);
}

After that, the list of pages that contain the tag, except for the names of pages themselves under them will also be bread crumbs to these pages.

Bad appearance when displaying tags at top of page

:!: Integrated to main code (see tags_list_css) option

When you insert the syntax at the top of a wiki page, the output of the plugin will be displayed below the TOC (Table of Contents). To make the visual appearance more smooth, change your lib/plugins/tag/style.css to the following code:

div.dokuwiki div.tags {
  border-top: 2px dotted __border__;
  font-size: 95%;
  text-align: right;
/*  clear: both; */
}
How to change the word tag and topic to another language
Is it possible to change the word tag used in syntax to something else, like another language {{tagInMylanguage>someTag}} –damascene 2012/04/10

You need to add copy of the existing tag pattern, and modify it to

syntax/tag.php
    $this->Lexer->addSpecialPattern('\{\{tag>.*?\}\}', $mode, 'plugin_tag_tag');
    //e.g. Spanish:
    $this->Lexer->addSpecialPattern('\{\{etiqueta>.*?\}\}', $mode, 'plugin_tag_tag');
Discussion
Pagelist With Alphabetical Headers

Is there a way to group pages by the first letter of their name or header?

Something like the example in this post on the user forums? https://forum.dokuwiki.org/d/12198-alphabetical-ordered-pages-list

No.

Collapsible outline of all tags? My ideal tag “cloud” display would have an alphabetic list of all tags. Click on a tag to expand (unfold) the display, and it would show an alphabetic list of pages that include that tag. We would want typical flags, such as for specifying namespaces, and display (like nspages), plus limiting tags (perhaps with RegEx?).
–davidtango 2021-03-21

—

I want the description under the tag, is it possible to make a line brake or to get the description under the tag? Thx

Is there any tip for hierarchical tag? I try to categorize my pages. For example, there are two pages. A Persian cat page has {tag>animal:cat}. And a Dalmatian dog page has {tag>animal:dog}. If I write '{topic>animal}, I hope to see the two pages, but all I can see is blank. Yes, I can tag that {tag>animal dog}, {tag>animal cat}, but it is not fancy.

For bugs or feature requests, there is the bug tracker linked here : Bug tracker.

This plugin clashes with the include module of the mediasyntax plugin. One workaround is to disable that part of the mediasyntax plugin by renaming the include.php file.

If you have a tag name that is the same as a page name that already exists, the tag links will point to that page in the current namespace rather than the page name in the tag namespace. Is this a bug or a feature? (3-Aug-2011)?

Found the issue. If you do not specify a namespace, it defaults to whatever is defined as the default namespace (ie. root:tag). If you do specify a namespace, it makes whatever you specify as the location for the data file (ie. root:mynamespace), NOT root:tag:mynamespace.
  • Is there no way to display all used tags? This would be very useful for finding typos and (nearly) duplicate entries. (2012-02-21)
    • Sry, me stupid, it works with count… BUG except that the table-entries are empty in my wiki! Latest DW/Plugin, with ~~NOCACHE~~ Screenshot. Sry for not registering at github for this.
      • In most of my installation it works, in some not… clueless!
    • How to sort the taglist (count>+) alphabetical?

My wiki has about 7000 pages with tags. It takes 25 seconds to display ~~TAGCLOUD~~ (My server runs with latest NGINX, UBUNTU 12.04, 4 core i5 cpu with 8gb ram, intel SSD ). Anyone have any other suggestion? or Do I need SQL-based tagging solution? — S.C. Yoo 2014/04/19 06:02

Individual Search Form: I'd like a form where the user could just type in the tag name, click search, and then a list is generated below. I know you got the searchtags but its just going to get unwieldy with the amount of tags I'm envisioning having. Thanks

Structured Tags: Can this (or any other plugin) support structured tags in addition to free-form tags? – 2014-09-02

Blank pages

I'm using Dokuwiki under Debian, last version in Debian distro. I installed plugin tags, but don't work :(

All page with {{tag>name_tag}} results a blank page, including the content of the page. I don't know what don't work but, I can't use it :(

I am using Debian Wheezy and I am having the same issue.

»»»»» Hy, I think the tag should be separted by a “,”. I mean what happen if I wanna tag “New York City” ? In present is created separte tag for “new” “york” “city” and that's not really good. — A.V

Nothing was found.

Same here, get a Nothing was found page.

(2017-03-28) I had the same problem. By coincidence, I switched to the default Dokuwiki template for an unrelated reason and got a different error when I clicked a tag link: “Helper plugin pagelist is not available.” Installed the pagelist plugin and then it worked. This dependency needs to be documented.

SEO meta keywords

Does this plugin alter the meta tags of the rendered pages? If it doesn't, I would like to leave the suggestion. — Fabricio Rocha 2016-06-11 17:00

Sorting the {{count>}} results

Is there any way to sort the output of the {{count>}} command? I'd like to have a page of used tags in alphabetical order, but it seems that pagelist parameters are not supported. — Fabricio Rocha 2016-06-19 19:42

This can be achieved by editing the helper.php file of the plugin. Before the return $otag; line within the function tagOccurrences, just insert the line ksort($otags); and that's all. IMO this should be standard behavior. — Taylan

In the current version for dokuwiki “kaos”, you need to put the line ksort($tagOccurrences); just before the statement return $tagOccurrences; — Jim

Unorderd List of all tags?

Is there a way to gen an unorderd list of all tags, similar as

Tag#
1
1
1
1
1
1
1

, but without table and occurrences?

Filtering the list of Tags?

Hi, I have attempted to try an solve this but my apologies as I do not know enough about PHP. I use some tags on the site to create dynamic links and I was wondering if there is a way to have the tagsearch have the capability to ignore certain tags. In this case I start the dynamic tags with dw_ and would like to know if possible to filter out all the tags that start with dw_. Thanks for any help! Frank.

Add "*" to list all the tags under a tag namespace?

I need a function to add all the tags under a tag namespace to the tag list.
That is, when I have a ns1:tag1, ns1:tag2, …, ns1:tagN, I can use

{{topic> ns1:*}}

to show all the pages with the tag under the namespace ns1. It is quite useful because sometimes I just want to show the pages with a sub tag, but sometimes I want to show all the pages with these tags on a main page. Since the tags under ns1 may be added in the future, I do not need to change the main page code to add more tags.
Now the tag namespace cannot be managed, I hope the basic function can be added.
2021-6-28

—

Columns?

2024-12-23

Is there a way to show the countlist or topic list (or just a list of tags) in a multicolumn format? I tried using the WRAP plugin, but that did not work.

Count Table Columns

2025-05-01

I too would like to have more columns for the count list or topic list. I tried creating userstyle.css file and directly editing the columns for the tables created with the plugin, but that had no effect. I also tried editing it by accessing the ul.plugin_tag_cloud but that also had no effect.

It is rather impossible to navigate the count list when you have dozens of tags, let alone the hundreds my wiki is using.

Exclude subnamespaces

I would have think something like {{topic>:?tag1 -:ns1?tag1}} would have showed every tag1 but NOT (minus -) :ns1?tag1.
It doesn't though. Is there any way to list every tag1 pages except the ones from :ns1 ?

2026-2-5 16:38:34

2026/02/05 16:38 · jackboo

====== Add New Page Plugin
Compatible with DokuWiki

2025-05-14 “Librarian”
Download
Report bugs
Donate
pluginPut ‘add new page’ forms within pages, with optional namespace selection


Last updated on
2025-09-21
Provides
Syntax
Repository
Source
Conflicts with
infomail
Similar to catlist, copypage, jsongendoc, new_page_dialog, npd, pagehere

Tagged with button, create, form

Needed for autoincludeindex

By Damien Regad, Benjamin Santalucia, Sam Wilson and other contributors
newpagetemplate cspheader authwordpress deletepagebutton
Edit
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

Edit
Description
This plugin allows you to add new-page forms to wiki pages, so that users can simply enter the title of a new page and go straight to the editing form (rather than first creating a link to the page, or typing the URL directly).

The target namespace for the new page can either be selected from a drop-down list in the new-page form, or specified in the form syntax. Only namespaces to which the user is permitted to write are shown.

The plugin can pair with the newpagetemplate Plugin to start with a predefined template instead of an empty page.

The form submit button is disabled if there is no text in the title field.

Edit
Usage
Put

anywhere in a wiki page to get a new-page-title text entry box, and a namespace selection drop-down menu. More details in the Syntax section below.

Edit
Screenshots
The default form has a drop-down with all namespaces of the wiki and a text field for the pagename.

with configuration option “Hide namespace selection” enabled.

with configuration option “Hide namespace selection” disabled.
Parent namespaces are greyed-out where the user has no access to add pages.
Edit
Edit
Syntax
Edit
Basic
The basic syntax is:


Or, to specify a namespace:


Where namespace is the target namespace for the new page. When this is specified, the namespace selection box can either be hidden (which it is by default) or set to show only sub-namespaces of the given one. This is configured in the main wiki configuration manager. If @PAGE@ (or @NS@) is given, the current page ID (or its namespace) will be used (e.g. for use in namespace templates; see below).

Edit
Creating a namespace
It is possible to use the @INPUT@ placeholder to reference the user's input in the namespace specification. For example,


will create a new namespace within the foo namespace.

Edit
Date/time-based naming
The plugin supports usage of strftime placeholders in the namespace config. This allows adding date elements to the namespace specification



When used together with the autopage option to hide the input field, a daily page can be created with a single button click:


Edit
Configuration overrides
It is possible to override the plugin's configuration for a single usage of the syntax, by specifying a ? followed by the config's name with an optional no prefix to negate it. Values for non-boolean configs can be provided with =, separated by ;. Multiple overrides can be given, separated by , or &.

General syntax:

?[no]<option_1>[=value_1[;value_2]…][,[no]<option_2>]…
Examples:

overwrite the default hide setting


custom namespace exclusion and hide root


disable subnamespace creation – with the code below, entering sub:page will create a page named sub_page instead of page page in namespace sub


Edit
Custom button labels
The submit button's label can be changed from the default Add Page, to a text of your choice using the 'label' option


Custom labels can of course be combined with other parameters, allowing for example to provide a one-click button to create a journal page.


Edit
New-page templates
This plugin is also compatible with the newpagetemplate plugin (note that this is a separate feature to the namespace templates described below). To specify a template to be used with the new page, use one of the following syntaxes:

Use the newtpl template

Present a drop-down list of newtpl1 and
newtpl2, allowing the user to choose one

The same as above, but with nicer titles
Edit
In all of these, the basic >namespace syntax can be included before the hash # character.

Edit
Multiple occurences
The

syntax may be added multiple times on the same page.

Edit
Site templates
To include an add-new-page form in a Site Template, use the following line:

<?php echo p_render('xhtml',p_get_instructions('

'),$info) ?>
Edit
Namespace Templates
Add-new-page forms can also be added to Namespace Templates. The replacement patterns @ID@ and @NS@ can be used in the plugin's namespace parameter.

Edit
Configuration and Settings
You can configure the plugin in the Config Manager of DokuWiki. There are four settings:

Excluded namespaces (exclude) — A semicolon-separated list of namespaces that should be excluded from the namespace selection list. Default: wiki;playground.
Show root namespace (showroot) — Whether to show the wiki's root namespace in the namespace selection list. Default: true.
Hide namespace selection (hide) — Hide the namespace selection list. Only applies if a namespace is given (see above). Default: true.
Hide “access denied” message (hideACL) — Do not show the “You are not allowed to add pages” message when the user doesn't have permission to create pages. Default: false (i.e. do show the message).
Hide the input box (autopage) — The preconfigured namespace is treated as a full page ID. Use with date placeholders). Default: false.
Namespace creation (createns) — When true (default), use of `:` in the page name will create a subnamespace; if false, it will be replaced by `_`, causing a page to be created.
Edit
FAQ
Why is a privileged user not allowed to add pages?
Logged in as administrator, why do I get a You are not allowed to add pages error message ?

This is a known problem, caused by caching. As a workaround, add to the page that contains the form.
Addnewpage form on the admin page?
Is there a possibility to add the plugin as a part of the admin page, like the plugins pagemove or upgrade?

Not currently, but this can be done by modifying your template and including the addnewpage form only when $ACT=='admin'
More than one form per page?
Is it possible to have more than one new-page form on a page?

Yes. Nothing special needs to be done to permit this, just add the markup wherever you want the forms to appear.
Can the textbox be pre-populated with a value? Specifically, the ID variable? (Trying to have a user search for a page, then use this plugin to create the page if they don't find what they're looking for…)
How can a add_page form add in the site template automaticaly? Where to place the php statements?
Edit
Development

2026-2-5 15:54:19

2026/02/05 15:54 · jackboo
备忘录

本站dokuwiki版本:dokuwiki-2018-04-22 3658kb

tag版本plugin-tag-2017-08-24,要配合:pagelist,版本为:plugin-pagelist-2017-08-24.zip

Helper plugin pagelist is not available or invalid.

blog版本 2013 by Michael Hamann,需要include插件

随机访问的代码: <a href=“?do=nsrandompage” >random</a> 使用:DokuWiki-randompage-what

2026-2-5 08:25:31

2026/02/05 08:26 · jackboo
安全

DokuWiki 是一种经常被使用在公共服务上的网络应用。这意味着,例如比起你桌面系统的本地应用,你要承担更多的风险接受恶意使用者的攻击。

DokuWiki 以安全的思想进行开发。我们试着在用户友好和安全之间找到一个平衡,但当无法找到满意的妥协时,更倾向于安全。

该页面对你应该关注哪些方面提供了一个概览,确保你的 DokuWiki 是安全的。

编辑 报告和通知 当你发现 DokuWiki 的安全问题时,请通知我们。你可以按以下方法进行:

提交一个bugs 发送邮件到邮件列表 发送私人邮件到andi [at] splitbrain [dot] org 前两个作为提交 bug 的首选方法,除非当您发现非常严重的错误,如果在 patch 提供之前使该 bug 公开,会危机到全世界已经安装 Dokuwiki 的使用者,那么您应该考虑第三种联系方法。

所有的以前的安全问题可以在这里找到。

根据已知安全问题的严重性,非常小的问题会在以后的版本中进行修正,又或者制作并释放 bugfix。在后一种情况下,更新检查机制会通知用户进行必要的更新。

你应该经常使用当前释放 DokuWiki 的最新版本,因为没有为旧版本发布安全修正程序。

编辑 网站访问安全 DokuWiki 使用文件来存储配置和页面数据。你必须确保这些页面绝不能直接的从网络访问。发布的压缩包里面含有一组 “.htaccess”文件,这些文件会告诉 Apache Web 服务器拒绝访问某些目录。

如果你不使用 Apache Web 服务器又或者你的 Apache 不能使用 “.htaccess” 文件,那么你需要手动设置,确保你的安装安全可靠。

以下目录不应该从网络直接访问:

data conf bin inc(尽管可访问时没有危险) 要检查你是否需要调整访问权限,你可以试着访问http://yourserver.com/data/pages/wiki/dokuwiki.txt。你应该无法以这种方法访问到该文件。

如果你的目录没有进行适当的安全设置,请阅读以下小节,它会告诉你如何做到这些。

编辑 在Apache中拒绝目录访问 最简单的方法就是在您的 Apache 配置中开启 .htaccess 支持。请参考Apache的 .htaccess 教程。

编辑 在 IIS 中拒绝目录访问 可以在 IIS 的配置设置中禁用上述目录的访问。

打开配置工具:开始 → 设置 → 控制面板 → 管理员工具 → IIS 服务 浏览到你想要保护的目录:本地计算机 → 网站 → 默认网站 → 目录的路径 右击文件夹选择属性 → 目录安全 → IP地址和域名限制 → 编辑… 选择“默认情况下,对所有计算机拒绝访问”。 在iis7配置设置中禁用上述目录的访问的方法

打开配置工具:开始 → 设置 → 控制面板 → 管理员工具 → IIS 服务 浏览到你想要保护的目录:本地计算机 → 网站 → 默认网站 →右边功能视图中找到iis里的请求筛选 在URL里添加.你需要保护的目录. 更简单的办法就是在dokuwiki的根目录下.找到web.config文件 如果没有就创建一个 打开改为以下代码

web.config <?xml version=“1.0” encoding=“UTF-8”?> <configuration>

  <system.webServer>
      <security>
          <requestFiltering>
              <filteringRules>
              </filteringRules>
              <alwaysAllowedUrls>
                  <add url="/data/media/" />
              </alwaysAllowedUrls>
              <denyUrlSequences>
                  <add sequence="/data/" />
                  <add sequence="/conf/" />
                  <add sequence="/bin/" />
                  <add sequence="/inc/" />
              </denyUrlSequences>
          </requestFiltering>
      </security>
  </system.webServer>

</configuration> 编辑 将目录移出根文档 为了避免任何对上述目录的访问,最安全的方法就是把它们从 Web 服务所谓的“根文档”中移出来。

data 目录 从根文档中移出 “data” 目录(和它所有的内容) 编辑 savedir 设置,使它指向 “data” 目录的新位置。 例如,如果把 “data” 目录移动到 “/home/yourname/data”,添加以下这一行到 “conf/local.php”:

$conf['savedir'] = '/home/yourname/data/'; conf 目录 从根文档中移出 “conf” 目录(和它所有的内容) 在 “inc” 目录内创建一个名为 preload.php 的文件,设置 “DOKU_CONF” 定义并使它指向 “conf” 目录的新地址。 例如,如果把 “conf” 目录移动到 “/home/yourname/conf”,创建以下的 “inc/preload.php”文件:

inc/preload.php <?php

define('DOKU_CONF','/home/yourname/conf/'); bin 目录 bin 目录包含了命令行工具。如果你没有 shell 可以访问你的服务器,你可以简单的删除该目录和它的内容。否则只要把它移出文档根即可。不需要更多的配置工作。

inc 目录 从文档根中移出该目录,直到目前还没有简单的方法。但是因为它不包含任何的敏感数据,所以不值得努力尝试移出它了。

编辑 DokuWiki 配置设置 DokuWiki 包含了多个配置设置,对安装的各个安全方面产生影响。请参阅每个设置文档,以了解它们能做什么以及建议的设置。

allowdebug – 禁止调试输出,以避免系统信息泄露 :!: fmode, dmode – 设置 DokuWiki 创建文件的文件权限,也可以看到关于建立权限的信息。 fetchsize – 配置外部数据缓存 fullpath – 显示页面的完整路径名 所有的 验证设置 usewordblock – 通过黑名单,防止垃圾邮件 mailguard – 避免收集邮件地址的机器人 iexssprotect – 在 IE 中防范跨站脚本问题 htmlok – 开启 HTML phpok – 开启 PHP hidepages – 在索引和搜索中隐藏特定页面 safemodehack – 解决安全模式的限制 编辑 插件安全 DokuWiki 拥有大量的社群贡献的插件。插件通过添加新的代码为 DokuWiki 提供新的功能。这意味着该代码实际上已经访问到你的服务器。此外在一个完全特设的方式下,插件与 DokuWiki 是分开发布的。它们不像 DokuWiki 的核心代码库那样得到同样的关注和审查。所以,在安装一个插件之前的安全措施是有必要的。

这里有一些提示,帮助你选择你想要安装的插件。

如果可以,在安装插件之前,你应该检阅一下插件的源代码。 如果有疑问,请在邮件列表提问。 插件安装在 DokuWiki 的 lib 目录下,它可以从外部直接访问。检查一下该插件包含哪些文件,并使用适当的 .htaccess 文件锁定对它们的访问。 插件的创作与开发与 DokuWiki 项目没有直接的关系 - 他们可能是经验不足,有恶意或可能是已经被入侵的服务器插件的源代码。小心选择你信任的插件! 回顾上述的安全警告,同时,当插件有可用的新版本时为插件进行升级。 编辑 附加阅读

https://github.com/Chris--S/dokuwiki-plugin-iframe/archive/master.zip 这里有一些更多关于安全方面的内部和外部网页。

设置访问控制 通过 Https 强行登陆 对 DokuWiki 的 php 设置 Remove ACL rules for deleted pages Apache 安全 - 第三章:PHP的锁定.

2026-2-5 06:46:08

2026/02/05 06:46 · jackboo

<< 更新的文章 | 更早的文章 >>

all above flags does not work, the index pages in sub namespace is still included .

This is global configuration, you should configure it in Configuration Manager. — Siyuan Liu 2023-08-17
Discussion

Please report bugs or feature requests at the Bug tracker.

Is it possible to make a blog in one namespace be in ascending order, and a blog in a different namespace to be in descending order?
2026-2-5 15:55:33

2026/02/05 15:55 · jackboo

====== Add New Page Plugin
Compatible with DokuWiki

2025-05-14 “Librarian”
Download
Report bugs
Donate
pluginPut ‘add new page’ forms within pages, with optional namespace selection


Last updated on
2025-09-21
Provides
Syntax
Repository
Source
Conflicts with
infomail
Similar to catlist, copypage, jsongendoc, new_page_dialog, npd, pagehere

Tagged with button, create, form

Needed for autoincludeindex

By Damien Regad, Benjamin Santalucia, Sam Wilson and other contributors
newpagetemplate cspheader authwordpress deletepagebutton
Edit
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

Edit
Description
This plugin allows you to add new-page forms to wiki pages, so that users can simply enter the title of a new page and go straight to the editing form (rather than first creating a link to the page, or typing the URL directly).

The target namespace for the new page can either be selected from a drop-down list in the new-page form, or specified in the form syntax. Only namespaces to which the user is permitted to write are shown.

The plugin can pair with the newpagetemplate Plugin to start with a predefined template instead of an empty page.

The form submit button is disabled if there is no text in the title field.

Edit
Usage
Put

anywhere in a wiki page to get a new-page-title text entry box, and a namespace selection drop-down menu. More details in the Syntax section below.

Edit
Screenshots
The default form has a drop-down with all namespaces of the wiki and a text field for the pagename.

with configuration option “Hide namespace selection” enabled.

with configuration option “Hide namespace selection” disabled.
Parent namespaces are greyed-out where the user has no access to add pages.
Edit
Edit
Syntax
Edit
Basic
The basic syntax is:


Or, to specify a namespace:


Where namespace is the target namespace for the new page. When this is specified, the namespace selection box can either be hidden (which it is by default) or set to show only sub-namespaces of the given one. This is configured in the main wiki configuration manager. If @PAGE@ (or @NS@) is given, the current page ID (or its namespace) will be used (e.g. for use in namespace templates; see below).

Edit
Creating a namespace
It is possible to use the @INPUT@ placeholder to reference the user's input in the namespace specification. For example,


will create a new namespace within the foo namespace.

Edit
Date/time-based naming
The plugin supports usage of strftime placeholders in the namespace config. This allows adding date elements to the namespace specification



When used together with the autopage option to hide the input field, a daily page can be created with a single button click:


Edit
Configuration overrides
It is possible to override the plugin's configuration for a single usage of the syntax, by specifying a ? followed by the config's name with an optional no prefix to negate it. Values for non-boolean configs can be provided with =, separated by ;. Multiple overrides can be given, separated by , or &.

General syntax:

?[no]<option_1>[=value_1[;value_2]…][,[no]<option_2>]…
Examples:

overwrite the default hide setting


custom namespace exclusion and hide root


disable subnamespace creation – with the code below, entering sub:page will create a page named sub_page instead of page page in namespace sub


Edit
Custom button labels
The submit button's label can be changed from the default Add Page, to a text of your choice using the 'label' option


Custom labels can of course be combined with other parameters, allowing for example to provide a one-click button to create a journal page.


Edit
New-page templates
This plugin is also compatible with the newpagetemplate plugin (note that this is a separate feature to the namespace templates described below). To specify a template to be used with the new page, use one of the following syntaxes:

Use the newtpl template

Present a drop-down list of newtpl1 and
newtpl2, allowing the user to choose one

The same as above, but with nicer titles
Edit
In all of these, the basic >namespace syntax can be included before the hash # character.

Edit
Multiple occurences
The

syntax may be added multiple times on the same page.

Edit
Site templates
To include an add-new-page form in a Site Template, use the following line:

<?php echo p_render('xhtml',p_get_instructions('

'),$info) ?>
Edit
Namespace Templates
Add-new-page forms can also be added to Namespace Templates. The replacement patterns @ID@ and @NS@ can be used in the plugin's namespace parameter.

Edit
Configuration and Settings
You can configure the plugin in the Config Manager of DokuWiki. There are four settings:

Excluded namespaces (exclude) — A semicolon-separated list of namespaces that should be excluded from the namespace selection list. Default: wiki;playground.
Show root namespace (showroot) — Whether to show the wiki's root namespace in the namespace selection list. Default: true.
Hide namespace selection (hide) — Hide the namespace selection list. Only applies if a namespace is given (see above). Default: true.
Hide “access denied” message (hideACL) — Do not show the “You are not allowed to add pages” message when the user doesn't have permission to create pages. Default: false (i.e. do show the message).
Hide the input box (autopage) — The preconfigured namespace is treated as a full page ID. Use with date placeholders). Default: false.
Namespace creation (createns) — When true (default), use of `:` in the page name will create a subnamespace; if false, it will be replaced by `_`, causing a page to be created.
Edit
FAQ
Why is a privileged user not allowed to add pages?
Logged in as administrator, why do I get a You are not allowed to add pages error message ?

This is a known problem, caused by caching. As a workaround, add to the page that contains the form.
Addnewpage form on the admin page?
Is there a possibility to add the plugin as a part of the admin page, like the plugins pagemove or upgrade?

Not currently, but this can be done by modifying your template and including the addnewpage form only when $ACT=='admin'
More than one form per page?
Is it possible to have more than one new-page form on a page?

Yes. Nothing special needs to be done to permit this, just add the markup wherever you want the forms to appear.
Can the textbox be pre-populated with a value? Specifically, the ID variable? (Trying to have a user search for a page, then use this plugin to create the page if they don't find what they're looking for…)
How can a add_page form add in the site template automaticaly? Where to place the php statements?
Edit
Development

2026-2-5 15:54:19

2026/02/05 15:54 · jackboo
备忘录

本站dokuwiki版本:dokuwiki-2018-04-22 3658kb

tag版本plugin-tag-2017-08-24,要配合:pagelist,版本为:plugin-pagelist-2017-08-24.zip

Helper plugin pagelist is not available or invalid.

blog版本 2013 by Michael Hamann,需要include插件

随机访问的代码: <a href=“?do=nsrandompage” >random</a> 使用:DokuWiki-randompage-what

2026-2-5 08:25:31

2026/02/05 08:26 · jackboo
安全

DokuWiki 是一种经常被使用在公共服务上的网络应用。这意味着,例如比起你桌面系统的本地应用,你要承担更多的风险接受恶意使用者的攻击。

DokuWiki 以安全的思想进行开发。我们试着在用户友好和安全之间找到一个平衡,但当无法找到满意的妥协时,更倾向于安全。

该页面对你应该关注哪些方面提供了一个概览,确保你的 DokuWiki 是安全的。

编辑 报告和通知 当你发现 DokuWiki 的安全问题时,请通知我们。你可以按以下方法进行:

提交一个bugs 发送邮件到邮件列表 发送私人邮件到andi [at] splitbrain [dot] org 前两个作为提交 bug 的首选方法,除非当您发现非常严重的错误,如果在 patch 提供之前使该 bug 公开,会危机到全世界已经安装 Dokuwiki 的使用者,那么您应该考虑第三种联系方法。

所有的以前的安全问题可以在这里找到。

根据已知安全问题的严重性,非常小的问题会在以后的版本中进行修正,又或者制作并释放 bugfix。在后一种情况下,更新检查机制会通知用户进行必要的更新。

你应该经常使用当前释放 DokuWiki 的最新版本,因为没有为旧版本发布安全修正程序。

编辑 网站访问安全 DokuWiki 使用文件来存储配置和页面数据。你必须确保这些页面绝不能直接的从网络访问。发布的压缩包里面含有一组 “.htaccess”文件,这些文件会告诉 Apache Web 服务器拒绝访问某些目录。

如果你不使用 Apache Web 服务器又或者你的 Apache 不能使用 “.htaccess” 文件,那么你需要手动设置,确保你的安装安全可靠。

以下目录不应该从网络直接访问:

data conf bin inc(尽管可访问时没有危险) 要检查你是否需要调整访问权限,你可以试着访问http://yourserver.com/data/pages/wiki/dokuwiki.txt。你应该无法以这种方法访问到该文件。

如果你的目录没有进行适当的安全设置,请阅读以下小节,它会告诉你如何做到这些。

编辑 在Apache中拒绝目录访问 最简单的方法就是在您的 Apache 配置中开启 .htaccess 支持。请参考Apache的 .htaccess 教程。

编辑 在 IIS 中拒绝目录访问 可以在 IIS 的配置设置中禁用上述目录的访问。

打开配置工具:开始 → 设置 → 控制面板 → 管理员工具 → IIS 服务 浏览到你想要保护的目录:本地计算机 → 网站 → 默认网站 → 目录的路径 右击文件夹选择属性 → 目录安全 → IP地址和域名限制 → 编辑… 选择“默认情况下,对所有计算机拒绝访问”。 在iis7配置设置中禁用上述目录的访问的方法

打开配置工具:开始 → 设置 → 控制面板 → 管理员工具 → IIS 服务 浏览到你想要保护的目录:本地计算机 → 网站 → 默认网站 →右边功能视图中找到iis里的请求筛选 在URL里添加.你需要保护的目录. 更简单的办法就是在dokuwiki的根目录下.找到web.config文件 如果没有就创建一个 打开改为以下代码

web.config <?xml version=“1.0” encoding=“UTF-8”?> <configuration>

  <system.webServer>
      <security>
          <requestFiltering>
              <filteringRules>
              </filteringRules>
              <alwaysAllowedUrls>
                  <add url="/data/media/" />
              </alwaysAllowedUrls>
              <denyUrlSequences>
                  <add sequence="/data/" />
                  <add sequence="/conf/" />
                  <add sequence="/bin/" />
                  <add sequence="/inc/" />
              </denyUrlSequences>
          </requestFiltering>
      </security>
  </system.webServer>

</configuration> 编辑 将目录移出根文档 为了避免任何对上述目录的访问,最安全的方法就是把它们从 Web 服务所谓的“根文档”中移出来。

data 目录 从根文档中移出 “data” 目录(和它所有的内容) 编辑 savedir 设置,使它指向 “data” 目录的新位置。 例如,如果把 “data” 目录移动到 “/home/yourname/data”,添加以下这一行到 “conf/local.php”:

$conf['savedir'] = '/home/yourname/data/'; conf 目录 从根文档中移出 “conf” 目录(和它所有的内容) 在 “inc” 目录内创建一个名为 preload.php 的文件,设置 “DOKU_CONF” 定义并使它指向 “conf” 目录的新地址。 例如,如果把 “conf” 目录移动到 “/home/yourname/conf”,创建以下的 “inc/preload.php”文件:

inc/preload.php <?php

define('DOKU_CONF','/home/yourname/conf/'); bin 目录 bin 目录包含了命令行工具。如果你没有 shell 可以访问你的服务器,你可以简单的删除该目录和它的内容。否则只要把它移出文档根即可。不需要更多的配置工作。

inc 目录 从文档根中移出该目录,直到目前还没有简单的方法。但是因为它不包含任何的敏感数据,所以不值得努力尝试移出它了。

编辑 DokuWiki 配置设置 DokuWiki 包含了多个配置设置,对安装的各个安全方面产生影响。请参阅每个设置文档,以了解它们能做什么以及建议的设置。

allowdebug – 禁止调试输出,以避免系统信息泄露 :!: fmode, dmode – 设置 DokuWiki 创建文件的文件权限,也可以看到关于建立权限的信息。 fetchsize – 配置外部数据缓存 fullpath – 显示页面的完整路径名 所有的 验证设置 usewordblock – 通过黑名单,防止垃圾邮件 mailguard – 避免收集邮件地址的机器人 iexssprotect – 在 IE 中防范跨站脚本问题 htmlok – 开启 HTML phpok – 开启 PHP hidepages – 在索引和搜索中隐藏特定页面 safemodehack – 解决安全模式的限制 编辑 插件安全 DokuWiki 拥有大量的社群贡献的插件。插件通过添加新的代码为 DokuWiki 提供新的功能。这意味着该代码实际上已经访问到你的服务器。此外在一个完全特设的方式下,插件与 DokuWiki 是分开发布的。它们不像 DokuWiki 的核心代码库那样得到同样的关注和审查。所以,在安装一个插件之前的安全措施是有必要的。

这里有一些提示,帮助你选择你想要安装的插件。

如果可以,在安装插件之前,你应该检阅一下插件的源代码。 如果有疑问,请在邮件列表提问。 插件安装在 DokuWiki 的 lib 目录下,它可以从外部直接访问。检查一下该插件包含哪些文件,并使用适当的 .htaccess 文件锁定对它们的访问。 插件的创作与开发与 DokuWiki 项目没有直接的关系 - 他们可能是经验不足,有恶意或可能是已经被入侵的服务器插件的源代码。小心选择你信任的插件! 回顾上述的安全警告,同时,当插件有可用的新版本时为插件进行升级。 编辑 附加阅读

https://github.com/Chris--S/dokuwiki-plugin-iframe/archive/master.zip 这里有一些更多关于安全方面的内部和外部网页。

设置访问控制 通过 Https 强行登陆 对 DokuWiki 的 php 设置 Remove ACL rules for deleted pages Apache 安全 - 第三章:PHP的锁定.

2026-2-5 06:46:08

2026/02/05 06:46 · jackboo
Tag Plugin

—- plugin —- description: Assign category tags to wiki pages author : Dokufreaks (previous authors: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner) email : freaks@dokuwiki.org type : syntax, action, helper lastupdate : 2023-10-17 compatible : Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, !Greebo, Hogfather, Igor, Jack Jackrum, Kaos, Librarian depends : pagelist conflicts : similar : tags : navigation, blog, tags, listing

downloadurl: https://github.com/dokufreaks/plugin-tag/tarball/master bugtracker : https://github.com/dokufreaks/plugin-tag/issues sourcerepo : https://github.com/dokufreaks/plugin-tag


Description

The Tag Plugin lets you assign category tags to wiki pages.

Components
Tag

Add a tag to the page

{{tag>[list of tags]}}
[list of tags] a space separated list of tags that describe the content of the current page required

Allows you to categorize your wiki pages. The resulting links either point to the corresponding page in the specified tag namespace (only if it exists). If you want a link to point to a page in another namespace, you have to indicate the namespace before the tag name. If this page doesn't exist, just the list of pages with the same tag is shown when you follow one of those links.

Examples:

  • {{tag>tag1 tag2 tag3}}
  • with namespaces: {{tag>ns1:tag1 ns1:tag2 ns2:subns1:tag3}}
  • multiple word tags: {{tag>tag1_with_multiple_words tag2 tag3_part}}
  • {{tag>"tag with spaces" tag2}} – Within quotes you can use spaces. Tag is stored internally with underscores _.
Topic

List all pages with given tags.

{{topic>[tag]&[flags]}}
[tag] the category tag for which you want a list of pages required
[flags] pagelist flags delimited by &, see flags optional

This displays a list of all pages that contain the given category tag. The list is sorted alphabetically by page ID. You can also prepend the modifiers + and -:

  • If you do not prepend, it acts as a OR. A page is added if it has one of these tags.
  • + creates an intersection between the list of pages created by the already defined tags and the pages matching the tag following the + (AND), so each listed page must have this tag.
  • - removes all pages tagged with the given tag from the list of already found pages (NOT).

Example:

  • {{topic>tag1 -tag2}} – Lists all pages tagged with tag1 but not with tag2.
  • {{topic>tag1 +tag2}} – Lists all pages tagged with tag1 and tag2.
  • {{topic>tag1 tag2}} – Lists all pages tagged with either tag1 or tag2 or both.
  • {{topic>ns1?tag1 tag2}} – List all pages inside namespace ns1 tagged with either tag1 or tag2
  • {{topic>.?tag1 tag2}} – List all pages inside the current namespace tagged with either tag1 or tag2
  • {{topic>tag1 tag2 tag3&nodate&desc&sort}} (Adding pagelist options to change the design)
Searchtags

Search form for filtering by tag.

 {{searchtags&[flags]}}
[flags] pagelist flags delimited by &, see flags optional

This displays a search form with the possibility to select a namespace and to select tags from a table of all tags that should either be in- or excluded with the option to choose if the tags should be associated with AND or OR. The results are displayed as in the topic component.

This is a great feature which you should not miss. Please add a screenshot of this cool feature. FIXME

And you might check out TagFilter Plugin for similar purpose but in different scenarios.

Example:

  • {{searchtags}} – The basic syntax
  • {{searchtags&nodate&desc&sort}} – with pagelist options to change the design
  • {{searchtags&nonsform}} – hide the namespace selector
Count

Shows a list of tags and its number of occurrences.

{{count>[tag][&namespace]}}
[tags] The tag for which you want to list the occurrence. Multiple tags separated by spaces. optional
&[namespaces] Counts occurrences for given tags only at pages inside the given namespaces. Multiple namespaces separated by spaces. optional

This part allows you to display an overview of your current used tags. It prints the tag and the related occurrence (how often is the tag used) in your wiki. Either you can specify a + (or empty) as tag-name, which results in a list of all used tags or just specify some tags separated by spaces.

Example:

  • {{count>+}} – List all tags with related occurrences.
  • {{count>tag1 tag2}} – List the occurrence of tag1 and tag2.
  • {{count>tag1 tag2 tag3&. ns1 ns2}} – List all occurrences for the given tags inside the namespaces (the dot . specifies the root namespace)
  • {{count>+&ns1 ns2}} – List all tags in ns1 and ns2.
Tagpage

Make link to the tag list

 {{tagpage>[tag][&dynamic][|title]}}

This displays a link to the listing of all tags as it is done by the Tag syntax but without tagging the page with that tag. With the optional dynamic flag the link becomes red when the listing of all pages with that tag is empty for the current user. The dynamic flag automatically disables the cache of the current page in order to ensure that the link color is always correct. Optionally a title can be specified that will be used as link name.

Example:

  • {{tagpage>test_foo}} – The basic syntax
  • {{tagpage>test_foo&dynamic}} – A link with dynamic link color
  • {{tagpage>test_foo|my title}} – A link with custom title
  • {{tagpage>test_foo&dynamic|my | title}} – A link with dynamic link color and custom title (that can also contain |)
Configuration

The plugin can be configured with the DokuWiki configuration manager available in the admin menu.

namespace Namespace where the tag plugin looks for existing tag pages and links to them instead of the default tag overview. You could use the topic component {{topic>...}} to display the list of tags on such a page for example. The default value of namespace is: tag
sortkey Order in which tagged pages are sorted in the topic overview; available options are cdate as creation date, mdate as modification date, pagename, id as page ID, ns to sort pages before namespaces and title
sortorder Sort order of the topic overview (ascending or descending)
pagelist_flags Comma separated Flags of the pagelist plugin which is used to display the topic overview
toolbar_icon Show icon in page editor toolbar to add tags.
list_tags_of_subns When counting tags in specified namespaces include also tags in subnamespaces.
tags_list_css Choose tags list style between standard or optimised for top of page position.
Tagindex Rebuild

If the tag index becomes corrupted somehow (such as by using page move), then you can rebuild it by using the searchindex plugin or bin/indexer.php.

Demo / Screenshots

Topic listing: Tag overview

Tags: A page with tags

Changes
  • 2014-02-16
    • New and updated translations
    • Fixed tag searching with out of date indexes and numbers
    • Drop compatibility with DokuWiki versions older than 2013-05-10 “Weatherwax” in order to be able to use newer DokuWiki features
  • 2013-04-14
    • New sorting key “ns” which lists for each namespace first all pages in the namespace sorted by name and then all subnamespaces sorted by namespace name
    • Sort by page name (as displayed by the pagelist plugin) when no title exists and the sort key is title
    • In the topic syntax an implicit query for all pages is assumed if the query starts with a tag with “+” or “-”, this means that “+tag +tag2” is now the same as “tag +tag2” and that “-tag1” will return all pages without tag1.
    • The tagRefine-function (used by the blog plugin) now also supports tags without “+” or “-”
    • Revert the tag query change that was introduced in version 2012-08-24, before this change the query was executed as if all tags with a “+” or “-” were at the end while the documentation actually describes that the order matters. Each part of the query modifies the existing result set and either adds new pages (tag without “+” or “-”) or removes all pages with (“-”) or without a tag (“+”).
  • 2013-04-05:
    • New tagpage feature for creating a link to the list of all pages with a certain tag without tagging the page
    • Removed the Technorati ping feature as Technorati is no longer using any pings
    • zh-tw translation updated
  • 2013-02-15:
    • :!: fixed a security issue (XSS vulnerability), if you are using an older version of the tag plugin you should upgrade ASAP!
  • 2012-11-25
    • New searchtags feature, displays a search form for the topic syntax
    • Fix section edit button styles for the new dokuwiki template
    • In the topic syntax now really only namespaces and not pages are matched by namespace parameter
    • When sorting by the title the case is ignored now
    • The topic syntax of the tag plugin is now used instead of the topic syntax of the blogtng plugin when both are installed
    • Fix problems that tags could be missing when another page is rendered during the preview or when an old revision is diplayed
  • 2012-08-24
    • The tag plugin is now using the metadata index of DokuWiki instead of its own index for storing tags. Most plugins that need the tag plugin need to be adapted.
    • Tags are now normalized in the same way as page ids are normalized

Development changelog:

Sites using this Plugin

Feel free to add yours here:

FAQ
How to use tags which consist of multiple words?

Just use an “_”, it gets automatically replaced by a “ ” i.e.:

{{tag>tag_with_multiple_words}}

Also, quotes seem to work:

{{tag>"tag with multiple words"}}
How to make the tag namespace breadcrumb still work

Let's use one of the example websites.

If you go to https://wiki.psiconauti.net/tag/esperienze?do=showtag&tag=esperienze and then click in the breadcrumb “esperienze” you go to https://wiki.psiconauti.net/tag/esperienze , an empty page. To make your pages inside the tag namespace always go to the tag list, add this to the beginning of your /.htaccess

This also allows you to keep your start page to add there, for example, the list of tags If your start page is not “start”, change it to the one you use

RewriteCond %{REQUEST_URI}            !tag:start
RewriteRule ^tag.([\-_a-zA-Z0-9\ ]*)$  tag:$1?do=showtag&tag=$1
Change CSS styles depending on existing tags

This colors the background of the page to red if the keyword 'deprecated' is specified as a tag.

action.php
function _handle_keywords(&$data) {
        global $ID;
 
        // Fetch tags for the page; stop proceeding when no tags specified
        $tags = p_get_metadata($ID, 'subject', METADATA_DONT_RENDER);
        if(is_null($tags)) return;
 
        // Replace underscores with blanks
        foreach($data->data['meta'] as &$meta) {
            if($meta['name'] == 'keywords') {
                $meta['content'] = str_replace('_', ' ', $meta['content']);
 
                // add extra styling
                $t = explode(',', $meta['content']);
                if(in_array('deprecated', $t)) {
                    $data->data['style'][] = array('type'  => 'text/css',
                                                     '_data' => '.dokuwiki .page {background-color: red;}');
                }
            }
        }       
}
Customizing the breadcrumbs

If you add at pagelist/helper.php

function tpl_youarehere2_help($id){
    $result = '';
    global $conf;
    global $ID;
    global $lang;
    // check if enabled
    if(!$conf['youarehere']) return false;
    $parts = explode(':', $id);
    $count = count($parts);
    // always print the startpage
    $result .= html_wikilink(':'.$conf['start']);
    // print intermediate namespace links
    $part = '';
    for($i=0; $i<$count - 1; $i++){
        $part .= $parts[$i].':';
        $page = $part;
        if ($page == $conf['start']) continue; // Skip startpage
        // output
        $result .= ' &raquo '.html_wikilink($page);
    }
    // print current page, skipping start page, skipping for namespace index
    resolve_pageid('',$page,$exists);
    if(isset($page) && $page==$part.$parts[$i]) return $result;
    $page = $part.$parts[$i];
    if($page == $conf['start']) return $result;
    $result .= ' &raquo '.html_wikilink($page);
    return $result;
}
 
function tpl_youarehere2($id) {
    $str = $this->tpl_youarehere2_help($id);
    $pos = strrpos($str , '&raquo');
    if ($pos == -1)
    return $str;
    return substr($str, 0, $pos);
}
 
function addPage2($page) {
    $id = $page['id'];
    if (!$id) return false;
    $this->page = $page;
    $this->_meta = NULL;
    // priority and draft
    if (!isset($this->page['draft'])) {
        $this->page['draft'] = ($this->_getMeta('type') == 'draft');
    }
    $class = '';
    if (isset($this->page['priority'])) $class .= 'priority'.$this->page['priority']. ' ';
    if ($this->page['draft']) $class .= 'draft ';
    if ($this->page['class']) $class .= $this->page['class'];
    if(!empty($class)) $class = ' class="' . $class . '"';
    $this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF;
    $this->_pageCell($id);
    if ($this->column['date']) $this->_dateCell();
    if ($this->column['user']) $this->_userCell();
    if ($this->column['desc']) $this->_descCell();
    foreach ($this->plugins as $plug => $col) {
        if ($this->column[$col]) $this->_pluginCell($plug, $col, $id);
    }
    $this->doc .= DOKU_TAB.'</tr>'.DOKU_LF;
    $this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF;
    $this->doc .= DOKU_TAB.DOKU_TAB.'<td style="padding-left:19px; padding-right:15px; padding-bottom:15px; font-size:10px;">';
    $this->doc .= $this->tpl_youarehere2($id);
    $this->doc .='</td>'.DOKU_LF;
    $this->doc .= DOKU_TAB.'</tr>'.DOKU_LF;
    return true;
}

And change tag/action.php

$pagelist->setFlags($flags);
$pagelist->startList();
foreach ($pages as $page) {
    $pagelist->addPage($page);
}

to

$pagelist->setFlags($flags);
$pagelist->startList();
foreach ($pages as $page) {
    $pagelist->addPage2($page);
}

After that, the list of pages that contain the tag, except for the names of pages themselves under them will also be bread crumbs to these pages.

Bad appearance when displaying tags at top of page

:!: Integrated to main code (see tags_list_css) option

When you insert the syntax at the top of a wiki page, the output of the plugin will be displayed below the TOC (Table of Contents). To make the visual appearance more smooth, change your lib/plugins/tag/style.css to the following code:

div.dokuwiki div.tags {
  border-top: 2px dotted __border__;
  font-size: 95%;
  text-align: right;
/*  clear: both; */
}
How to change the word tag and topic to another language
Is it possible to change the word tag used in syntax to something else, like another language {{tagInMylanguage>someTag}} –damascene 2012/04/10

You need to add copy of the existing tag pattern, and modify it to

syntax/tag.php
    $this->Lexer->addSpecialPattern('\{\{tag>.*?\}\}', $mode, 'plugin_tag_tag');
    //e.g. Spanish:
    $this->Lexer->addSpecialPattern('\{\{etiqueta>.*?\}\}', $mode, 'plugin_tag_tag');
Discussion
Pagelist With Alphabetical Headers

Is there a way to group pages by the first letter of their name or header?

Something like the example in this post on the user forums? https://forum.dokuwiki.org/d/12198-alphabetical-ordered-pages-list

No.

Collapsible outline of all tags? My ideal tag “cloud” display would have an alphabetic list of all tags. Click on a tag to expand (unfold) the display, and it would show an alphabetic list of pages that include that tag. We would want typical flags, such as for specifying namespaces, and display (like nspages), plus limiting tags (perhaps with RegEx?).
–davidtango 2021-03-21

—

I want the description under the tag, is it possible to make a line brake or to get the description under the tag? Thx

Is there any tip for hierarchical tag? I try to categorize my pages. For example, there are two pages. A Persian cat page has {tag>animal:cat}. And a Dalmatian dog page has {tag>animal:dog}. If I write '{topic>animal}, I hope to see the two pages, but all I can see is blank. Yes, I can tag that {tag>animal dog}, {tag>animal cat}, but it is not fancy.

For bugs or feature requests, there is the bug tracker linked here : Bug tracker.

This plugin clashes with the include module of the mediasyntax plugin. One workaround is to disable that part of the mediasyntax plugin by renaming the include.php file.

If you have a tag name that is the same as a page name that already exists, the tag links will point to that page in the current namespace rather than the page name in the tag namespace. Is this a bug or a feature? (3-Aug-2011)?

Found the issue. If you do not specify a namespace, it defaults to whatever is defined as the default namespace (ie. root:tag). If you do specify a namespace, it makes whatever you specify as the location for the data file (ie. root:mynamespace), NOT root:tag:mynamespace.
  • Is there no way to display all used tags? This would be very useful for finding typos and (nearly) duplicate entries. (2012-02-21)
    • Sry, me stupid, it works with count… BUG except that the table-entries are empty in my wiki! Latest DW/Plugin, with ~~NOCACHE~~ Screenshot. Sry for not registering at github for this.
      • In most of my installation it works, in some not… clueless!
    • How to sort the taglist (count>+) alphabetical?

My wiki has about 7000 pages with tags. It takes 25 seconds to display ~~TAGCLOUD~~ (My server runs with latest NGINX, UBUNTU 12.04, 4 core i5 cpu with 8gb ram, intel SSD ). Anyone have any other suggestion? or Do I need SQL-based tagging solution? — S.C. Yoo 2014/04/19 06:02

Individual Search Form: I'd like a form where the user could just type in the tag name, click search, and then a list is generated below. I know you got the searchtags but its just going to get unwieldy with the amount of tags I'm envisioning having. Thanks

Structured Tags: Can this (or any other plugin) support structured tags in addition to free-form tags? – 2014-09-02

Blank pages

I'm using Dokuwiki under Debian, last version in Debian distro. I installed plugin tags, but don't work :(

All page with {{tag>name_tag}} results a blank page, including the content of the page. I don't know what don't work but, I can't use it :(

I am using Debian Wheezy and I am having the same issue.

»»»»» Hy, I think the tag should be separted by a “,”. I mean what happen if I wanna tag “New York City” ? In present is created separte tag for “new” “york” “city” and that's not really good. — A.V

Nothing was found.

Same here, get a Nothing was found page.

(2017-03-28) I had the same problem. By coincidence, I switched to the default Dokuwiki template for an unrelated reason and got a different error when I clicked a tag link: “Helper plugin pagelist is not available.” Installed the pagelist plugin and then it worked. This dependency needs to be documented.

SEO meta keywords

Does this plugin alter the meta tags of the rendered pages? If it doesn't, I would like to leave the suggestion. — Fabricio Rocha 2016-06-11 17:00

Sorting the {{count>}} results

Is there any way to sort the output of the {{count>}} command? I'd like to have a page of used tags in alphabetical order, but it seems that pagelist parameters are not supported. — Fabricio Rocha 2016-06-19 19:42

This can be achieved by editing the helper.php file of the plugin. Before the return $otag; line within the function tagOccurrences, just insert the line ksort($otags); and that's all. IMO this should be standard behavior. — Taylan

In the current version for dokuwiki “kaos”, you need to put the line ksort($tagOccurrences); just before the statement return $tagOccurrences; — Jim

Unorderd List of all tags?

Is there a way to gen an unorderd list of all tags, similar as

Tag#
1
1
1
1
1
1
1

, but without table and occurrences?

Filtering the list of Tags?

Hi, I have attempted to try an solve this but my apologies as I do not know enough about PHP. I use some tags on the site to create dynamic links and I was wondering if there is a way to have the tagsearch have the capability to ignore certain tags. In this case I start the dynamic tags with dw_ and would like to know if possible to filter out all the tags that start with dw_. Thanks for any help! Frank.

Add "*" to list all the tags under a tag namespace?

I need a function to add all the tags under a tag namespace to the tag list.
That is, when I have a ns1:tag1, ns1:tag2, …, ns1:tagN, I can use

{{topic> ns1:*}}

to show all the pages with the tag under the namespace ns1. It is quite useful because sometimes I just want to show the pages with a sub tag, but sometimes I want to show all the pages with these tags on a main page. Since the tags under ns1 may be added in the future, I do not need to change the main page code to add more tags.
Now the tag namespace cannot be managed, I hope the basic function can be added.
2021-6-28

—

Columns?

2024-12-23

Is there a way to show the countlist or topic list (or just a list of tags) in a multicolumn format? I tried using the WRAP plugin, but that did not work.

Count Table Columns

2025-05-01

I too would like to have more columns for the count list or topic list. I tried creating userstyle.css file and directly editing the columns for the tables created with the plugin, but that had no effect. I also tried editing it by accessing the ul.plugin_tag_cloud but that also had no effect.

It is rather impossible to navigate the count list when you have dozens of tags, let alone the hundreds my wiki is using.

Exclude subnamespaces

I would have think something like {{topic>:?tag1 -:ns1?tag1}} would have showed every tag1 but NOT (minus -) :ns1?tag1.
It doesn't though. Is there any way to list every tag1 pages except the ones from :ns1 ?

2026-2-5 16:38:34

2026/02/05 16:38 · jackboo
Blog Plugin

—- plugin —-
description: Use DokuWiki as blogging tool
author : Dokufreaks (previous author: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner)
email : freaks@dokuwiki.org
type : syntax, action, helper
lastupdate : 2023-10-24
compatible : Librarian, Kaos, Lemming, Anteater, Rincewind, Angua, Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, Greebo, Hogfather, Igor, Jack Jackrum
depends : include, pagelist
conflicts :
similar : blogtng, miniblog
tags : blog, news

downloadurl: https://github.com/dokufreaks/plugin-blog/archive/master.zip
bugtracker : https://github.com/dokufreaks/plugin-blog/issues
sourcerepo : https://github.com/dokufreaks/plugin-blog


Description

The Blog Plugin makes blogs in your wiki easily possible. The blog component shows the latest entries (pages) from a namespace in reverse chronological order. In this new version, the creation date is the sort key – no longer the date of the last non-minor modification as in previous versions. The archive component lists all entries that were written (created) in the given month.

Installation
Download plugin-blog.tgz
BundleHub Configure your own DokuWiki blogsuite install package, consisting of all mandatory plugins plus any optional features you want to include:
BlogSuite BundleHub :!: The Bundle Hub is currently out of date and not updated any more, please install the plugins individually :!:
FIXME Site seems to be down for sime time, here is the archived version if you want to see possible optional plugins & features.
Tips If you intend to use this plugin be sure to take a look at the blogging tips page
Syntax
Blog
[namespace] namespace for the blog; subspaces will be searched as well; * is the whole wiki, . is the same namespace as the page lies in optional; default is the blog namespace set in the configuration
[number] number of entries to show per page optional; default is 5
[flags] flags are delimited by &
all Include plugin flags are supported optional
Form placement: topform/bottomform/noform optional, default is topform
Custom new-entry form title: newentrytitle=Custom title optional, can also be set as a configuration option
Hide paging controls: nopagingcontrols optional

This includes a specified number of most recent blog entries from the given namespace into the current page. Below the entries a link to the page (permalink), the author, the creation date and the number of comments are shown. Link, author, date and comments info can be hidden. At the end of the blog a link to older entries lets you navigate in the history of the blog. At the very end, if you have enough rights to create new pages, a form for new blog entries is displayed.

Note that when the page with the blog syntax is in the specified namespace, content my be shown twice. At some point, the loop will be detected and stopped. You should therefore make sure that either the page with the listing is in a different namespace or use the excluded_pages-option to explicitly exclude the blog page from the blog listing.


Archive
[namespace] the namespace for which you want an archive list; * is the whole wiki, . is the same namespace as the page lies in optional; default is the namespace specified in the configuration
[month] the month for the archive list in YYYY-MM format; * for all pages required
[flags] pagelist flags delimited by &, see flags optional
[username] username of an author optional


Shows a table with all pages of the given namespace that were created in the specified month.

Creates an automatic archive.

Configuration and Settings

The blog plugin can be configured using the DokuWiki configuration manager available in the admin menu.

namespace The default namespace which is used if no namespace was given in the syntax
formposition You can choose to display the new entry form either above or below the blog entries
newentrytitle Set a custom title for all new entry forms. This can also be set on individual blog forms.
dateprefix A date prefix that automatically gets added to pages created with the new entry form. You can use the options from the strftime PHP function; namespace separators work as well, e.g. %Y:%m%d
sortkey Defines how the blog entries are sorted. Available options are creation date, modification date, page name, page ID and page title (first headline)
sortorder Sort the blog entries ascending/descending
excluded_pages Exclude certain pages from the blog listing. Requires a regular expression. Use for example !(^|:)start$! in order to exclude start pages from all blog listings.
To exclude both start and rightsidebar directly below :blog use
!(^|:)blog:(start|rightsidebar)$!
showhistogram Display a histogram in normal archive mode (not for autoarchive)
max_months Maximum number of months to show in the histogram
histogram_height Height of the histogram (in pixels)
Changes

* 2013-10-20: Translation updates, fix cache handling for empty blog listings
* 2013-03-27: Better cache handling for the archive syntax

  • the syntax that lists everything till now correctly updates the cache now whenever a page is changed or a comment or linkback is added.
  • the cache is not used anymore when it contains an archive listing with a page that the current user can't access. The excluded pages won't be included again automatically unless the cache expires for other reasons, the ~~NOCACHE~~ macro can be used if this is needed.


Development
Change Log
Bugs / Feature Requests

Please report bugs or feature requests at the Bug tracker.


FAQ

Please also have a look at the blogging tips page!

My dates are shown wrong. What can I do?

Make sure you run the latest version of all required plugins and DokuWiki.

Is it possible to change the way the date is displayed?

Yes, the plugin uses the dformat option to format the date.

How can I alter the date of a blog post?

You can use the meta plugin to manually set the creation date (and modification date) in the page source, then select the modification date in the blog plugins order setting. An alternative solution would be to alter the timestamps of the created files.

Is it possible to show table of contents?

The table of contents is shown automatically (depending on the settings in DokuWiki itself) from version 2013-02-07 on.

The blog plugin assumes that in the context of a blog the header should be a link. However from version 2013-02-26 on it is possible to disable this behavior by using the nolink-flag, the blog plugin now only sets a default without overriding the nolink flag.

Is it possible to show just the first lines of each post with a 'Read more' link to view the full post?

I think I solved myself.
In the blog mark, use the following flags

This will work if you add an H2 header (in the full post) where you want to make appear the 'Read more' link.
If you don't need or want an H2 header in your post, you can add a empty H2 header, just as a delimiter for the text you want to show in the Blog's headlines


the excluded_pages does not work

In the blog mark ,use the following flags

Tag Plugin

—- plugin —- description: Assign category tags to wiki pages author : Dokufreaks (previous authors: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner) email : freaks@dokuwiki.org type : syntax, action, helper lastupdate : 2023-10-17 compatible : Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, !Greebo, Hogfather, Igor, Jack Jackrum, Kaos, Librarian depends : pagelist conflicts : similar : tags : navigation, blog, tags, listing

downloadurl: https://github.com/dokufreaks/plugin-tag/tarball/master bugtracker : https://github.com/dokufreaks/plugin-tag/issues sourcerepo : https://github.com/dokufreaks/plugin-tag


Description

The Tag Plugin lets you assign category tags to wiki pages.

Components
Tag

Add a tag to the page

{{tag>[list of tags]}}
[list of tags] a space separated list of tags that describe the content of the current page required

Allows you to categorize your wiki pages. The resulting links either point to the corresponding page in the specified tag namespace (only if it exists). If you want a link to point to a page in another namespace, you have to indicate the namespace before the tag name. If this page doesn't exist, just the list of pages with the same tag is shown when you follow one of those links.

Examples:

  • {{tag>tag1 tag2 tag3}}
  • with namespaces: {{tag>ns1:tag1 ns1:tag2 ns2:subns1:tag3}}
  • multiple word tags: {{tag>tag1_with_multiple_words tag2 tag3_part}}
  • {{tag>"tag with spaces" tag2}} – Within quotes you can use spaces. Tag is stored internally with underscores _.
Topic

List all pages with given tags.

{{topic>[tag]&[flags]}}
[tag] the category tag for which you want a list of pages required
[flags] pagelist flags delimited by &, see flags optional

This displays a list of all pages that contain the given category tag. The list is sorted alphabetically by page ID. You can also prepend the modifiers + and -:

  • If you do not prepend, it acts as a OR. A page is added if it has one of these tags.
  • + creates an intersection between the list of pages created by the already defined tags and the pages matching the tag following the + (AND), so each listed page must have this tag.
  • - removes all pages tagged with the given tag from the list of already found pages (NOT).

Example:

  • {{topic>tag1 -tag2}} – Lists all pages tagged with tag1 but not with tag2.
  • {{topic>tag1 +tag2}} – Lists all pages tagged with tag1 and tag2.
  • {{topic>tag1 tag2}} – Lists all pages tagged with either tag1 or tag2 or both.
  • {{topic>ns1?tag1 tag2}} – List all pages inside namespace ns1 tagged with either tag1 or tag2
  • {{topic>.?tag1 tag2}} – List all pages inside the current namespace tagged with either tag1 or tag2
  • {{topic>tag1 tag2 tag3&nodate&desc&sort}} (Adding pagelist options to change the design)
Searchtags

Search form for filtering by tag.

 {{searchtags&[flags]}}
[flags] pagelist flags delimited by &, see flags optional

This displays a search form with the possibility to select a namespace and to select tags from a table of all tags that should either be in- or excluded with the option to choose if the tags should be associated with AND or OR. The results are displayed as in the topic component.

This is a great feature which you should not miss. Please add a screenshot of this cool feature. FIXME

And you might check out TagFilter Plugin for similar purpose but in different scenarios.

Example:

  • {{searchtags}} – The basic syntax
  • {{searchtags&nodate&desc&sort}} – with pagelist options to change the design
  • {{searchtags&nonsform}} – hide the namespace selector
Count

Shows a list of tags and its number of occurrences.

{{count>[tag][&namespace]}}
[tags] The tag for which you want to list the occurrence. Multiple tags separated by spaces. optional
&[namespaces] Counts occurrences for given tags only at pages inside the given namespaces. Multiple namespaces separated by spaces. optional

This part allows you to display an overview of your current used tags. It prints the tag and the related occurrence (how often is the tag used) in your wiki. Either you can specify a + (or empty) as tag-name, which results in a list of all used tags or just specify some tags separated by spaces.

Example:

  • {{count>+}} – List all tags with related occurrences.
  • {{count>tag1 tag2}} – List the occurrence of tag1 and tag2.
  • {{count>tag1 tag2 tag3&. ns1 ns2}} – List all occurrences for the given tags inside the namespaces (the dot . specifies the root namespace)
  • {{count>+&ns1 ns2}} – List all tags in ns1 and ns2.
Tagpage

Make link to the tag list

 {{tagpage>[tag][&dynamic][|title]}}

This displays a link to the listing of all tags as it is done by the Tag syntax but without tagging the page with that tag. With the optional dynamic flag the link becomes red when the listing of all pages with that tag is empty for the current user. The dynamic flag automatically disables the cache of the current page in order to ensure that the link color is always correct. Optionally a title can be specified that will be used as link name.

Example:

  • {{tagpage>test_foo}} – The basic syntax
  • {{tagpage>test_foo&dynamic}} – A link with dynamic link color
  • {{tagpage>test_foo|my title}} – A link with custom title
  • {{tagpage>test_foo&dynamic|my | title}} – A link with dynamic link color and custom title (that can also contain |)
Configuration

The plugin can be configured with the DokuWiki configuration manager available in the admin menu.

namespace Namespace where the tag plugin looks for existing tag pages and links to them instead of the default tag overview. You could use the topic component {{topic>...}} to display the list of tags on such a page for example. The default value of namespace is: tag
sortkey Order in which tagged pages are sorted in the topic overview; available options are cdate as creation date, mdate as modification date, pagename, id as page ID, ns to sort pages before namespaces and title
sortorder Sort order of the topic overview (ascending or descending)
pagelist_flags Comma separated Flags of the pagelist plugin which is used to display the topic overview
toolbar_icon Show icon in page editor toolbar to add tags.
list_tags_of_subns When counting tags in specified namespaces include also tags in subnamespaces.
tags_list_css Choose tags list style between standard or optimised for top of page position.
Tagindex Rebuild

If the tag index becomes corrupted somehow (such as by using page move), then you can rebuild it by using the searchindex plugin or bin/indexer.php.

Demo / Screenshots

Topic listing: Tag overview

Tags: A page with tags

Changes
  • 2014-02-16
    • New and updated translations
    • Fixed tag searching with out of date indexes and numbers
    • Drop compatibility with DokuWiki versions older than 2013-05-10 “Weatherwax” in order to be able to use newer DokuWiki features
  • 2013-04-14
    • New sorting key “ns” which lists for each namespace first all pages in the namespace sorted by name and then all subnamespaces sorted by namespace name
    • Sort by page name (as displayed by the pagelist plugin) when no title exists and the sort key is title
    • In the topic syntax an implicit query for all pages is assumed if the query starts with a tag with “+” or “-”, this means that “+tag +tag2” is now the same as “tag +tag2” and that “-tag1” will return all pages without tag1.
    • The tagRefine-function (used by the blog plugin) now also supports tags without “+” or “-”
    • Revert the tag query change that was introduced in version 2012-08-24, before this change the query was executed as if all tags with a “+” or “-” were at the end while the documentation actually describes that the order matters. Each part of the query modifies the existing result set and either adds new pages (tag without “+” or “-”) or removes all pages with (“-”) or without a tag (“+”).
  • 2013-04-05:
    • New tagpage feature for creating a link to the list of all pages with a certain tag without tagging the page
    • Removed the Technorati ping feature as Technorati is no longer using any pings
    • zh-tw translation updated
  • 2013-02-15:
    • :!: fixed a security issue (XSS vulnerability), if you are using an older version of the tag plugin you should upgrade ASAP!
  • 2012-11-25
    • New searchtags feature, displays a search form for the topic syntax
    • Fix section edit button styles for the new dokuwiki template
    • In the topic syntax now really only namespaces and not pages are matched by namespace parameter
    • When sorting by the title the case is ignored now
    • The topic syntax of the tag plugin is now used instead of the topic syntax of the blogtng plugin when both are installed
    • Fix problems that tags could be missing when another page is rendered during the preview or when an old revision is diplayed
  • 2012-08-24
    • The tag plugin is now using the metadata index of DokuWiki instead of its own index for storing tags. Most plugins that need the tag plugin need to be adapted.
    • Tags are now normalized in the same way as page ids are normalized

Development changelog:

Sites using this Plugin

Feel free to add yours here:

FAQ
How to use tags which consist of multiple words?

Just use an “_”, it gets automatically replaced by a “ ” i.e.:

{{tag>tag_with_multiple_words}}

Also, quotes seem to work:

{{tag>"tag with multiple words"}}
How to make the tag namespace breadcrumb still work

Let's use one of the example websites.

If you go to https://wiki.psiconauti.net/tag/esperienze?do=showtag&tag=esperienze and then click in the breadcrumb “esperienze” you go to https://wiki.psiconauti.net/tag/esperienze , an empty page. To make your pages inside the tag namespace always go to the tag list, add this to the beginning of your /.htaccess

This also allows you to keep your start page to add there, for example, the list of tags If your start page is not “start”, change it to the one you use

RewriteCond %{REQUEST_URI}            !tag:start
RewriteRule ^tag.([\-_a-zA-Z0-9\ ]*)$  tag:$1?do=showtag&tag=$1
Change CSS styles depending on existing tags

This colors the background of the page to red if the keyword 'deprecated' is specified as a tag.

action.php
function _handle_keywords(&$data) {
        global $ID;
 
        // Fetch tags for the page; stop proceeding when no tags specified
        $tags = p_get_metadata($ID, 'subject', METADATA_DONT_RENDER);
        if(is_null($tags)) return;
 
        // Replace underscores with blanks
        foreach($data->data['meta'] as &$meta) {
            if($meta['name'] == 'keywords') {
                $meta['content'] = str_replace('_', ' ', $meta['content']);
 
                // add extra styling
                $t = explode(',', $meta['content']);
                if(in_array('deprecated', $t)) {
                    $data->data['style'][] = array('type'  => 'text/css',
                                                     '_data' => '.dokuwiki .page {background-color: red;}');
                }
            }
        }       
}
Customizing the breadcrumbs

If you add at pagelist/helper.php

function tpl_youarehere2_help($id){
    $result = '';
    global $conf;
    global $ID;
    global $lang;
    // check if enabled
    if(!$conf['youarehere']) return false;
    $parts = explode(':', $id);
    $count = count($parts);
    // always print the startpage
    $result .= html_wikilink(':'.$conf['start']);
    // print intermediate namespace links
    $part = '';
    for($i=0; $i<$count - 1; $i++){
        $part .= $parts[$i].':';
        $page = $part;
        if ($page == $conf['start']) continue; // Skip startpage
        // output
        $result .= ' &raquo '.html_wikilink($page);
    }
    // print current page, skipping start page, skipping for namespace index
    resolve_pageid('',$page,$exists);
    if(isset($page) && $page==$part.$parts[$i]) return $result;
    $page = $part.$parts[$i];
    if($page == $conf['start']) return $result;
    $result .= ' &raquo '.html_wikilink($page);
    return $result;
}
 
function tpl_youarehere2($id) {
    $str = $this->tpl_youarehere2_help($id);
    $pos = strrpos($str , '&raquo');
    if ($pos == -1)
    return $str;
    return substr($str, 0, $pos);
}
 
function addPage2($page) {
    $id = $page['id'];
    if (!$id) return false;
    $this->page = $page;
    $this->_meta = NULL;
    // priority and draft
    if (!isset($this->page['draft'])) {
        $this->page['draft'] = ($this->_getMeta('type') == 'draft');
    }
    $class = '';
    if (isset($this->page['priority'])) $class .= 'priority'.$this->page['priority']. ' ';
    if ($this->page['draft']) $class .= 'draft ';
    if ($this->page['class']) $class .= $this->page['class'];
    if(!empty($class)) $class = ' class="' . $class . '"';
    $this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF;
    $this->_pageCell($id);
    if ($this->column['date']) $this->_dateCell();
    if ($this->column['user']) $this->_userCell();
    if ($this->column['desc']) $this->_descCell();
    foreach ($this->plugins as $plug => $col) {
        if ($this->column[$col]) $this->_pluginCell($plug, $col, $id);
    }
    $this->doc .= DOKU_TAB.'</tr>'.DOKU_LF;
    $this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF;
    $this->doc .= DOKU_TAB.DOKU_TAB.'<td style="padding-left:19px; padding-right:15px; padding-bottom:15px; font-size:10px;">';
    $this->doc .= $this->tpl_youarehere2($id);
    $this->doc .='</td>'.DOKU_LF;
    $this->doc .= DOKU_TAB.'</tr>'.DOKU_LF;
    return true;
}

And change tag/action.php

$pagelist->setFlags($flags);
$pagelist->startList();
foreach ($pages as $page) {
    $pagelist->addPage($page);
}

to

$pagelist->setFlags($flags);
$pagelist->startList();
foreach ($pages as $page) {
    $pagelist->addPage2($page);
}

After that, the list of pages that contain the tag, except for the names of pages themselves under them will also be bread crumbs to these pages.

Bad appearance when displaying tags at top of page

:!: Integrated to main code (see tags_list_css) option

When you insert the syntax at the top of a wiki page, the output of the plugin will be displayed below the TOC (Table of Contents). To make the visual appearance more smooth, change your lib/plugins/tag/style.css to the following code:

div.dokuwiki div.tags {
  border-top: 2px dotted __border__;
  font-size: 95%;
  text-align: right;
/*  clear: both; */
}
How to change the word tag and topic to another language
Is it possible to change the word tag used in syntax to something else, like another language {{tagInMylanguage>someTag}} –damascene 2012/04/10

You need to add copy of the existing tag pattern, and modify it to

syntax/tag.php
    $this->Lexer->addSpecialPattern('\{\{tag>.*?\}\}', $mode, 'plugin_tag_tag');
    //e.g. Spanish:
    $this->Lexer->addSpecialPattern('\{\{etiqueta>.*?\}\}', $mode, 'plugin_tag_tag');
Discussion
Pagelist With Alphabetical Headers

Is there a way to group pages by the first letter of their name or header?

Something like the example in this post on the user forums? https://forum.dokuwiki.org/d/12198-alphabetical-ordered-pages-list

No.

Collapsible outline of all tags? My ideal tag “cloud” display would have an alphabetic list of all tags. Click on a tag to expand (unfold) the display, and it would show an alphabetic list of pages that include that tag. We would want typical flags, such as for specifying namespaces, and display (like nspages), plus limiting tags (perhaps with RegEx?).
–davidtango 2021-03-21

—

I want the description under the tag, is it possible to make a line brake or to get the description under the tag? Thx

Is there any tip for hierarchical tag? I try to categorize my pages. For example, there are two pages. A Persian cat page has {tag>animal:cat}. And a Dalmatian dog page has {tag>animal:dog}. If I write '{topic>animal}, I hope to see the two pages, but all I can see is blank. Yes, I can tag that {tag>animal dog}, {tag>animal cat}, but it is not fancy.

For bugs or feature requests, there is the bug tracker linked here : Bug tracker.

This plugin clashes with the include module of the mediasyntax plugin. One workaround is to disable that part of the mediasyntax plugin by renaming the include.php file.

If you have a tag name that is the same as a page name that already exists, the tag links will point to that page in the current namespace rather than the page name in the tag namespace. Is this a bug or a feature? (3-Aug-2011)?

Found the issue. If you do not specify a namespace, it defaults to whatever is defined as the default namespace (ie. root:tag). If you do specify a namespace, it makes whatever you specify as the location for the data file (ie. root:mynamespace), NOT root:tag:mynamespace.
  • Is there no way to display all used tags? This would be very useful for finding typos and (nearly) duplicate entries. (2012-02-21)
    • Sry, me stupid, it works with count… BUG except that the table-entries are empty in my wiki! Latest DW/Plugin, with ~~NOCACHE~~ Screenshot. Sry for not registering at github for this.
      • In most of my installation it works, in some not… clueless!
    • How to sort the taglist (count>+) alphabetical?

My wiki has about 7000 pages with tags. It takes 25 seconds to display ~~TAGCLOUD~~ (My server runs with latest NGINX, UBUNTU 12.04, 4 core i5 cpu with 8gb ram, intel SSD ). Anyone have any other suggestion? or Do I need SQL-based tagging solution? — S.C. Yoo 2014/04/19 06:02

Individual Search Form: I'd like a form where the user could just type in the tag name, click search, and then a list is generated below. I know you got the searchtags but its just going to get unwieldy with the amount of tags I'm envisioning having. Thanks

Structured Tags: Can this (or any other plugin) support structured tags in addition to free-form tags? – 2014-09-02

Blank pages

I'm using Dokuwiki under Debian, last version in Debian distro. I installed plugin tags, but don't work :(

All page with {{tag>name_tag}} results a blank page, including the content of the page. I don't know what don't work but, I can't use it :(

I am using Debian Wheezy and I am having the same issue.

»»»»» Hy, I think the tag should be separted by a “,”. I mean what happen if I wanna tag “New York City” ? In present is created separte tag for “new” “york” “city” and that's not really good. — A.V

Nothing was found.

Same here, get a Nothing was found page.

(2017-03-28) I had the same problem. By coincidence, I switched to the default Dokuwiki template for an unrelated reason and got a different error when I clicked a tag link: “Helper plugin pagelist is not available.” Installed the pagelist plugin and then it worked. This dependency needs to be documented.

SEO meta keywords

Does this plugin alter the meta tags of the rendered pages? If it doesn't, I would like to leave the suggestion. — Fabricio Rocha 2016-06-11 17:00

Sorting the {{count>}} results

Is there any way to sort the output of the {{count>}} command? I'd like to have a page of used tags in alphabetical order, but it seems that pagelist parameters are not supported. — Fabricio Rocha 2016-06-19 19:42

This can be achieved by editing the helper.php file of the plugin. Before the return $otag; line within the function tagOccurrences, just insert the line ksort($otags); and that's all. IMO this should be standard behavior. — Taylan

In the current version for dokuwiki “kaos”, you need to put the line ksort($tagOccurrences); just before the statement return $tagOccurrences; — Jim

Unorderd List of all tags?

Is there a way to gen an unorderd list of all tags, similar as

Tag#
1
1
1
1
1
1
1

, but without table and occurrences?

Filtering the list of Tags?

Hi, I have attempted to try an solve this but my apologies as I do not know enough about PHP. I use some tags on the site to create dynamic links and I was wondering if there is a way to have the tagsearch have the capability to ignore certain tags. In this case I start the dynamic tags with dw_ and would like to know if possible to filter out all the tags that start with dw_. Thanks for any help! Frank.

Add "*" to list all the tags under a tag namespace?

I need a function to add all the tags under a tag namespace to the tag list.
That is, when I have a ns1:tag1, ns1:tag2, …, ns1:tagN, I can use

{{topic> ns1:*}}

to show all the pages with the tag under the namespace ns1. It is quite useful because sometimes I just want to show the pages with a sub tag, but sometimes I want to show all the pages with these tags on a main page. Since the tags under ns1 may be added in the future, I do not need to change the main page code to add more tags.
Now the tag namespace cannot be managed, I hope the basic function can be added.
2021-6-28

—

Columns?

2024-12-23

Is there a way to show the countlist or topic list (or just a list of tags) in a multicolumn format? I tried using the WRAP plugin, but that did not work.

Count Table Columns

2025-05-01

I too would like to have more columns for the count list or topic list. I tried creating userstyle.css file and directly editing the columns for the tables created with the plugin, but that had no effect. I also tried editing it by accessing the ul.plugin_tag_cloud but that also had no effect.

It is rather impossible to navigate the count list when you have dozens of tags, let alone the hundreds my wiki is using.

Exclude subnamespaces

I would have think something like {{topic>:?tag1 -:ns1?tag1}} would have showed every tag1 but NOT (minus -) :ns1?tag1.
It doesn't though. Is there any way to list every tag1 pages except the ones from :ns1 ?

2026-2-5 16:38:34

2026/02/05 16:38 · jackboo

====== Add New Page Plugin
Compatible with DokuWiki

2025-05-14 “Librarian”
Download
Report bugs
Donate
pluginPut ‘add new page’ forms within pages, with optional namespace selection


Last updated on
2025-09-21
Provides
Syntax
Repository
Source
Conflicts with
infomail
Similar to catlist, copypage, jsongendoc, new_page_dialog, npd, pagehere

Tagged with button, create, form

Needed for autoincludeindex

By Damien Regad, Benjamin Santalucia, Sam Wilson and other contributors
newpagetemplate cspheader authwordpress deletepagebutton
Edit
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

Edit
Description
This plugin allows you to add new-page forms to wiki pages, so that users can simply enter the title of a new page and go straight to the editing form (rather than first creating a link to the page, or typing the URL directly).

The target namespace for the new page can either be selected from a drop-down list in the new-page form, or specified in the form syntax. Only namespaces to which the user is permitted to write are shown.

The plugin can pair with the newpagetemplate Plugin to start with a predefined template instead of an empty page.

The form submit button is disabled if there is no text in the title field.

Edit
Usage
Put

anywhere in a wiki page to get a new-page-title text entry box, and a namespace selection drop-down menu. More details in the Syntax section below.

Edit
Screenshots
The default form has a drop-down with all namespaces of the wiki and a text field for the pagename.

with configuration option “Hide namespace selection” enabled.

with configuration option “Hide namespace selection” disabled.
Parent namespaces are greyed-out where the user has no access to add pages.
Edit
Edit
Syntax
Edit
Basic
The basic syntax is:


Or, to specify a namespace:


Where namespace is the target namespace for the new page. When this is specified, the namespace selection box can either be hidden (which it is by default) or set to show only sub-namespaces of the given one. This is configured in the main wiki configuration manager. If @PAGE@ (or @NS@) is given, the current page ID (or its namespace) will be used (e.g. for use in namespace templates; see below).

Edit
Creating a namespace
It is possible to use the @INPUT@ placeholder to reference the user's input in the namespace specification. For example,


will create a new namespace within the foo namespace.

Edit
Date/time-based naming
The plugin supports usage of strftime placeholders in the namespace config. This allows adding date elements to the namespace specification



When used together with the autopage option to hide the input field, a daily page can be created with a single button click:


Edit
Configuration overrides
It is possible to override the plugin's configuration for a single usage of the syntax, by specifying a ? followed by the config's name with an optional no prefix to negate it. Values for non-boolean configs can be provided with =, separated by ;. Multiple overrides can be given, separated by , or &.

General syntax:

?[no]<option_1>[=value_1[;value_2]…][,[no]<option_2>]…
Examples:

overwrite the default hide setting


custom namespace exclusion and hide root


disable subnamespace creation – with the code below, entering sub:page will create a page named sub_page instead of page page in namespace sub


Edit
Custom button labels
The submit button's label can be changed from the default Add Page, to a text of your choice using the 'label' option


Custom labels can of course be combined with other parameters, allowing for example to provide a one-click button to create a journal page.


Edit
New-page templates
This plugin is also compatible with the newpagetemplate plugin (note that this is a separate feature to the namespace templates described below). To specify a template to be used with the new page, use one of the following syntaxes:

Use the newtpl template

Present a drop-down list of newtpl1 and
newtpl2, allowing the user to choose one

The same as above, but with nicer titles
Edit
In all of these, the basic >namespace syntax can be included before the hash # character.

Edit
Multiple occurences
The

syntax may be added multiple times on the same page.

Edit
Site templates
To include an add-new-page form in a Site Template, use the following line:

<?php echo p_render('xhtml',p_get_instructions('

'),$info) ?>
Edit
Namespace Templates
Add-new-page forms can also be added to Namespace Templates. The replacement patterns @ID@ and @NS@ can be used in the plugin's namespace parameter.

Edit
Configuration and Settings
You can configure the plugin in the Config Manager of DokuWiki. There are four settings:

Excluded namespaces (exclude) — A semicolon-separated list of namespaces that should be excluded from the namespace selection list. Default: wiki;playground.
Show root namespace (showroot) — Whether to show the wiki's root namespace in the namespace selection list. Default: true.
Hide namespace selection (hide) — Hide the namespace selection list. Only applies if a namespace is given (see above). Default: true.
Hide “access denied” message (hideACL) — Do not show the “You are not allowed to add pages” message when the user doesn't have permission to create pages. Default: false (i.e. do show the message).
Hide the input box (autopage) — The preconfigured namespace is treated as a full page ID. Use with date placeholders). Default: false.
Namespace creation (createns) — When true (default), use of `:` in the page name will create a subnamespace; if false, it will be replaced by `_`, causing a page to be created.
Edit
FAQ
Why is a privileged user not allowed to add pages?
Logged in as administrator, why do I get a You are not allowed to add pages error message ?

This is a known problem, caused by caching. As a workaround, add to the page that contains the form.
Addnewpage form on the admin page?
Is there a possibility to add the plugin as a part of the admin page, like the plugins pagemove or upgrade?

Not currently, but this can be done by modifying your template and including the addnewpage form only when $ACT=='admin'
More than one form per page?
Is it possible to have more than one new-page form on a page?

Yes. Nothing special needs to be done to permit this, just add the markup wherever you want the forms to appear.
Can the textbox be pre-populated with a value? Specifically, the ID variable? (Trying to have a user search for a page, then use this plugin to create the page if they don't find what they're looking for…)
How can a add_page form add in the site template automaticaly? Where to place the php statements?
Edit
Development

2026-2-5 15:54:19

2026/02/05 15:54 · jackboo
备忘录

本站dokuwiki版本:dokuwiki-2018-04-22 3658kb

tag版本plugin-tag-2017-08-24,要配合:pagelist,版本为:plugin-pagelist-2017-08-24.zip

Helper plugin pagelist is not available or invalid.

blog版本 2013 by Michael Hamann,需要include插件

随机访问的代码: <a href=“?do=nsrandompage” >random</a> 使用:DokuWiki-randompage-what

2026-2-5 08:25:31

2026/02/05 08:26 · jackboo
安全

DokuWiki 是一种经常被使用在公共服务上的网络应用。这意味着,例如比起你桌面系统的本地应用,你要承担更多的风险接受恶意使用者的攻击。

DokuWiki 以安全的思想进行开发。我们试着在用户友好和安全之间找到一个平衡,但当无法找到满意的妥协时,更倾向于安全。

该页面对你应该关注哪些方面提供了一个概览,确保你的 DokuWiki 是安全的。

编辑 报告和通知 当你发现 DokuWiki 的安全问题时,请通知我们。你可以按以下方法进行:

提交一个bugs 发送邮件到邮件列表 发送私人邮件到andi [at] splitbrain [dot] org 前两个作为提交 bug 的首选方法,除非当您发现非常严重的错误,如果在 patch 提供之前使该 bug 公开,会危机到全世界已经安装 Dokuwiki 的使用者,那么您应该考虑第三种联系方法。

所有的以前的安全问题可以在这里找到。

根据已知安全问题的严重性,非常小的问题会在以后的版本中进行修正,又或者制作并释放 bugfix。在后一种情况下,更新检查机制会通知用户进行必要的更新。

你应该经常使用当前释放 DokuWiki 的最新版本,因为没有为旧版本发布安全修正程序。

编辑 网站访问安全 DokuWiki 使用文件来存储配置和页面数据。你必须确保这些页面绝不能直接的从网络访问。发布的压缩包里面含有一组 “.htaccess”文件,这些文件会告诉 Apache Web 服务器拒绝访问某些目录。

如果你不使用 Apache Web 服务器又或者你的 Apache 不能使用 “.htaccess” 文件,那么你需要手动设置,确保你的安装安全可靠。

以下目录不应该从网络直接访问:

data conf bin inc(尽管可访问时没有危险) 要检查你是否需要调整访问权限,你可以试着访问http://yourserver.com/data/pages/wiki/dokuwiki.txt。你应该无法以这种方法访问到该文件。

如果你的目录没有进行适当的安全设置,请阅读以下小节,它会告诉你如何做到这些。

编辑 在Apache中拒绝目录访问 最简单的方法就是在您的 Apache 配置中开启 .htaccess 支持。请参考Apache的 .htaccess 教程。

编辑 在 IIS 中拒绝目录访问 可以在 IIS 的配置设置中禁用上述目录的访问。

打开配置工具:开始 → 设置 → 控制面板 → 管理员工具 → IIS 服务 浏览到你想要保护的目录:本地计算机 → 网站 → 默认网站 → 目录的路径 右击文件夹选择属性 → 目录安全 → IP地址和域名限制 → 编辑… 选择“默认情况下,对所有计算机拒绝访问”。 在iis7配置设置中禁用上述目录的访问的方法

打开配置工具:开始 → 设置 → 控制面板 → 管理员工具 → IIS 服务 浏览到你想要保护的目录:本地计算机 → 网站 → 默认网站 →右边功能视图中找到iis里的请求筛选 在URL里添加.你需要保护的目录. 更简单的办法就是在dokuwiki的根目录下.找到web.config文件 如果没有就创建一个 打开改为以下代码

web.config <?xml version=“1.0” encoding=“UTF-8”?> <configuration>

  <system.webServer>
      <security>
          <requestFiltering>
              <filteringRules>
              </filteringRules>
              <alwaysAllowedUrls>
                  <add url="/data/media/" />
              </alwaysAllowedUrls>
              <denyUrlSequences>
                  <add sequence="/data/" />
                  <add sequence="/conf/" />
                  <add sequence="/bin/" />
                  <add sequence="/inc/" />
              </denyUrlSequences>
          </requestFiltering>
      </security>
  </system.webServer>

</configuration> 编辑 将目录移出根文档 为了避免任何对上述目录的访问,最安全的方法就是把它们从 Web 服务所谓的“根文档”中移出来。

data 目录 从根文档中移出 “data” 目录(和它所有的内容) 编辑 savedir 设置,使它指向 “data” 目录的新位置。 例如,如果把 “data” 目录移动到 “/home/yourname/data”,添加以下这一行到 “conf/local.php”:

$conf['savedir'] = '/home/yourname/data/'; conf 目录 从根文档中移出 “conf” 目录(和它所有的内容) 在 “inc” 目录内创建一个名为 preload.php 的文件,设置 “DOKU_CONF” 定义并使它指向 “conf” 目录的新地址。 例如,如果把 “conf” 目录移动到 “/home/yourname/conf”,创建以下的 “inc/preload.php”文件:

inc/preload.php <?php

define('DOKU_CONF','/home/yourname/conf/'); bin 目录 bin 目录包含了命令行工具。如果你没有 shell 可以访问你的服务器,你可以简单的删除该目录和它的内容。否则只要把它移出文档根即可。不需要更多的配置工作。

inc 目录 从文档根中移出该目录,直到目前还没有简单的方法。但是因为它不包含任何的敏感数据,所以不值得努力尝试移出它了。

编辑 DokuWiki 配置设置 DokuWiki 包含了多个配置设置,对安装的各个安全方面产生影响。请参阅每个设置文档,以了解它们能做什么以及建议的设置。

allowdebug – 禁止调试输出,以避免系统信息泄露 :!: fmode, dmode – 设置 DokuWiki 创建文件的文件权限,也可以看到关于建立权限的信息。 fetchsize – 配置外部数据缓存 fullpath – 显示页面的完整路径名 所有的 验证设置 usewordblock – 通过黑名单,防止垃圾邮件 mailguard – 避免收集邮件地址的机器人 iexssprotect – 在 IE 中防范跨站脚本问题 htmlok – 开启 HTML phpok – 开启 PHP hidepages – 在索引和搜索中隐藏特定页面 safemodehack – 解决安全模式的限制 编辑 插件安全 DokuWiki 拥有大量的社群贡献的插件。插件通过添加新的代码为 DokuWiki 提供新的功能。这意味着该代码实际上已经访问到你的服务器。此外在一个完全特设的方式下,插件与 DokuWiki 是分开发布的。它们不像 DokuWiki 的核心代码库那样得到同样的关注和审查。所以,在安装一个插件之前的安全措施是有必要的。

这里有一些提示,帮助你选择你想要安装的插件。

如果可以,在安装插件之前,你应该检阅一下插件的源代码。 如果有疑问,请在邮件列表提问。 插件安装在 DokuWiki 的 lib 目录下,它可以从外部直接访问。检查一下该插件包含哪些文件,并使用适当的 .htaccess 文件锁定对它们的访问。 插件的创作与开发与 DokuWiki 项目没有直接的关系 - 他们可能是经验不足,有恶意或可能是已经被入侵的服务器插件的源代码。小心选择你信任的插件! 回顾上述的安全警告,同时,当插件有可用的新版本时为插件进行升级。 编辑 附加阅读

https://github.com/Chris--S/dokuwiki-plugin-iframe/archive/master.zip 这里有一些更多关于安全方面的内部和外部网页。

设置访问控制 通过 Https 强行登陆 对 DokuWiki 的 php 设置 Remove ACL rules for deleted pages Apache 安全 - 第三章:PHP的锁定.

2026-2-5 06:46:08

2026/02/05 06:46 · jackboo
Tag Plugin

—- plugin —- description: Assign category tags to wiki pages author : Dokufreaks (previous authors: Michael Hamann, Gina Häußge, Michael Klier, Esther Brunner) email : freaks@dokuwiki.org type : syntax, action, helper lastupdate : 2023-10-17 compatible : Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, !Greebo, Hogfather, Igor, Jack Jackrum, Kaos, Librarian depends : pagelist conflicts : similar : tags : navigation, blog, tags, listing

downloadurl: https://github.com/dokufreaks/plugin-tag/tarball/master bugtracker : https://github.com/dokufreaks/plugin-tag/issues sourcerepo : https://github.com/dokufreaks/plugin-tag


Description

The Tag Plugin lets you assign category tags to wiki pages.

Components
Tag

Add a tag to the page

{{tag>[list of tags]}}
[list of tags] a space separated list of tags that describe the content of the current page required

Allows you to categorize your wiki pages. The resulting links either point to the corresponding page in the specified tag namespace (only if it exists). If you want a link to point to a page in another namespace, you have to indicate the namespace before the tag name. If this page doesn't exist, just the list of pages with the same tag is shown when you follow one of those links.

Examples:

  • {{tag>tag1 tag2 tag3}}
  • with namespaces: {{tag>ns1:tag1 ns1:tag2 ns2:subns1:tag3}}
  • multiple word tags: {{tag>tag1_with_multiple_words tag2 tag3_part}}
  • {{tag>"tag with spaces" tag2}} – Within quotes you can use spaces. Tag is stored internally with underscores _.
Topic

List all pages with given tags.

{{topic>[tag]&[flags]}}
[tag] the category tag for which you want a list of pages required
[flags] pagelist flags delimited by &, see flags optional

This displays a list of all pages that contain the given category tag. The list is sorted alphabetically by page ID. You can also prepend the modifiers + and -:

  • If you do not prepend, it acts as a OR. A page is added if it has one of these tags.
  • + creates an intersection between the list of pages created by the already defined tags and the pages matching the tag following the + (AND), so each listed page must have this tag.
  • - removes all pages tagged with the given tag from the list of already found pages (NOT).

Example:

  • {{topic>tag1 -tag2}} – Lists all pages tagged with tag1 but not with tag2.
  • {{topic>tag1 +tag2}} – Lists all pages tagged with tag1 and tag2.
  • {{topic>tag1 tag2}} – Lists all pages tagged with either tag1 or tag2 or both.
  • {{topic>ns1?tag1 tag2}} – List all pages inside namespace ns1 tagged with either tag1 or tag2
  • {{topic>.?tag1 tag2}} – List all pages inside the current namespace tagged with either tag1 or tag2
  • {{topic>tag1 tag2 tag3&nodate&desc&sort}} (Adding pagelist options to change the design)
Searchtags

Search form for filtering by tag.

 {{searchtags&[flags]}}
[flags] pagelist flags delimited by &, see flags optional

This displays a search form with the possibility to select a namespace and to select tags from a table of all tags that should either be in- or excluded with the option to choose if the tags should be associated with AND or OR. The results are displayed as in the topic component.

This is a great feature which you should not miss. Please add a screenshot of this cool feature. FIXME

And you might check out TagFilter Plugin for similar purpose but in different scenarios.

Example:

  • {{searchtags}} – The basic syntax
  • {{searchtags&nodate&desc&sort}} – with pagelist options to change the design
  • {{searchtags&nonsform}} – hide the namespace selector
Count

Shows a list of tags and its number of occurrences.

{{count>[tag][&namespace]}}
[tags] The tag for which you want to list the occurrence. Multiple tags separated by spaces. optional
&[namespaces] Counts occurrences for given tags only at pages inside the given namespaces. Multiple namespaces separated by spaces. optional

This part allows you to display an overview of your current used tags. It prints the tag and the related occurrence (how often is the tag used) in your wiki. Either you can specify a + (or empty) as tag-name, which results in a list of all used tags or just specify some tags separated by spaces.

Example:

  • {{count>+}} – List all tags with related occurrences.
  • {{count>tag1 tag2}} – List the occurrence of tag1 and tag2.
  • {{count>tag1 tag2 tag3&. ns1 ns2}} – List all occurrences for the given tags inside the namespaces (the dot . specifies the root namespace)
  • {{count>+&ns1 ns2}} – List all tags in ns1 and ns2.
Tagpage

Make link to the tag list

 {{tagpage>[tag][&dynamic][|title]}}

This displays a link to the listing of all tags as it is done by the Tag syntax but without tagging the page with that tag. With the optional dynamic flag the link becomes red when the listing of all pages with that tag is empty for the current user. The dynamic flag automatically disables the cache of the current page in order to ensure that the link color is always correct. Optionally a title can be specified that will be used as link name.

Example:

  • {{tagpage>test_foo}} – The basic syntax
  • {{tagpage>test_foo&dynamic}} – A link with dynamic link color
  • {{tagpage>test_foo|my title}} – A link with custom title
  • {{tagpage>test_foo&dynamic|my | title}} – A link with dynamic link color and custom title (that can also contain |)
Configuration

The plugin can be configured with the DokuWiki configuration manager available in the admin menu.

namespace Namespace where the tag plugin looks for existing tag pages and links to them instead of the default tag overview. You could use the topic component {{topic>...}} to display the list of tags on such a page for example. The default value of namespace is: tag
sortkey Order in which tagged pages are sorted in the topic overview; available options are cdate as creation date, mdate as modification date, pagename, id as page ID, ns to sort pages before namespaces and title
sortorder Sort order of the topic overview (ascending or descending)
pagelist_flags Comma separated Flags of the pagelist plugin which is used to display the topic overview
toolbar_icon Show icon in page editor toolbar to add tags.
list_tags_of_subns When counting tags in specified namespaces include also tags in subnamespaces.
tags_list_css Choose tags list style between standard or optimised for top of page position.
Tagindex Rebuild

If the tag index becomes corrupted somehow (such as by using page move), then you can rebuild it by using the searchindex plugin or bin/indexer.php.

Demo / Screenshots

Topic listing: Tag overview

Tags: A page with tags

Changes
  • 2014-02-16
    • New and updated translations
    • Fixed tag searching with out of date indexes and numbers
    • Drop compatibility with DokuWiki versions older than 2013-05-10 “Weatherwax” in order to be able to use newer DokuWiki features
  • 2013-04-14
    • New sorting key “ns” which lists for each namespace first all pages in the namespace sorted by name and then all subnamespaces sorted by namespace name
    • Sort by page name (as displayed by the pagelist plugin) when no title exists and the sort key is title
    • In the topic syntax an implicit query for all pages is assumed if the query starts with a tag with “+” or “-”, this means that “+tag +tag2” is now the same as “tag +tag2” and that “-tag1” will return all pages without tag1.
    • The tagRefine-function (used by the blog plugin) now also supports tags without “+” or “-”
    • Revert the tag query change that was introduced in version 2012-08-24, before this change the query was executed as if all tags with a “+” or “-” were at the end while the documentation actually describes that the order matters. Each part of the query modifies the existing result set and either adds new pages (tag without “+” or “-”) or removes all pages with (“-”) or without a tag (“+”).
  • 2013-04-05:
    • New tagpage feature for creating a link to the list of all pages with a certain tag without tagging the page
    • Removed the Technorati ping feature as Technorati is no longer using any pings
    • zh-tw translation updated
  • 2013-02-15:
    • :!: fixed a security issue (XSS vulnerability), if you are using an older version of the tag plugin you should upgrade ASAP!
  • 2012-11-25
    • New searchtags feature, displays a search form for the topic syntax
    • Fix section edit button styles for the new dokuwiki template
    • In the topic syntax now really only namespaces and not pages are matched by namespace parameter
    • When sorting by the title the case is ignored now
    • The topic syntax of the tag plugin is now used instead of the topic syntax of the blogtng plugin when both are installed
    • Fix problems that tags could be missing when another page is rendered during the preview or when an old revision is diplayed
  • 2012-08-24
    • The tag plugin is now using the metadata index of DokuWiki instead of its own index for storing tags. Most plugins that need the tag plugin need to be adapted.
    • Tags are now normalized in the same way as page ids are normalized

Development changelog:

Sites using this Plugin

Feel free to add yours here:

FAQ
How to use tags which consist of multiple words?

Just use an “_”, it gets automatically replaced by a “ ” i.e.:

{{tag>tag_with_multiple_words}}

Also, quotes seem to work:

{{tag>"tag with multiple words"}}
How to make the tag namespace breadcrumb still work

Let's use one of the example websites.

If you go to https://wiki.psiconauti.net/tag/esperienze?do=showtag&tag=esperienze and then click in the breadcrumb “esperienze” you go to https://wiki.psiconauti.net/tag/esperienze , an empty page. To make your pages inside the tag namespace always go to the tag list, add this to the beginning of your /.htaccess

This also allows you to keep your start page to add there, for example, the list of tags If your start page is not “start”, change it to the one you use

RewriteCond %{REQUEST_URI}            !tag:start
RewriteRule ^tag.([\-_a-zA-Z0-9\ ]*)$  tag:$1?do=showtag&tag=$1
Change CSS styles depending on existing tags

This colors the background of the page to red if the keyword 'deprecated' is specified as a tag.

action.php
function _handle_keywords(&$data) {
        global $ID;
 
        // Fetch tags for the page; stop proceeding when no tags specified
        $tags = p_get_metadata($ID, 'subject', METADATA_DONT_RENDER);
        if(is_null($tags)) return;
 
        // Replace underscores with blanks
        foreach($data->data['meta'] as &$meta) {
            if($meta['name'] == 'keywords') {
                $meta['content'] = str_replace('_', ' ', $meta['content']);
 
                // add extra styling
                $t = explode(',', $meta['content']);
                if(in_array('deprecated', $t)) {
                    $data->data['style'][] = array('type'  => 'text/css',
                                                     '_data' => '.dokuwiki .page {background-color: red;}');
                }
            }
        }       
}
Customizing the breadcrumbs

If you add at pagelist/helper.php

function tpl_youarehere2_help($id){
    $result = '';
    global $conf;
    global $ID;
    global $lang;
    // check if enabled
    if(!$conf['youarehere']) return false;
    $parts = explode(':', $id);
    $count = count($parts);
    // always print the startpage
    $result .= html_wikilink(':'.$conf['start']);
    // print intermediate namespace links
    $part = '';
    for($i=0; $i<$count - 1; $i++){
        $part .= $parts[$i].':';
        $page = $part;
        if ($page == $conf['start']) continue; // Skip startpage
        // output
        $result .= ' &raquo '.html_wikilink($page);
    }
    // print current page, skipping start page, skipping for namespace index
    resolve_pageid('',$page,$exists);
    if(isset($page) && $page==$part.$parts[$i]) return $result;
    $page = $part.$parts[$i];
    if($page == $conf['start']) return $result;
    $result .= ' &raquo '.html_wikilink($page);
    return $result;
}
 
function tpl_youarehere2($id) {
    $str = $this->tpl_youarehere2_help($id);
    $pos = strrpos($str , '&raquo');
    if ($pos == -1)
    return $str;
    return substr($str, 0, $pos);
}
 
function addPage2($page) {
    $id = $page['id'];
    if (!$id) return false;
    $this->page = $page;
    $this->_meta = NULL;
    // priority and draft
    if (!isset($this->page['draft'])) {
        $this->page['draft'] = ($this->_getMeta('type') == 'draft');
    }
    $class = '';
    if (isset($this->page['priority'])) $class .= 'priority'.$this->page['priority']. ' ';
    if ($this->page['draft']) $class .= 'draft ';
    if ($this->page['class']) $class .= $this->page['class'];
    if(!empty($class)) $class = ' class="' . $class . '"';
    $this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF;
    $this->_pageCell($id);
    if ($this->column['date']) $this->_dateCell();
    if ($this->column['user']) $this->_userCell();
    if ($this->column['desc']) $this->_descCell();
    foreach ($this->plugins as $plug => $col) {
        if ($this->column[$col]) $this->_pluginCell($plug, $col, $id);
    }
    $this->doc .= DOKU_TAB.'</tr>'.DOKU_LF;
    $this->doc .= DOKU_TAB.'<tr'.$class.'>'.DOKU_LF;
    $this->doc .= DOKU_TAB.DOKU_TAB.'<td style="padding-left:19px; padding-right:15px; padding-bottom:15px; font-size:10px;">';
    $this->doc .= $this->tpl_youarehere2($id);
    $this->doc .='</td>'.DOKU_LF;
    $this->doc .= DOKU_TAB.'</tr>'.DOKU_LF;
    return true;
}

And change tag/action.php

$pagelist->setFlags($flags);
$pagelist->startList();
foreach ($pages as $page) {
    $pagelist->addPage($page);
}

to

$pagelist->setFlags($flags);
$pagelist->startList();
foreach ($pages as $page) {
    $pagelist->addPage2($page);
}

After that, the list of pages that contain the tag, except for the names of pages themselves under them will also be bread crumbs to these pages.

Bad appearance when displaying tags at top of page

:!: Integrated to main code (see tags_list_css) option

When you insert the syntax at the top of a wiki page, the output of the plugin will be displayed below the TOC (Table of Contents). To make the visual appearance more smooth, change your lib/plugins/tag/style.css to the following code:

div.dokuwiki div.tags {
  border-top: 2px dotted __border__;
  font-size: 95%;
  text-align: right;
/*  clear: both; */
}
How to change the word tag and topic to another language
Is it possible to change the word tag used in syntax to something else, like another language {{tagInMylanguage>someTag}} –damascene 2012/04/10

You need to add copy of the existing tag pattern, and modify it to

syntax/tag.php
    $this->Lexer->addSpecialPattern('\{\{tag>.*?\}\}', $mode, 'plugin_tag_tag');
    //e.g. Spanish:
    $this->Lexer->addSpecialPattern('\{\{etiqueta>.*?\}\}', $mode, 'plugin_tag_tag');
Discussion
Pagelist With Alphabetical Headers

Is there a way to group pages by the first letter of their name or header?

Something like the example in this post on the user forums? https://forum.dokuwiki.org/d/12198-alphabetical-ordered-pages-list

No.

Collapsible outline of all tags? My ideal tag “cloud” display would have an alphabetic list of all tags. Click on a tag to expand (unfold) the display, and it would show an alphabetic list of pages that include that tag. We would want typical flags, such as for specifying namespaces, and display (like nspages), plus limiting tags (perhaps with RegEx?).
–davidtango 2021-03-21

—

I want the description under the tag, is it possible to make a line brake or to get the description under the tag? Thx

Is there any tip for hierarchical tag? I try to categorize my pages. For example, there are two pages. A Persian cat page has {tag>animal:cat}. And a Dalmatian dog page has {tag>animal:dog}. If I write '{topic>animal}, I hope to see the two pages, but all I can see is blank. Yes, I can tag that {tag>animal dog}, {tag>animal cat}, but it is not fancy.

For bugs or feature requests, there is the bug tracker linked here : Bug tracker.

This plugin clashes with the include module of the mediasyntax plugin. One workaround is to disable that part of the mediasyntax plugin by renaming the include.php file.

If you have a tag name that is the same as a page name that already exists, the tag links will point to that page in the current namespace rather than the page name in the tag namespace. Is this a bug or a feature? (3-Aug-2011)?

Found the issue. If you do not specify a namespace, it defaults to whatever is defined as the default namespace (ie. root:tag). If you do specify a namespace, it makes whatever you specify as the location for the data file (ie. root:mynamespace), NOT root:tag:mynamespace.
  • Is there no way to display all used tags? This would be very useful for finding typos and (nearly) duplicate entries. (2012-02-21)
    • Sry, me stupid, it works with count… BUG except that the table-entries are empty in my wiki! Latest DW/Plugin, with ~~NOCACHE~~ Screenshot. Sry for not registering at github for this.
      • In most of my installation it works, in some not… clueless!
    • How to sort the taglist (count>+) alphabetical?

My wiki has about 7000 pages with tags. It takes 25 seconds to display ~~TAGCLOUD~~ (My server runs with latest NGINX, UBUNTU 12.04, 4 core i5 cpu with 8gb ram, intel SSD ). Anyone have any other suggestion? or Do I need SQL-based tagging solution? — S.C. Yoo 2014/04/19 06:02

Individual Search Form: I'd like a form where the user could just type in the tag name, click search, and then a list is generated below. I know you got the searchtags but its just going to get unwieldy with the amount of tags I'm envisioning having. Thanks

Structured Tags: Can this (or any other plugin) support structured tags in addition to free-form tags? – 2014-09-02

Blank pages

I'm using Dokuwiki under Debian, last version in Debian distro. I installed plugin tags, but don't work :(

All page with {{tag>name_tag}} results a blank page, including the content of the page. I don't know what don't work but, I can't use it :(

I am using Debian Wheezy and I am having the same issue.

»»»»» Hy, I think the tag should be separted by a “,”. I mean what happen if I wanna tag “New York City” ? In present is created separte tag for “new” “york” “city” and that's not really good. — A.V

Nothing was found.

Same here, get a Nothing was found page.

(2017-03-28) I had the same problem. By coincidence, I switched to the default Dokuwiki template for an unrelated reason and got a different error when I clicked a tag link: “Helper plugin pagelist is not available.” Installed the pagelist plugin and then it worked. This dependency needs to be documented.

SEO meta keywords

Does this plugin alter the meta tags of the rendered pages? If it doesn't, I would like to leave the suggestion. — Fabricio Rocha 2016-06-11 17:00

Sorting the {{count>}} results

Is there any way to sort the output of the {{count>}} command? I'd like to have a page of used tags in alphabetical order, but it seems that pagelist parameters are not supported. — Fabricio Rocha 2016-06-19 19:42

This can be achieved by editing the helper.php file of the plugin. Before the return $otag; line within the function tagOccurrences, just insert the line ksort($otags); and that's all. IMO this should be standard behavior. — Taylan

In the current version for dokuwiki “kaos”, you need to put the line ksort($tagOccurrences); just before the statement return $tagOccurrences; — Jim

Unorderd List of all tags?

Is there a way to gen an unorderd list of all tags, similar as

Tag#
1
1
1
1
1
1
1

, but without table and occurrences?

Filtering the list of Tags?

Hi, I have attempted to try an solve this but my apologies as I do not know enough about PHP. I use some tags on the site to create dynamic links and I was wondering if there is a way to have the tagsearch have the capability to ignore certain tags. In this case I start the dynamic tags with dw_ and would like to know if possible to filter out all the tags that start with dw_. Thanks for any help! Frank.

Add "*" to list all the tags under a tag namespace?

I need a function to add all the tags under a tag namespace to the tag list.
That is, when I have a ns1:tag1, ns1:tag2, …, ns1:tagN, I can use

{{topic> ns1:*}}

to show all the pages with the tag under the namespace ns1. It is quite useful because sometimes I just want to show the pages with a sub tag, but sometimes I want to show all the pages with these tags on a main page. Since the tags under ns1 may be added in the future, I do not need to change the main page code to add more tags.
Now the tag namespace cannot be managed, I hope the basic function can be added.
2021-6-28

—

Columns?

2024-12-23

Is there a way to show the countlist or topic list (or just a list of tags) in a multicolumn format? I tried using the WRAP plugin, but that did not work.

Count Table Columns

2025-05-01

I too would like to have more columns for the count list or topic list. I tried creating userstyle.css file and directly editing the columns for the tables created with the plugin, but that had no effect. I also tried editing it by accessing the ul.plugin_tag_cloud but that also had no effect.

It is rather impossible to navigate the count list when you have dozens of tags, let alone the hundreds my wiki is using.

Exclude subnamespaces

I would have think something like {{topic>:?tag1 -:ns1?tag1}} would have showed every tag1 but NOT (minus -) :ns1?tag1.
It doesn't though. Is there any way to list every tag1 pages except the ones from :ns1 ?

2026-2-5 16:38:34

2026/02/05 16:38 · jackboo

====== Add New Page Plugin
Compatible with DokuWiki

2025-05-14 “Librarian”
Download
Report bugs
Donate
pluginPut ‘add new page’ forms within pages, with optional namespace selection


Last updated on
2025-09-21
Provides
Syntax
Repository
Source
Conflicts with
infomail
Similar to catlist, copypage, jsongendoc, new_page_dialog, npd, pagehere

Tagged with button, create, form

Needed for autoincludeindex

By Damien Regad, Benjamin Santalucia, Sam Wilson and other contributors
newpagetemplate cspheader authwordpress deletepagebutton
Edit
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

Edit
Description
This plugin allows you to add new-page forms to wiki pages, so that users can simply enter the title of a new page and go straight to the editing form (rather than first creating a link to the page, or typing the URL directly).

The target namespace for the new page can either be selected from a drop-down list in the new-page form, or specified in the form syntax. Only namespaces to which the user is permitted to write are shown.

The plugin can pair with the newpagetemplate Plugin to start with a predefined template instead of an empty page.

The form submit button is disabled if there is no text in the title field.

Edit
Usage
Put

anywhere in a wiki page to get a new-page-title text entry box, and a namespace selection drop-down menu. More details in the Syntax section below.

Edit
Screenshots
The default form has a drop-down with all namespaces of the wiki and a text field for the pagename.

with configuration option “Hide namespace selection” enabled.

with configuration option “Hide namespace selection” disabled.
Parent namespaces are greyed-out where the user has no access to add pages.
Edit
Edit
Syntax
Edit
Basic
The basic syntax is:


Or, to specify a namespace:


Where namespace is the target namespace for the new page. When this is specified, the namespace selection box can either be hidden (which it is by default) or set to show only sub-namespaces of the given one. This is configured in the main wiki configuration manager. If @PAGE@ (or @NS@) is given, the current page ID (or its namespace) will be used (e.g. for use in namespace templates; see below).

Edit
Creating a namespace
It is possible to use the @INPUT@ placeholder to reference the user's input in the namespace specification. For example,


will create a new namespace within the foo namespace.

Edit
Date/time-based naming
The plugin supports usage of strftime placeholders in the namespace config. This allows adding date elements to the namespace specification



When used together with the autopage option to hide the input field, a daily page can be created with a single button click:


Edit
Configuration overrides
It is possible to override the plugin's configuration for a single usage of the syntax, by specifying a ? followed by the config's name with an optional no prefix to negate it. Values for non-boolean configs can be provided with =, separated by ;. Multiple overrides can be given, separated by , or &.

General syntax:

?[no]<option_1>[=value_1[;value_2]…][,[no]<option_2>]…
Examples:

overwrite the default hide setting


custom namespace exclusion and hide root


disable subnamespace creation – with the code below, entering sub:page will create a page named sub_page instead of page page in namespace sub


Edit
Custom button labels
The submit button's label can be changed from the default Add Page, to a text of your choice using the 'label' option


Custom labels can of course be combined with other parameters, allowing for example to provide a one-click button to create a journal page.


Edit
New-page templates
This plugin is also compatible with the newpagetemplate plugin (note that this is a separate feature to the namespace templates described below). To specify a template to be used with the new page, use one of the following syntaxes:

Use the newtpl template

Present a drop-down list of newtpl1 and
newtpl2, allowing the user to choose one

The same as above, but with nicer titles
Edit
In all of these, the basic >namespace syntax can be included before the hash # character.

Edit
Multiple occurences
The

syntax may be added multiple times on the same page.

Edit
Site templates
To include an add-new-page form in a Site Template, use the following line:

<?php echo p_render('xhtml',p_get_instructions('

'),$info) ?>
Edit
Namespace Templates
Add-new-page forms can also be added to Namespace Templates. The replacement patterns @ID@ and @NS@ can be used in the plugin's namespace parameter.

Edit
Configuration and Settings
You can configure the plugin in the Config Manager of DokuWiki. There are four settings:

Excluded namespaces (exclude) — A semicolon-separated list of namespaces that should be excluded from the namespace selection list. Default: wiki;playground.
Show root namespace (showroot) — Whether to show the wiki's root namespace in the namespace selection list. Default: true.
Hide namespace selection (hide) — Hide the namespace selection list. Only applies if a namespace is given (see above). Default: true.
Hide “access denied” message (hideACL) — Do not show the “You are not allowed to add pages” message when the user doesn't have permission to create pages. Default: false (i.e. do show the message).
Hide the input box (autopage) — The preconfigured namespace is treated as a full page ID. Use with date placeholders). Default: false.
Namespace creation (createns) — When true (default), use of `:` in the page name will create a subnamespace; if false, it will be replaced by `_`, causing a page to be created.
Edit
FAQ
Why is a privileged user not allowed to add pages?
Logged in as administrator, why do I get a You are not allowed to add pages error message ?

This is a known problem, caused by caching. As a workaround, add to the page that contains the form.
Addnewpage form on the admin page?
Is there a possibility to add the plugin as a part of the admin page, like the plugins pagemove or upgrade?

Not currently, but this can be done by modifying your template and including the addnewpage form only when $ACT=='admin'
More than one form per page?
Is it possible to have more than one new-page form on a page?

Yes. Nothing special needs to be done to permit this, just add the markup wherever you want the forms to appear.
Can the textbox be pre-populated with a value? Specifically, the ID variable? (Trying to have a user search for a page, then use this plugin to create the page if they don't find what they're looking for…)
How can a add_page form add in the site template automaticaly? Where to place the php statements?
Edit
Development

2026-2-5 15:54:19

2026/02/05 15:54 · jackboo
备忘录

本站dokuwiki版本:dokuwiki-2018-04-22 3658kb

tag版本plugin-tag-2017-08-24,要配合:pagelist,版本为:plugin-pagelist-2017-08-24.zip

Helper plugin pagelist is not available or invalid.

blog版本 2013 by Michael Hamann,需要include插件

随机访问的代码: <a href=“?do=nsrandompage” >random</a> 使用:DokuWiki-randompage-what

2026-2-5 08:25:31

2026/02/05 08:26 · jackboo
安全

DokuWiki 是一种经常被使用在公共服务上的网络应用。这意味着,例如比起你桌面系统的本地应用,你要承担更多的风险接受恶意使用者的攻击。

DokuWiki 以安全的思想进行开发。我们试着在用户友好和安全之间找到一个平衡,但当无法找到满意的妥协时,更倾向于安全。

该页面对你应该关注哪些方面提供了一个概览,确保你的 DokuWiki 是安全的。

编辑 报告和通知 当你发现 DokuWiki 的安全问题时,请通知我们。你可以按以下方法进行:

提交一个bugs 发送邮件到邮件列表 发送私人邮件到andi [at] splitbrain [dot] org 前两个作为提交 bug 的首选方法,除非当您发现非常严重的错误,如果在 patch 提供之前使该 bug 公开,会危机到全世界已经安装 Dokuwiki 的使用者,那么您应该考虑第三种联系方法。

所有的以前的安全问题可以在这里找到。

根据已知安全问题的严重性,非常小的问题会在以后的版本中进行修正,又或者制作并释放 bugfix。在后一种情况下,更新检查机制会通知用户进行必要的更新。

你应该经常使用当前释放 DokuWiki 的最新版本,因为没有为旧版本发布安全修正程序。

编辑 网站访问安全 DokuWiki 使用文件来存储配置和页面数据。你必须确保这些页面绝不能直接的从网络访问。发布的压缩包里面含有一组 “.htaccess”文件,这些文件会告诉 Apache Web 服务器拒绝访问某些目录。

如果你不使用 Apache Web 服务器又或者你的 Apache 不能使用 “.htaccess” 文件,那么你需要手动设置,确保你的安装安全可靠。

以下目录不应该从网络直接访问:

data conf bin inc(尽管可访问时没有危险) 要检查你是否需要调整访问权限,你可以试着访问http://yourserver.com/data/pages/wiki/dokuwiki.txt。你应该无法以这种方法访问到该文件。

如果你的目录没有进行适当的安全设置,请阅读以下小节,它会告诉你如何做到这些。

编辑 在Apache中拒绝目录访问 最简单的方法就是在您的 Apache 配置中开启 .htaccess 支持。请参考Apache的 .htaccess 教程。

编辑 在 IIS 中拒绝目录访问 可以在 IIS 的配置设置中禁用上述目录的访问。

打开配置工具:开始 → 设置 → 控制面板 → 管理员工具 → IIS 服务 浏览到你想要保护的目录:本地计算机 → 网站 → 默认网站 → 目录的路径 右击文件夹选择属性 → 目录安全 → IP地址和域名限制 → 编辑… 选择“默认情况下,对所有计算机拒绝访问”。 在iis7配置设置中禁用上述目录的访问的方法

打开配置工具:开始 → 设置 → 控制面板 → 管理员工具 → IIS 服务 浏览到你想要保护的目录:本地计算机 → 网站 → 默认网站 →右边功能视图中找到iis里的请求筛选 在URL里添加.你需要保护的目录. 更简单的办法就是在dokuwiki的根目录下.找到web.config文件 如果没有就创建一个 打开改为以下代码

web.config <?xml version=“1.0” encoding=“UTF-8”?> <configuration>

  <system.webServer>
      <security>
          <requestFiltering>
              <filteringRules>
              </filteringRules>
              <alwaysAllowedUrls>
                  <add url="/data/media/" />
              </alwaysAllowedUrls>
              <denyUrlSequences>
                  <add sequence="/data/" />
                  <add sequence="/conf/" />
                  <add sequence="/bin/" />
                  <add sequence="/inc/" />
              </denyUrlSequences>
          </requestFiltering>
      </security>
  </system.webServer>

</configuration> 编辑 将目录移出根文档 为了避免任何对上述目录的访问,最安全的方法就是把它们从 Web 服务所谓的“根文档”中移出来。

data 目录 从根文档中移出 “data” 目录(和它所有的内容) 编辑 savedir 设置,使它指向 “data” 目录的新位置。 例如,如果把 “data” 目录移动到 “/home/yourname/data”,添加以下这一行到 “conf/local.php”:

$conf['savedir'] = '/home/yourname/data/'; conf 目录 从根文档中移出 “conf” 目录(和它所有的内容) 在 “inc” 目录内创建一个名为 preload.php 的文件,设置 “DOKU_CONF” 定义并使它指向 “conf” 目录的新地址。 例如,如果把 “conf” 目录移动到 “/home/yourname/conf”,创建以下的 “inc/preload.php”文件:

inc/preload.php <?php

define('DOKU_CONF','/home/yourname/conf/'); bin 目录 bin 目录包含了命令行工具。如果你没有 shell 可以访问你的服务器,你可以简单的删除该目录和它的内容。否则只要把它移出文档根即可。不需要更多的配置工作。

inc 目录 从文档根中移出该目录,直到目前还没有简单的方法。但是因为它不包含任何的敏感数据,所以不值得努力尝试移出它了。

编辑 DokuWiki 配置设置 DokuWiki 包含了多个配置设置,对安装的各个安全方面产生影响。请参阅每个设置文档,以了解它们能做什么以及建议的设置。

allowdebug – 禁止调试输出,以避免系统信息泄露 :!: fmode, dmode – 设置 DokuWiki 创建文件的文件权限,也可以看到关于建立权限的信息。 fetchsize – 配置外部数据缓存 fullpath – 显示页面的完整路径名 所有的 验证设置 usewordblock – 通过黑名单,防止垃圾邮件 mailguard – 避免收集邮件地址的机器人 iexssprotect – 在 IE 中防范跨站脚本问题 htmlok – 开启 HTML phpok – 开启 PHP hidepages – 在索引和搜索中隐藏特定页面 safemodehack – 解决安全模式的限制 编辑 插件安全 DokuWiki 拥有大量的社群贡献的插件。插件通过添加新的代码为 DokuWiki 提供新的功能。这意味着该代码实际上已经访问到你的服务器。此外在一个完全特设的方式下,插件与 DokuWiki 是分开发布的。它们不像 DokuWiki 的核心代码库那样得到同样的关注和审查。所以,在安装一个插件之前的安全措施是有必要的。

这里有一些提示,帮助你选择你想要安装的插件。

如果可以,在安装插件之前,你应该检阅一下插件的源代码。 如果有疑问,请在邮件列表提问。 插件安装在 DokuWiki 的 lib 目录下,它可以从外部直接访问。检查一下该插件包含哪些文件,并使用适当的 .htaccess 文件锁定对它们的访问。 插件的创作与开发与 DokuWiki 项目没有直接的关系 - 他们可能是经验不足,有恶意或可能是已经被入侵的服务器插件的源代码。小心选择你信任的插件! 回顾上述的安全警告,同时,当插件有可用的新版本时为插件进行升级。 编辑 附加阅读

https://github.com/Chris--S/dokuwiki-plugin-iframe/archive/master.zip 这里有一些更多关于安全方面的内部和外部网页。

设置访问控制 通过 Https 强行登陆 对 DokuWiki 的 php 设置 Remove ACL rules for deleted pages Apache 安全 - 第三章:PHP的锁定.

2026-2-5 06:46:08

2026/02/05 06:46 · jackboo

<< 更新的文章 | 更早的文章 >>

all above flags does not work, the index pages in sub namespace is still included .

This is global configuration, you should configure it in Configuration Manager. — Siyuan Liu 2023-08-17
Discussion

Please report bugs or feature requests at the Bug tracker.

Is it possible to make a blog in one namespace be in ascending order, and a blog in a different namespace to be in descending order?
2026-2-5 15:55:33

2026/02/05 15:55 · jackboo

====== Add New Page Plugin
Compatible with DokuWiki

2025-05-14 “Librarian”
Download
Report bugs
Donate
pluginPut ‘add new page’ forms within pages, with optional namespace selection


Last updated on
2025-09-21
Provides
Syntax
Repository
Source
Conflicts with
infomail
Similar to catlist, copypage, jsongendoc, new_page_dialog, npd, pagehere

Tagged with button, create, form

Needed for autoincludeindex

By Damien Regad, Benjamin Santalucia, Sam Wilson and other contributors
newpagetemplate cspheader authwordpress deletepagebutton
Edit
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

Edit
Description
This plugin allows you to add new-page forms to wiki pages, so that users can simply enter the title of a new page and go straight to the editing form (rather than first creating a link to the page, or typing the URL directly).

The target namespace for the new page can either be selected from a drop-down list in the new-page form, or specified in the form syntax. Only namespaces to which the user is permitted to write are shown.

The plugin can pair with the newpagetemplate Plugin to start with a predefined template instead of an empty page.

The form submit button is disabled if there is no text in the title field.

Edit
Usage
Put

anywhere in a wiki page to get a new-page-title text entry box, and a namespace selection drop-down menu. More details in the Syntax section below.

Edit
Screenshots
The default form has a drop-down with all namespaces of the wiki and a text field for the pagename.

with configuration option “Hide namespace selection” enabled.

with configuration option “Hide namespace selection” disabled.
Parent namespaces are greyed-out where the user has no access to add pages.
Edit
Edit
Syntax
Edit
Basic
The basic syntax is:


Or, to specify a namespace:


Where namespace is the target namespace for the new page. When this is specified, the namespace selection box can either be hidden (which it is by default) or set to show only sub-namespaces of the given one. This is configured in the main wiki configuration manager. If @PAGE@ (or @NS@) is given, the current page ID (or its namespace) will be used (e.g. for use in namespace templates; see below).

Edit
Creating a namespace
It is possible to use the @INPUT@ placeholder to reference the user's input in the namespace specification. For example,


will create a new namespace within the foo namespace.

Edit
Date/time-based naming
The plugin supports usage of strftime placeholders in the namespace config. This allows adding date elements to the namespace specification



When used together with the autopage option to hide the input field, a daily page can be created with a single button click:


Edit
Configuration overrides
It is possible to override the plugin's configuration for a single usage of the syntax, by specifying a ? followed by the config's name with an optional no prefix to negate it. Values for non-boolean configs can be provided with =, separated by ;. Multiple overrides can be given, separated by , or &.

General syntax:

?[no]<option_1>[=value_1[;value_2]…][,[no]<option_2>]…
Examples:

overwrite the default hide setting


custom namespace exclusion and hide root


disable subnamespace creation – with the code below, entering sub:page will create a page named sub_page instead of page page in namespace sub


Edit
Custom button labels
The submit button's label can be changed from the default Add Page, to a text of your choice using the 'label' option


Custom labels can of course be combined with other parameters, allowing for example to provide a one-click button to create a journal page.


Edit
New-page templates
This plugin is also compatible with the newpagetemplate plugin (note that this is a separate feature to the namespace templates described below). To specify a template to be used with the new page, use one of the following syntaxes:

Use the newtpl template

Present a drop-down list of newtpl1 and
newtpl2, allowing the user to choose one

The same as above, but with nicer titles
Edit
In all of these, the basic >namespace syntax can be included before the hash # character.

Edit
Multiple occurences
The

syntax may be added multiple times on the same page.

Edit
Site templates
To include an add-new-page form in a Site Template, use the following line:

<?php echo p_render('xhtml',p_get_instructions('

'),$info) ?>
Edit
Namespace Templates
Add-new-page forms can also be added to Namespace Templates. The replacement patterns @ID@ and @NS@ can be used in the plugin's namespace parameter.

Edit
Configuration and Settings
You can configure the plugin in the Config Manager of DokuWiki. There are four settings:

Excluded namespaces (exclude) — A semicolon-separated list of namespaces that should be excluded from the namespace selection list. Default: wiki;playground.
Show root namespace (showroot) — Whether to show the wiki's root namespace in the namespace selection list. Default: true.
Hide namespace selection (hide) — Hide the namespace selection list. Only applies if a namespace is given (see above). Default: true.
Hide “access denied” message (hideACL) — Do not show the “You are not allowed to add pages” message when the user doesn't have permission to create pages. Default: false (i.e. do show the message).
Hide the input box (autopage) — The preconfigured namespace is treated as a full page ID. Use with date placeholders). Default: false.
Namespace creation (createns) — When true (default), use of `:` in the page name will create a subnamespace; if false, it will be replaced by `_`, causing a page to be created.
Edit
FAQ
Why is a privileged user not allowed to add pages?
Logged in as administrator, why do I get a You are not allowed to add pages error message ?

This is a known problem, caused by caching. As a workaround, add to the page that contains the form.
Addnewpage form on the admin page?
Is there a possibility to add the plugin as a part of the admin page, like the plugins pagemove or upgrade?

Not currently, but this can be done by modifying your template and including the addnewpage form only when $ACT=='admin'
More than one form per page?
Is it possible to have more than one new-page form on a page?

Yes. Nothing special needs to be done to permit this, just add the markup wherever you want the forms to appear.
Can the textbox be pre-populated with a value? Specifically, the ID variable? (Trying to have a user search for a page, then use this plugin to create the page if they don't find what they're looking for…)
How can a add_page form add in the site template automaticaly? Where to place the php statements?
Edit
Development

2026-2-5 15:54:19

2026/02/05 15:54 · jackboo
备忘录

本站dokuwiki版本:dokuwiki-2018-04-22 3658kb

tag版本plugin-tag-2017-08-24,要配合:pagelist,版本为:plugin-pagelist-2017-08-24.zip

Helper plugin pagelist is not available or invalid.

blog版本 2013 by Michael Hamann,需要include插件

随机访问的代码: <a href=“?do=nsrandompage” >random</a> 使用:DokuWiki-randompage-what

2026-2-5 08:25:31

2026/02/05 08:26 · jackboo
安全

DokuWiki 是一种经常被使用在公共服务上的网络应用。这意味着,例如比起你桌面系统的本地应用,你要承担更多的风险接受恶意使用者的攻击。

DokuWiki 以安全的思想进行开发。我们试着在用户友好和安全之间找到一个平衡,但当无法找到满意的妥协时,更倾向于安全。

该页面对你应该关注哪些方面提供了一个概览,确保你的 DokuWiki 是安全的。

编辑 报告和通知 当你发现 DokuWiki 的安全问题时,请通知我们。你可以按以下方法进行:

提交一个bugs 发送邮件到邮件列表 发送私人邮件到andi [at] splitbrain [dot] org 前两个作为提交 bug 的首选方法,除非当您发现非常严重的错误,如果在 patch 提供之前使该 bug 公开,会危机到全世界已经安装 Dokuwiki 的使用者,那么您应该考虑第三种联系方法。

所有的以前的安全问题可以在这里找到。

根据已知安全问题的严重性,非常小的问题会在以后的版本中进行修正,又或者制作并释放 bugfix。在后一种情况下,更新检查机制会通知用户进行必要的更新。

你应该经常使用当前释放 DokuWiki 的最新版本,因为没有为旧版本发布安全修正程序。

编辑 网站访问安全 DokuWiki 使用文件来存储配置和页面数据。你必须确保这些页面绝不能直接的从网络访问。发布的压缩包里面含有一组 “.htaccess”文件,这些文件会告诉 Apache Web 服务器拒绝访问某些目录。

如果你不使用 Apache Web 服务器又或者你的 Apache 不能使用 “.htaccess” 文件,那么你需要手动设置,确保你的安装安全可靠。

以下目录不应该从网络直接访问:

data conf bin inc(尽管可访问时没有危险) 要检查你是否需要调整访问权限,你可以试着访问http://yourserver.com/data/pages/wiki/dokuwiki.txt。你应该无法以这种方法访问到该文件。

如果你的目录没有进行适当的安全设置,请阅读以下小节,它会告诉你如何做到这些。

编辑 在Apache中拒绝目录访问 最简单的方法就是在您的 Apache 配置中开启 .htaccess 支持。请参考Apache的 .htaccess 教程。

编辑 在 IIS 中拒绝目录访问 可以在 IIS 的配置设置中禁用上述目录的访问。

打开配置工具:开始 → 设置 → 控制面板 → 管理员工具 → IIS 服务 浏览到你想要保护的目录:本地计算机 → 网站 → 默认网站 → 目录的路径 右击文件夹选择属性 → 目录安全 → IP地址和域名限制 → 编辑… 选择“默认情况下,对所有计算机拒绝访问”。 在iis7配置设置中禁用上述目录的访问的方法

打开配置工具:开始 → 设置 → 控制面板 → 管理员工具 → IIS 服务 浏览到你想要保护的目录:本地计算机 → 网站 → 默认网站 →右边功能视图中找到iis里的请求筛选 在URL里添加.你需要保护的目录. 更简单的办法就是在dokuwiki的根目录下.找到web.config文件 如果没有就创建一个 打开改为以下代码

web.config <?xml version=“1.0” encoding=“UTF-8”?> <configuration>

  <system.webServer>
      <security>
          <requestFiltering>
              <filteringRules>
              </filteringRules>
              <alwaysAllowedUrls>
                  <add url="/data/media/" />
              </alwaysAllowedUrls>
              <denyUrlSequences>
                  <add sequence="/data/" />
                  <add sequence="/conf/" />
                  <add sequence="/bin/" />
                  <add sequence="/inc/" />
              </denyUrlSequences>
          </requestFiltering>
      </security>
  </system.webServer>

</configuration> 编辑 将目录移出根文档 为了避免任何对上述目录的访问,最安全的方法就是把它们从 Web 服务所谓的“根文档”中移出来。

data 目录 从根文档中移出 “data” 目录(和它所有的内容) 编辑 savedir 设置,使它指向 “data” 目录的新位置。 例如,如果把 “data” 目录移动到 “/home/yourname/data”,添加以下这一行到 “conf/local.php”:

$conf['savedir'] = '/home/yourname/data/'; conf 目录 从根文档中移出 “conf” 目录(和它所有的内容) 在 “inc” 目录内创建一个名为 preload.php 的文件,设置 “DOKU_CONF” 定义并使它指向 “conf” 目录的新地址。 例如,如果把 “conf” 目录移动到 “/home/yourname/conf”,创建以下的 “inc/preload.php”文件:

inc/preload.php <?php

define('DOKU_CONF','/home/yourname/conf/'); bin 目录 bin 目录包含了命令行工具。如果你没有 shell 可以访问你的服务器,你可以简单的删除该目录和它的内容。否则只要把它移出文档根即可。不需要更多的配置工作。

inc 目录 从文档根中移出该目录,直到目前还没有简单的方法。但是因为它不包含任何的敏感数据,所以不值得努力尝试移出它了。

编辑 DokuWiki 配置设置 DokuWiki 包含了多个配置设置,对安装的各个安全方面产生影响。请参阅每个设置文档,以了解它们能做什么以及建议的设置。

allowdebug – 禁止调试输出,以避免系统信息泄露 :!: fmode, dmode – 设置 DokuWiki 创建文件的文件权限,也可以看到关于建立权限的信息。 fetchsize – 配置外部数据缓存 fullpath – 显示页面的完整路径名 所有的 验证设置 usewordblock – 通过黑名单,防止垃圾邮件 mailguard – 避免收集邮件地址的机器人 iexssprotect – 在 IE 中防范跨站脚本问题 htmlok – 开启 HTML phpok – 开启 PHP hidepages – 在索引和搜索中隐藏特定页面 safemodehack – 解决安全模式的限制 编辑 插件安全 DokuWiki 拥有大量的社群贡献的插件。插件通过添加新的代码为 DokuWiki 提供新的功能。这意味着该代码实际上已经访问到你的服务器。此外在一个完全特设的方式下,插件与 DokuWiki 是分开发布的。它们不像 DokuWiki 的核心代码库那样得到同样的关注和审查。所以,在安装一个插件之前的安全措施是有必要的。

这里有一些提示,帮助你选择你想要安装的插件。

如果可以,在安装插件之前,你应该检阅一下插件的源代码。 如果有疑问,请在邮件列表提问。 插件安装在 DokuWiki 的 lib 目录下,它可以从外部直接访问。检查一下该插件包含哪些文件,并使用适当的 .htaccess 文件锁定对它们的访问。 插件的创作与开发与 DokuWiki 项目没有直接的关系 - 他们可能是经验不足,有恶意或可能是已经被入侵的服务器插件的源代码。小心选择你信任的插件! 回顾上述的安全警告,同时,当插件有可用的新版本时为插件进行升级。 编辑 附加阅读

https://github.com/Chris--S/dokuwiki-plugin-iframe/archive/master.zip 这里有一些更多关于安全方面的内部和外部网页。

设置访问控制 通过 Https 强行登陆 对 DokuWiki 的 php 设置 Remove ACL rules for deleted pages Apache 安全 - 第三章:PHP的锁定.

2026-2-5 06:46:08

2026/02/05 06:46 · jackboo

<< 更新的文章 | 更早的文章 >>

all above flags does not work, the index pages in sub namespace is still included .

This is global configuration, you should configure it in Configuration Manager. — Siyuan Liu 2023-08-17

Discussion

Please report bugs or feature requests at the Bug tracker.

Is it possible to make a blog in one namespace be in ascending order, and a blog in a different namespace to be in descending order?
2026-2-5 15:55:33