You are here

function theme_cumulus_weighted in Cumulus 5

Same name and namespace in other branches
  1. 6 cumulus.module \theme_cumulus_weighted()
  2. 7 cumulus.module \theme_cumulus_weighted()

Theme function

1 theme call to theme_cumulus_weighted()
cumulus_block in ./cumulus.module
Implementation of hook_block().

File

./cumulus.module, line 184
Provides a Flash-based 3D tag cloud. Based on WP-Cumulus for WordPress, by Roy Tanck.

Code

function theme_cumulus_weighted($terms) {
  $output = '<tags>';
  foreach ($terms as $term) {

    // assign font size
    $font_size = intval($term->weight) * variable_get('cumulus_flash_font_size_interval', 2) + (variable_get('cumulus_flash_font_size', 10) - variable_get('cumulus_flash_font_size_interval', 2));
    $output .= l($term->name, taxonomy_term_path($term), array(
      'style' => '"font-size:' . $font_size . 'px;"',
    )) . " \n";
  }
  $output .= '</tags>';
  $output = urlencode($output);
  return $output;
}