- if (Event::handle('StartShowTagProfileForm', array($this, $this->profile)) && $this->profile) {
- $this->elementStart('div', 'entity_profile vcard author');
- // TRANS: Header in list form.
- $this->element('h2', null, _('User profile'));
-
- $avatar = $this->profile->getAvatar(AVATAR_PROFILE_SIZE);
- $this->element('img', array('src' => ($avatar) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_PROFILE_SIZE),
- 'class' => 'photo avatar entity_depiction',
- 'width' => AVATAR_PROFILE_SIZE,
- 'height' => AVATAR_PROFILE_SIZE,
- 'alt' =>
- ($this->profile->fullname) ? $this->profile->fullname :
- $this->profile->nickname));
-
- $this->element('a', array('href' => $this->profile->profileurl,
- 'class' => 'entity_nickname nickname'),
- $this->profile->nickname);
- if ($this->profile->fullname) {
- $this->element('div', 'fn entity_fn', $this->profile->fullname);
- }
-
- if ($this->profile->location) {
- $this->element('div', 'label entity_location', $this->profile->location);
- }
-
- if ($this->profile->homepage) {
- $this->element('a', array('href' => $this->profile->homepage,
- 'rel' => 'me',
- 'class' => 'url entity_url'),
- $this->profile->homepage);
- }
-
- if ($this->profile->bio) {
- $this->element('div', 'note entity_note', $this->profile->bio);
- }
-
- $this->elementEnd('div');
-
- $this->elementStart('form', array('method' => 'post',
- 'id' => 'form_tag_user',
- 'class' => 'form_settings',
- 'name' => 'tagprofile',
- 'action' => common_local_url('tagprofile', array('id' => $this->profile->id))));
+ $this->elementStart('div', 'entity_profile h-card');
+ // TRANS: Header in list form.
+ $this->element('h2', null, _('User profile'));
+
+ $avatarUrl = $this->target->avatarUrl(AVATAR_PROFILE_SIZE);
+ $this->element('img', array('src' => $avatarUrl,
+ 'class' => 'u-photo avatar entity_depiction',
+ 'width' => AVATAR_PROFILE_SIZE,
+ 'height' => AVATAR_PROFILE_SIZE,
+ 'alt' => $this->target->getBestName()));
+
+ $this->element('a', array('href' => $this->target->getUrl(),
+ 'class' => 'entity_nickname p-nickname'),
+ $this->target->getNickname());
+ if ($this->target->fullname) {
+ $this->element('div', 'p-name entity_fn', $this->target->fullname);
+ }