Posts: 7
Threads: 2
Joined: Oct 2014
I have comments set up on stories and profiles on my website. Is it possible to send an email to the owner/author of the profile/story when someone comments on it?
Posts: 7
Threads: 2
Joined: Oct 2014
Just gonna go ahead and bump this.
On my website, I have a comment form on the stories and profiles. Is there a way to send the person who wrote the story (or has that profile) an email whenever someone posts a comment? The email would need to include at least where the comment was sent from, and preferably the text of the comment.
I'd imagine I could just hook into the part where the comment passes all verification checks and is inserted into the database, but I'm not sure exactly how commentics does that, or which file I would put it in.
Posts: 2,895
Threads: 59
Joined: Jun 2010
Hi,
You'll need to open /upload/includes/app/processor.php and after this line:
PHP Code:
<?php
cmtx_notify_admin_new_comment_okay($cmtx_name, $cmtx_comment, $cmtx_comment_id); //notify admin of new comment
Add this:
PHP Code:
<?php
cmtx_notify_author_new_comment_okay($cmtx_name, $cmtx_comment, $cmtx_comment_id); //notify author of new comment
Then in /upload/includes/functions/processor.php find the
cmtx_notify_admin_new_comment_okay function, copy and rename it to
cmtx_notify_author_new_comment_okay and modify it as per your requirements.