diff options
author | Friendika <info@friendika.com> | 2011-10-09 20:26:17 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-10-09 20:26:17 -0700 |
commit | 26f2c868daba9012dc0309c922e2f6a0b8b1b1a1 (patch) | |
tree | 0d75efc7aca00c7ce6c42ca2b9112bfdebd7c2bf /mod/notifications.php | |
parent | 0657baa0b278baf0922f63fb6bbc7cbd77dacb54 (diff) | |
download | volse-hubzilla-26f2c868daba9012dc0309c922e2f6a0b8b1b1a1.tar.gz volse-hubzilla-26f2c868daba9012dc0309c922e2f6a0b8b1b1a1.tar.bz2 volse-hubzilla-26f2c868daba9012dc0309c922e2f6a0b8b1b1a1.zip |
some notification text cleanup and notification page layout fixes for duepuntozero
Diffstat (limited to 'mod/notifications.php')
-rw-r--r-- | mod/notifications.php | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/mod/notifications.php b/mod/notifications.php index 083476501..e1d94526a 100644 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -212,7 +212,7 @@ function notifications_content(&$a) { $notif_content .= replace_macros($tpl_item_dislikes,array( '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'], '$item_image' => $it['author-avatar'], - '$item_text' => sprintf( t("%s liked %s's post"), $it['author-name'], $it['pname']), + '$item_text' => sprintf( t("%s disliked %s's post"), $it['author-name'], $it['pname']), '$item_when' => relative_date($it['created']) )); break; @@ -226,24 +226,21 @@ function notifications_content(&$a) { $notif_content .= replace_macros($tpl_item_friends,array( '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'], '$item_image' => $it['author-avatar'], - '$item_text' => sprintf( t("%s is now friend with %s"), $it['author-name'], $it['fname']), - '$item_when' => relative_date($it['created']) - )); - break; - - case ACTIVITY_POST;$notif_content .= replace_macros($tpl_item_posts,array( - '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'], - '$item_image' => $it['author-avatar'], - '$item_text' => sprintf( t("%s posted"), $it['author-name']), + '$item_text' => sprintf( t("%s is now friends with %s"), $it['author-name'], $it['fname']), '$item_when' => relative_date($it['created']) )); break; default: - $notif_content .= replace_macros($tpl_item_comments,array( + $item_text = (($it['id'] == $it['parent']) + ? sprintf( t("%s created a new post"), $it['author-name']) + : sprintf( t("%s commented on %s's post"), $it['author-name'], $it['pname'])); + $tpl = (($it['id'] == $it['parent']) ? $tpl_item_posts : $tpl_item_comments); + + $notif_content .= replace_macros($tpl,array( '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'], '$item_image' => $it['author-avatar'], - '$item_text' => sprintf( t("%s commented %s's post"), $it['author-name'], $it['pname']), + '$item_text' => $item_text, '$item_when' => relative_date($it['created']) )); } @@ -296,7 +293,7 @@ function notifications_content(&$a) { $notif_content .= replace_macros($tpl_item_dislikes,array( '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'], '$item_image' => $it['author-avatar'], - '$item_text' => sprintf( t("%s liked %s's post"), $it['author-name'], $it['pname']), + '$item_text' => sprintf( t("%s disliked %s's post"), $it['author-name'], $it['pname']), '$item_when' => relative_date($it['created']) )); @@ -310,7 +307,7 @@ function notifications_content(&$a) { $notif_content .= replace_macros($tpl_item_friends,array( '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'], '$item_image' => $it['author-avatar'], - '$item_text' => sprintf( t("%s is now friend with %s"), $it['author-name'], $it['fname']), + '$item_text' => sprintf( t("%s is now friends with %s"), $it['author-name'], $it['fname']), '$item_when' => relative_date($it['created']) )); @@ -319,7 +316,7 @@ function notifications_content(&$a) { $notif_content .= replace_macros($tpl_item_comments,array( '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'], '$item_image' => $it['author-avatar'], - '$item_text' => sprintf( t("%s commented %s's post"), $it['author-name'], $it['pname']), + '$item_text' => sprintf( t("%s commented on %s's post"), $it['author-name'], $it['pname']), '$item_when' => relative_date($it['created']) )); } |