Reputation: 5664
I'd like to create a tag clouds, and I'm wondering based on what parameters I should do this.
Also, I don't want the same top tags to be displayed all the time, so how do big sites handle this?
I've got table that contains the items, a table that contains the tags (just tag id and tag text) and another table for normalization, with a row for each relationship between an item and a tag.
Upvotes: 1
Views: 780
Reputation: 34013
I think a good implementation with nice flexibility (and in PHP) is WordPress's implementaion. Have a look at their argument object in the documentation for wp_tag_cloud():
That's with this code as a sample:
<?php $args = array(
'smallest' => 8,
'largest' => 22,
'unit' => 'pt',
'number' => 45,
'format' => 'flat',
'separator' => \"\n\",
'orderby' => 'name',
'order' => 'ASC',
'exclude' => null,
'include' => null,
'topic_count_text_callback' => default_topic_count_text,
'link' => 'view',
'taxonomy' => 'post_tag',
'echo' => true ); ?>
Upvotes: 1