Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2006-11-16 19:01:22

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

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

Hi Ben
thanks for getting back

Is there any way to put the article title into the mailout title?
The quick answer is yes… add the article title to the subject line of a list, click ‘edit’ next to the list you want to edit, and then in the field “Subject Line:” enter the TXP tag “@<txp:title />@. That should do it.

Hmmm. I tried that and nothing was output where the title should be. Has anyone else tried this? I’d be interested to hear…
It may or may not be a plugin isssue, as the site I’m working on has had it’s core files fairly extensively hacked by myself. Debug ain’t pretty!

Have you read through the ZCR “help” section?

I have but, not thoroughly enough. I’ll delve further into the ZCR docs and see how far I get – it seems like a great bit of work on first impression.

Hmm … I see what you mean with this. Will you test what happens when you simply write the article with Textile and then send it as a text email? It’s possible that the tags will not appear in the text, I don’t know. If not, then you should be good to go. If they do appear in the email, then the solution for now is to write two versions; This would be another good item to add to the To Do list — it could be a checkbox on the “write” tab.

I tested with basic Textile in the excerpt and body (and both in the email template) and they just get output as you write them – no parsing or stripping.

Maybe that’s one for the hit list – it would make writing and sending much less of a pain if you could write it only once, as you would a normal article.
Of course you could also say that you should probably write differently in each case – because if you know that you’re writing for plain text, you can use caps and other techniques for giving it a bit of structure and styling. So for now I’m going to go for plain text in the excerpt/email and the same copy Textiled up in the body/page.

This should be gone. It’s hardcoded in the code, so you could changed it to “return;” if you know php, or else I’ll have to go make an update — I want it to actually show nothing publicly, so that’s a nice catch.

OK, I edited the plugin like so:
line 780, changed return 'Deleted.'; to return '';
line 813, changed return 'Deleted.'; to return '';
now nothing gets output, as I hoped

Hope that helps,

indeed it does
thanks again

Offline

#32 2006-11-16 21:12:50

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

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

pieman,

re: the subject line — You know what? I knew the TXP tags wouldn’t work there; it slipped my mind. Try using the Custom Data Tag instead and see if that works:

<txp:bab_pm_data display="title" />

  • Ben

Offline

#33 2006-11-17 17:27:06

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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

Great plug-in, Ben!
Recently installed and still going thru the help and thinking the different ways of implementing it.

I would like to know if this is possible:
In the “Contact” section of a site, I want to use ZCR for the contact form. I would like to use it as a “suscribe to Postmaster” form by adding a checkbox to the contact form.
If the checkbox is unticked, ZCR will just send the e-mail as a simple contact form does.
If the checkbox is ticked, ZCR will just send the e-mail as a simple contact form does AND also add the sender to the suscribers list.

That way, when someone want to contact us, he/she would also have the chance to suscribe to the newsletter.

I have already implemented the ZCR as contact form, but there is no problem if I have to make changes to that form to achieve what I’m looking for.

Is this possible?

Thanks again.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#34 2006-11-18 02:14:34

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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

Well… still testing slowly… everything seems to work as I go through each step of the configuration…

I have another question:
Right now, all the texts (for example, when a user submit a subscription form) are picked up from zem_contact_lang plug-in.
The problem is: the meanings of the phrases I have there are more contact-form oriented than subscriber-form oriented.
So, when a subscription form is submitted, the “thank you” message says something like: “Thank you for contacting us. You will receive a copy of the e-mail sent.” and that is a bit confusing.

I would like to know if it is possible to customize the phrases that the subscription form will use…
In the meanwhile, I will go thru the PM plug-in code to see if there is anything there… :D

Thanks again.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#35 2006-11-19 02:43:14

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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

Hi.
Still grasping this great plug-in…
The plug-in help is really very helpful and complete, but questions and comments and ideas and features arises.

Comments

pieman wrote:

subscriber notifications
I set copysender=“no” in my ZCR form, but when I subscribe myself I still get sent an email. A confirmation email is good, but I’d like to define what goes in it. Is that possible? At the moment, it’s lacking a personal touch ;)

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

benbruce wrote:

You are able to do this using a ZCR form. Check the default form in the help to see how to build that (the default has both subscribe and unsubscribe in it).

In the default form… it isn’t there ;)
The line <txp:zem_contact_text name="zemUnSubscribe" label="Unsubscribe:" required="no"><br> hasn’t been properly encoded in the Help so you have to view the Help Page source code to find it out.

Questions

How can I make the form to default the subscription to one predefined list?
The default form suggests this implementation:
<txp:zem_contact_select list="default,test" selected="default" name="zemSubscriberLists" label="Your List:" />
That’s fine if you plan to have more than one list. But I want to simplify things at the beggining… I think I won’t use more than one list.
So, how can I add a hidden input (or whatever is needed) with a default value so subscribers automatically get subscribed to the “default” list?

Can test@test and testrow be safely deleted?
I think testrow has been imported from the previous NL management.

Bugs

I dont know if this is exactly a bug, but from time to time (I havent find ouf how to reproduce it) a totally blank entry is added to subscribers list.

Ideas/Features

  • Order subscribers list by an assigned incremental id number (or date, but I dont think that subscription date is saved in the DB) so you can see the last added subscribers.

In the “Contact” section of a site, I want to use ZCR for the contact form. I would like to use it as a “suscribe to Postmaster” form by adding a checkbox to the contact form.
If the checkbox is unticked, ZCR will just send the e-mail as a simple contact form does.
If the checkbox is ticked, ZCR will just send the e-mail as a simple contact form does AND also add the sender to the suscribers list.

I’m not a programmer (not even know what PHP stands for) but I was thingking about how to implement this.
Please, tell me if anything of this makes any sense:

  • create a new name value name="zemSuscribe".
  • if it isn’t explicitly added or if it’s added to a form in a hidden <input /> element, the subscription will work as it does currently.
  • but that new name value could be also added to a checkbox <input /> element, and only if checked the subscription will be effectively done.

Well, that’s all by now.
Thanks!


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#36 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

#37 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

#38 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

#39 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

#40 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

#41 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

#42 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

#43 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

#44 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

Board footer

Powered by FluxBB