Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Navigation
Latest Addons
AD Gallery 64
SyntaxHighlighte... 51
Newsletters v4.03 114
Facebook Like Box 132
Newsletters v4.02 60
Metro 171
Facebook Connect 173
Shoutbox Panel 129
Redactor for PHP... 107
MI Floating Side... 109
Facebook Login/R... 156
Avatar Studio v2.03 180
Relationship Sta... 98
Sexual Orientati... 116
Fisherman 144
Popular Addons
iTheme2 5808
Arise 5808
User Control v1.23 4623
Event Calendar 4054
Photowidget panel 3888
Radio-Theme red2... 3359
Highslide Gallery 3315
CSS/JavaScript D... 3234
Facebook Connect... 2992
Dynamic Menu 2895
Slideshow Lightb... 2728
L-AMANT 2662
Enigma 2637
2Dark 2608
Black 2580
View Thread
Official Home of PHP-Fusion » General Addon and Modification Support » Ideas for Modifications and Requests
Who is here? 1 guest(s)
 Print Thread
Need a email sent to me for every comment posted
AKC_Pico
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! Sad

Thanks,

Pico
Edited by AKC_Pico on 16-05-2012 14:40
 
HobbyMan
Open includes/comment_include.php

Find lines 92 to 106...

Download source  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...

Download source  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'
                     )"
                  );
               }
            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.
Just some Guy
 
http://www.hobbysites.net/
MarcusG
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.
 
http://phpfusion.marcusg.de
HobbyMan
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.
Just some Guy
 
http://www.hobbysites.net/
MarcusG
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.
 
http://phpfusion.marcusg.de
pitty
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. Grin
 
afoster
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
 
Jump to Forum:
Similar Threads
Thread Forum Replies Last Post
Email Login Tutorial Code Snippet and functions 2 22-03-2013 11:37
Unactivated members & Email Notification User Administration 8 01-03-2013 10:20
Email in links Content Administration 7 27-11-2012 18:16
no email after track this thread User Administration 11 23-11-2012 08:05
Comment's Themes Support 5 02-11-2012 02:09
Official Home of PHP-Fusion uses cookies. Some may already have been set. Read more about our Cookies here.
Please click the button I Consent Cookies to hide this bar and accept our cookies. If you continue to use the site with no action taken, we'll assume that you consent our cookies anyway.
Cookiebar Panel byVenue