CVV001 Posted July 6, 2011 Report Share Posted July 6, 2011 Very useful add-on In the \core\common\ForumData.class.php i found the code that send an email to the administrator but this is not function in my VA... should i configure anything ? Note that pireps and all other emails are sent correctly to the administrator. TNX in advance Gianni Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted July 7, 2011 Administrators Report Share Posted July 7, 2011 I am not sure what you are refering to, is this in the extended va-forum or the original? File, line #? Quote Link to comment Share on other sites More sharing options...
CVV001 Posted July 11, 2011 Author Report Share Posted July 11, 2011 I am not sure what you are refering to, is this in the extended va-forum or the original? File, line #? Sorry, my mistake... I had read the code in an another file. My question is: it is possible to send an email when a new post is inserted in the forum ? //VAForum Original by:simpilot //VAForum Security updates + VAForum 2.0 Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted July 13, 2011 Administrators Report Share Posted July 13, 2011 You should be able to use the native phpVMS mail function to add an email into the script. I would add it to the save new post command. Quote Link to comment Share on other sites More sharing options...
CVV001 Posted July 15, 2011 Author Report Share Posted July 15, 2011 You should be able to use the native phpVMS mail function to add an email into the script. I would add it to the save new post command. Many TNX for the advice. Now my problem is solved with the above code in the file \core\modules\Forum\Forum.php in section 'protected function post_new_topic()' // Send a mail to the admin that a new post is inserted in the forum $sub = 'A new post was added in the forum'; $message = "The pilot {$pilot_id} has added a post in the forum with the title {$title}."; $email = Config::Get('EMAIL_NEW_REGISTRATION'); // code from pilot registration if(empty($email)) { $email = ADMIN_EMAIL; } Util::SendEmail($email, $sub, $message); // End MOD sending mail since I have little experience with php i desire to send to the admin the name of the pilot and the name of the board but i have no idea where i can get this data... TNX - Gianni Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.