X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fprofilelist.php;h=57559b5bb27d4d43069dcc443e3ff0e88b9632b2;hb=b15f5f0cafc08c9b63090c5b4f7494fca0634238;hp=2aa477274972b45b3911cc1c012626259a79897a;hpb=734287cfd37b9833a2d0fdf93c25934c2cae9e53;p=quix0rs-gnu-social.git diff --git a/lib/profilelist.php b/lib/profilelist.php index 2aa4772749..57559b5bb2 100644 --- a/lib/profilelist.php +++ b/lib/profilelist.php @@ -74,7 +74,7 @@ class ProfileList extends Widget function startList() { - $this->out->elementStart('ul', 'profiles xoxo'); + $this->out->elementStart('ul', 'profile_list xoxo'); } function endList() @@ -97,7 +97,7 @@ class ProfileList extends Widget return $cnt; } - function newListItem($profile) + function newListItem(Profile $profile) { return new ProfileListItem($profile, $this->action); } @@ -142,7 +142,7 @@ class ProfileListItem extends Widget function startItem() { - $this->out->elementStart('li', array('class' => 'profile h-entry', + $this->out->elementStart('li', array('class' => 'profile', 'id' => 'profile-' . $this->profile->id)); } @@ -157,6 +157,10 @@ class ProfileListItem extends Widget $this->out->elementEnd('a'); Event::handle('EndProfileListItemAvatar', array($this)); } + if (Event::handle('StartProfileListItemNickname', array($this))) { + $this->showNickname(); + Event::handle('EndProfileListItemNickname', array($this)); + } if (Event::handle('StartProfileListItemFullName', array($this))) { $this->showFullName(); Event::handle('EndProfileListItemFullName', array($this)); @@ -187,23 +191,24 @@ class ProfileListItem extends Widget $this->out->elementStart('div', 'entity_profile h-card'); } + function showNickname() + { + $this->out->element('a', array('href'=>$this->profile->getUrl(), + 'class'=>'p-nickname'), + $this->profile->getNickname()); + } + function showFullName() { if (!empty($this->profile->fullname)) { - $this->out->text(' '); - $this->out->elementStart('span', 'p-name'); - $this->out->raw($this->highlight($this->profile->fullname)); - $this->out->elementEnd('span'); + $this->out->element('span', 'p-name', $this->profile->fullname); } } function showLocation() { if (!empty($this->profile->location)) { - $this->out->text(' '); - $this->out->elementStart('span', 'label'); - $this->out->raw($this->highlight($this->profile->location)); - $this->out->elementEnd('span'); + $this->out->element('span', 'label p-locality', $this->profile->location); } }