From 9fe063022e08a4b6fa5f5935f8f185d5d95814a4 Mon Sep 17 00:00:00 2001 From: Sem Date: Wed, 25 Apr 2012 19:09:22 +0200 Subject: Upgraded to Elgg 1.8.4. --- mod/blog/start.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'mod/blog/start.php') diff --git a/mod/blog/start.php b/mod/blog/start.php index a8553b4b8..73056f1c9 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -226,6 +226,33 @@ function blog_entity_menu_setup($hook, $type, $return, $params) { return $return; } +/** + * Set the notification message body + * + * @param string $hook Hook name + * @param string $type Hook type + * @param string $message The current message body + * @param array $params Parameters about the blog posted + * @return string + */ +function blog_notify_message($hook, $type, $message, $params) { + $entity = $params['entity']; + $to_entity = $params['to_entity']; + $method = $params['method']; + if (elgg_instanceof($entity, 'object', 'blog')) { + $descr = $entity->excerpt; + $title = $entity->title; + $owner = $entity->getOwnerEntity(); + return elgg_echo('blog:notification', array( + $owner->name, + $title, + $descr, + $entity->getURL() + )); + } + return null; +} + /** * Register blogs with ECML. */ -- cgit v1.2.3