ProfileMiniListItem does same events as ProfileListItem

This commit is contained in:
Evan Prodromou 2010-04-01 15:53:17 -04:00
parent 650074c648
commit ac9fda4bc0

View File

@ -81,20 +81,24 @@ class ProfileMiniListItem extends ProfileListItem
function show() function show()
{ {
$this->out->elementStart('li', 'vcard'); $this->out->elementStart('li', 'vcard');
$this->out->elementStart('a', array('title' => $this->profile->getBestName(), if (Event::handle('StartProfileListItemProfileElements', array($this))) {
'href' => $this->profile->profileurl, if (Event::handle('StartProfileListItemAvatar', array($this))) {
'rel' => 'contact member', $this->out->elementStart('a', array('title' => $this->profile->getBestName(),
'class' => 'url')); 'href' => $this->profile->profileurl,
$avatar = $this->profile->getAvatar(AVATAR_MINI_SIZE); 'rel' => 'contact member',
$this->out->element('img', array('src' => (($avatar) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_MINI_SIZE)), 'class' => 'url'));
'width' => AVATAR_MINI_SIZE, $avatar = $this->profile->getAvatar(AVATAR_MINI_SIZE);
'height' => AVATAR_MINI_SIZE, $this->out->element('img', array('src' => (($avatar) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_MINI_SIZE)),
'class' => 'avatar photo', 'width' => AVATAR_MINI_SIZE,
'alt' => ($this->profile->fullname) ? 'height' => AVATAR_MINI_SIZE,
$this->profile->fullname : 'class' => 'avatar photo',
$this->profile->nickname)); 'alt' => ($this->profile->fullname) ?
$this->out->element('span', 'fn nickname', $this->profile->nickname); $this->profile->fullname :
$this->out->elementEnd('a'); $this->profile->nickname));
$this->out->elementEnd('li'); $this->out->element('span', 'fn nickname', $this->profile->nickname);
} $this->out->elementEnd('a');
Event::handle('EndProfileListItemAvatar', array($this));
}
$this->out->elementEnd('li');
}
} }