rrts wrote:

http://www.punres.org/viewtopic.php?id=229
You have to change the version for installation.

May be you can fix the mod.

wow, that looks easy.  just open the file and change the necessary lines contained within the first 12 lines.  i haven't tried it but i might try it later...

rrts wrote:

Thanks. Its working.

But anybody using 'Mail posts' mod with success?

unfortunately it looks like Mail Posts was developed for 1.2.5 and hasn't been changed since... sad

I'd make sure that everything within this IF conditional is correct:

if ($pun_user['id'] != 2) { // or whatever the admin's ID is
            $custom_to      = 'email@domain.com';
            $custom_message = 'New post/thread: http://www.YOURDOMAIN.com/forums/viewtopic.php?pid='.$new_pid.'#p'.$new_pid;
            $custom_headers = 'From: YOUR Forums <youremail@domain.com>' . "\r\n" .
               'Reply-To: whatever@domain.com' . "\r\n" .
               'X-Mailer: PHP/' . phpversion();

            mail($custom_to, $custom_subject, $custom_message, $custom_headers);
         }
Smartys wrote:

Most likely not, since this becomes too intensive for forums rather quickly (ie: if you have 100 posts per day, you'll be sent 100 emails)

But on new boards with no moderators, it is quite useful.  Most forums take some time to get up to 100 a day. 

I tried this http://www.punres.org/desc.php?pid=95 but no luck. it was built for 1.2.5.

If anyone wants a quick and dirty way to do this, I added the following code in post.php at line 322 right before this line: 

        redirect('viewtopic.php?pid='.$new_pid.'#p'.$new_pid, $lang_post['Post redirect']);
    }
}

Add this:

        /***************************
         *************************** SEND MAIL 
         ***************************/
         
         // get subject line
         if ($tid) {
             $custom_subject = 'New Post - ' . stripslashes($cur_posting['subject']);
         } else if ($fid) {
              $custom_subject = 'New Post - ' . stripslashes($db->escape($subject));
         }
         
         
         if ($pun_user['id'] != 2) { // or whatever the admin's ID is
            $custom_to      = 'email@domain.com';
            $custom_message = 'New post/thread: http://www.YOURDOMAIN.com/forums/viewtopic.php?pid='.$new_pid.'#p'.$new_pid;
            $custom_headers = 'From: YOUR Forums <youremail@domain.com>' . "\r\n" .
               'Reply-To: whatever@domain.com' . "\r\n" .
               'X-Mailer: PHP/' . phpversion();

            mail($custom_to, $custom_subject, $custom_message, $custom_headers);
         }         
        /***************************
         ***************************
         ***************************/

This sends an email after any post has been made or a thread started to the admin.  Like i said, very dirty coding but it's fine for those just getting their sites off the ground and don't have an active community of "post reporters" to identify nefarious posts.

This little hack is for 1.2.14

Eric

Looks like this isn't built in so I found this:
http://www.punres.org/desc.php?pid=95

Any ideas if this will be come included in 1.3?

Hi,

Is it possible for the admin to receive an email for each new topic  or post?

Thanks,
Eric