. * * @category Widget * @package StatusNet * @author Evan Prodromou * @copyright 2009 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } /** * Personal tag cloud section * * @category Widget * @package StatusNet * @author Evan Prodromou * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ class SubPeopleTagCloudSection extends TagCloudSection { function getTags() { $qry = $this->query(); $limit = TAGS_PER_SECTION; $offset = 0; if (common_config('db','type') == 'pgsql') { $qry .= ' LIMIT ' . $limit . ' OFFSET ' . $offset; } else { $qry .= ' LIMIT ' . $offset . ', ' . $limit; } $profile_tag = Memcached_DataObject::cachedQuery('Profile_tag', sprintf($qry, $this->out->user->id)); return $profile_tag; } function tagUrl($tag) { return common_local_url('peopletag', array('tag' => $tag)); } function showTag($tag, $weight, $relative) { $rel = 'tag-cloud-'; $rel .= 1+intval(7 * $relative * $weight - 0.01); $this->out->elementStart('li', $rel); $this->out->element('a', array('href' => $this->tagUrl($tag)), $tag); $this->out->elementEnd('li'); } }