|
Need a email sent to me for every comment posted
|
| AKC_Pico |
Posted on 15-05-2012 18:31
|

Junior Member

Posts: 45
Joined: 23/05/2008
|
Hey all, I need a something to email me every single time a new comment is posted on a download.
(You can make a comment on a download on php-fusion, I want to receive a email every single time a comment is made on said downloads)
any possible way someone could help me out?
thanks!
pico
Merged on May 16 2012 at 01:46:22:
Hate to bump this, but no-one has been able to help me on other sites - so hope someone can here! 
Thanks,
Pico
Edited by AKC_Pico on 16-05-2012 14:40
|
| |
|
|
| HobbyMan |
Posted on 20-05-2012 07:26
|

Admin

Posts: 1501
Joined: 24/03/2007
|
Open includes/comment_include.php
Find lines 92 to 106...
Code if ($comment_name && $comment_message) {
require_once INCLUDES."flood_include.php";
if (!flood_control("comment_datestamp", DB_COMMENTS, "comment_ip='".USER_IP."'")) {
$result = dbquery(
"INSERT INTO ".DB_COMMENTS." (
comment_item_id, comment_type, comment_name, comment_message, comment_datestamp,
comment_ip, comment_ip_type, comment_hidden
) VALUES (
'".$cid."', '".$ctype."', '".$comment_name."', '".$comment_message."', '".time()."',
'".USER_IP."', '".USER_IP_TYPE."', '0'
)"
);
}
}
Replace with...
Codeif ($comment_name && $comment_message) {
require_once INCLUDES."flood_include.php";
if (!flood_control("comment_datestamp", DB_COMMENTS, "comment_ip='".USER_IP."'")) {
$result = dbquery(
"INSERT INTO ".DB_COMMENTS." (
comment_item_id, comment_type, comment_name, comment_message, comment_datestamp,
comment_ip, comment_ip_type, comment_hidden
) VALUES (
'".$cid."', '".$ctype."', '".$comment_name."', '".$comment_message."', '".time()."',
'".USER_IP."', '".USER_IP_TYPE."', '0'
)"
);
}
if($ctype == "D") {
require_once INCLUDES."sendmail_include.php";
$myemail = "";
$subject = "New Download Comment";
$message = "A new comment has been posted in downloads: ".$settings['siteurl']."downloads.php?download_id=".$cid;
sendemail($settings['siteusername'], $myemail, $settings['sitename'], $settings['siteemail'], $subject, $message);
}
}
IMPORTANT: Add email address to line 108...
$myemail = "";
It must be a different email address from your site email address.
|
| |
|
|
| MarcusG |
Posted on 20-05-2012 07:57
|

Admin

Posts: 191
Joined: 13/08/2010
|
You could also try this: http://www.php-fu...ddon_id=89
Enable email notification on new private messages, and you get your mail without modifying core files.
Ex Senior Dev.
|
| |
|
|
| HobbyMan |
Posted on 20-05-2012 08:12
|

Admin

Posts: 1501
Joined: 24/03/2007
|
I saw that panel, but a comment underneath says Does not work on PF v07.02.XX and AKC_Pico said he just wants comments for downloads only.
|
| |
|
|
| MarcusG |
Posted on 20-05-2012 09:19
|

Admin

Posts: 191
Joined: 13/08/2010
|
Only because it doesn't work on one person's site doesn't mean it does not work on 7.02.xx. It is not tested on versions higher than 7.01.06, that's true but i wrote he could try it out.
Ex Senior Dev.
|
| |
|
|
| pitty |
Posted on 06-01-2013 21:11
|

Newbie

Posts: 1
Joined: 06/01/2013
|
Sorry, to post in such an old thread. The code edits Philip proposed work just fine, but what if I want notifications every time a comment is made anywhere? Or at least for news. I'm running 7.02. Sorry for being such a noob.  |
| |
|
|
| afoster |
Posted on 06-01-2013 21:30
|

Senior Member

Posts: 427
Joined: 11/06/2007
|
I think there is an infusion/mod called autonews that will send out an email to everyone that is on the list to receive news, articles, shouts, comments and you can add others if you know how to code. I have been using it for quite a while and works with 7.02.05.
Here is a link to the developer'w webpage in Denmark
http://www.php-fu...rowstart=0 |
| |
|