We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Multiple Newsletters Extension

Development and Programming

Cocoaholic's avatar
Cocoaholic
445 posts
18 years ago
Cocoaholic's avatar Cocoaholic

Hi all,

THANKS to Paul! This extension is based on the “Newsletter Extension” Paul quietly released in this thread.

IMPORTANT! This extension does not play nice with Pauls extension, make sure you disable that one first. sorry Paul 😉

The extension allows you to create multiple newsletters, based on regular templates. You can also specify a default subject if you like.

I created it with multi language websites in mind, but it can be used however you see fit.

Please, please read the README for instructions first!

After reading the readme and setting up your newsletters you can access them by clicking the appropriate Tab. Your Communicate page will still works as usual! (unlike Pauls extension).

Installation should be pretty easy but the Tabs part is a but unusual, feel free to spam me with questions if you have any.

EDIT1: updated to 1.1 EDIT2: Updated the extension to play nice with other extensions using the same hook.

       
ms's avatar
ms
274 posts
18 years ago
ms's avatar ms

Thanks! I’ll definitely test it as soon as time permits.

       
Cocoaholic's avatar
Cocoaholic
445 posts
18 years ago
Cocoaholic's avatar Cocoaholic

I updated the extension to version 1.1.

Version 1.1 adds a “Custom Javascript” field which you can use to add some extra javascript to the page, you can use this to select checkboxes, set the value of drop-down menus etc. so your client does not have to worry about that part.

You could add this for example:

// ============================================
// Formatting (plain, html)
document.forms['0'].mailtype.value ='html';

// Word Wrapping (y, n)
document.forms['0'].wordwrap.value ='n';

// Priority (1, 2, 3, 4, 5)
document.forms['0'].priority.value ='3';

// Send to Mailing Lists (list_1, list_2, etc.)
document.forms['0'].list_1.checked = true;
// ============================================

Of course this feature requires some javascript knowledge.

If you were using 1.0 you’ll have to update your language file to add the Javascript field.

Enjoy

       
adjustafresh's avatar
adjustafresh
6 posts
18 years ago
adjustafresh's avatar adjustafresh

Hi, trying desperately to get this to work so I can give it a whirl. I changed the variable names in both the extension and language files, enabled the extension (Paul Burdick’s has been disabled - it’s didn’t do what I needed anyway) and added the tab as you suggested. Once I clicked on the tab I got this error message:

Notice: Uninitialized string offset: 0 in /www/pmh5340/public_html/publish/extensions/ext.multiple_newsletters.php on line 170

Notice: Undefined index: 1 in /www/pmh5340/public_html/publish/extensions/ext.multiple_newsletters.php on line 172

Notice: Uninitialized string offset: 0 in /www/pmh5340/public_html/publish/extensions/ext.multiple_newsletters.php on line 175
MySQL ERROR:

Error Number: 1064

Description: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Query: SELECT group_name FROM exp_template_groups WHERE group_id =

Any thoughts?

—EDIT—

I hadn’t hit submit on the email template setup page. That’s what threw the error. This is pulling content exactly as I had hoped. So far, so good.

Thanks! Scott

       
Rob Quigley's avatar
Rob Quigley
236 posts
18 years ago
Rob Quigley's avatar Rob Quigley

I installed this on some test sites and had no problems – it’s a really neat solution that you came up with. But I tried it on a live site and the “create newsletter tab” link did not show up in the newsletter extension settings. Any thoughts why that happened and any steps to workaround that?

Thanks!

       
Cocoaholic's avatar
Cocoaholic
445 posts
18 years ago
Cocoaholic's avatar Cocoaholic

No idea why the link isn’t showing.

There is a simple workaround for creating tabs. Point your browser to this page and change the last part of the URL to match the name of your newsletter.

http://domain.com/system/index.php?S=0&C=myaccount&M=tab_manager&link=C–communicate/newsletter–NEWSLETTER_NAME

       
Rob Quigley's avatar
Rob Quigley
236 posts
18 years ago
Rob Quigley's avatar Rob Quigley

Great, I’ll give that a shot. Thanks for the quick response!

       
Cocoaholic's avatar
Cocoaholic
445 posts
18 years ago
Cocoaholic's avatar Cocoaholic

Those links are actually stored in the language file, could you chack and make sure you have the latest version?

it should look something like this for each newsletter:

<?php

$L = array(

"EN_subject" =>
"Subject",
"EN" =>
"English Template - <a href="http://index.php?S=0&C=myaccount&M=tab_manager&link=C--communicate/newsletter--ENtarget=_blank" rel="noopener">Create Tab</a>",
"EN_scripts" =>
"Custom Javascript",

etc...
       
Rob Quigley's avatar
Rob Quigley
236 posts
18 years ago
Rob Quigley's avatar Rob Quigley

Yes, that is what I have:

"EN_subject" =>
"Subject",
"EN" =>
"English Template - <a href="http://index.php?S=0&C=myaccount&M=tab_manager&link=C--communicate/newsletter--ENtarget=_blank" rel="noopener">Create Tab</a>",
"EN_scripts" =>
"Custom Javascript",
       
Cocoaholic's avatar
Cocoaholic
445 posts
18 years ago
Cocoaholic's avatar Cocoaholic

Ok, thanks.

Still no idea why the link isn’t showing up :ohh:

       
Rob Quigley's avatar
Rob Quigley
236 posts
18 years ago
Rob Quigley's avatar Rob Quigley

Just a thought but I’ve got the multi-text extension and was wondering if that lanaguage file being so closely named to multiple_newsletters might have contributed to the problem. I may investigate this at a later time.

       
kenny2's avatar
kenny2
90 posts
18 years ago
kenny2's avatar kenny2

Hi Cocoaholic, just a couple of q’s about your ext..

We currently have an english newsletter on our site, but we would slowly like to roll out also an italian, french and spanish version.

Ideally visitors would be able to choose which version they can subscribe to and receive the email confirmation in their native language. Is this what your extension achieves?

thanks, kenny

       
Cocoaholic's avatar
Cocoaholic
445 posts
18 years ago
Cocoaholic's avatar Cocoaholic

Hi Kenny,

Not exactly, but you can use it for the purpose. All the extension does is allow you to use regular templates as a basis for (more than one) newsletters.

Visitors that visit your site cannot subscribe to a newsletter directly, they subscribe to a mailinglist, and you decide what to send to that particular list. see docs.

You could have a mailinglist for each language, and setup the extension to check (select) the correct mailinglist by default in the communicate page.

There are some examples on how to do this in the README.txt

I might look into updating the extension and add some more settings instead of having to do this manually using javascript.

       
kenny2's avatar
kenny2
90 posts
18 years ago
kenny2's avatar kenny2

Hi, yes that is exactly what i have done (set up individual mailing lists), however there seems to be only one Mailing List Activation Email template. I suppose I could include text in all languages in this template but that is a bit messy. I was wondering if I could use an if structure in this template to sniff out what mailing list is active and display only the relevent text.

       
Nathan Pitman's avatar
Nathan Pitman
531 posts
17 years ago
Nathan Pitman's avatar Nathan Pitman

Hi Cocoaholic. This sounds like a very exciting extension. However, I can’t get the tabs to appear in the communicate tab, running EE 1.6. Any ideas?

       
1 2 3 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.