diff -r tagadelic/tagadelic.module public_projects/wiley/sites/default/modules/tagadelic/tagadelic.module
3a4,5
> define('TAGADELIC_MILLISECONDS_PER_DAY', 86400);
> 
97a100,106
>   $form['tagadelic_days'] = array(
>     '#type' => 'textfield',
>     '#size' => 5,
>     '#title' => t('Number of days of tags'),
>     '#default_value' => variable_get('tagadelic_days', 30),
>     '#description' => t('How many days to go back in collecting tags. Information will only be gathered when tags are used on nodes with a modification date at least as recent as this number of days ago (to the granularity of the timestamp).')
>     );
224a234,237
>     $delta = variable_get('tagadelic_days', 30);
>     $cutoff = time() - $delta * TAGADELIC_MILLISECONDS_PER_DAY;
>     
>   
228c241
<     $result = db_query_range('SELECT COUNT(*) AS count, d.tid, d.name, d.vid FROM {term_data} d INNER JOIN {term_node} n ON d.tid = n.tid WHERE d.vid IN ('. substr(str_repeat('%d,', count($vids)), 0, -1) .') GROUP BY d.tid, d.name, d.vid ORDER BY count DESC', $vids, 0, $size);
---
>     $result = db_query_range('SELECT 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} no on n.nid = no.nid WHERE d.vid IN ('. substr(str_repeat('%d,', count($vids)), 0, -1) .') AND no.changed >= ' . $cutoff . ' GROUP BY d.tid, d.name, d.vid ORDER BY count DESC', $vids, 0, $size);
