X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fshowstream.php;h=75e10858d08ad2f917074c56a5ed0861bec29346;hb=7ef6c9da437b504f949dc3d7d8c05f8abe36baae;hp=663638c18a2c6781845bc844444209b7ce548de2;hpb=4b98edf75f4e255f8c61087bd1525d89653a521f;p=quix0rs-gnu-social.git diff --git a/actions/showstream.php b/actions/showstream.php index 663638c18a..75e10858d0 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -76,7 +76,7 @@ class ShowstreamAction extends ProfileAction if ($this->page == 1) { return $base; } else { - return sprintf(_("%s, page %d"), + return sprintf(_("%1$s, page %2$d"), $base, $this->page); } @@ -119,7 +119,7 @@ class ShowstreamAction extends ProfileAction common_local_url('userrss', array('nickname' => $this->user->nickname, 'tag' => $this->tag)), - sprintf(_('Notice feed for %s tagged %s (RSS 1.0)'), + sprintf(_('Notice feed for %1$s tagged %2$s (RSS 1.0)'), $this->user->nickname, $this->tag))); } @@ -188,14 +188,14 @@ class ShowstreamAction extends ProfileAction function showEmptyListMessage() { - $message = sprintf(_('This is the timeline for %s but %s hasn\'t posted anything yet.'), $this->user->nickname, $this->user->nickname) . ' '; + $message = sprintf(_('This is the timeline for %1$s but %2$s hasn\'t posted anything yet.'), $this->user->nickname, $this->user->nickname) . ' '; if (common_logged_in()) { $current_user = common_current_user(); if ($this->user->id === $current_user->id) { $message .= _('Seen anything interesting recently? You haven\'t posted any notices yet, now would be a good time to start :)'); } else { - $message .= sprintf(_('You can try to nudge %s or [post something to his or her attention](%%%%action.newnotice%%%%?status_textarea=%s).'), $this->user->nickname, '@' . $this->user->nickname); + $message .= sprintf(_('You can try to nudge %1$s or [post something to his or her attention](%%%%action.newnotice%%%%?status_textarea=%2$s).'), $this->user->nickname, '@' . $this->user->nickname); } } else { @@ -269,4 +269,50 @@ class ProfileNoticeListItem extends NoticeListItem { return; } + + /** + * show a link to the author of repeat + * + * @return void + */ + + function showRepeat() + { + if (!empty($this->repeat)) { + + // FIXME: this code is almost identical to default; need to refactor + + $attrs = array('href' => $this->profile->profileurl, + 'class' => 'url'); + + if (!empty($this->profile->fullname)) { + $attrs['title'] = $this->profile->fullname . ' (' . $this->profile->nickname . ')'; + } + + $this->out->elementStart('span', 'repeat'); + + $this->out->elementStart('a', $attrs); + + $avatar = $this->profile->getAvatar(AVATAR_MINI_SIZE); + + $this->out->element('img', array('src' => ($avatar) ? + $avatar->displayUrl() : + Avatar::defaultImage(AVATAR_MINI_SIZE), + 'class' => 'avatar photo', + 'width' => AVATAR_MINI_SIZE, + 'height' => AVATAR_MINI_SIZE, + 'alt' => + ($this->profile->fullname) ? + $this->profile->fullname : + $this->profile->nickname)); + + $this->out->elementEnd('a'); + + $text_link = XMLStringer::estring('a', $attrs, $this->profile->nickname); + + $this->out->raw(sprintf(_('Repeat of %s'), $text_link)); + + $this->out->elementEnd('span'); + } + } }