X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fuserprofile.php;fp=lib%2Fuserprofile.php;h=444bb081218c9e3bd6a42e4e6f94301568b68d35;hb=b7d07466943a73e1c009467c8daa6e499810080f;hp=8bd68ae3d74f1ba6f89bb6458ced884b2569811e;hpb=061c8d959ba8351b145a27690d5a4caa477915ca;p=quix0rs-gnu-social.git diff --git a/lib/userprofile.php b/lib/userprofile.php index 8bd68ae3d7..444bb08121 100644 --- a/lib/userprofile.php +++ b/lib/userprofile.php @@ -103,28 +103,21 @@ class UserProfile extends Widget $avatar = $this->profile->getAvatar(73); } - $this->out->elementStart('dl', 'entity_depiction'); - // TRANS: DT element in area for user avatar. - $this->out->element('dt', null, _('Photo')); - $this->out->elementStart('dd'); - $this->out->element('img', array('src' => ($avatar) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_PROFILE_SIZE), - 'class' => 'photo avatar', - 'width' => AVATAR_PROFILE_SIZE, - 'height' => AVATAR_PROFILE_SIZE, - 'alt' => $this->profile->nickname)); - $this->out->elementEnd('dd'); - + $this->out->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->nickname)); + $cur = common_current_user(); + if ($cur && $cur->id == $this->profile->id) { - $this->out->elementStart('dd'); - // TRANS: Link text for changeing the avatar of the logged in user. $this->out->element('a', array('href' => common_local_url('avatarsettings')), _('Edit Avatar')); - $this->out->elementEnd('dd'); } - $this->out->elementEnd('dl'); - - Event::handle('EndProfilePageAvatar', array($this->out, $this->profile)); + Event::handle('EndProfilePageAvatar', + array($this->out, $this->profile)); } } @@ -132,16 +125,12 @@ class UserProfile extends Widget { if (Event::handle('StartProfilePageNickname', array($this->out, $this->profile))) { - $this->out->elementStart('dl', 'entity_nickname'); - // TRANS: DT for nick name in a profile. - $this->out->element('dt', null, _('Nickname')); - $this->out->elementStart('dd'); - $hasFN = ($this->profile->fullname) ? 'nickname url uid' : 'fn nickname url uid'; - $this->out->element('a', array('href' => $this->profile->profileurl, - 'rel' => 'me', 'class' => $hasFN), + $hasFN = ($this->profile->fullname) ? 'entity_nickname nickname url uid' : 'entity_nickname fn nickname url uid'; + $this->out->element('a', + array('href' => $this->profile->profileurl, + 'rel' => 'me', + 'class' => $hasFN), $this->profile->nickname); - $this->out->elementEnd('dd'); - $this->out->elementEnd('dl'); Event::handle('EndProfilePageNickname', array($this->out, $this->profile)); } @@ -151,13 +140,9 @@ class UserProfile extends Widget { if (Event::handle('StartProfilePageFullName', array($this->out, $this->profile))) { if ($this->profile->fullname) { - $this->out->elementStart('dl', 'entity_fn'); - // TRANS: DT for full name in a profile. - $this->out->element('dt', null, _('Full name')); - $this->out->elementStart('dd'); - $this->out->element('span', 'fn', $this->profile->fullname); - $this->out->elementEnd('dd'); - $this->out->elementEnd('dl'); + $this->out->element('span', + 'entity_fn fn', + $this->profile->fullname); } Event::handle('EndProfilePageFullName', array($this->out, $this->profile)); } @@ -167,11 +152,9 @@ class UserProfile extends Widget { if (Event::handle('StartProfilePageLocation', array($this->out, $this->profile))) { if ($this->profile->location) { - $this->out->elementStart('dl', 'entity_location'); - // TRANS: DT for location in a profile. - $this->out->element('dt', null, _('Location')); - $this->out->element('dd', 'label', $this->profile->location); - $this->out->elementEnd('dl'); + $this->out->element('span', + 'entity_location label', + $this->profile->location); } Event::handle('EndProfilePageLocation', array($this->out, $this->profile)); } @@ -181,15 +164,11 @@ class UserProfile extends Widget { if (Event::handle('StartProfilePageHomepage', array($this->out, $this->profile))) { if ($this->profile->homepage) { - $this->out->elementStart('dl', 'entity_url'); - // TRANS: DT for URL in a profile. - $this->out->element('dt', null, _('URL')); - $this->out->elementStart('dd'); - $this->out->element('a', array('href' => $this->profile->homepage, - 'rel' => 'me', 'class' => 'url'), + $this->out->element('a', + array('href' => $this->profile->homepage, + 'rel' => 'me', + 'class' => 'url entity_url'), $this->profile->homepage); - $this->out->elementEnd('dd'); - $this->out->elementEnd('dl'); } Event::handle('EndProfilePageHomepage', array($this->out, $this->profile)); } @@ -199,11 +178,9 @@ class UserProfile extends Widget { if (Event::handle('StartProfilePageBio', array($this->out, $this->profile))) { if ($this->profile->bio) { - $this->out->elementStart('dl', 'entity_note'); - // TRANS: DT for note in a profile. - $this->out->element('dt', null, _('Note')); - $this->out->element('dd', 'note', $this->profile->bio); - $this->out->elementEnd('dl'); + $this->out->element('div', + 'note entity_note', + $this->profile->bio); } Event::handle('EndProfilePageBio', array($this->out, $this->profile)); } @@ -215,11 +192,15 @@ class UserProfile extends Widget $tags = Profile_tag::getTags($this->profile->id, $this->profile->id); if (count($tags) > 0) { +<<<<<<< HEAD + $this->out->elementStart('ul', 'tags xoxo entity_tags'); +======= $this->out->elementStart('dl', 'entity_tags'); // TRANS: DT for tags in a profile. $this->out->element('dt', null, _('Tags')); $this->out->elementStart('dd'); $this->out->elementStart('ul', 'tags xoxo'); +>>>>>>> 0.9.x foreach ($tags as $tag) { $this->out->elementStart('li'); // Avoid space by using raw output. @@ -230,8 +211,6 @@ class UserProfile extends Widget $this->out->elementEnd('li'); } $this->out->elementEnd('ul'); - $this->out->elementEnd('dd'); - $this->out->elementEnd('dl'); } Event::handle('EndProfilePageProfileTags', array($this->out, $this->profile)); }