]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Allow profileblock subclasses to show different sized avatars
authorEvan Prodromou <evan@status.net>
Mon, 14 Mar 2011 20:19:37 +0000 (15:19 -0500)
committerEvan Prodromou <evan@status.net>
Wed, 16 Mar 2011 13:57:10 +0000 (09:57 -0400)
lib/profileblock.php

index 3e8e929821256fa7314af3a388adc263f1afc89e..26d38ee3496989224fa7589346ed95fb692fe9fa 100644 (file)
@@ -61,11 +61,13 @@ abstract class ProfileBlock extends Widget
     {
         $this->out->elementStart('div', 'profile_block');
 
+        $size = $this->avatarSize();
+
         $this->out->element('img', array('src' => $this->avatar(),
                                          'class' => 'profile_block_avatar',
                                          'alt' => $this->name(),
-                                         'width' => AVATAR_PROFILE_SIZE,
-                                         'height' => AVATAR_PROFILE_SIZE));
+                                         'width' => $size,
+                                         'height' => $size));
 
         if ($this->canEdit()) {
             $this->out->element('a', array('href' => $this->editUrl()),
@@ -106,4 +108,10 @@ abstract class ProfileBlock extends Widget
 
         $this->out->elementEnd('div');
     }
+
+    function avatarSize()
+    {
+        return AVATAR_PROFILE_SIZE;
+    }
+
 }