![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
| Email notifications when your story is promoted or commented on.
I would like to have the story submitter automatically notified by email when their story is commented on or promoted. Has anyone done this before? If so it would be great if you could share your code with me. I can probably handle the code that sends the email if someone could help me with where I'de want to put the code. Which file (libs/comments.php perhaps?) and in which function. Thanks!
__________________ my pligg site: pickstation.com |
| |||
|
I agree, this would be a very useful and appreciated feature. Hope to see it added in a futere version of Pligg..
__________________ My Pligg site: Digga |
| |||
|
Ok, heres some code you can add to have new comment notifications. Beware, I'm using Pligg 8 and I don't know how much the comments.php file has changes since then so you can give this a shot but It may not work in Pligg 9. Maybe someone can test it out and let us know. Add this to libs/comments.php under the line: "if($this->id===0) {" $story_submitter = $db->get_var("SELECT link_author FROM links WHERE link_id = $this->link"); $story_submitter_email = $db->get_var("SELECT user_email FROM users WHERE user_id = $story_submitter"); $story_commenter_name = $db->get_var("SELECT user_login FROM users WHERE user_id = $comment_author"); $story_name = $db->get_var("SELECT link_title FROM links WHERE link_id = $comment_link"); $email = $story_submitter_email; $subject = "Text for your emails subject"; $body = "This message is to inform you that the user \"" . $story_commenter_name. "\" has just commented on your post \"" . $story_name . ".\" You can go here to view your post and read all of its comments: http://www.yoursite.com/story/" . $comment_link . "."; mail($email, $subject, $body, "From: admin@yoursite.com");
__________________ my pligg site: pickstation.com |
| |||
|
Cool, it would also be great if there was in option in the user CP to enable this or not.
__________________ My Pligg site: Digga |
| |||
|
Found this thread thru search...similar to what I want to do. Notify users via email when a new story reaches the front page. In particular I would like it with $subject = (title of the story) $body = (url to the story) And yes like the above comment says a check box in the user profile would be important. Could be useful to lots of people...anyone...??? Last edited by monica79; 07-06-2007 at 04:57 PM.. |
| |||
|
As a matter of practicality, I would suggest not mailing the story submitter everytime a comment is added - potentially heavy on server resources. A better option would be a reader's digest (daily or weekly).
|
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Email to Admin on Story Submission | wnw | Modification Tutorials | 12 | 08-13-2008 06:02 PM |
| submitter real name & email in story page | rebel | General Help | 0 | 08-07-2007 10:30 AM |
| Story link in "Tell a Friend" Email | nzbullet | General Help | 1 | 07-24-2007 06:12 AM |
| Story status change email? | pliggnj | General Help | 4 | 03-07-2007 06:22 PM |
| Idea for scalable story promotion | jvallery | Suggestions | 6 | 04-18-2006 09:41 PM |




Linear Mode

