DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:cloud

Cloud Plugin

Compatible with DokuWiki

  • 2024-02-06 "Kaos" yes
  • 2023-04-04 "Jack Jackrum" yes
  • 2022-07-31 "Igor" yes
  • 2020-07-29 "Hogfather" yes

plugin Shows a word cloud from different sources (used words, tags, searched words)

Last updated on
2023-02-11
Provides
Syntax
Repository
Source
Requires
(searchstats), (tag), pagelist

Similar to cumulus

Tagged with listing, navigation, search, tags

Description

Word cloud

This is a very simple plugin that shows a cloud of the most frequently used words in your wiki:

~~CLOUD~~
~~CLOUD:number~~

Optionally you can specify the number of words to display. Default is 50. Each of the words is linked to the search result page for it. The words are styled in a way that more frequent words are bigger and have a darker link color.

Tag cloud

This plugin can also make a “tag cloud”. (tag plugin must be installed.) The syntax is:

~~TAGCLOUD~~
~~TAGCLOUD:number~~
~~TAGCLOUD:number>namespace1:subns11|.|namespace2~~

Search word cloud

It also supports clouds for the most searched words in the wiki (searchstats plugin must be installed):

~~SEARCHCLOUD~~
~~SEARCHCLOUD:number~~

Options

[showcount] the number of occurrences can also be output by adding the showCount option.

:number sets the number of items shown in the cloud. Default 50, minimal 1 and maximum 999.

>namespace1|namespace2 (tag cloud only) filters the tags in the tag cloud to these belonging to given namespace(s), with | you can add more namespaces.

All options together applied:

~~TAGCLOUD[showCount]:10>yournamespace~~

Configuration

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

minimum_word_length Minimum word-length for words in the cloud. Default: 2
word_blacklist Words, which shouldn't be displayed on pages (Comma separated)
tag_blacklist Tags, which shouldn't be displayed on pages (Comma separated)
search_blacklist Search words, which shouldn't be displayed on pages (Comma separated)
list_tags_of_subns List also tags in subnamespaces of a specified namespace

You can exclude words from the word cloud by adding them to the word_blacklist configuration setting. Alternatively, words can be added each on its own line to inc/lang/<lang-code>/stopwords.txt or to conf/stopwords.txt. Remember that last line in file should be empty to work correctly. This affects also the fulltext indexing.

Modifying the style

The CSS style of the cloud is defined in style.less. The less code makes it easier to modify the look of the cloud. In conf/userstyle.less you can just override the variables used.

To modify the text size in the cloud only the size factor @sF needs to be changed. The following example doubles the size by changing the size factor from 1 to 2.

To change the color modify one of the three base color values in @c0, @c1 or @c2. The following code will make the cloud have a lime green base color.

conf/userstyle.less
/* Size factor */
@sF: 2;
/* Lime green base color for the word cloud */
@c0: #32CD32;

Please only use RGB color values here, not CSS color names.

Development

Changes

Bugs/Feature Requests

Please report bugs and feature requests at the Bug Tracker.

Demo

The plugins page of dokuwiki.org presents a tag cloud that refers to all pages in the plugin name space.

Site using this plugin

FAQ

Caching for clouds

Hi, is it possible to cache the cloud? If i activate the plugin on my page, it slows down my system very much.

You can enable the caching feature by setting $renderer->info['cache'] = false; in syntax.php line 74 to true.
Note that with caching also ACL protected pages can be listed unintended. So be aware of how ACL are used before enabling caching.

Whitespaces in Tags

Use underscores to specify whitespaces in tags.

Cloud in Windows-Server

You run cloud on a Windows server. The stylesheet style.css must be edited to hold Windows linebreaks rather then Unix. This solved the same problem for me. Ruud

Discussion

The old discussion has been moved to discussion_old and will be cleaned up sooner or later. Please add bug reports and feature requests to the bug tracker of the plugin!

First heading in tagcloud

Related to the previous suggestion for tagcloud; If the first heading exists in a page of the specified tag, I'd like the tag-clouds to appear the first heading of the tag page.

Stopwords in tag clouds?

I was trying to remove some tags from the tag cloud as I have nested tags as a structuring element but due to this, certain tags appear much more often than others (the 'folder' tags). However, the described methods (include stopwords.txt in conf/ or inc/lang/) apparently do not work for tag clouds. Is there some way to have the clouds behave the way I would like them to? — Cantello 2011/11/30 19:40

stopwords are only for the word cloud, not for the tag cloud. I consider adding a similar (but differently named) blacklist for the tag cloud. — Michael Hamann 2013/02/27 23:50

Using Dokuwiki release Adora belle with tag and cloud plugin:

Some of my tags and some of my page names equal. If such a tag appears in the tagcloud, the cloud item will link to the page with the equal name and not to the list of pages, that are tagged with the tag.

Julian 2013-02-16

This is intentional in order to give you the possibility to add a description for that tag on this page. You can use the topic syntax of the tag plugin in order to add the list of pages to the description of the tag. — Michael Hamann 2013/02/16 13:45
Thank you!

Manolito 2013-02-21

Can we force the tag's link in cloud to a page defined in advance in subnamespace ? By default, the link leads in a page autogenerated like “tag:tag1”. I would like to report “tag1” in address like “en:tag:ns1:ns2:tag1”. This is my way of organizing the navigation menu almost auto-generated which created this particular request… and with plugin multilingue it's better too. — Alinea 2013/03/09 12:17

Tag namespace feature request

It would be nice if you could also control what tag namespace to use as it is with page namespaces now.

For example, you tag some of your pages with topic1, topic2, myCategory:subTopic1, myCategory:subTopic2 and then you create a tagcloud restricting it to myCategory to get only subTopic1 and subTopic2 listed there.

Seykela 2013/02/22 15:59
I agree with this, it would be a great feature!
Fernando Ribeiro 2013/05/02 14:41
I would also like to see this functionality. It would be excellent if (just as in the SEARCHCLOUD syntax) a cloud could be generated from the resullts of a TagFilter plugin listing.— JD4x4
plugin/cloud.txt · Last modified: 2024-03-07 19:30 by dregad

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