]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/topposterssection.php
"Notice posted" message in Ajax title for NewnoticeAction
[quix0rs-gnu-social.git] / lib / topposterssection.php
index 7a3d46aa5f43ab91b513be482310fc1f1f1aa741..c62150421596e75a818a72a27102a7aaa571b01d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Laconica, the distributed open-source microblogging tool
+ * StatusNet, the distributed open-source microblogging tool
  *
  * Base class for sections showing lists of people
  *
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  * @category  Widget
- * @package   Laconica
- * @author    Evan Prodromou <evan@controlyourself.ca>
- * @copyright 2009 Control Yourself, Inc.
+ * @package   StatusNet
+ * @author    Evan Prodromou <evan@status.net>
+ * @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 <evan@controlyourself.ca>
+ * @package  StatusNet
+ * @author   Evan Prodromou <evan@status.net>
  * @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,33 +68,9 @@ 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()
     {
+        // TRANS: Title for top posters section.
         return _('Top posters');
     }