Topic: New topic/posts admin email notification
Hi,
Is it possible for the admin to receive an email for each new topic or post?
Thanks,
Eric
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 troubleshooting → New topic/posts admin email notification
Hi,
Is it possible for the admin to receive an email for each new topic or post?
Thanks,
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?
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)
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
The above codeworking for you?
My thread :
http://punbb.org/forums/viewtopic.php?id=14826
That mod not sending email.
thanks.
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);
}
Thanks. Its working.
But anybody using 'Mail posts' mod with success?
I tried this http://www.punres.org/desc.php?pid=95 but no luck. it was built for 1.2.5.
http://www.punres.org/viewtopic.php?id=229
You have to change the version.
May be yu can fix the mod
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...
http://www.punres.org/viewtopic.php?id=229
You have to change the version for installation.
May be you can fix the mod.
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...
OK. If that 'Mail posts' mod working for you, can you please let me know?
You don't have to change all 12 lines in install_mod.php. just line 12 I think?
Thanks.
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']); } }
I do not see this line of code at all within my post.php file.
redirect('viewtopic.php?pid='.$new_pid.'#p'.$new_pid, $lang_post['Post redirect']); } }
I do not see this line of code at all within my post.php file.
1.3* is not 1.2*.
PunBB Forums → PunBB 1.2 troubleshooting → New topic/posts admin email notification
Powered by PunBB, supported by Informer Technologies, Inc.