Dashboard > blojsom 3.0 > ... > Plugins > Tag Cloud Plugin
  blojsom 3.0 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 /WEB-INF/classes/blojsom-plugins.xml file, add the following:

<bean id="tag-cloud" class="org.blojsom.plugin.technorati.TagCloudPlugin" init-method="init" destroy-method="destroy">
        <property name="fetcher">
            <ref bean="fetcher"/>
        </property>
    </bean>

You may then add "tag-cloud" to one of the flavor-based plugin chains.

Usage and URL Parameters

Sample Style for Tag Cloud

You may add the following to the CSS file in use on your blog.

.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