Jump to content

Recommended Posts

Posted

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

Posted

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

  • Administrators
Posted

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.

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...