This project is read-only.

Unpublish/Publish state

Jan 5, 2011 at 3:22 PM

Any chance of this being implemented?

....... it's possible for the Newsletter widget to go thru the same process when a Page is updated.  Currently, it's just Posts.  But it could be changed to handle Pages as well without it being an overhaul.

Right now, the Newsletter widget sends out an email whenever the post is going from an Unpublished to a Published state.  So even right now, if you unpublish a post, click Save, and then publish it (via the checkbox) and click Save, the people will be emailed again.  Knowing this, you could use this capability by following that sequence of steps whenever you'd like to resend the Newsletter email.

The code could be adjusted to always send out a Newsletter whenever a post is updated.  But this would have to be tested, because there's various times that the Post is saved by BE when you are not editing it.  For example, when a comment is added, the post is saved ... but you are not actually editing the post.  Even in this scenario, the Newsletter widget would probably send out an email everytime the post is being saved like this ... i.e. whenever a new comment is added, or a comment is approved, etc etc.  In other words, the Newsletter widget probably cannot currently distinguish between the Post being saved because it's being edited VS it being saved for another reason.  Probably it's possible though to create code that could distinguish between these two situations.


Jan 5, 2011 at 7:27 PM

Yes, there's a chance.

Jan 8, 2011 at 7:23 AM

One of the updates in BE (which I just checked in), is a new option for the Newsletter widget to send out emails for Pages when they are being published.

You can download BE on the Source Code tab.  There's only one updated file for this -- widget.ascx.cs in the /widgets/Newsletter folder.

For backwards compatibility, by default, the Newsletter widget will only send emails for Posts when they are being published.  You can easily turn on the option for it to send out emails for Pages when they are being published too.  In widget.ascx.cs, around like 55 (towards the top) is this line of code:

private const bool SendEmailsForPages = false;

Just change that "false" to "true" for it to send emails when a Page is being published.

Jan 8, 2011 at 1:48 PM

Thank you very much Ben.