Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2012, 01:22:12 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155554 Posts in 21715 Topics by 7737 Members
Latest Member: gx-world
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: News Module Comment Notification  (Read 1835 times)
G4

Offline Offline

Posts: 68



« on: November 24, 2006, 09:27:13 AM »

NEWS MODULE

When you post a news item. People can comment.
Is it possible whenever some one leaves a comments. The writer gets a notification by email?

Know you have to check every single news item every day to check if someone has posted a messeage.

Later...
« Last Edit: November 26, 2006, 01:13:33 PM by G4 » Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7973



WWW
« Reply #1 on: November 24, 2006, 09:38:20 AM »

Hello,

i know someone wrote a code snippet wich could be implemented in the related news files and does exactly what you want. Try a search in the forum.

Matthias
Logged
G4

Offline Offline

Posts: 68



« Reply #2 on: November 24, 2006, 10:50:27 AM »

UPDATE

I placed the following code in submit_comment.php. So far so good. If somebody clicks the submit button a mail will be sent...

But even if captha or a field is not filled in correctly you wil also get a mail. Does anybody have a solution?

Code:
<?php

// Setup email to send
$mail_subject 'SUBJECT';
$mail_to 'email@01.com' ', ';
$mail_to .= 'email@02.com';
$mail_message ''.
'Hello'.$display_name.',

There is a new comment '
.WEBSITE_TITLE.'.

From: '
.$title.'
Comment: '
.$comment.'

Go to www.websitebaker.com'
;

// Try sending the email
(mail($mail_to$mail_subject$mail_message"From: ".SERVER_EMAIL."\r\n""Bcc: "SERVER_EMAIL."\r\n")) 
?>

« Last Edit: November 26, 2006, 01:23:48 PM by G4 » Logged
kriskd

Offline Offline

Posts: 63



« Reply #3 on: October 17, 2007, 11:59:18 PM »

Very nice.

I removed the second $mail_to as I only need it sent to one e-mail at the moment.  But, for some reason I got two copies of the message.  Is that meant to happen?

Also, is there a way for the message to tell you what news article the comment is coming from?  I'm developing a site that will have over 40 news articles with the potential for comments on all of them.
Logged
kriskd

Offline Offline

Posts: 63



« Reply #4 on: October 27, 2007, 03:24:22 PM »

As a follow up, I ended up having to set my comments to "Private" because all I was getting was explicit spam.  However, I just got an e-mail comment alert that was empty.

The empty comment did not show up in the admin panel, so it appears that somehow bots are able to send these e-mail alerts.  Does this sound logical or possible?
Logged
tomhung

Offline Offline

Posts: 353


« Reply #5 on: November 15, 2007, 03:31:39 PM »

can you package this up into either a patch or new version?
G
Logged
Argos
Moderator
**
Online Online

Posts: 2161


WWW
« Reply #6 on: November 10, 2010, 02:11:45 PM »

This is an old topic, but there is a similar function available for WB 2.8 (maybe earlier versions also, not tested) at http://www.websitebaker2.org/forum/index.php/topic,19849.new.html
Logged

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase: http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!