Download & Extend

Integration of simplenews with E-publish

Project:E-Publish
Version:6.x-1.3
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Hi,

I want to send email the publication to all subscribed user of newsletter. E-publish email is not working for my requirement.

Thanks in advance...

Comments

#1

Here's how I have done it...hope it helps someone.

    Create a publication in e-publish (number 1 in my case)

    Create a Newsletter in simplenews.

    Hack the epublish.module as per http://drupal.org/node/125332, editing the display page to allow publication and edition to be passed as parameters as well as via the query string.

    Add the Select Publication module.

    Edit the simplenews content type (newsletter issue) to be able to select a publication. This is under submission form settings -> Select Publication.

    Add a computed field to the simplenews content type to get the selected publication and use it to display the publication
    This has a computed value of: foreach($node->select_publication as $option) { $first_option = $option;}
    $node_field[0]['value'] = $first_option;
    And a display value of: $display = epublish_pub_page(1,$node_field_item['value']);

Note I am hard-coding the publication number as I only have one.
Note also that simplenews content type should NOT be one of the allowed content types for the publication.

Now I can edit my newsletter issue, select a publication, and it will display that publication on the page automatically.

I had to tidy up quite a few things on the e-publish side, particularly in the layout file I wanted, but it seems to work OK.
You can now send a newsletter incorporating a publication.

I'd love to see this added properly as a module but I'm afraid my expertise isn't up to it