Help:Tagcloud format

From semantic-mediawiki.org
(Redirected from Tagcloud)
Jump to: navigation, search
Tagcloud format
Has description::Displays queried data in a tagcloud
Available languages
Expression error: Unrecognized punctuation character "{".
Image collection
{{#ask: has image collection::tagcloud|?has description|widths=220|heights=220|format=gallery|order=random|widget=slideshow|overlay=yes|class=demo-center|navigation=auto|autocaptions=no}}
Further Information
Provided by: Semantic Result Formats
Added: Has minimum version::1.5.3
Removed: Has maximum version::still supported
Requirements: Has further requirements::none
Format name: Has format name::tagcloud
Enabled by default: {{#info:Indicates whether the result format is enabled by default upon installation of the respective extension.}} Is enabled by default::yes
Authors: {{#set:Has author=Jeroen De Dauw}}Jeroen De Dauw, {{#set:Has author=MWJames}}MWJames
Categories: {{#ask: Has category::misc Docinfo status::effective[[Docinfo language::{{#show:Help:Tagcloud format|?Docinfo language|link=none|format=list}}]] ?Has description format=broadtable headers=show link=all class=sortable wikitable smwtable offset= searchlabel=misc limit=0

}}

Group:
Class: SRFTagCloud, SMWResultPrinter
Folder: Commit history
Folder tree
Table of Contents

↓ INFO ↓

The result format tagcloud, part of the Semantic Result Formats extension, can be used to display result values in a tag cloud. It has been written by Jeroen De Dauw for WikiWorks and is partly based on code from the FolkTagCloud extension.

Parameters

{{#smwdoc:tagcloud}}

With the deployment of SRF 1.8 the tagcloud format will support template inclusion,a sphere widget, class parameter, and wordcloud widget.

Usage

A simple example - displaying a tag cloud of authors of books:

{{#ask: [[Category:Books]]
| ?Has author
| format=tagcloud
}}

Displaying a tag cloud of things with the most related items. The pages themselves are also listed, as they are related to themselves. Depending on the cloud order, the biggest tags are shown first (tagorder=desc) and limited by the parameter limit=.

Styling support

Assigning cascading style sheet classes (classs=) to a tagcloud query will influence its positioning, width/height etc.. The width= and height= parameters are only recognized by a widget type output.

.demo-30-percent-width {
 width:30%;
 clear:both;
}
.demo-float-right {
 clear:both;
 float:right;
 margin-left:10px;
 margin-bottom:10px;
}
{{#ask: [[Category:Books]]
| ?Has author
| format=tagcloud
| class=demo-30-percent-width demo-float-right
}}
{{#subobject:|has styling=Class parameter|has description=Apply class parameter to change position and size }}

Template support

In a scenario where a page title is represented by a unique ID rather than a human readable title a inclusion template can be used to retrieve and replace a tag with a human readable name (stored as property-value pair). (See example Template:tagcloud.tag.title)

Wordcloud widget

The widget shows tags as word cloud map using d3.cloud.js plug-in. (see here)

Sphere widget

The sphere output implements some basic settings but for a more elaborate option set, please adjust the JavaScript accordingly. (See available options).

The plugin that is used to create the sphere output requires that tags are a link type entity therefore normal text (of type string etc.) entities need to be converted into a link type using a template (see above) that creates a wiki link ( such as [[{{{1}}}]]). The class parameter can be used to position the tagcloud easily within a page.

Examples

{{#ask:|format=ul}}



{{#set: |docinfo status=effective }}{{#set: |worn by =Template:Docinfo |warning =Master page updated }}{{#set:

|worn by =Template:Docinfo
|warning =No description
}}{{#set:

|revision id=26794 |namespace=Help |docinfo progress =100 |docinfo priority =3 }}{{#set:docinfo master page=Help:Tagcloud format }}{{#set:docinfo master rev =26794 }}{{#set:docinfo category=Category:Result formats}}{{#set:docinfo author=User:Jeroen De Dauw}}{{#set:docinfo editor=User:MWJames}}{{#set:docinfo support=User:Jeroen De Dauw}}{{#set:docinfo language=en}}

This documentation page applies to all SMW versions from 1.5.3 to the most current version.
Other versions: {{#ask: Docinfo master page::Help:Tagcloud format Docinfo language::en from version::!1.5.3|
   ?from version = |
   ?to version = |
   sort = from version|
   order = desc|
   link=none|
   format=list|
   sep=, |
   template=versionlink|
   limit = 3|
   searchlabel = […]
  }}       Other languages: {{#ask: Docinfo master page::Help:Tagcloud format from version::1.5.3 Docinfo language::!en|
  ?Docinfo language =|
  link=none|
  format=list|
  sep=, |
  template=languagelink|
  sort = Docinfo language|
  order = asc|
  limit = 10|
  searchlabel = […]
}}

Docinfo master page::Help:Tagcloud format Docinfo language::en from version::1.5.3

{{#set:Release status=current}}

{{#set:Is master page=true}}