protected $options = true;
protected $maxchars = 0; // if <= 0 it means use full posts
protected $item_tag = 'li';
+ protected $pa = null;
/**
* constructor
$this->elementStart('section', array('class'=>'notice-headers'));
$this->showNoticeTitle();
$this->showAuthor();
- if ($this->addressees) { $this->showAddressees(); }
+
+ if (!empty($this->notice->reply_to) || count($this->getProfileAddressees()) > 0) {
+ $this->elementStart('div', array('class' => 'parents'));
+ if (!empty($this->notice->reply_to)) { $this->showParent(); }
+ if ($this->addressees) { $this->showAddressees(); }
+ $this->elementEnd('div');
+ }
$this->elementEnd('section');
}
}
}
+ function showParent()
+ {
+ $this->out->element(
+ 'a',
+ array(
+ 'href' => $this->notice->getParent()->getUrl(),
+ 'class' => 'u-in-reply-to',
+ 'rel' => 'in-reply-to'
+ ),
+ 'in reply to'
+ );
+ }
+
function showAddressees()
{
$pa = $this->getProfileAddressees();
function getProfileAddressees()
{
- $pa = array();
+ if($this->pa) { return $this->pa; }
+ $this->pa = array();
$attentions = $this->getReplyProfiles();
foreach ($attentions as $attn) {
$class = $attn->isGroup() ? 'group' : 'account';
- $pa[] = array('href' => $attn->profileurl,
- 'title' => $attn->getNickname(),
- 'class' => "addressee {$class}",
- 'text' => $attn->getStreamName());
+ $this->pa[] = array('href' => $attn->profileurl,
+ 'title' => $attn->getNickname(),
+ 'class' => "addressee {$class}",
+ 'text' => $attn->getStreamName());
}
- return $pa;
+ return $this->pa;
}
function getReplyProfiles()