Go Back   Pligg CMS Forum > Pligg Help > General Help

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-14-2007, 04:57 AM
Constant Pligger
 
Join Date: Feb 2006
Posts: 120
Thanks: 5
Thanked 1 Time in 1 Post
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
Reply With Quote
  #2 (permalink)  
Old 01-14-2007, 05:07 AM
Casual Pligger
 
Join Date: Jun 2006
Location: Sweden
Posts: 37
Thanks: 1
Thanked 2 Times in 1 Post
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
Reply With Quote
  #3 (permalink)  
Old 01-15-2007, 02:46 AM
Constant Pligger
 
Join Date: Feb 2006
Posts: 120
Thanks: 5
Thanked 1 Time in 1 Post
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
Reply With Quote
  #4 (permalink)  
Old 01-15-2007, 04:49 AM
Casual Pligger
 
Join Date: Jun 2006
Location: Sweden
Posts: 37
Thanks: 1
Thanked 2 Times in 1 Post
Cool, it would also be great if there was in option in the user CP to enable this or not.
__________________
My Pligg site: Digga
Reply With Quote
  #5 (permalink)  
Old 07-06-2007, 04:53 PM
New Pligger
 
Join Date: Jun 2007
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
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..
Reply With Quote
  #6 (permalink)  
Old 07-06-2007, 09:23 PM
not2serious's Avatar
Pligg Donor
Pligg Version: v0.96 w/modifications
Pligg Template: Yget w/modifications
 
Join Date: Apr 2007
Location: East Coast, USA
Posts: 226
Thanks: 16
Thanked 16 Times in 15 Posts
I would be interested in using this if the mod was developed.
__________________
My Pligg Site: Critique My Art
My Arts Directory: Links 2 Arts
Reply With Quote
  #7 (permalink)  
Old 07-06-2007, 09:50 PM
Constant Pligger
 
Join Date: Mar 2006
Posts: 575
Thanks: 14
Thanked 126 Times in 61 Posts
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).
__________________

Reply With Quote
  #8 (permalink)  
Old 08-18-2008, 10:54 PM
nationalchamps's Avatar
New Pligger
 
Join Date: Jul 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
I would also love to see this feature added. I'll give this a try.
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
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


Search Engine Friendly URLs by vBSEO 3.2.0