X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fprofilelist.php;h=b010fb724921028a04e36661471b8932bd7102b8;hb=7ca57e32aa25daae3bbf69987d2ec12899e4e173;hp=f3eb66658edeb691317c91e7ea845c2d3de012e4;hpb=ec6a38a62786c85e8ee30c5726ea81f82465b39d;p=quix0rs-gnu-social.git diff --git a/lib/profilelist.php b/lib/profilelist.php index f3eb66658e..b010fb7249 100644 --- a/lib/profilelist.php +++ b/lib/profilelist.php @@ -76,7 +76,7 @@ class ProfileList extends Widget function startList() { - $this->out->elementStart('ul', 'profiles'); + $this->out->elementStart('ul', 'profiles xoxo'); } function endList() @@ -140,7 +140,7 @@ class ProfileListItem extends Widget function startItem() { - $this->out->elementStart('li', array('class' => 'profile', + $this->out->elementStart('li', array('class' => 'profile hentry', 'id' => 'profile-' . $this->profile->id)); } @@ -175,15 +175,14 @@ class ProfileListItem extends Widget function startProfile() { - $this->out->elementStart('div', 'entity_profile vcard'); + $this->out->elementStart('div', 'entity_profile vcard entry-content'); } function showAvatar() { $avatar = $this->profile->getAvatar(AVATAR_STREAM_SIZE); - $this->out->elementStart('a', array('href' => $this->profile->profileurl, - 'class' => 'url', - 'rel' => 'contact')); + $aAttrs = $this->linkAttributes(); + $this->out->elementStart('a', $aAttrs); $this->out->element('img', array('src' => ($avatar) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_STREAM_SIZE), 'class' => 'photo avatar', 'width' => AVATAR_STREAM_SIZE, @@ -191,6 +190,7 @@ class ProfileListItem extends Widget 'alt' => ($this->profile->fullname) ? $this->profile->fullname : $this->profile->nickname)); + $this->out->text(' '); $hasFN = (!empty($this->profile->fullname)) ? 'nickname' : 'fn nickname'; $this->out->elementStart('span', $hasFN); $this->out->raw($this->highlight($this->profile->nickname)); @@ -201,6 +201,7 @@ class ProfileListItem extends Widget function showFullName() { if (!empty($this->profile->fullname)) { + $this->out->text(' '); $this->out->elementStart('span', 'fn'); $this->out->raw($this->highlight($this->profile->fullname)); $this->out->elementEnd('span'); @@ -210,7 +211,8 @@ class ProfileListItem extends Widget function showLocation() { if (!empty($this->profile->location)) { - $this->out->elementStart('span', 'location'); + $this->out->text(' '); + $this->out->elementStart('span', 'label'); $this->out->raw($this->highlight($this->profile->location)); $this->out->elementEnd('span'); } @@ -219,8 +221,9 @@ class ProfileListItem extends Widget function showHomepage() { if (!empty($this->profile->homepage)) { - $this->out->elementStart('a', array('href' => $this->profile->homepage, - 'class' => 'url')); + $this->out->text(' '); + $aAttrs = $this->homepageAttributes(); + $this->out->elementStart('a', $aAttrs); $this->out->raw($this->highlight($this->profile->homepage)); $this->out->elementEnd('a'); } @@ -269,10 +272,9 @@ class ProfileListItem extends Widget $usf = new UnsubscribeForm($this->out, $this->profile); $usf->show(); } else { - // Is it a local user? cannot remote sub from a list - // XXX: make that possible! - $other = User::staticGet('id', $this->profile->id); - if (!empty($other)) { + // We can't initiate sub for a remote OMB profile. + $remote = Remote_profile::staticGet('id', $this->profile->id); + if (empty($remote)) { $sf = new SubscribeForm($this->out, $this->profile); $sf->show(); } @@ -296,4 +298,17 @@ class ProfileListItem extends Widget { return htmlspecialchars($text); } + + function linkAttributes() + { + return array('href' => $this->profile->profileurl, + 'class' => 'url entry-title', + 'rel' => 'contact'); + } + + function homepageAttributes() + { + return array('href' => $this->profile->homepage, + 'class' => 'url'); + } }