diff options
author | Evan Prodromou <evan@status.net> | 2010-11-08 13:08:59 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-11-08 13:08:59 -0500 |
commit | 719b480eaaa3459497c008839606a96cc8f368e1 (patch) | |
tree | fe4a342e9465129e71d272c1dc100dddbca6092d /actions | |
parent | 892a32fed7172658b61783865166f80839397cc9 (diff) |
use subclassing to change notice list output for single notice
Diffstat (limited to 'actions')
-rw-r--r-- | actions/shownotice.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/actions/shownotice.php b/actions/shownotice.php index 7cc6c5424..b7e61a137 100644 --- a/actions/shownotice.php +++ b/actions/shownotice.php @@ -331,6 +331,32 @@ class SingleNoticeItem extends DoFollowListItem $this->showEnd(); } + /** + * show the avatar of the notice's author + * + * We use the larger size for single notice page. + * + * @return void + */ + + function showAvatar() + { + $avatar_size = AVATAR_PROFILE_SIZE; + + $avatar = $this->profile->getAvatar($avatar_size); + + $this->out->element('img', array('src' => ($avatar) ? + $avatar->displayUrl() : + Avatar::defaultImage($avatar_size), + 'class' => 'avatar photo', + 'width' => $avatar_size, + 'height' => $avatar_size, + 'alt' => + ($this->profile->fullname) ? + $this->profile->fullname : + $this->profile->nickname)); + } + function showNoticeAttachments() { $al = new AttachmentList($this->notice, $this->out); $al->show(); |