| 276 | | $spread = max($tags) - min($tags); |
| 277 | | if ($spread <= 0) { $spread = 1; }; |
| 278 | | $fontspread = LARGEST - SMALLEST; |
| 279 | | $fontstep = $spread / $fontspread; |
| 280 | | if ($fontspread <= 0) { $fontspread = 1; } |
| 281 | | $ret = ""; |
| 282 | | foreach ($tags as $tag => $cnt) { |
| 283 | | $taglink = getPath() . |
| 284 | | (getConfig('rss.output.usemodrewrite')?"tag/$tag":"tags.php?tag=$tag"); |
| 285 | | $ret .= "\t<a href=\"$taglink\" title=\"$cnt " |
| 286 | | .($cnt > 1 || $cnt == 0 ? ITEMS:ITEM)."\" style=\"font-size: ". |
| 287 | | (SMALLEST + ($cnt/$fontstep)). UNIT.";\">$tag</a> \n"; |
| | 279 | if (count($tags)) { |
| | 280 | $spread = max($tags) - min($tags); |
| | 281 | if ($spread <= 0) { $spread = 1; }; |
| | 282 | $fontspread = LARGEST - SMALLEST; |
| | 283 | $fontstep = $spread / $fontspread; |
| | 284 | if ($fontspread <= 0) { $fontspread = 1; } |
| | 285 | $ret = ""; |
| | 286 | foreach ($tags as $tag => $cnt) { |
| | 287 | $taglink = getPath() . |
| | 288 | (getConfig('rss.output.usemodrewrite')?"tag/$tag":"tags.php?tag=$tag"); |
| | 289 | $ret .= "\t<a href=\"$taglink\" title=\"$cnt " |
| | 290 | .($cnt > 1 || $cnt == 0 ? ITEMS:ITEM)."\" style=\"font-size: ". |
| | 291 | (SMALLEST + ($cnt/$fontstep)). UNIT.";\">$tag</a> \n"; |
| | 292 | } |
| | 293 | } else { |
| | 294 | $ret =""; |