Commit 6d95037e authored by Nigel McNie's avatar Nigel McNie

Changed forum post template again. Aiming for more clarity.

parent d8e9a4ca
......@@ -66,8 +66,14 @@ $string['edittitle'] = 'Edit forum';
$string['edittopic'] = 'Edit topic';
$string['edittopicsuccess'] = 'Topic edited successfully';
$string['forumname'] = 'Forum Name';
$string['forumposttemplate'] = "%s: %s: %s\nBy %s - %s\n\n%s\n\n------------------------------------------------------------------------
To see the post online, follow this link:
$string['forumposttemplate'] = "%s by %s
%s
------------------------------------------------------------------------
%s
------------------------------------------------------------------------
To see and reply to the post online, follow this link:
%s
To unsubscribe from this %s, visit:
......
......@@ -423,10 +423,10 @@ class ActivityTypeInteractionForumNewPost extends ActivityTypePlugin {
$unsubscribeid = $post->{$data->type . 'id'};
$user->message = get_string_from_language($lang, 'forumposttemplate', 'interaction.forum',
$post->groupname, $post->forumtitle,
$post->subject ? $post->subject : get_string_from_language($lang, 're', 'interaction.forum', $post->topicsubject),
display_name($post->poster, $user),
strftime(get_string('strftimedaydatetime'), $post->ctime), trim(html2text($post->body)),
strftime(get_string('strftimedaydatetime'), $post->ctime),
trim(html2text($post->body)),
get_config('wwwroot') . 'interaction/forum/topic.php?id=' . $post->topicid . '#post' . $this->postid,
$data->type,
get_config('wwwroot') . 'interaction/forum/unsubscribe.php?' . $data->type . '=' . $unsubscribeid . '&key=' . $data->key
......
......@@ -68,7 +68,8 @@ class PluginNotificationEmail extends PluginNotification {
$messagebody .= "\n\n" . get_string_from_language($lang, 'emailfooter', 'notification.email', $sitename, $prefurl);
}
email_user($user, null, $subject, $messagebody, null, !empty($data->customheaders) ? $data->customheaders : null);
$userfrom = get_record('usr', 'id', get_field('interaction_forum_post', 'poster', 'id', $data->postid));
email_user($user, $userfrom, $subject, $messagebody, null, !empty($data->customheaders) ? $data->customheaders : null);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment