Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2006-11-20 04:46:47

Sak
Member
From: Seattle, WA
Registered: 2006-10-18
Posts: 30
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Hey everyone,

I just downloaded the Postmaster plugin today and in setting it up I’m getting something weird:

When I use the <txp:bab_pm_unsubscribe /> tag I get the word “deleted” followed by a period in the article output.

Currently, I’m using an article_custom tag, and a custom form for my Unsubscribe page, because I didn’t want it to show up in my Recent Articles list. But even if I put the tag in a plain old post and make it live, I get the same.

Here’s the results of the output:
http://sak.102010.org/index.php?s=unsubscribe

Any suggestions?


Thanks,
Sak.

Offline

#38 2006-11-20 06:29:40

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Hi Sak
I cam across that problem. As a hack, you can edit the plugin code like this:

line 780, change return 'Deleted.'; to return '';

line 813, change return 'Deleted.'; to return '';

Offline

#39 2006-11-20 06:48:49

Sak
Member
From: Seattle, WA
Registered: 2006-10-18
Posts: 30
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Great, thanks pieman! That did the trick.

I was a bit confused. The help documentation said that the tag didn’t have any output.

Update: I feel like a heel for not reading this entire thread now. :P

Last edited by Sak (2006-11-20 07:43:24)


Thanks,
Sak.

Offline

#40 2006-11-22 14:19:52

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

@ maniqui

subscriber notifications
I haven’t explicitly set copysender attribute in ZCR and I dont get a copy when I subscribe my self. You could try that.

Thanks maniqui – that gets rid of the nonsensical user notifications
Thing is , I’d really like to have them, but be able to customise them. As far as I can tell, this isn’t possible with ZCR. Anyone know different?

@ Ben

That aside, it’s all working as I’d hoped, with one further exception:

If I try to send a mailout (or test it) the first time I publish a new article, it just sends a blank email template.

In order to get any content in the mailout, I have to publish the article first, then send it/test it as I re-save. Is this how it’s supposed to work?

Offline

#41 2006-11-22 17:47:04

benbruce
Plugin Author
Registered: 2006-01-13
Posts: 328
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Hi all,

I’m working on 0.3, but probably not over the Thanksgiving weekend. 0.3 will incorporate some of the fixes and updates published and requested here, including:

  • Body_html, etc, display values for the data tag (for use with your HTML emails). In addition, I just went ahead and added all the other “bits” of an article for good measure.
  • The line endings fix
  • Contact Form / Subscribe ability (using a dropdown — a checkbox required trickier coding but if it was widely demanded could definitely be done)
  • No “deleted.” after unsubscribing — these were a hangover
  • Fixes to the help

There are more, I think, but I can’t think of them all. Nothing major, just minor adjustments that have been requested.

@pieman — initially I had it set up so that the options on the write tab did not appear until an article was already saved; then I doublechecked and I WAS able to send emails without that; but if you are running into that problem then it might be correct to switch it back. The way it would work is that you would need to select an article, before the “Email-on-post” options appear on the write tab.

About ZCR — I’ll have to poke more closely but I think that’s got to be taken up with ZCR itself. We’ll see.

  • Ben

UPDATE: Grabbed this from the ZCR documentation:

To specify fields explicitly, use something like this:
<txp:zem_contact to=“dest@example.com”>
<txp:zem_contact_email />
<txp:zem_contact_text label=“Phone” min=7 />
<txp:zem_contact_textarea label=“Enquiry” />
<txp:zem_contact_submit label=“Enquire” />
</txp:zem_contact>
Alternatively, place the field specifications in a Textpattern form, and call it like this:
<txp:zem_contact to=“dest@example.com” form=“mycontactform” />

All labels, inputs and the textarea have their own individual “id” and “class” which are equal to the value of $name. This may be a default value or one that you have entered yourself using the name=“whatever” attribute.

This may all be updated with the next version — I saw a note in that thread about updating your styling, so heads up …

Last edited by benbruce (2006-11-22 18:16:07)

Offline

#42 2006-11-22 17:59:39

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

benbruce wrote:

initially I had it set up so that the options on the write tab did not appear until an article was already saved; then I doublechecked and I WAS able to send emails without that; but if you are running into that problem then it might be correct to switch it back. The way it would work is that you would need to select an article, before the “Email-on-post” options appear on the write tab.

ben, thanks for getting back

Having to publish an article before you see the Email-on-post options appear would be fine – in fact it’s probably a sensible safety measure. You could test the published post in the page before you mailed it out. How could I revert to that state?

It’s only a problem at the moment because one of my clients is bound to forget they need to publish first and they’ll send a blank message to 100 people! Then ring me up ;)

Offline

#43 2006-11-22 18:23:31

benbruce
Plugin Author
Registered: 2006-01-13
Posts: 328
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

pieman, that was my original thought.

Here’s the hack: please test this carefully.

At the very top of the plugin code you’ll see:

—————————————————————————————————————-

