You are here

function tagadelic_page_chunk in Tagadelic 6

Same name and namespace in other branches
  1. 5 tagadelic.module \tagadelic_page_chunk()
  2. 7 tagadelic.module \tagadelic_page_chunk()

Menu callback renders a tagadelic page.

1 string reference to 'tagadelic_page_chunk'
tagadelic_menu in ./tagadelic.module
Implements hook_menu().

File

./tagadelic.module, line 158

Code

function tagadelic_page_chunk($vocs) {
  if ($vocs == NULL) {
    foreach (taxonomy_get_vocabularies(NULL) as $vocabulary) {
      $vocs[] = $vocabulary->vid;
    }
  }
  $tags = tagadelic_get_weighted_tags($vocs, variable_get('tagadelic_levels', 6), variable_get('tagadelic_page_amount', '60'));
  $tags = tagadelic_sort_tags($tags);
  $output = theme('tagadelic_weighted', $tags);
  if (!$output) {
    return drupal_not_found();
  }
  $output = "<div class=\"wrapper tagadelic\">{$output}</div>";
  return $output;
}