How would I create a notification to the Pligg site owner when an article is posted?
The email would say something like, "New Article posted" and contain details about the article similar to the 'Tell-a-friend' feature.
Any ideas?
Thx


![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
| How would I create a notification to the Pligg site owner when an article is posted? The email would say something like, "New Article posted" and contain details about the article similar to the 'Tell-a-friend' feature. Any ideas? Thx Last edited by aaronpais; 05-28-2007 at 07:01 PM. |
| ||||
| Are you sure you want to have this? If your site is gonna get more traffic then it will be a nightmare to you. if so add php's mail() before the last redirect statement in do_submit3() in submit.php |
| |||
| I must be blind. I looked in submit.php for a redirect statement and cannot find it. I want to send an email using the same variables as recommend.php, so the email is sent to me with the link to the new article and details about the article. I am not a developer. Can you please help me write a mail() statement? Can I just copy something from recommend.php? |
| |||
| A useful related feature would be to alert users to stories that are related to their saved list - in the form of a daily or weekly digest. For the instant admin notification, try: Above: Code: header("Location: " . getmyurl('upcoming'));
Code: $to = 'email@domain.com';
$from = 'email@domain.com';
$subject = 'New Article Posted!';
$message = $linkres->url;
mail($to, $from, $subject, $message);
|
| |||
| Thx so much.... I have another question -> I collect an email address in my submit form. The email address is stored in the 'extra-field-8'. I want to use this email address as the 'to' email address. How do I link the email address in 'extra-field-8' to the 'to' email address? Thx so much Last edited by aaronpais; 05-29-2007 at 04:03 PM. |
| ||||
| Be careful when using the mail() function without cleansing the input for the extra field. It's quite possible for someone to send spam through it regardless if the from, subject, and other fields are hard-coded. See: http://www.securephpwiki.com/index.php/Email_Injection Best, Cent |
| ||||
| That is why I warned before I posted the mail() code - it is always danger and unwanted burden to the admin. best is to just check for the post very often. |
| ||||
| I remember using the mail() tag early on when I was learning PHP. Some spammer had used a contact webform i made to spam people and it "appeared" to come from my admin email account. I had some many bounced emails back I had to ssh into the server and kill the entire mail file for that account. Best, Cent |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Email notification when a story is submitted | federrer | Questions and Comments | 0 | 05-02-2008 07:31 AM |
| [SOLVED] article links out fail from imported RSS feeds | asapcustoms | Questions and Comments | 2 | 10-26-2007 01:09 AM |
| I have two article whose URLs don't post correctly | AshMCairo | Questions and Comments | 0 | 06-08-2007 03:44 PM |
| Duplicate article URL - Error - Bug? | DailyResearch | Questions and Comments | 3 | 05-14-2007 01:36 PM |
| Artile Title doesn't link to the actual article | mryder | Questions and Comments | 2 | 04-02-2007 08:38 PM |