// —— SET PRIVILEGE LEVELS for “event=postmaster” — see help for details

etc, etc …

register_callback(“bab_pm_writeTab”, ‘article’ , ‘’);

——————————————————————————————————————-

Replace that with:

——————————————————————————————————————

// —— SET PRIVILEGE LEVELS for “event=postmaster” — see help for details

etc, etc …

register_callback(‘bab_pm_writeTab’, ‘article’ , ‘edit’);
register_callback(‘bab_pm_writeTab’, ‘article’ , ‘save’);
register_callback(“bab_pm_writeTab”, ‘article’ , ‘publish’);

——————————————————————————————————————-

So that:

register_callback(“bab_pm_writeTab”, ‘article’ , ‘’);

Is replaced with:

register_callback(‘bab_pm_writeTab’, ‘article’ , ‘edit’);
register_callback(‘bab_pm_writeTab’, ‘article’ , ‘save’);
register_callback(“bab_pm_writeTab”, ‘article’ , ‘publish’);

Does that make sense? That tells Textpattern to call the function only when “step” in the url is “edit,” “save” or “publish.” Since a blank article page has no step, the function is not called.

Make sure that the line :

register_callback(“bab_pm_writeTab”, ‘article’ , ‘’);

Does not appear in your hacked file, or the options will still appear (here it’s saying, even if there is no step, call the function).

I’m out for the holidays so I can’t promise help with this — if you run into any problems — until next week.

– Ben

Last edited by benbruce (2006-11-22 18:30:45)

Offline

#44 2006-11-22 19:24:20

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

that works a treat!
thanks again – enjoy your holiday :)

Offline

#45 2006-11-23 03:33:28

Sak
Member
From: Seattle, WA
Registered: 2006-10-18
Posts: 30
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

I ran into one other thing testing emails generated from Postmaster that I thought I’d run by you guys:

I’ve tried sending a few emails to a secondary email account as a “subscriber” and I’m getting a bunch of header information in the email body.


Reply-To: sak@102010.org

X-Mailer: PHP/5.1.4

MIME-Version: 1.0

Content-Type: text/plain; charset=“UTF-8”

Content-Transfer-Encoding: 8bit
Message-Id: <20061123032032.8A9DBC9F81@thurlow.textdrive.com>
Date: Thu, 23 Nov 2006 03:20:32 +0000 (GMT)

This only shows up for an email that is sent to a subscriber, but not when I do a “Test” email.

Another difference is the body content of the messages generated. The messages sent to a subscriber have extra linebreaks in them, whereas the “Test” messages follow what the email form looks like.


Thanks,
Sak.

Offline

#46 2006-11-28 04:26:48

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

This is an awesome plugin. Thanks Ben

I just set up my first Newsletter and it works really well.

I have a couple of suggestions for features.

  1. the ability to output one or a series of article image(s); i.e. <txp:bab_pm_data display="articleImage" />
  2. the ability to simply specify a “section” that draws content from a site’s section, allowing multiple articles, images, links, etc; i.e. <txp:bab_pm_data display="section" section="newsletter" />
  3. the ability to easily customize the custom field names. (perhaps you could do this in a similar way to the way TXP handles it.

Just a couple of ideas. I’m delighted with this plugin, though. great work…

Last edited by mrdale (2006-11-28 04:28:35)

Offline

#47 2006-11-28 23:21:31

benbruce
Plugin Author
Registered: 2006-01-13
Posts: 328
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Sak,

I’ll look into it. Should be fixed with 0.3.

mrdale,

I’ve already added “display=” for article image, though I haven’t had a chance to test it out yet and see how it works with an HTML email. Should work fine though.

The section idea might be a bit more complicated. Maybe not, though. Sometimes TXP is so simple!

RE: Custom Fields … you’re wanting to be able to set it up so that “custom1” is called “subscriberFavoriteColor” or whatever you want? So that you — or your site owner — doesn’t have to think “what does custom1 equal”? This is how I had Newsletter Manager, but it seemed like a lot of complication for not much gain. I’m not sure that if you set up a mailing list six months ago, you’re more likely to remember “subscriberFavoriteColor” any better than “custom1” (meaning you — or your site owner — is going to have to go see what they called it regardless). It’s definitely something that can be done, though, and it does make for a better experience, I think. I’ll poke at it.

  • Ben

Last edited by benbruce (2006-11-28 23:43:50)

Offline

#48 2006-11-28 23:38:27

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Hi Ben,

Thanks for the quick response.

Great news about article image. I assume that you’ve added it in 3.0?

The section idea is pure icing on the cake. Without too much effort I could just do this with a view source, cut and paste. I’m just thinking of making it automatic for anotherless sophisticated user.

Actually all I care about with the custom fields is being able to label them in the forms with whatever I like. So programatically they would stay “custom 1” etc. But the label beside the input would say “Address” for example.

Kudos on this project though. It’s really well thought out.

Offline

Board footer

Powered by FluxBB