Permalink
Browse files

added posts to network section of the notifications page

  • Loading branch information...
duthied committed Oct 9, 2011
1 parent dfc65f1 commit 8eedbf30f1da18c7eae8d822293faf8056545e65
Showing with 15 additions and 3 deletions.
  1. +12 −3 mod/notifications.php
  2. +3 −0 view/notifications_posts_item.tpl
View
@@ -191,6 +191,7 @@ function notifications_content(&$a) {
$tpl_item_dislikes = get_markup_template('notifications_dislikes_item.tpl');
$tpl_item_friends = get_markup_template('notifications_friends_item.tpl');
$tpl_item_comments = get_markup_template('notifications_comments_item.tpl');
+ $tpl_item_posts = get_markup_template('notifications_posts_item.tpl');
$notif_content = '';
@@ -205,17 +206,17 @@ function notifications_content(&$a) {
'$item_text' => sprintf( t("%s liked %s's post"), $it['author-name'], $it['pname']),
'$item_when' => relative_date($it['created'])
));
-
break;
+
case ACTIVITY_DISLIKE:
$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_when' => relative_date($it['created'])
));
-
break;
+
case ACTIVITY_FRIEND:
$xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">";
@@ -228,8 +229,16 @@ function notifications_content(&$a) {
'$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_when' => relative_date($it['created'])
+ ));
+ break;
+
default:
$notif_content .= replace_macros($tpl_item_comments,array(
'$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'],
@@ -0,0 +1,3 @@
+<div class="notif-item">
+ <a href="$item_link"><img src="$item_image" class="notif-image">$item_text <span class="notif-when">$item_when</span></a>
+</div>

0 comments on commit 8eedbf3

Please sign in to comment.