| 1 |
<?php |
<?php |
| 2 |
// $Id: tagadelic.module,v 1.40.2.4 2008/12/31 11:35:44 ber Exp $ |
// $Id: tagadelic.module,v 1.40.2.5 2009/05/13 16:47:00 ber Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_help |
* Implementation of hook_help |
| 225 |
if (!is_array($vids) || count($vids) == 0) { |
if (!is_array($vids) || count($vids) == 0) { |
| 226 |
return array(); |
return array(); |
| 227 |
} |
} |
| 228 |
$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, d.description 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); |
| 229 |
|
|
| 230 |
$tags = tagadelic_build_weighted_tags($result, $steps); |
$tags = tagadelic_build_weighted_tags($result, $steps); |
| 231 |
|
|
| 308 |
function theme_tagadelic_weighted($terms) { |
function theme_tagadelic_weighted($terms) { |
| 309 |
$output = ''; |
$output = ''; |
| 310 |
foreach ($terms as $term) { |
foreach ($terms as $term) { |
| 311 |
$output .= l($term->name, taxonomy_term_path($term), array('attributes' => array('class' => "tagadelic level$term->weight", 'rel' => 'tag'))) ." \n"; |
$output .= l($term->name, taxonomy_term_path($term), array( |
| 312 |
|
'attributes' => array( |
| 313 |
|
'class' => "tagadelic level$term->weight", |
| 314 |
|
'rel' => 'tag', |
| 315 |
|
'title' => $term->description, |
| 316 |
|
) |
| 317 |
|
) |
| 318 |
|
) ." \n"; |
| 319 |
} |
} |
| 320 |
return $output; |
return $output; |
| 321 |
} |
} |