I've found a number of interesting tagclouds at
Dries Buytaert's website. I've recreated the code (mainly the SQL queries) needed to reproduce the same clouds using the
Tagadelic Drupal module. Take a look at them, if you're interested.
The following code creates the tagclouds that you can take a look at
here.
1.) What people read about (tagcloud based on nodes' visiting statistics):
<?php
if (module_exists('tagadelic')) {
$vids = array(4); // ids of vocabs for which you want to build a tag cloud
$sql = ''
. 'SELECT SUM(c.totalcount) AS count, d.tid, d.name, d.vid '
. 'FROM {term_data} d INNER JOIN {term_node} n ON d.tid = n.tid INNER JOIN {node_counter} c ON n.nid = c.nid '
. 'WHERE d.vid IN (' . substr(str_repeat('%d,', count($vids)), 0, -1) . ') '
. 'GROUP BY d.tid, d.name, d.vid '
. 'ORDER BY count DESC'
;
$stats = db_query_range($sql, $vids, 0, variable_get('tagadelic_page_amount', '60'));
$tags = tagadelic_build_weighted_tags($stats, variable_get('tagadelic_levels', 6));
$tagcloud = theme('tagadelic_weighted',tagadelic_sort_tags($tags));
print $tagcloud;
}
?>
2.) What people comment on (tagcloud based on nodes' number of comments):
<?php
if (module_exists('tagadelic')) {
$vids = array(4); // ids of vocabs for which you want to build a tag cloud
$sql = ''
. 'SELECT SUM(s.comment_count) AS count, d.tid, d.name, d.vid '
. 'FROM {term_data} d INNER JOIN {term_node} n ON d.tid = n.tid INNER JOIN {node_comment_statistics} s ON n.nid = s.nid '
. 'WHERE d.vid IN (' . substr(str_repeat('%d,', count($vids)), 0, -1) . ') '
. 'GROUP BY d.tid, d.name, d.vid '
. 'ORDER BY count DESC'
;
$stats = db_query_range($sql, $vids, 0, variable_get('tagadelic_page_amount', '60'));
$tags = tagadelic_build_weighted_tags($stats, variable_get('tagadelic_levels', 6));
$tagcloud = theme('tagadelic_weighted',tagadelic_sort_tags($tags));
print $tagcloud;
}
?>
3.) What the website is about (tagcloud based on number of nodes):
<?php
if (module_exists('tagadelic')) {
$vocs = array(4); // ids of vocabs for which you want to build a tag cloud
$tags = tagadelic_get_weighted_tags($vocs, variable_get('tagadelic_levels', 6), variable_get('tagadelic_page_amount', '60'));
$tagcloud = theme('tagadelic_weighted', tagadelic_sort_tags($tags));
print $tagcloud;
}
?>
Recent comments
2 years 24 weeks ago
3 years 45 weeks ago
3 years 45 weeks ago
3 years 47 weeks ago
3 years 48 weeks ago
4 years 3 weeks ago
4 years 3 weeks ago
4 years 3 weeks ago
4 years 3 weeks ago
4 years 3 weeks ago