. /** * 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 * * @category Widget * @package GNUsocial * @author Evan Prodromou * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ class SubscribersPeopleTagCloudSection extends SubPeopleTagCloudSection { public function title() { // TRANS: Title of personal tag cloud section. return _('People Tagcloud as tagged'); } public function tagUrl($tag) { $nickname = $this->out->profile->nickname; return common_local_url('subscribers', array('nickname' => $nickname, 'tag' => $tag)); } public function query() { return <<<'END' SELECT profile_tag.tag, COUNT(profile_tag.tag) AS weight FROM profile_tag INNER JOIN subscription AS sub ON profile_tag.tagged = sub.subscriber AND profile_tag.tagger = sub.subscribed LEFT JOIN profile_list ON profile_tag.tagger = profile_list.tagger AND profile_tag.tag = profile_list.tag WHERE profile_list.private IS NOT TRUE AND sub.subscribed = %d AND sub.subscriber <> sub.subscribed GROUP BY profile_tag.tag ORDER BY weight DESC; END; } }