/[drupal]/contributions/modules/simplenews_template/README.txt
ViewVC logotype

Contents of /contributions/modules/simplenews_template/README.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download)
Mon Feb 2 09:07:22 2009 UTC (9 months, 3 weeks ago) by tbarregren
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +2 -2 lines
File MIME type: text/plain
Brought HEAD up to date.
1 // $Id: README.txt,v 1.3.2.1 2008/12/05 13:41:22 tobiassjosten Exp $
2
3
4 Simplenews Template
5 ===================
6
7 Simplenews Template is a Drupal module that extends the Simplenews module by
8 providing a themable template with configurable header, footer and style.
9 Header, footer and style are configurable for each newsletter independently.
10
11 Simplenews Template can with advantage be used in conjunction with
12 RelatedContent <http://drupal.org/project/relatedcontent>.
13
14 Developed by
15
16 * Thomas Barregren <http://drupal.org/user/16678>
17
18 Sponsored by
19
20 * Spoon Media <http://www.spoon.com.au/>
21 * Webbredaktören <http://www.webbredaktoren.se/>
22
23
24 Requirements
25 ------------
26
27 To install Simplenews Template you need:
28
29 * Drupal 5.x
30 * Simplenews
31 * Mime Mail
32 * PHPTemplate based theme
33
34
35 Installation
36 ------------
37
38 Install Simplenews Template as follows:
39
40 1. Download, install and configure the Mime Mail module.
41 See http://drupal.org/project/mimemail.
42
43 2. Download, install and configure the Simplenews module.
44 See http://drupal.org/project/simplenews.
45
46 3. Download the latest stable version of Simplenews Template.
47 See http://drupal.org/project/simplenews_template.
48
49 4. Unpack the downloaded file into sites/all/modules or the modules directory
50 of your site.
51
52 5. Go to Administer » Site building » Modules and enable the module.
53
54 6. OPTIONAL: To enable automatic insertion of the Simplenews Template style
55 definitions into HTML-tags of e-mails, download the Emogrifier from
56 http://www.pelagodesign.com/sidecar/emogrifier/ and extract the file
57 emogrifier.php file into the Simplenews Template folder. More information
58 below.
59
60
61 Configuration
62 -------------
63
64 There is no configuration for the Simplenews Template module itself.
65
66
67 Usage
68 -----
69
70 Header, footer and style is setup for each newsletter individually as follows:
71
72 1. If not already existing, go to admin/content/newsletters/types and add at
73 least one newsletter.
74
75 2. Go to admin/content/simplenews/types, and select the newsletter to be
76 configured.
77
78 3. Fill out the text area with the content to be shown at the beginning of
79 each issue of the newsletter. Leave blank to not include a header. Do not
80 forget to choose appropriate input format.
81
82 4. Locate and open the collapsible section called Footer. Fill out the text
83 area with the content to be shown at the end of each issue of the
84 newsletter. Leave blank to not include a footer. Do not forget to choose
85 appropriate input format.
86
87 5. Locate and open the collapsible section called Style. Fill out the text
88 field called Body background color with any valid HTML color value,
89 e.g. #ff00ff and fuchsia.
90
91 6. Fill out the text area called CSS with style sheet rules valid within the
92 HTML tags <style type="text/css">...</style>,
93 e.g. div.message { color: red }.
94
95
96 Emogrifier
97 ----------
98
99 Some e-mail clients, notably Microsoft Outlook 2007 and Google Gmail, discharge
100 CSS defintions within <style> tags. The solution is to put the style definitions
101 into the e-mail HTML-tags. Simplenews Template can do this automagically
102 if Emogrifier <http://www.pelagodesign.com/sidecar/emogrifier/> is installed
103 as described above.
104
105 Emogrifier supports not all CSS2 selectors, e.g. including pseudo selectors. All
106 CSS1 selectors works.
107
108 Emogrifier parses the CSS selectors in order. Later selectors will therefore
109 override earlier selectors that apply to the same element.
110
111 Notice that even with Emogrifier certain e-mail clients will ignore certain CSS
112 properties. For more information, see http://www.email-standards.org/.
113
114 The 15 August 2008 version of Emogrifier has a minor bug, which is easily fixed
115 by replacing $body with $html on lines 35 and 38. Alternatively, you can apply
116 following patch:
117
118 --- emogrifier.php 2008-08-15 13:33:22.000000000 +0200
119 +++ emogrifier.php 2008-10-19 16:51:00.000000000 +0200
120 @@ -32,10 +32,10 @@ class Emogrifier {
121 public function emogrify() {
122 // process the CSS here, turning the CSS style blocks into inline css
123 $unprocessableHTMLTags = implode('|',$this->unprocessableHTMLTags);
124 - $body = preg_replace("/<($unprocessableHTMLTags)[^>]*>/i",'',$this->body);
125 + $html = preg_replace("/<($unprocessableHTMLTags)[^>]*>/i",'',$this->html);
126
127 $xmldoc = new DOMDocument();
128 - $xmldoc->loadHTML($body);
129 + $xmldoc->loadHTML($html);
130
131 $xpath = new DOMXPath($xmldoc);
132
133 The bug is reported to the creator of Emogrifier and will eventually be fixed.

  ViewVC Help
Powered by ViewVC 1.1.2