function execute(&$controller, &$request, &$user) { $tags = TagUtils::get_hot_tags(20); $cloud = new TagCloud(); foreach ($tags as $tag) { $cloud->add($tag['name'], SCRIPT_PATH . 'tag/' . urlencode($tag['name']), $tag['cnt']); } $request->setAttribute('tag_cloud', $cloud->htmlAndCSS()); return VIEW_SUCCESS; }
function display_tagcloud($limit = null, $tag = null) { $view = new TagCloud(); $tagcloud = $this->get_tagcloud($limit, $tag); foreach ($tagcloud as $tag => $count) { $url = get_script_uri() . '?' . 'cmd=lsx&tag=' . rawurlencode($tag); $view->add(htmlspecialchars($tag), $url, $count); } return $view->html(); }
function execute(&$controller, &$request, &$user) { $account = $request->getParameter('account'); $tags = TagUtils::get_tags_by_account($account); $cloud = new TagCloud(); foreach ($tags as $tag) { $cloud->add($tag['name'], SCRIPT_PATH . $account . '/tag/' . urlencode($tag['name']), $tag['cnt']); } $request->setAttribute('tag_cloud', $cloud->htmlAndCSS()); return VIEW_SUCCESS; }
function display_tagcloud($limit = null, $tag = null) { $view = new TagCloud(); $tagcloud = $this->get_tagcloud($limit, $tag); foreach ($tagcloud as $tag => $count) { $url = $this->conf['listcmd'] . rawurlencode($tag); $view->add(htmlspecialchars($tag), $url, $count); } return $view->html(); }
/** * Display tagcloud * * @access public * @param integer $limit Number to show * @param string $relate_tag Show only related tags of this * @param string $basehref base href * @return string HTML */ function display_tagcloud($limit = null, $relate_tag = null) { $view = new TagCloud(); $tagcloud = $this->get_tagcloud($limit, $relate_tag); foreach ($tagcloud as $tag => $count) { $url = $this->get_tag_uri($tag); $view->add(htmlspecialchars($tag), $url, $count); } return $view->html(); }