parent::__construct($out);
$this->peopletag = $peopletag;
$this->current = $current;
- $this->profile = Profile::staticGet('id', $this->peopletag->tagger);
+ $this->profile = Profile::getKV('id', $this->peopletag->tagger);
}
/**
function showStart()
{
$mode = ($this->peopletag->private) ? 'private' : 'public';
- $this->out->elementStart('li', array('class' => 'hentry peopletag mode-' . $mode,
+ $this->out->elementStart('li', array('class' => 'h-entry peopletag mode-' . $mode,
'id' => 'peopletag-' . $this->peopletag->id));
}
function showCreator()
{
- $this->out->elementStart('span', 'author vcard');
$attrs = array();
$attrs['href'] = $this->profile->profileurl;
- $attrs['class'] = 'url';
+ $attrs['class'] = 'h-card p-author nickname p-name';
$attrs['rel'] = 'contact';
+ $attrs['title'] = $this->profile->getFancyName();
- if (!empty($this->profile->fullname)) {
- $attrs['title'] = $this->profile->fullname . ' (' . $this->profile->nickname . ')';
- }
$this->out->elementStart('a', $attrs);
- $this->showAvatar();
- $this->out->text(' ');
- $this->out->element('span', 'nickname fn',
- htmlspecialchars($this->profile->nickname));
-
+ $this->showAvatar($this->profile);
+ $this->out->text($this->profile->getNickname());
$this->out->elementEnd('a');
- $this->out->elementEnd('span');
}
function showUpdated()
$this->out->elementEnd('span');
}
- /**
- * show the avatar of the peopletag's creator
- *
- * This will use the default avatar if no avatar is assigned for the author.
- * It makes a link to the author's profile.
- *
- * @return void
- */
-
- function showAvatar($size=AVATAR_STREAM_SIZE)
- {
- $avatar = $this->profile->getAvatar($size);
-
- $this->out->element('img', array('src' => ($avatar) ?
- $avatar->displayUrl() :
- Avatar::defaultImage($size),
- 'class' => 'avatar photo',
- 'width' => $size,
- 'height' => $size,
- 'alt' =>
- ($this->profile->fullname) ?
- $this->profile->fullname :
- $this->profile->nickname));
- }
-
function showActions()
{
$this->out->elementStart('div', 'entity_actions');
function showDescription()
{
- $this->out->element('div', 'entry-content description',
- $this->peopletag->description);
+ $this->out->element('div', 'e-content description', $this->peopletag->description);
}
}