}
$profile = $notice->getProfile();
-
+
if (!$profile) {
$this->no_such_notice();
}
# Looks like we're good; show the header
- common_show_header($profile->nickname."'s status on ".common_date_string($notice->created),
+ common_show_header($profile->nickname."'s status on ".common_exact_date($notice->created),
NULL, $profile,
array($this, 'show_top'));
function show_top($user) {
$cur = common_current_user();
-
+
if ($cur && $cur->id == $user->id) {
common_notice_form();
}
}
-
+
function no_such_notice() {
common_user_error('No such notice.');
}
}
function views_menu() {
-
+
$user = NULL;
$action = $this->trimmed('action');
$nickname = $this->trimmed('nickname');
if ($nickname) {
$user = User::staticGet('nickname', $nickname);
}
-
+
common_element_start('ul', array('id' => 'nav_views'));
-
+
common_menu_item(common_local_url('all', array('nickname' =>
$nickname)),
_t('Personal'),
$action == 'all');
common_menu_item(common_local_url('showstream', array('nickname' =>
$nickname)),
- _t('Profile'),
+ _t('Profile'),
($user && $user->fullname) ? $user->fullname : $nickname,
$action == 'showstream');
common_element_end('ul');
}
-
+
function show_notice($notice) {
global $config;
$profile = $notice->getProfile();
$noticeurl = common_local_url('shownotice', array('notice' => $notice->id));
common_element_start('p', 'time');
common_element('a', array('class' => 'notice',
- 'href' => $noticeurl),
+ 'href' => $noticeurl,
+ 'title' => common_exact_date($notice->created)),
common_date_string($notice->created));
common_element_end('p');
common_element_end('li');
$diff = $now - $t;
if ($now < $t) { # that shouldn't happen!
- return common_simple_date($dt);
+ return common_exact_date($dt);
} else if ($diff < 60) {
return _t('a few seconds ago');
} else if ($diff < 92) {
} else if ($diff < 480 * 24 * 3600) {
return _t('about a year ago');
} else {
- return common_simple_date($dt);
+ return common_exact_date($dt);
}
}
-function common_simple_date($dt) {
+function common_exact_date($dt) {
$t = strtotime($dt);
return date(DATE_RFC822, $t);
}