From 6079598aeba3b0569de36074c46a77262d98fe88 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Tue, 9 Dec 2008 20:53:27 -0500 Subject: Enhanced tag cloud --- includes/footer.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'includes') diff --git a/includes/footer.php b/includes/footer.php index b400bbb..4fe5ec5 100755 --- a/includes/footer.php +++ b/includes/footer.php @@ -206,7 +206,7 @@ if (!isset($noRightbar)) 'USERNAME' => $getuser3['username'])); } - $gettags = "SELECT DISTINCT tag FROM tags"; + $gettags = "SELECT DISTINCT tag FROM tags WHERE post_type = \"published\""; $gettags2 = mysql_query($gettags); $i=0; while ($gettags3[$i] = mysql_fetch_array($gettags2)) @@ -224,13 +224,14 @@ if (!isset($noRightbar)) $spread = max($counts) - $min_count; $spread = ($spread <= 0) ? 1 : $spread; $font_step = 8 / $spread; - - uksort($counts, 'strnatcasecmp'); - foreach ($counts as $tag => $count) { - $template->adds_block('TAGCLOUD', array( 'TAG' => $tag, - 'SIZE' => (8 + (($count - $min_count) * $font_step)))); + if ($count != $min_count) + { + $template->adds_block('TAGCLOUD', array( 'TAG' => $tag, + 'SIZE' => (8 + (($count - $min_count) * $font_step)), + 'COUNT' => $count)); + } } } -- cgit 1.4.1