arc_popular_category_cloud

arc_popular_category_cloud is a Textpattern plugin for producing weighted lists of popular article categories that can be styled using CSS to take on the appearance of a category cloud. It’s based on the work of Mirko Jost.

The current version of this plugin is for use with Textpattern 4.07 and takes into account the expiration date of articles (see attributes below). For older versions of Textpattern please use the 0.1.x version of this plugin.

Installation

To install go to the ‘plugins’ tab under ‘admin’ and paste the plugin code into the ‘Install plugin’ box, ‘upload’ and then ‘install’. Finally activate the plugin.

Description

This plugin produces a weighted category list for article categories. The categories output can be restricted by the number of associated articles, or by setting a limit on the number of months to search within from the current date. Only categories containing articles are listed.

Syntax

<txp:arc_popular_category_cloud />

Attributes

Required

None.

Optional
Attribute Description Default Example
section The section to show categories from current section section=“blog”
parent If set will restrict output to direct child categories of specified parent category unset
posted Either ‘past’, ‘future’, or ‘all’ past posted=“all”
expired ‘1’ to include expired articles, ‘0’ to exclude them Set by site’s preferences expired=“1”
limit If set specifies the number of months prior to now in which to restrict the results; this attribute requires the posted attribute to be ‘past’. unset limit=“3”
minposts When set, this restricts the categories output to the list as only those with the specified number of posts associated with the category unset minposts=“5”
weighted ‘1’ for weighted list, ‘0’ for unweighted 1 weighted=“0”
label Label for the top of the list no label label=“Popular categories”
labeltag Independent wraptag for label empty labeltag=“h3”
break HTML tag to be used for line breaks, without brackets br break=“li”
wraptag HTML tag to be used as the wraptag, without brackets empty
class CSS class attribute for wraptag arc_popular_category_cloud
activeclass CSS class attribute for the currently active category, if any unset activeclass=“active”
maxfont Maximum font-size in percent 200% maxfont=“150%”
minfont Minimum font-size in percent 80%

Examples

Example 1: Weighted category cloud for articles posted in the last two months
<txp:arc_popular_category_cloud limit='2' />
Example 2: Weighted category cloud for categories associated with a minimum of 5 articles
<txp:arc_popular_category_cloud minposts='5' />

Change-log

  • v0.2 (2/12/08) – works with Textpattern 4.07+
    • expired and weighted attributes added
  • v0.1.1 (30/10/08) – works with Textpattern 4.06+

The Details


Comments

  1. Su-Mu |

    Thanks :-)