? tests
? translations
Index: simplenews-block.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simplenews/simplenews-block.tpl.php,v
retrieving revision 1.4
diff -u -p -r1.4 simplenews-block.tpl.php
--- simplenews-block.tpl.php	24 Dec 2008 14:20:13 -0000	1.4
+++ simplenews-block.tpl.php	28 Dec 2008 16:12:37 -0000
@@ -4,7 +4,10 @@
 /**
  * @file simplenews-block.tpl.php
  * Default theme implementation to display the simplenews block.
- * The form applies to one newsletter (series) identified by $tid
+ * 
+ * Copy this file in your theme directory to create a custom themed block.
+ * Rename it to simplenews-block--<tid>.tpl.php to override it for a 
+ * newsletter using the newsletter term's id.
  *
  * Available variables:
  * - $subscribed: the current user is subscribed to the $tid newsletter
Index: simplenews-newsletter-body.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simplenews/simplenews-newsletter-body.tpl.php,v
retrieving revision 1.1
diff -u -p -r1.1 simplenews-newsletter-body.tpl.php
--- simplenews-newsletter-body.tpl.php	27 Dec 2008 23:24:29 -0000	1.1
+++ simplenews-newsletter-body.tpl.php	28 Dec 2008 16:12:37 -0000
@@ -5,6 +5,10 @@
  * @file simplenews-newsletter-body.tpl.php
  * Default theme implementation to format the simplenews newsletter body.
  *
+ * Copy this file in your theme directory to create a custom themed body.
+ * Rename it to simplenews-newsletter-body--<tid>.tpl.php to override it for a 
+ * newsletter using the newsletter term's id.
+ *
  * Available variables:
  * - node: Newsletter node object
  * - $body: Newsletter body (formatted as plain text or HTML)
Index: simplenews-newsletter-footer.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simplenews/simplenews-newsletter-footer.tpl.php,v
retrieving revision 1.1
diff -u -p -r1.1 simplenews-newsletter-footer.tpl.php
--- simplenews-newsletter-footer.tpl.php	27 Dec 2008 23:24:29 -0000	1.1
+++ simplenews-newsletter-footer.tpl.php	28 Dec 2008 16:12:37 -0000
@@ -4,6 +4,10 @@
 /**
  * @file simplenews-newsletter-footer.tpl.php
  * Default theme implementation to format the simplenews newsletter footer.
+ * 
+ * Copy this file in your theme directory to create a custom themed footer.
+ * Rename it to simplenews-newsletter-footer--<tid>.tpl.php to override it for a 
+ * newsletter using the newsletter term's id.
  *
  * Available variables:
  * - $node: newsletter node object
Index: simplenews.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simplenews/simplenews.module,v
retrieving revision 1.181
diff -u -p -r1.181 simplenews.module
--- simplenews.module	27 Dec 2008 23:24:29 -0000	1.181
+++ simplenews.module	28 Dec 2008 16:12:41 -0000
@@ -894,7 +894,7 @@ function simplenews_block($op = 'list', 
           }
           $block = array(
             'subject' => check_plain($newsletter['name']),
-            'content' => theme('simplenews_block', $newsletter['tid']),
+            'content' => theme(array('simplenews_block__'. $newsletter['tid'], 'simplenews_block'), $newsletter['tid']),
           );
           return $block;
         }
@@ -1557,17 +1557,13 @@ function simplenews_mail($key, &$message
         node_invoke_nodeapi($node, 'alter', FALSE, TRUE);
         unset($node->simplenews_mail);
 
-        // TODO: Add 'simplenews_newsletter_body__' to enable dynamic
-        // theming of newsletter by term.
-        $body = theme('simplenews_newsletter_body', $node, $message['language']);
+        $body = theme(array('simplenews_newsletter_body__'. $context['node']->simplenews['tid'], 'simplenews_newsletter_body'), $node, $message['language']);
 
         // Buffer body text node and language specific
         $messages[$nid][$langcode]['body'] = $body;
 
         // Build and buffer message footer
-        // TODO: Add 'simplenews_newsletter_footer__' to enable dynamic
-        // theming of newsletter by term.
-        $footer = theme('simplenews_newsletter_footer', $context['node'], $key, $message['language']);
+        $footer = theme(array('simplenews_newsletter_footer' .$context['node']->simplenews['tid'], 'simplenews_newsletter_footer'), $context['node'], $key, $message['language']);
         $messages[$nid][$langcode]['footer'] = $footer;
 
       }
@@ -2324,6 +2320,7 @@ function simplenews_theme() {
     'simplenews_block' => array(
       'template' => 'simplenews-block',
       'arguments' => array('tid' => NULL),
+      'pattern' => 'simplenews_block__',
     ),
     'simplenews_status' => array(
       'template' => 'simplenews-status',
