From: Evan Prodromou <evan@status.net>
Date: Mon, 14 Mar 2011 20:19:37 +0000 (-0500)
Subject: Allow profileblock subclasses to show different sized avatars
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fbc11b72d7e2f51033f4d331fdfdeb6ebfbe7437;p=quix0rs-gnu-social.git

Allow profileblock subclasses to show different sized avatars
---

diff --git a/lib/profileblock.php b/lib/profileblock.php
index 3e8e929821..26d38ee349 100644
--- a/lib/profileblock.php
+++ b/lib/profileblock.php
@@ -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;
+    }
+
 }