protected function showNoticeContent(Notice $stored, HTMLOutputter $out, Profile $scoped = null) { $nb = Bookmark::fromStored($stored); // Whether to nofollow $attrs = array('href' => $nb->getUrl(), 'class' => 'bookmark-title'); $nf = common_config('nofollow', 'external'); if ($nf == 'never' || ($nf == 'sometimes' and $out instanceof ShowstreamAction)) { $attrs['rel'] = 'external'; } else { $attrs['rel'] = 'nofollow external'; } $out->elementStart('h3'); $out->element('a', $attrs, $nb->getTitle()); $out->elementEnd('h3'); // Replies look like "for:" tags $replies = $stored->getReplies(); $tags = $stored->getTags(); if (!empty($nb->description)) { $out->element('p', array('class' => 'bookmark-description'), $nb->description); } if (!empty($replies) || !empty($tags)) { $out->elementStart('ul', array('class' => 'bookmark-tags')); foreach ($replies as $reply) { $other = Profile::getByPK($reply); $out->elementStart('li'); $out->element('a', array('rel' => 'tag', 'href' => $other->getUrl(), 'title' => $other->getBestName()), sprintf('for:%s', $other->getNickname())); $out->elementEnd('li'); $out->text(' '); } foreach ($tags as $tag) { $tag = trim($tag); if (!empty($tag)) { $out->elementStart('li'); $out->element('a', array('rel' => 'tag', 'href' => Notice_tag::url($tag)), $tag); $out->elementEnd('li'); $out->text(' '); } } $out->elementEnd('ul'); } }