Exemple #1
0
 protected function displayContent()
 {
     $comment = $this->data_object;
     $div_tag = new SwatHtmlTag('div');
     $div_tag->setContent($this->data_object->post->getTitle());
     $div_tag->display();
     $h2_tag = new SwatHtmlTag('h2');
     $h2_tag->setContent($this->data_object->fullname);
     $h2_tag->display();
     $abbr_tag = new SwatHtmlTag('abbr');
     $date = clone $comment->createdate;
     $date->convertTZ($this->app->default_time_zone);
     $abbr_tag->setContent(sprintf(Blorg::_('Posted: %s'), $date->formatLikeIntl(SwatDate::DF_DATE)));
     $abbr_tag->display();
     echo SwatString::toXHTML($comment->bodytext);
 }
Exemple #2
0
 /**
  * Part of the {@link SiteCommentable} interface
  *
  * @return string the title of this post.
  */
 public function getTitle()
 {
     if ($this->title == '') {
         return SwatString::ellipsizeRight(SwatString::condense(SwatString::toXHTML($this->bodytext)), 50, Blorg::_(' …'));
     } else {
         return $this->title;
     }
 }