epublish is a nice rich newsletter creation tool (once you get your head around it) with zero emailing capabilities.
simplenews is a nice effective subscription and emailing tool with zero creation capabilities.

A marriage made in heaven :-)

Here's two different kludges to shotgun them to the altar:

1) Modify epublish.module at line 656 (Drupal 4.7) to add the two parameters to the function call and wrap the next two lines in an "if":

function epublish_pub_page($pub=0, $ed=0) {
  if ($pub==0) {
    $pub = arg(1);
    $ed = arg(2); //) ? arg(2) : 'current';
  }

2) Create your newsletter in epublish. Note the publication number and edition number.

3) Define the newsletter again in Simplenews.

4) Create content >> newsletter
In the body of the newsletter add the code:

<?php 
print epublish_pub_page(111,222);
?>
where 111 is the publication  number and 222 is the edition number that you noted earlier.

Change the input format to PHP Code
Submit et voila! You can now email the epublish edition.

If you don't like changing the module there is another way that makes a static copy of the epublish version:

1) Create your newsletter in epublish.

2) use your browser to view HTML source

3) Define the newsletter again in Simplenews.

4) Create content >> newsletter
In the title copy the title of the epublish newsletter
In the body of the newsletter paste all the HTML from "

" to "

"
Change the input format to Full HTML
Submit

Comments

twohills’s picture

That should of course read:

4) Create content >> newsletter
In the title copy the title of the epublish newsletter
In the body of the newsletter paste all the HTML from "!-- begin content -->" to "!-- end content -->"
Change the input format to Full HTML
Submit

twohills’s picture

There's not actually anything to see - you just have to take my word for it - but here is the Newsletter http://www.itskeptic.org/node/126 and here is the identical ePublish edition http://www.itskeptic.org/epublish/1

using the first of the two methods described above

twohills’s picture

One refinement:
when simplenews mails out the newsletter it loses the CSS formatting. So I chnasged the content of the newsletter node to read:

<!--break-->
<link rel="stylesheet" type="text/css" href="http://www.itskeptic.org/modules/epublish/epublish.css" />
<?php 
  print epublish_pub_page(1,1);
?>

I didn't add the theme .CSS files as well but I could have.

Note that for the example newsletter, I wrote my own layout_xxx.inc file (hacked from layout_one_two.inc) and modified the epublish.css.

abhiabhi’s picture

when i use print epublish_pub_page(1,2) ,it suddenly changes my layout & every page's title is same as that of publication...
is there any solution..
i m using d6.

ndru’s picture

I've been wracking my brain trying to create the content of a newsletter with simplenews. Thanks for clarifying that I actually need another module to take care of that part. Your examples look excellent. Must check out epublish.