コード例 #1
0
 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;
 }
コード例 #2
0
ファイル: TagsAction.class.php プロジェクト: komagata/plnet
 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;
 }