Dashboard > blojsom > ... > Available Plugins > Tag Cloud Plugin
  blojsom Log In   View a printable version of the current page.  
  Tag Cloud Plugin
Added by David Czarnecki, last edited by David Czarnecki on Jul 10, 2007  (view change)
Labels: 
(None)

Availability

Available as of blojsom 2.26.

Description

Creates a "cloud" of the tags used on your blog. This "cloud" can be displayed in your template to allow visitors to search among entries based on a given tag.

Installation and Setup

Plugin Setup and Configuration

In your global /WEB-INF/plugin.properties file, add the following line:

tag-cloud=org.blojsom.plugin.technorati.TagCloudPlugin

You may then add "tag-cloud" to one of the flavor-based plugin chains. It must occur after the meta plugin. These plugin chains can be found in the individual blog's plugin.properties file. You should also place this plugin at the beginning of the chain. For example:

html.blojsom-plugin-chain=meta, tag-cloud, ...

Usage and URL Parameters

Sample Style for Tag Cloud

.tagcloud1 {
  font-size: 14px;
}

.tagcloud2 {
  font-size: 16px;
}

.tagcloud3 {
  font-size: 18px;
}

.tagcloud4 {
  font-size: 20px;
}

.tagcloud5 {
  font-size: 22px;
}

.tagcloud6 {
  font-size: 24px;
}

.tagcloud7 {
  font-size: 26px;
}

.tagcloud8 {
  font-size: 28px;
}

.tagcloud9 {
  font-size: 30px;
}

.tagcloud10 {
  font-size: 32px;
}

Sample Template Code to Display Tag Cloud

#if (!$BLOJSOM_PERMALINK && $BLOJSOM_PLUGIN_TAG_CLOUD_MAP)
<div>
<strong>Cloud:</strong><p/>
#foreach($tag in $BLOJSOM_PLUGIN_TAG_CLOUD_MAP.keySet())
<span class="tagcloud$BLOJSOM_PLUGIN_TAG_CLOUD_MAP.get($tag)"><a href="#BlogURL()?tq=$tag">$tag</a></span>
#end
</div>
#end

URL Parameters

The following URL parameters control the operation of this plugin.

URL parameter Accepted values Usage
tq The "tq" parameter can be any of the tags you've used when tagging your blog entries. The plugin will filter using the tag from this parameter for any entries that have the tag. /blog/?tq=foo

Site running on a free Atlassian Confluence Open Source Project License granted to blojsom. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators