Page 1 of 1
Mailer Plugin on Edited Entries
Posted: Thu Mar 10, 2011 8:01 pm
by adedecker
I've been using the mailer plugin for a certain amount of time. I'd now like to be able to edit entries frequently and be emailed on each edit. I seem to only get the email messages when the initial entry is created. Subsequent edits do not result in emails. The "Send this entry via E-mail" button is checked at the bottom of the entry when it is saved. Is there a simple line I can comment out that might skip and edit/create entry check and email out regardless (provided the selection button is clicked)?
We're using Serendipity 1.5.5, and the FCKEditor as the WYSIWYG editor though I don't think that factors in.
Thanks
Andy
Re: Mailer Plugin on Edited Entries
Posted: Fri Mar 11, 2011 11:08 am
by garvinhicking
Hi!
To force re-sending, you can save your entry as draft, save it, and then immediately switch to "publish" again and save again. This will re-force all "publish" actions, like sending out email notifications.
Otherwise you would need to replace "backend_publish" with "backend_save" inside the plugin file.
HTH,
Garvin
Re: Mailer Plugin on Edited Entries
Posted: Fri Mar 11, 2011 7:43 pm
by adedecker
Thanks Garvin. This worked, though I had to add 'backend_save' to 'backend_publish' (as opposed to replacing it) to ensure that that emails go out on both initial post and future edits. However, this does break the concept of a draft in that all drafts are now sent out as emails. Is there an additional check I can add that would detect the status of the Draft/Publish selection (which we could use to skip the emailing in those cases?)
Thanks
Andy
Re: Mailer Plugin on Edited Entries
Posted: Mon Mar 14, 2011 3:38 pm
by garvinhicking
Hi!
Yes, I think you should be able to check if $eventData['isdraft'] equals true, and then do the appropriate actions...
HTH,
Garvin