X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Ftopposterssection.php;h=c62150421596e75a818a72a27102a7aaa571b01d;hb=73dbc5ca1b203758693f73d6423fea71ef6b6fb6;hp=78697309369fc9a9c50a9658032365ebf3f8bd45;hpb=f6f71ea0ee8b8efb288f9abdf62b7850a18fe7cd;p=quix0rs-gnu-social.git diff --git a/lib/topposterssection.php b/lib/topposterssection.php index 7869730936..c621504215 100644 --- a/lib/topposterssection.php +++ b/lib/topposterssection.php @@ -1,6 +1,6 @@ . * * @category Widget - * @package Laconica - * @author Evan Prodromou - * @copyright 2009 Control Yourself, Inc. + * @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://laconi.ca/ + * @link http://status.net/ */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -38,12 +38,11 @@ if (!defined('LACONICA')) { * group, or site. * * @category Widget - * @package Laconica - * @author Evan Prodromou + * @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://laconi.ca/ + * @link http://status.net/ */ - class TopPostersSection extends ProfileSection { function getProfiles() @@ -51,7 +50,7 @@ class TopPostersSection extends ProfileSection $qry = 'SELECT profile.*, count(*) as value ' . 'FROM profile JOIN notice ON profile.id = notice.profile_id ' . (common_config('public', 'localonly') ? 'WHERE is_local = 1 ' : '') . - 'GROUP BY profile.id ' . + 'GROUP BY profile.id,nickname,fullname,profileurl,homepage,bio,location,profile.created,profile.modified,textsearch ' . 'ORDER BY value DESC '; $limit = PROFILES_PER_SECTION; @@ -69,38 +68,9 @@ class TopPostersSection extends ProfileSection return $profile; } - function showProfile($profile) - { - $this->out->elementStart('tr'); - $this->out->elementStart('td'); - $this->out->elementStart('span', 'vcard'); - $this->out->elementStart('a', array('title' => ($profile->fullname) ? - $profile->fullname : - $profile->nickname, - 'href' => $profile->profileurl, - 'rel' => 'contact member', - 'class' => 'url')); - $avatar = $profile->getAvatar(AVATAR_MINI_SIZE); - $this->out->element('img', array('src' => (($avatar) ? common_avatar_display_url($avatar) : common_default_avatar(AVATAR_MINI_SIZE)), - 'width' => AVATAR_MINI_SIZE, - 'height' => AVATAR_MINI_SIZE, - 'class' => 'avatar photo', - 'alt' => ($profile->fullname) ? - $profile->fullname : - $profile->nickname)); - $this->out->element('span', 'fn nickname', $profile->nickname); - $this->out->elementEnd('span'); - $this->out->elementEnd('a'); - $this->out->elementEnd('td'); - if ($profile->value) { - $this->out->element('td', 'value', $profile->value); - } - - $this->out->elementEnd('tr'); - } - function title() { + // TRANS: Title for top posters section. return _('Top posters'); }