function tag_display_cloud(&$tags, $journo_ref = null, $period = null) { $minsize = 10; $maxsize = 24; // map most frequent to maxsize and least frequent to minsize $total = 0; $low = 9999; $high = 0; foreach ($tags as $freq) { if ($freq > $high) { $high = $freq; } if ($freq < $low) { $low = $freq; } } foreach ($tags as $tag => $freq) { if ($high == $low) { $size = $minsize + ($maxsize - $minsize) / 4; } else { $size = $minsize + ($freq - $low) * ($maxsize - $minsize) / ($high - $low); } printf(" <a href=\"%s\" style=\"font-size: %dpx\">%s</a> \n", tag_gen_link($tag, $journo_ref, $period), $size, $tag); } }
<?php if (!$quick_n_nasty && $toptag_alltime) { ?> <li>More about '<a href ="<?php echo tag_gen_link($toptag_alltime, $ref); ?> "><?php echo $toptag_alltime; ?> </a>' than anything else</li> <?php } if (!$quick_n_nasty && $toptag_month) { ?> <li>A lot about '<a href ="<?php echo tag_gen_link($toptag_month, $ref); ?> "><?php echo $toptag_month; ?> </a>' in the last month</li> <?php } ?> </ul> <?php /* journo_emitBasedDisclaimer(); */ ?> </div> <div class="foot"></div> </div>