Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#97 2008-03-16 18:08:24

jdykast
Member
From: Tennessee
Registered: 2004-12-30
Posts: 119
Website

Re: [ARCHIVED] Postmaster (0.4.4) -A simple newsletter manager

I had the same problem. I found that by putting the unsubscribe flag in a zem_secret tag I was able to successfully unsubscribe a user. Here’s the code I used:

<txp:zem_contact to="EMAIL" subject="Unsubscription Notice" label="" thanks_form="unsubscribe_success">
  <p>To unsubscribe simply enter your email and submit the form.</p>
<txp:zem_contact_email name="zemSubscriberEmail" label="Your Email:" />
<txp:zem_contact_secret name="zemUnSubscribe" value="on" />
<txp:zem_contact_submit />
</txp:zem_contact>

Offline

#98 2008-03-16 22:14:55

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: [ARCHIVED] Postmaster (0.4.4) -A simple newsletter manager

yep thanks jdykast – that got unsubscribe working

Offline

#99 2008-03-17 16:15:24

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

Re: [ARCHIVED] Postmaster (0.4.4) -A simple newsletter manager

nardo and jdykast,

I think the value="on" in jdykast’s version may be the difference, rather than the secret aspect.

  • Ben

Offline

#100 2008-03-17 18:52:52

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: [ARCHIVED] Postmaster (0.4.4) -A simple newsletter manager

thanks ben – maybe update your docs – I copied & pasted from there

Offline

#101 2008-03-18 00:17:16

jdykast
Member
From: Tennessee
Registered: 2004-12-30
Posts: 119
Website

Re: [ARCHIVED] Postmaster (0.4.4) -A simple newsletter manager

I thought I checked the contents of $_POST while using the checkbox and even when “on” was supplied as the value of zemUnSubscribe it wasn’t working. It’s been a couple of days since I tested the form so I could just be imagining things.

As a side note, I too copied the code from the helps docs.

Offline

#102 2008-03-18 17:28:07

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

Re: [ARCHIVED] Postmaster (0.4.4) -A simple newsletter manager

nardo and jdykast,

I’m really not sure. Glad you figured it out and I’ve updated the docs (added value="on" to the original, and added jdykast’s working tag as well).

Thanks,

  • Ben

Offline

#103 2008-03-24 00:16:14

jdykast
Member
From: Tennessee
Registered: 2004-12-30
Posts: 119
Website

Re: [ARCHIVED] Postmaster (0.4.4) -A simple newsletter manager

Hopefully this is a quick question: what would be the best way to test the addition and removal of subscribers without actually sending an email notification? I want to play around with the subscribers but I don’t want a bunch of emails to flood my inbox. Is there a way to bypass the email notification?

Edit: Nevermind. I figured out a temporary solution.

Last edited by jdykast (2008-03-24 13:37:43)

Offline

#104 2008-04-09 19:31:35

johnnie
Member
Registered: 2007-03-10
Posts: 58

Re: [ARCHIVED] Postmaster (0.4.4) -A simple newsletter manager

Why is an HTML mail sent out not displayed as an HTML mail? In several agents (thunderbird, hotmail, webmail, outlook express) it just shows me the mime type information as text and then follows with th mail itself, as text (with HTML tags as mail-text)

Offline

#105 2008-04-14 20:44:36

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

Re: [ARCHIVED] Postmaster (0.4.4) -A simple newsletter manager

Hey everybody,

I’ve just recently upgraded my site and plugins, now running Textpattern 4.0.6, but since I upgraded Postmaster the emails it sends aren’t working out very well. Full list of plug-ins I’m running:

pap_contact_cleaner 0.1
Postmaster 0.4.4
Postmaster Library 0.2.3
rss_admin_db_manager 4.3 (modified to fix the Unauthorized Access issue)
rss_unlimited_categories 0.7.4
zem_contact_lang 4.0.3.6
zem_contact_reborn 4.0.3.20

Here’s sort of a shopping list of issues that I’ve run into…

1. Blank tags?
Some of the tags that I used to use no longer generate any content. For example, <txp:bab_pm_data display=“excerpt” /> doesn’t send the excerpt from the article. If I replace it with the regular <txp:excerpt /> I get straight HTML as text in the email.

Postmanual uses the <txp:bab_pm_data display=“excerpt” /> tag in its examples, so I’m not sure what’s going on for me. I was also unable to find documentation on the Postmanual site that listed all the tags that come with Postmaster, what they do, and their accepted attributes. Maybe I missed a link?

2. Custom Subject?
I used to use the following in the Subject Line field under the Lists tab when editing a list:

Sak.102010.org : <txp:bab_pm_data display=“title” />

Now, the subject line gets truncated for some reason to look like this:

Sak.102010.org : <txp:bab_pm_data display=

and there’s now an additional bit that shows up next to the Subject Line field. I’ve included a screenshot so that you can see what I mean. I’d like to get the custom subject line back so that the title of the new article posted shows up, but whatever I try doesn’t seem to work properly.

Note that this additional attribute with mysterious extra quotation mark at the beginning only appears when using a tag with an attribute. A simple tag like <txp:title /> doesn’t cause it to appear, unless I include an attribute in the tag, at which point it gets truncated and the strange additional attribute shows up.

3. Messy URLs?
My site is set to use messy URLs, something of a necessity for how it’s being hosted currently, iirc, but the links that are being generated and sent by <txp:bab_pm_data display=“link” /> aren’t messy. Is there an attribute that I’m missing for this tag?

4. Normal <txp: /> tags sending straight HTML as text?
With respect to the above problems with the excerpt, and the title in the subject line, I tested the email form with normal textpattern tags in place to see what would happen. The excerpt that is sent is just straight HTML as text, and if I use the <txp:title /> tag in the subject line it also sends HTML for the title as text. I understand that there were some changes to Postmaster to support mime types and whatnot, but the documentation isn’t very clear. Anyone have any suggestions?

