New Post Email Notification
Geplaatst: 02 okt 2005, 20:43
Ik heb de volgende mod zojuist geinstalleerd:
In tegenstelling tot wat de naam doet vermoeden, krijg ik geen mailtje bij elk nieuw gepost bericht, maar uitsluitend wanneer er een nieuw topic gestart wordt. Kan iemand me vertellen waar ik de bovenstaande aanvulling precies moet plakken om ervoor te zorgen dat ik bij elk bericht (nieuw of reactie) een mailtje krijg?
Mijn forum wordt niet zo heel druk bezocht, vandaar dat ik graag een mailtje wil bij een nieuw bericht of reactie.
Alvast bedankt!
Code: Selecteer alles
###############################################
## Hack Title: New Post Email Notification
## Hack Version: 1.0
## Author: Pinyo Bhulipongsanon
## Description: Your forum send you an email whenever a new post is made.
## Compatibility: 2.0.0 - 2.0.13
##
## Installation Level: Easy
## Installation Time: 5 minutes
## Files To Edit: 1
## It is recommended that you list the file names here in
## alphabetical order, starting with folders. For example:
##
## includes/functions_post.php
##
## History:
## 1.0: first release (4-10-2005)
##
## Author Notes:
## Please visit www.greatnexus.com for more webmaster resources
##
## Support: http://www.phpbbhacks.com/forums
## Copyright: Copyright © 2005 New Post Email Notification v1.0 - Pinyo Bhulipongsanon
##
###############################################
## You downloaded this hack from phpBBHacks.com, the #1 source for phpBB related downloads.
## Please visit http://www.phpbbhacks.com/forums for support.
###############################################
##
###############################################
## This hack is released under the GPL License.
## This hack can be freely used, but not distributed, without permission.
## Intellectual Property is retained by the hack author(s) listed above.
###############################################
#
#-----[ Open ]------------------------------------------
#
includes/functions_post.php
#
#-----[ Find ]------------------------------------------
#
if ($mode == 'newtopic')
{
$topic_id = $db->sql_nextid();
#
#-----[ Add After ]------------------------------------------
#
# email first post - BEGIN
$forumURL = "http://www.yourdomain.com/forums";
$adminEmail = "admin@yourdomain.com";
$subject = "New Post Notification";
$headers = "From: Yourdomain.com Forums Admin <contact01@yourdomain.com>\r\n";
$message = "A new post was made to your forum, click on the link below to view the topic:\n\nLink: $forumURL/viewtopic.php?t=$topic_id";
@mail ( $adminEmail, $subject, $message, $headers);
# email first post - END
#
#-----[ Modify ]------------------------------------------
#
Change the variables to match your site information
#
#-----[ SAVE & CLOSE ALL FILES ]--------------------------
#
#End
Mijn forum wordt niet zo heel druk bezocht, vandaar dat ik graag een mailtje wil bij een nieuw bericht of reactie.
Alvast bedankt!