]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/topposterssection.php
Updated Cloudy theme default avatars and minor CSS
[quix0rs-gnu-social.git] / lib / topposterssection.php
index 1163738180c381e1d543f3c121f14ff13423b44b..1a2ce00140f6c0e092f1173779dc009d74651ec8 100644 (file)
@@ -50,7 +50,8 @@ class TopPostersSection extends ProfileSection
     {
         $qry = 'SELECT profile.*, count(*) as value ' .
           'FROM profile JOIN notice ON profile.id = notice.profile_id ' .
-          'GROUP BY profile.id ' .
+          (common_config('public', 'localonly') ? 'WHERE is_local = 1 ' : '') .
+          'GROUP BY profile.id,nickname,fullname,profileurl,homepage,bio,location,profile.created,profile.modified,textsearch ' .
           'ORDER BY value DESC ';
 
         $limit = PROFILES_PER_SECTION;
@@ -68,31 +69,6 @@ class TopPostersSection extends ProfileSection
         return $profile;
     }
 
-    function showProfile($profile)
-    {
-        $this->out->elementStart('li', '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('a');
-        if ($profile->value) {
-            $this->out->element('span', 'value', $profile->value);
-        }
-        $this->out->elementEnd('li');
-    }
-
     function title()
     {
         return _('Top posters');