Anyway, I appreciate any suggestions or advice anyone can offer to help with these issues.

Thanks,
Sak.


Thanks,
Sak.

Offline

#106 2008-04-14 23:30:11

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

Re: [ARCHIVED] Postmaster (0.4.4) -A simple newsletter manager

  • info on bab_pm_data tag
  • all of the tags are listed here, with their attributes in the article
  • the subject line issue is known — i think that it’s an issue with display on the admin side, and not the email side. In other words, I think it saves the correct information to the database and the email subject should come out ok. Is that not the case? I got stalled on fixing that issue.
  • you could try to build the correct messy url by using <txp:bab_pm_data display="ID" /> (which is not listed as an accepted attribute but may work). You could also hack the system by using an article field you’re not currently using like Keywords, or a Custom Field, and paste in the messy url, and then use the data tag to display that content. If none of those options work, I think it should be updated to accommodate messy urls (not sure why that happened).
  • If you want regular TXP tags to return straight text, set the field to “Use Textile -> Leave text untouched” or whatever it is. Otherwise the <txp:body /> returns the Textiled text, not the straight text. I think I’m right here. If you use the data tag, you can use either display="Body" or display="Body_html" (supposedly, although you’re saying you had trouble with these).

The documentation is a work in progress. What exactly was confusing and what info did you need?

  • Ben

PS. I’m hoping this brief response will help!

Last edited by benbruce (2008-04-14 23:30:27)

Offline

#107 2008-04-15 01:50:05

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

Re: [ARCHIVED] Postmaster (0.4.4) -A simple newsletter manager

Hey Ben,

Thanks for your response; much of which had me with the slap to the face, “doh,” expression here on my end of the wire. This is what I get for trying things at 2am and then posting problems first thing in the morning without looking over the problems again to see if solutions eluded me because I was tired and stupid, or if there really were problems.

In the case of the links, I had actually read those last night, and somehow my brain didn’t register them as existing. Looking at it again, lo and behold, there they are. Oops.

In the case of the <txp:bab_pm_data /> tag, I was using lowercase attributes, based on the assumption that <txp:bab_pm_data display=“link” /> was lowercase, then “excerpt” and “title” must also be. With changing those accordingly, the content shows up for both the custom subject line and the excerpt. The subject line still gets truncated, but works just as you said, leaving it as more an aesthetic problem than a technical one — though also certainly confusing.

In the case of <txp:bab_pm_data display=“link” />, the non-messy link still seems to work, I just wasn’t sure if it was a bug that PM wasn’t reading the setting from the TXP preferences.

With respect to the Postmanual, I guess what was confusing me was still seeing examples of the lowercase attributes used, which weren’t working for me. For example, using the examples referenced on this tutorial page, the attributes are all lowercase, and as such don’t work. At least for me, they don’t return anything in the email.

Anyway, thanks for taking the time to get me on track. I apologize for not taking more time with the problem and researching it a little more carefully. I’m 2 for 2 on that today, it seems.


Thanks,
Sak.

Offline

#108 2008-04-15 09:47:02

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,275
Website GitHub

Re: [ARCHIVED] Postmaster (0.4.4) -A simple newsletter manager

Having a small conceptual difficulty with this great plugin; might just be my brain’s not warmed up yet, hopefully someone can show me the light.

I would like people to be able to “subscribe” (for want of a better word: “register interest” is probably more accurate) for a seminar we’re offering. So I want to throw a form out to the page that allows them to fill in their details and when they hit Send they’re subscribed to that seminar’s List. I’ll get a notification and we can gauge numbers, hunky dory.

Now, while they’re on that page I’d like to offer in the same form the ability to also subscribe to our newsletter if they so wish.

I figured I’d:

  1. add a hidden element containing the seminar code (probably read from a custom field) and somehow use that as the list name to subscribe to
  2. add a checkbox with the name of the ‘newsletter’ list so they could subscribe to that as well

If it has any bearing on proceedings I’m going to be using cascading for the seminar code: the Lists will look like ‘seminarAS104’. Thus, when we add future seminars I can choose to send out notifications to all people who have attended prior seminars or only notify people attending a particular seminar (e.g. of a venue change).

What’s the best approach for achieving this? I’ve tried these two tags inside my contact form:

<txp:zem_contact_secret name="zemDoSubscribe" label="Seminar code" value="seminarAS104" />
<txp:zem_contact_checkbox name="zemDoSubscribe" label="newsletter" />

I get a notification e-mail with the correct Seminar code displayed, I get a subscriber created but they are not assigned to either list that I’ve set up. Can this be done? All the examples use select lists so maybe they are the only supported type? And I’m not sure what I should be naming the fields as this example says to use name="zemDoSubscribe" whereas this one says to use name="zemSubscriberLists". Is there a special name I have to give checkboxes to use them as list names too? What about hidden/secret values?

I’m running a stock TXP4.0.6 under PHP 4.4.4/MySQL 4.1.22-standard-log (yeah yeah, it’s supposedly changing soon), postmaster 0.4.4/0.2.3, zem_contact_reborn 4.0.3.20/4.0.3.6 and zem_event 0.3.5 for holding details of the seminar(s) and their dates etc

Many thanks in advance for any pointers or ideas on how to achieve this sort of functionality.

P.S. I had to turn off Send Last Modified Header in order to use the Postmaster tab or I just got stale copies of the pages when jumping between List and Subscriber subtabs, and also had to make sure my site was in Live mode or I got a truck load of PHP ‘undefined’ warnings: is this normal?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB