plugin:cloud
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:cloud [2020-07-22 15:42] – [Cloud Plugin] Description changed Michaelsy | plugin:cloud [2024-03-07 19:30] (current) – Tested OK with Kaos dregad | ||
---|---|---|---|
Line 2: | Line 2: | ||
---- plugin ---- | ---- plugin ---- | ||
- | description: | + | description: |
author | author | ||
email : freaks@dokuwiki.org | email : freaks@dokuwiki.org | ||
type : syntax | type : syntax | ||
- | lastupdate : 2019-02-15 | + | lastupdate : 2023-02-11 |
- | compatible : Anteater, Rincewind, Angua, Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Frusterick Manners, Greebo | + | compatible : Anteater, Rincewind, Angua, Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Frusterick Manners, Greebo, Hogfather, Igor, Jack Jackrum, Kaos+ |
depends | depends | ||
conflicts | conflicts | ||
Line 13: | Line 13: | ||
tags : navigation, listing, tags, search | tags : navigation, listing, tags, search | ||
- | downloadurl: | + | downloadurl: |
sourcerepo : https:// | sourcerepo : https:// | ||
bugtracker : https:// | bugtracker : https:// | ||
Line 19: | Line 19: | ||
===== Description ===== | ===== Description ===== | ||
+ | ==== Word cloud ==== | ||
This is a very simple plugin that shows a cloud of the most frequently used words in your wiki: | This is a very simple plugin that shows a cloud of the most frequently used words in your wiki: | ||
Line 25: | Line 26: | ||
~~CLOUD: | ~~CLOUD: | ||
- | Optionally you can specify the number of words to display. Default is 50. Allowed are numbers between 1 and 999. 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. | + | 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. |
- | You can exclude words from the word cloud by adding them each on its own line to '' | ||
- | This plugin can also make a "tag cloud" | + | ==== Tag cloud ==== |
+ | |||
+ | This plugin can also make a "tag cloud". ([[plugin: | ||
~~TAGCLOUD~~ | ~~TAGCLOUD~~ | ||
~~TAGCLOUD: | ~~TAGCLOUD: | ||
~~TAGCLOUD: | ~~TAGCLOUD: | ||
+ | |||
+ | ==== Search word cloud ==== | ||
It also supports clouds for the most searched words in the wiki ([[plugin: | It also supports clouds for the most searched words in the wiki ([[plugin: | ||
Line 40: | Line 44: | ||
~~SEARCHCLOUD: | ~~SEARCHCLOUD: | ||
- | Since release 2017-08-05 | + | ===== Options ===== |
+ | '' | ||
- | ~~CLOUD[showCount]~~ | + | '': |
- | ==== Modifying | + | ''> |
- | Since release 2017-08-05 the CSS style of the cloud is defined in '' | + | All options together applied: |
+ | ~~TAGCLOUD[showCount]: | ||
- | To modify the text size in the cloud only the size factor '' | ||
- | <code css> | + | ===== Configuration ===== |
- | /* Size factor. */ | + | |
- | @sF: 1; | + | |
- | .dokuwiki div.cloud { margin-bottom: 1em; line-height: 145% * @sF; } | + | The plugin can be configured with the DokuWiki Configuration manager available in the admin menu. |
- | ... | + | |
- | </code> | + | ^ '' |
+ | ^ '' | ||
+ | ^ '' | ||
+ | ^ '' | ||
+ | ^ '' | ||
+ | |||
+ | You can exclude words from the word cloud by adding them to the '' | ||
+ | |||
+ | |||
+ | ==== Modifying the style ==== | ||
+ | The CSS style of the cloud is defined in '' | ||
+ | |||
+ | To modify the text size in the cloud only the size factor '' | ||
- | To change the color modify one of the three base color values in '' | + | To change the color modify one of the three base color values in '' |
- | <code css> | + | <code css conf/ |
- | ... | + | /* Size factor */ |
+ | @sF: 2; | ||
+ | /* Lime green base color for the word cloud */ | ||
@c0: #32CD32; | @c0: #32CD32; | ||
- | .dokuwiki div.cloud a.cloud1 { font-size: @f1; color: desaturate(lighten(@c0, | ||
- | .dokuwiki div.cloud a.cloud2 { font-size: @f2; color: desaturate(lighten(@c0, | ||
- | .dokuwiki div.cloud a.cloud3 { font-size: @f3; color: desaturate(lighten(@c0, | ||
- | .dokuwiki div.cloud a.cloud4 { font-size: @f4; color: desaturate(lighten(@c0, | ||
- | .dokuwiki div.cloud a.cloud5 { font-size: @f5; color: @c0; } | ||
- | ... | ||
</ | </ | ||
Line 76: | Line 87: | ||
==== Changes ==== | ==== Changes ==== | ||
- | |||
- | * **2013-02-27**: | ||
- | * Fixed stopwords. Note that stopwords are only for the word cloud and not for the tag or searchstats cloud. | ||
- | * Added different text sizes for the searchstats cloud | ||
- | * Changed HTML output to be valid when more than one cloud is used on a page, if you had adapted the colors/ | ||
Most recent code changes: | Most recent code changes: | ||
Line 95: | Line 101: | ||
Site using this plugin | Site using this plugin | ||
- | * [[http:// | + | * [[http:// |
===== FAQ ===== | ===== FAQ ===== | ||
Line 103: | Line 109: | ||
Hi, is it possible to cache the cloud? If i activate the plugin on my page, it slows down my system very much. | 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 | + | > You can enable the caching feature by setting |
+ | >> 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 ==== | ==== Whitespaces in Tags ==== | ||
Line 113: | Line 120: | ||
You run cloud on a Windows server. The stylesheet '' | You run cloud on a Windows server. The stylesheet '' | ||
- | ==== More than one Cloud on a page ==== | ||
- | When you have more than one cloud (eg. a word and a tag cloud) on a page you end up with invalid HTML because each cloud has the same id ('' | ||
- | > Fixed int he 2013-02-27 version | ||
===== Discussion ===== | ===== Discussion ===== | ||
The old discussion has been moved to [[plugin: | The old discussion has been moved to [[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. | >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. | ||
- | |||
- | I have one problem that the size of each tag remain the same, does not change. I am using a [[template: | ||
- | |||
- | ==== SEARCHCLOUD Size ==== | ||
- | |||
- | When a searchcloud is rendered, the size of each search term remains the same (cloud5). Kludgy fix: | ||
- | |||
- | After | ||
- | < | ||
- | | ||
- | </ | ||
- | Add | ||
- | < | ||
- | | ||
- | if ($num != 50) { // if not the default cloud size | ||
- | | ||
- | } else { | ||
- | | ||
- | } | ||
- | | ||
- | | ||
- | $min = min($size, | ||
- | $max = max($size, | ||
- | } | ||
- | </ | ||
- | |||
- | > (Different) fix is in the 2013-02-27 version | ||
==== Stopwords in tag clouds? ==== | ==== Stopwords in tag clouds? ==== | ||
Line 156: | Line 135: | ||
> 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. | > 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. | ||
- | === patch to fix stopwords === | ||
- | |||
- | @[[user> | ||
- | |||
- | <code php cloud_stopwords-fix.diff> | ||
- | --- syntax.php.orig | ||
- | +++ syntax.php | ||
- | @@ -142,6 +142,7 @@ | ||
- | | ||
- | if (@file_exists($swfile)) $stopwords = array_merge($stopwords, | ||
- | |||
- | + | ||
- | | ||
- | |||
- | if (@file_exists($conf[' | ||
- | </ | ||
- | |||
- | Thanks @ skipliquid! | ||
- | Where do I have to implement that code or the file? | ||
- | Best regards, flu. | ||
- | |||
- | > A different fix for this problem is in the 2013-02-27 version. | ||
==== Tagcloud links to pages ==== | ==== Tagcloud links to pages ==== | ||
Line 208: | Line 165: | ||
>> 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.--- [[user> | >> 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.--- [[user> | ||
- | ==== Show the number of occurences for each tag ==== | ||
- | |||
- | Could you please tell me how can i show the number of occurences of each tag of the cloud, such as keyword(number)..\\ | ||
- | |||
- | Thank u | ||
- | //Steve 19/ | ||
plugin/cloud.txt · Last modified: 2024-03-07 19:30 by dregad