/[drupal]/contributions/modules/tagadelic/tagadelic.module
ViewVC logotype

Diff of /contributions/modules/tagadelic/tagadelic.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.40.2.5, Wed May 13 16:47:00 2009 UTC revision 1.40.2.6, Wed May 13 16:56:12 2009 UTC
# Line 1  Line 1 
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
# Line 225  function tagadelic_get_weighted_tags($vi Line 225  function tagadelic_get_weighted_tags($vi
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    
# Line 308  function _tagadelic_sort_by_weight($a, $ Line 308  function _tagadelic_sort_by_weight($a, $
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  }  }

Legend:
Removed from v.1.40.2.5  
changed lines
  Added in v.1.40.2.6

  ViewVC Help
Powered by ViewVC 1.1.2