<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Tag cloud alogrithm</title>
	<atom:link href="http://www.crazybobbles.org/2007/01/29/tag-cloud-alogrithm/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.crazybobbles.org/2007/01/29/tag-cloud-alogrithm/</link>
	<description>photos + music + geekery - mind games</description>
	<pubDate>Thu, 20 Nov 2008 11:35:28 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7-beta3-9762</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Alex</title>
		<link>http://www.crazybobbles.org/2007/01/29/tag-cloud-alogrithm/comment-page-1/#comment-84</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Tue, 30 Jan 2007 12:02:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.crazybobbles.org/2007/01/29/tag-cloud-alogrithm/#comment-84</guid>
		<description>I used a similar calculation on my tag cloud I've just built for my new site...

I get the following variables from the database:

$max - the number of times the most popular tag has been used.
$min - the number of times the least popular tag has been used.
$distribution - ($max - $min) / 5;

Then I just go through each tag from the database and select the CSS class for each one...

Let's say that $tagcount is the amount of times a specific tag has been used...

if($tagcount == $min){
$class = "link13"; /* smallest */
}elseif($tagcount == $max){
$class = "link28"; /* biggest */
}elseif($tagcount &#62; ($min + ($distribution*2))){
$class = "link26"; /* big */
}elseif ($tagcount &#62; ($min + $distribution)){
$class = "link20"; /* medium */
}else{
$class = "link15"; /* small */
}

It's a bit quick and dirty but it works (so far)</description>
		<content:encoded><![CDATA[<p>I used a similar calculation on my tag cloud I&#8217;ve just built for my new site&#8230;</p>
<p>I get the following variables from the database:</p>
<p>$max - the number of times the most popular tag has been used.<br />
$min - the number of times the least popular tag has been used.<br />
$distribution - ($max - $min) / 5;</p>
<p>Then I just go through each tag from the database and select the CSS class for each one&#8230;</p>
<p>Let&#8217;s say that $tagcount is the amount of times a specific tag has been used&#8230;</p>
<p>if($tagcount == $min){<br />
$class = &#8220;link13&#8243;; /* smallest */<br />
}elseif($tagcount == $max){<br />
$class = &#8220;link28&#8243;; /* biggest */<br />
}elseif($tagcount &gt; ($min + ($distribution*2))){<br />
$class = &#8220;link26&#8243;; /* big */<br />
}elseif ($tagcount &gt; ($min + $distribution)){<br />
$class = &#8220;link20&#8243;; /* medium */<br />
}else{<br />
$class = &#8220;link15&#8243;; /* small */<br />
}</p>
<p>It&#8217;s a bit quick and dirty but it works (so far)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
