file: simplenews/includes/simplenews.source.inc
object: SimplenewsSourceNode

add public function setNodeBody.

Doing this will allow a patch for http://drupal.org/node/1502736.

CommentFileSizeAuthor
#1 simplenews-1537102-1.patch505 bytesjjchinquist

Comments

jjchinquist’s picture

StatusFileSize
new505 bytes

patch

berdir’s picture

I need to have a look at that issue what it's actually doing, this is problematic:

- Body is a field, it can be removed and there can be many other fields. My guess is that you want to change the mail body and not the node body?
- Also, we are trying to make the whole thing more generic and not node specific, this is a step in the opposite direction.

Note: There is another issue in the queue of Simplenews Statistics where the maintainer notes that the 7.x branch is completely out of sync and needs to be adapted to changes in 6.x, make sure you talk with him.

jjchinquist’s picture

I do understand that - and would like to help out with development. And I agree that the node body itself should not be changed.

So that I can better understand and help, what is the proper method at this point to edit and add field data to the newsletter body?

berdir’s picture

Status: Needs review » Closed (won't fix)

This is not necessary from what I'm seeing in that other patch.

You already have the built newsletter body available in $message['body'] (note it's an array, body and footer are separated), *that's* what you want to change. Changing the $node->body will not result in any changes in the actually sent mail.