Code: Select all
<?php
// Send Notifications
if ($mode != 'edit' && $mode != 'delete' && ($auth->acl_get('f_noapprove', $data['forum_id']) || $auth->acl_get('m_approve', $data['forum_id'])))
{
//remove bbcode from text
$stripped_post_text = $data['message'];
strip_bbcode($stripped_post_text, $data['bbcode_uid']);
user_notification($mode, $subject, $data['topic_title'], $data['forum_name'], $data['forum_id'], $data['topic_id'], $data['post_id'], $stripped_post_text);
}
Code: Select all
<?php
/**
* User Notification
*/
function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id, $topic_id, $post_id, $post_text='')
{
global $db, $user, $config, $phpbb_root_path, $phpEx, $auth;
Code: Select all
<?php
$messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($addr['name']),
'TOPIC_TITLE' => htmlspecialchars_decode($topic_title),
'FORUM_NAME' => htmlspecialchars_decode($forum_name),
'POST_TEXT' => htmlspecialchars_decode($post_text),
'U_FORUM' => generate_board_url() . "/viewforum.$phpEx?f=$forum_id",
'U_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id",
'U_NEWEST_POST' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id&p=$post_id&e=$post_id",
'U_STOP_WATCHING_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t=$topic_id&unwatch=topic",
'U_STOP_WATCHING_FORUM' => generate_board_url() . "/viewforum.$phpEx?f=$forum_id&unwatch=forum",
));
Thanks,/language/en/email/forum_notify.txt, added "{POST_TEXT}" (with quotation marks) and some spacing...place holder post text
/language/en/email/newtopic_notify.txt, added "{POST_TEXT}" (with quotation marks) and some spacing...place holder post text
/language/en/email/topic_notify.txt, added "{POST_TEXT}" (with quotation marks) and some spacing...place holder post text
Code: Select all
Subject: New topic notification - "{FORUM_NAME}"
Hello {USERNAME},
You are receiving this notification because you are watching the forum, "{FORUM_NAME}" at "{SITENAME}". This forum has received a new topic since your last visit, "{TOPIC_TITLE}".
"{POST_TEXT}"
You can use the following link to view forum, no more notifications will be sent until you visit the forum.
{U_FORUM}
If you no longer wish to watch this forum you can either click the "Unsubscribe forum" link found in the forum above, or by clicking the following link:
{U_STOP_WATCHING_FORUM}
{EMAIL_SIG}
Kerrith wrote:Hi fpbaum,
Since posting I discovered newpost2mail_beta9 which I installed but can't get to work. I'm not getting a email notifcation of a new post or a reply, neither as a new registered user or as admin.
Thank you,
Kerry