. /** * Personal tag cloud section * * @category Widget * @package GNUsocial * @author Evan Prodromou * @copyright 2009 StatusNet, Inc. * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ defined('GNUSOCIAL') || die(); /** * Personal tag cloud section * * @copyright 2009 StatusNet, Inc. * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ class SubPeopleTagCloudSection extends TagCloudSection { public function getTags() { $qry = $this->query(); $qry .= ' LIMIT ' . TAGS_PER_SECTION; $profile_tag = Memcached_DataObject::cachedQuery( 'Profile_tag', sprintf($qry, $this->out->user->id) ); return $profile_tag; } public function tagUrl($tag) { return common_local_url('peopletag', array('tag' => $tag)); } public function showTag($tag, $weight, $relative) { $rel = 'tag-cloud-'; $rel .= 1 + (int) (7 * $relative * $weight - 0.01); $this->out->elementStart('li', $rel); $this->out->element('a', array('href' => $this->tagUrl($tag)), $tag); $this->out->elementEnd('li'); } }