$tags = $this->getTags();
if (!$tags) {
+ $this->out->element('p', null, _('None'));
return false;
}
$sum += $tags->weight;
}
+ if ($cnt == 0) {
+ $this->out->element('p', null, _('(None)'));
+ return false;
+ }
+
ksort($tw);
$this->out->elementStart('ul', 'tags xoxo tag-cloud');
foreach ($tw as $tag => $weight) {
- $this->showTag($tag, $weight, $weight/$sum);
+ $this->showTag($tag, $weight, ($sum == 0) ? 0 : $weight/$sum);
}
$this->out->elementEnd('ul');
{
return common_local_url('tag', array('tag' => $tag));
}
+
+ function divId()
+ {
+ return 'tagcloud';
+ }
}