Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2019-03-15 18:00:12

colin99
Member
Registered: 2005-11-15
Posts: 65

Subscription alerts for new articles on Textpattern

I would like to have a plug-in that issues an e-mail alert when I post new material.
I have read that there are some Mailchimp RSS hooks that can do this.

Is such a thing natively possible within Textpattern?

Stef Dawson adroitly offered…

In theory, yes. The level of solution depends how clever you want to be. A plugin can hook into the save process and target the ‘article_posted’ event which should then only fire for new articles. It’s then a simple case of extracting the URL-only title and Title/Excerpt/whatever chunks from the information passed to the plugin, packaging it up into an email and mailing the link out. I tried for 10 minutes yesterday and didn’t get anywhere but my heart wasn’t in it so I probably overlooked something simple. Textpattern raises a callback and a plugin can respond, so it’s definitely possible. There might need to be a check addded in case an article is unpublished and then republished so you don’t trigger a second message, can’t remember how it works offhand.

If you want to maintain a manual list of destination email addresses in the plugin, that’s great. Up to you how you do that. If you want people to be able to subscribe to content themselves you’ll need to maintain a separate list, either in the database or via a third-party site. Then it becomes more involved as you need to provide opt-out to comply with various privacy laws.

For this, you might like to enlist the help of the com_connect (contact form) plugin and build a module that interfaces with something like MailChimp to handle subscription lists on contact form submission. I built one a while ago (see https://github.com/Bloke/ext_mailchimp) but it needs updating to use the latest API.

Then, Ken and Shirl can subscribe if they wish, the plugin that hooks into the article create/save process can grab the latest subscriber list from MailChimp and push content to current subscribers only.

I’d ask on the forum. Someone will probably be able to knock you up a plugin if you provide a spec of what it needs to do.

Colin here again – I’d happily pay some $$ to have a brainstorming session to make this work on my blog -

EDIT: added bq..{space} for easier distinction of quoted text.


On the World Wide Web since Day 1 – Editor/Creator – Coffeecrew.comCoffee.bc.ca
Twitter – Twitter.Com/CoffeeCrew -

Offline

#2 2019-03-15 18:15:14

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,137
GitHub

Re: Subscription alerts for new articles on Textpattern

Is this too simple?

Offline

#3 2019-03-15 18:25:46

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,596
Website

Re: Subscription alerts for new articles on Textpattern

And see this thread too.


TXP Builders – finely-crafted code, design and txp

Offline

#4 2019-03-15 18:28:41

colin99
Member
Registered: 2005-11-15
Posts: 65

Re: Subscription alerts for new articles on Textpattern

Just testing it now! :-)

Thanks.


On the World Wide Web since Day 1 – Editor/Creator – Coffeecrew.comCoffee.bc.ca
Twitter – Twitter.Com/CoffeeCrew -

Offline

#5 2019-03-15 21:09:49

colin99
Member
Registered: 2005-11-15
Posts: 65

Re: Subscription alerts for new articles on Textpattern

gaekwad wrote #317079:

Is this too simple?

I set it up using the Textpattern RSS built in – wrote a couple of blog posts -
Set the RSS trigger for 1500 Hours (Eastern Time…)

Got the e-mail from MailChimp but it contained nothing from my Textpattern blog.

Not sure how to debug this.


On the World Wide Web since Day 1 – Editor/Creator – Coffeecrew.comCoffee.bc.ca
Twitter – Twitter.Com/CoffeeCrew -

Offline

#6 2019-03-15 21:18:54

colin99
Member
Registered: 2005-11-15
Posts: 65

Re: Subscription alerts for new articles on Textpattern

colin99 wrote #317083:

I set it up using the Textpattern RSS built in – wrote a couple of blog posts -
Set the RSS trigger for 1500 Hours (Eastern Time…)

Got the e-mail from MailChimp but it contained nothing from my Textpattern blog.

Not sure how to debug this.

Whoops – I think I did not add the requisite RSS blocks in the Campaign form.

My bad!

If anyone wants to try this out – please head over to my blog at Blog
and do a test sign up – that way, we can all have fun.

Last edited by colin99 (2019-03-15 21:20:46)


On the World Wide Web since Day 1 – Editor/Creator – Coffeecrew.comCoffee.bc.ca
Twitter – Twitter.Com/CoffeeCrew -

Offline

#7 2019-03-15 21:36:13

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,137
GitHub

Re: Subscription alerts for new articles on Textpattern

colin99 wrote #317084:

If anyone wants to try this out – please head over to my blog at Blog
and do a test sign up – that way, we can all have fun.

/me checks Friday evening social calendar

Nope, all clear. I’ve signed up.

Last edited by gaekwad (2019-03-15 21:36:37)

Offline

#8 2019-03-15 21:39:11

colin99
Member
Registered: 2005-11-15
Posts: 65

Re: Subscription alerts for new articles on Textpattern

Pretty sure it’s going to work —

Amazing what happens when you follow the instructions!


On the World Wide Web since Day 1 – Editor/Creator – Coffeecrew.comCoffee.bc.ca
Twitter – Twitter.Com/CoffeeCrew -

Offline

#9 2019-03-15 22:14:23

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

Re: Subscription alerts for new articles on Textpattern

Didn’t realise MailChimp offered a direct RSS-to-email service. That’s great to know, thanks Pete. Far simpler than my ill-informed suggestions.


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

#10 2019-03-15 22:35:44

colin99
Member
Registered: 2005-11-15
Posts: 65

Re: Subscription alerts for new articles on Textpattern

Bloke wrote #317087:

Didn’t realise MailChimp offered a direct RSS-to-email service. That’s great to know, thanks Pete. Far simpler than my ill-informed suggestions.

We look to you for wisdom and fun.

When I get to the U.K. lunch is on the missus and I.

Pint of best bitter, bangers and mash, bubble and squeak, lorries and bonnets, mind the gap…


On the World Wide Web since Day 1 – Editor/Creator – Coffeecrew.comCoffee.bc.ca
Twitter – Twitter.Com/CoffeeCrew -

Offline

Board footer

Powered by FluxBB