I did a slight modification for the mod:
Now it will send an email only the the forum's administrator.
This is good incase you have several forums and in each one of them you have different administrators.
fill free to fix my code because this is my first day in PHP coding....
This code goes after:
include($phpbb_root_path . 'newpost2mail.config.php');
//Sending the mail only the the forum's admin in which the post was made on
/*
if ((empty($n2m_MAILTO)) or (empty($n2m_MAILTO[0]))) {
$n2m_MAILTO = "";
$n2m_MAILTO[] = $config[board_contact];
} */
global $auth,$db;
$admin_ary = $auth->acl_get_list(false, 'm_', $data[forum_id]);
$admin_ary = (!empty($admin_ary['3']['m_'])) ? $admin_ary['3']['m_'] : array();
$n2m_MAILTO = "";
if (sizeof($admin_ary))
{
$where_sql = 'Where ' . $db->sql_in_set('user_id', $admin_ary);
$sql = 'SELECT user_email,username
FROM ' . USERS_TABLE . ' ' .
$where_sql;
$result = $db->sql_query($sql);
$email = "";
$n2m_MAILTO = array();
while ($row = $db->sql_fetchrow($result))
{
if ($post_USERNAME != $row['username'])
$n2m_MAILTO[] = $row['user_email'];
}
}
//End sending the mail only the the forum's admin in which the post was made on