X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fprofilesection.php;h=8ed290e03aa3c6195567da6c50401f8b12924cdf;hb=9b7c57d094ef5fc52a8a2c4ac6b7a89b1c221c54;hp=087adb2ef61c82d452f75fa605e9548cb5f51076;hpb=04b164c342bebc8b5973b28fb25ea512161aa0b1;p=quix0rs-gnu-social.git diff --git a/lib/profilesection.php b/lib/profilesection.php index 087adb2ef6..8ed290e03a 100644 --- a/lib/profilesection.php +++ b/lib/profilesection.php @@ -52,15 +52,19 @@ class ProfileSection extends Section { $profiles = $this->getProfiles(); - $cnt = 0; + if (!$profiles) { + return false; + } - $this->out->elementStart('ul', 'entities users xoxo'); + $cnt = 0; + $this->out->elementStart('table'); + $this->out->elementStart('tbody'); while ($profiles->fetch() && ++$cnt <= PROFILES_PER_SECTION) { $this->showProfile($profiles); } - - $this->out->elementEnd('ul'); + $this->out->elementEnd('tbody'); + $this->out->elementEnd('table'); return ($cnt > PROFILES_PER_SECTION); } @@ -72,7 +76,9 @@ class ProfileSection extends Section function showProfile($profile) { - $this->out->elementStart('li', 'vcard'); + $this->out->elementStart('tr'); + $this->out->elementStart('td'); + $this->out->elementStart('span', 'vcard'); $this->out->elementStart('a', array('title' => ($profile->fullname) ? $profile->fullname : $profile->nickname, @@ -80,7 +86,7 @@ class ProfileSection extends Section 'rel' => 'contact member', 'class' => 'url')); $avatar = $profile->getAvatar(AVATAR_MINI_SIZE); - $this->out->element('img', array('src' => (($avatar) ? common_avatar_display_url($avatar) : common_default_avatar(AVATAR_MINI_SIZE)), + $this->out->element('img', array('src' => (($avatar) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_MINI_SIZE)), 'width' => AVATAR_MINI_SIZE, 'height' => AVATAR_MINI_SIZE, 'class' => 'avatar photo', @@ -88,10 +94,13 @@ class ProfileSection extends Section $profile->fullname : $profile->nickname)); $this->out->element('span', 'fn nickname', $profile->nickname); + $this->out->elementEnd('span'); $this->out->elementEnd('a'); + $this->out->elementEnd('td'); if ($profile->value) { - $this->out->element('span', 'value', $profile->value); + $this->out->element('td', 'value', $profile->value); } - $this->out->elementEnd('li'); + + $this->out->elementEnd('tr'); } }