(t("Tag cloud")." HTML5")); } static function get($block_id, $theme) { $block = ""; switch ($block_id) { case "tag_cloud_html5_site": // load settings $options = module::get_var("tag_cloud_html5", "options_sidebar", null); $maxtags = module::get_var("tag_cloud_html5", "maxtags_sidebar", null); $showlink = module::get_var("tag_cloud_html5", "show_wholecloud_link", null); $showaddtag = module::get_var("tag_cloud_html5", "show_add_tag_form", null); $width = module::get_var("tag_cloud_html5", "width_sidebar", null); $height = module::get_var("tag_cloud_html5", "height_sidebar", null); // make the block $block = new Block(); $block->css_id = "g-tag"; $block->title = t("Tag cloud"); $block->content = new View("tag_cloud_html5_block.html"); $block->content->cloud = tag::cloud($maxtags); $block->content->options = $options; $block->content->width = $width; $block->content->height = $height; // add the 'View whole cloud' link if needed if ($showlink) { $block->content->wholecloud_link = "".t("View whole cloud").""; } else { $block->content->wholecloud_link = ""; } // add the 'Add tag' form if needed if ($theme->item() && $theme->page_subtype() != "tag" && access::can("edit", $theme->item()) && $showaddtag) { $controller = new Tags_Controller(); $block->content->form = tag::get_add_form($theme->item()); } else { $block->content->form = ""; } break; } return $block; } }