From 536c037bfa6a04a2a08db94330c9a12fe22cd6cb Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Tue, 21 Feb 2012 22:53:22 -0800 Subject: Fixes #4335. Cleaned up the notifications for new content. --- mod/blog/languages/en.php | 11 ++++++++++- mod/blog/start.php | 17 ++++++++--------- 2 files changed, 18 insertions(+), 10 deletions(-) (limited to 'mod/blog') diff --git a/mod/blog/languages/en.php b/mod/blog/languages/en.php index 42606bf8e..e1930b916 100644 --- a/mod/blog/languages/en.php +++ b/mod/blog/languages/en.php @@ -58,7 +58,16 @@ $english = array( // notifications 'blog:newpost' => 'A new blog post', - 'blog:via' => "published a blog post", + 'blog:notification' => +' +%s made a new blog post. + +%s +%s + +View and comment on the new blog post: +%s +', // widget 'blog:widget:description' => 'Display your latest blog posts', diff --git a/mod/blog/start.php b/mod/blog/start.php index eb4e11086..73056f1c9 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -240,16 +240,15 @@ function blog_notify_message($hook, $type, $message, $params) { $to_entity = $params['to_entity']; $method = $params['method']; if (elgg_instanceof($entity, 'object', 'blog')) { - $descr = $entity->description; + $descr = $entity->excerpt; $title = $entity->title; - if ($method == 'email') { - $owner = $entity->getOwnerEntity(); - return $owner->name . ' ' . elgg_echo('blog:via') . ': ' . $title . "\n\n" . $descr . "\n\n" . $entity->getURL(); - } - if ($method == 'web') { - $owner = $entity->getOwnerEntity(); - return $owner->name . ' ' . elgg_echo('blog:via') . ': ' . $title . "\n\n" . $descr . "\n\n" . $entity->getURL(); - } + $owner = $entity->getOwnerEntity(); + return elgg_echo('blog:notification', array( + $owner->name, + $title, + $descr, + $entity->getURL() + )); } return null; } -- cgit v1.2.3