plugin:tag
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:tag [2021-08-27 18:24] – [Sites using this Plugin] greginthenorth | plugin:tag [2024-01-19 23:43] (current) – [Demo / Screenshots] Aleksandr | ||
---|---|---|---|
Line 6: | Line 6: | ||
email : freaks@dokuwiki.org | email : freaks@dokuwiki.org | ||
type : syntax, action, helper | type : syntax, action, helper | ||
- | lastupdate : 2020-12-02 | + | lastupdate : 2023-10-17 |
- | compatible : Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, Greebo, Hogfather | + | compatible : Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, |
depends | depends | ||
conflicts | conflicts | ||
Line 18: | Line 18: | ||
donationurl: | donationurl: | ||
---- | ---- | ||
- | |||
- | :!: The 2013-02-15 release fixed a security issue (XSS vulnerability), | ||
===== Description ===== | ===== Description ===== | ||
Line 25: | Line 23: | ||
The Tag Plugin lets you assign category tags to wiki pages. | The Tag Plugin lets you assign category tags to wiki pages. | ||
- | **Updating from before 2012-08-24**: | + | |
===== Components ===== | ===== Components ===== | ||
==== Tag ==== | ==== Tag ==== | ||
+ | Add a tag to the page | ||
{{tag> | {{tag> | ||
Line 41: | Line 40: | ||
* with namespaces: '' | * with namespaces: '' | ||
* multiple word tags: '' | * multiple word tags: '' | ||
+ | * '' | ||
==== Topic ==== | ==== Topic ==== | ||
+ | List all pages with given tags. | ||
{{topic> | {{topic> | ||
Line 50: | Line 50: | ||
^ [flags] | ^ [flags] | ||
- | 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 '' | + | 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 '' |
+ | * If you do not prepend, it acts as a OR. A page is added if it has one of these tags. | ||
+ | * '' | ||
+ | * '' | ||
Example: | Example: | ||
Line 61: | Line 64: | ||
==== Searchtags ==== | ==== Searchtags ==== | ||
+ | Search form for filtering by tag. | ||
| | ||
Line 80: | Line 84: | ||
==== Count ==== | ==== Count ==== | ||
+ | Shows a list of tags and its number of occurrences. | ||
- | {{count> | + | {{count> |
- | ^ [tag] | the category | + | ^ [tags] | The tag for which you want to list the occurrence. Multiple tags separated by spaces. |
+ | ^ & | ||
- | 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 '' | + | 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 '' |
Example: | Example: | ||
* '' | * '' | ||
* '' | * '' | ||
- | * '' | + | * '' |
+ | * '' | ||
| | ||
==== Tagpage ==== | ==== Tagpage ==== | ||
+ | Make link to the tag list | ||
| | ||
Line 108: | Line 116: | ||
The plugin can be configured with the DokuWiki configuration manager available in the admin menu. | The plugin can be configured with the DokuWiki configuration manager available in the admin menu. | ||
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
^ '' | ^ '' | ||
^ '' | ^ '' | ||
Line 121: | Line 129: | ||
===== Demo / Screenshots ===== | ===== Demo / Screenshots ===== | ||
+ | Topic listing: | ||
+ | {{ https:// | ||
- | {{ http://dump.lupo49.de/tmp/dokuwiki/ | + | Tags: |
- | + | {{ https://trello.com/1/cards/64398723319f190ba6cb5235/attachments/64398760e3c8fe34a7786c62/download/ | |
- | {{ http:// | + | |
===== Changes ===== | ===== Changes ===== | ||
Line 166: | Line 175: | ||
* [[http:// | * [[http:// | ||
* [[https:// | * [[https:// | ||
- | * [[https:// | + | |
Line 181: | Line 190: | ||
< | < | ||
{{tag>" | {{tag>" | ||
+ | </ | ||
+ | |||
+ | ==== How to make the tag namespace breadcrumb still work ==== | ||
+ | |||
+ | Let's use one of the example websites. | ||
+ | |||
+ | If you go to https:// | ||
+ | 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 [[config: | ||
+ | |||
+ | < | ||
+ | RewriteCond %{REQUEST_URI} | ||
+ | RewriteRule ^tag.([\-_a-zA-Z0-9\ ]*)$ tag: | ||
</ | </ | ||
Line 187: | Line 211: | ||
This colors the background of the page to red if the keyword ' | This colors the background of the page to red if the keyword ' | ||
- | <code php> | + | < |
function _handle_keywords(& | function _handle_keywords(& | ||
global $ID; | global $ID; | ||
Line 193: | Line 217: | ||
// Fetch tags for the page; stop proceeding when no tags specified | // Fetch tags for the page; stop proceeding when no tags specified | ||
$tags = p_get_metadata($ID, | $tags = p_get_metadata($ID, | ||
- | if(is_null($tags)) | + | if(is_null($tags)) |
// Replace underscores with blanks | // Replace underscores with blanks | ||
Line 200: | Line 224: | ||
$meta[' | $meta[' | ||
+ | // add extra styling | ||
$t = explode(',', | $t = explode(',', | ||
if(in_array(' | if(in_array(' | ||
Line 324: | Line 349: | ||
> Is it possible to change the word tag used in syntax to something else, like another language < | > Is it possible to change the word tag used in syntax to something else, like another language < | ||
+ | |||
+ | You need to add copy of the existing tag pattern, and modify it to | ||
+ | <code php syntax/ | ||
+ | $this-> | ||
+ | //e.g. Spanish: | ||
+ | $this-> | ||
+ | </ | ||
===== Discussion ===== | ===== 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:// | ||
+ | > No. | ||
==== Collapsible outline of all tags ==== | ==== Collapsible outline of all tags ==== | ||
Line 338: | Line 377: | ||
- | How do I tag a page? Lots of detail about how to display tagged pages, but I cannot find anything about how to tag a page to begin with. | ||
- | |||
- | > You have to type it into the page. Look at the **Components** portion of this page to see what to type. | ||
For __**bugs or feature requests, there is the bug tracker**__ linked here : [[https:// | For __**bugs or feature requests, there is the bug tracker**__ linked here : [[https:// |
plugin/tag.1630081459.txt.gz · Last modified: 2021-08-27 18:24 by greginthenorth