summary refs log tree commit diff stats
path: root/includes/footer.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/footer.php')
-rwxr-xr-xincludes/footer.php13
1 files changed, 7 insertions, 6 deletions
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))
206 'USERNAME' => $getuser3['username'])); 206 'USERNAME' => $getuser3['username']));
207 } 207 }
208 208
209 $gettags = "SELECT DISTINCT tag FROM tags"; 209 $gettags = "SELECT DISTINCT tag FROM tags WHERE post_type = \"published\"";
210 $gettags2 = mysql_query($gettags); 210 $gettags2 = mysql_query($gettags);
211 $i=0; 211 $i=0;
212 while ($gettags3[$i] = mysql_fetch_array($gettags2)) 212 while ($gettags3[$i] = mysql_fetch_array($gettags2))
@@ -224,13 +224,14 @@ if (!isset($noRightbar))
224 $spread = max($counts) - $min_count; 224 $spread = max($counts) - $min_count;
225 $spread = ($spread <= 0) ? 1 : $spread; 225 $spread = ($spread <= 0) ? 1 : $spread;
226 $font_step = 8 / $spread; 226 $font_step = 8 / $spread;
227
228 uksort($counts, 'strnatcasecmp');
229
230 foreach ($counts as $tag => $count) 227 foreach ($counts as $tag => $count)
231 { 228 {
232 $template->adds_block('TAGCLOUD', array( 'TAG' => $tag, 229 if ($count != $min_count)
233 'SIZE' => (8 + (($count - $min_count) * $font_step)))); 230 {
231 $template->adds_block('TAGCLOUD', array( 'TAG' => $tag,
232 'SIZE' => (8 + (($count - $min_count) * $font_step)),
233 'COUNT' => $count));
234 }
234 } 235 }
235} 236}
236 237