diff options
-rwxr-xr-x | includes/footer.php | 13 | ||||
-rwxr-xr-x | theme/footer.tpl | 2 |
2 files changed, 8 insertions, 7 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 | ||
diff --git a/theme/footer.tpl b/theme/footer.tpl index b5f49c1..7a81d2b 100755 --- a/theme/footer.tpl +++ b/theme/footer.tpl | |||
@@ -178,7 +178,7 @@ | |||
178 | <DIV ID="hatbar"><H3>Tag Cloud</H3><P> | 178 | <DIV ID="hatbar"><H3>Tag Cloud</H3><P> |
179 | <P> | 179 | <P> |
180 | <!--BEGIN TAGCLOUD--> | 180 | <!--BEGIN TAGCLOUD--> |
181 | <A HREF="/blog/tag/<!--TAGCLOUD.TAG-->.php" STYLE="font-size: <!--TAGCLOUD.SIZE-->pt"><!--TAGCLOUD.TAG--></A> | 181 | <A HREF="/blog/tag/<!--TAGCLOUD.TAG-->.php" STYLE="font-size: <!--TAGCLOUD.SIZE-->pt" ALT="<!--TAGCLOUD.TAG--> (<!--TAGCLOUD.COUNT-->)" TITLE="<!--TAGCLOUD.TAG--> (<!--TAGCLOUD.COUNT-->)"><!--TAGCLOUD.TAG--></A> |
182 | <!--END TAGCLOUD--> | 182 | <!--END TAGCLOUD--> |
183 | </P> | 183 | </P> |
184 | </DIV> | 184 | </DIV> |