-
- global $config;
-
- $profile = $notice->getProfile();
- $avatar = $profile->getAvatar(AVATAR_STREAM_SIZE);
-
- $noticeurl = common_local_url('shownotice', array('notice' => $notice->id));
-
- # XXX: we need to figure this out better. Is this right?
- if (strcmp($notice->uri, $noticeurl) != 0 && preg_match('/^http/', $notice->uri)) {
- $noticeurl = $notice->uri;
- }
-
- $html =
- '<li class="notice_single" id="' . $notice->id . '">'
- .'<a href="' . $profile->profileurl . '">'
- .'<img src="';
-
- if ($avatar) {
- $html .= common_avatar_display_url($avatar);
- } else {
- $html .= common_default_avatar(AVATAR_STREAM_SIZE);
- }
-
- $html .=
- '" class="avatar stream" width="'
- . AVATAR_STREAM_SIZE . '" height="' . AVATAR_STREAM_SIZE .'"'
- .' alt="';
-
- if ($profile->fullname) {
- $html .= $profile->fullname;
- } else {
- $html .= $profile->nickname;
- }
-
- $html .=
- '"></a>'
- .'<a href="' . $profile->profileurl . '" class="nickname">' . $profile->nickname . '</a>'
- .'<p class="content">' . $notice->rendered . '</p>'
- .'<p class="time">'
- .'<a class="permalink" href="' . $noticeurl . '" title="' . common_exact_date($notice->created) . '">' . common_date_string($notice->created) . '</a>';
-
- if ($notice->source) {
- $html .= _(' from ');
- $html .= $this->source_link($notice->source);
- }
-
- if ($notice->reply_to) {
- $replyurl = common_local_url('shownotice', array('notice' => $notice->reply_to));
- $html .=
- ' (<a class="inreplyto" href="' . $replyurl . '">' . _('in reply to...') . ')';
- }
-
- $html .= '</p></li>';
-
- return $html;