Postie - Version 1.5.10

Version Description

(2013.05.31) = * Added template field descriptions to image tab. * Fixed a bug where caption placeholder in templates wasn't being properly set. * Additional test to see if wp-config.php can be found.

Download this release

Release Info

Developer WayneAllen
Plugin Icon 128x128 Postie
Version 1.5.10
Comparing to
See all releases

Code changes from version 1.5.9 to 1.5.10

config_form.php CHANGED
@@ -1,6 +1,6 @@
1
  <div class="wrap">
2
  <div style="float:right; width: 220px; border: 1px solid darkgrey; padding:2px;border-radius:10px;margin-left: 10px;" >
3
- <p class="" style="text-align:center;font-weight: bolder; margin-top: 0px; margin-bottom: 2px;">Please Donate</p>
4
  <p style="margin-top: 0;margin-bottom: 2px;">Your generous donation allows me to continue developing Postie for the WordPress community.</p>
5
  <form style="" action="https://www.paypal.com/cgi-bin/webscr" method="post">
6
  <input type="hidden" name="cmd" value="_s-xclick">
@@ -160,16 +160,6 @@
160
  <br/><input name='postie-settings[mail_server_port]' type="text" id='postie-settings-mail_server_port' value="<?php echo esc_attr($mail_server_port); ?>" size="6" />
161
  </td>
162
  </tr>
163
- <tr>
164
- <th scope="row"><?php _e('Postie Time Correction:', 'postie') ?>
165
- <br />
166
- <span class='recommendation'><?php _e("Should be the same as your normal offset - but this lets you adjust it in cases where that doesn't work.", 'postie'); ?></span>
167
- </th>
168
- <td><input name='postie-settings[time_offset]' type="text" id='postie-settings-time_offset' size="2" value="<?php echo esc_attr($time_offset); ?>" />
169
- <?php _e('hours', 'postie') ?>
170
-
171
- </td>
172
- </tr>
173
  <tr valign="top">
174
  <th scope="row"><?php _e('Mail Server:', 'postie') ?></th>
175
  <td><input name='postie-settings[mail_server]' type="text" id='postie-settings-mail_server' value="<?php echo esc_attr($mail_server); ?>" size="40" />
@@ -185,6 +175,16 @@
185
  <input name='postie-settings[mail_password]' type="password" id='postie-settings-mail_password' autocomplete='off' value="<?php echo esc_attr($mail_password); ?>" size="40" />
186
  </td>
187
  </tr>
 
 
 
 
 
 
 
 
 
 
188
  <tr>
189
  <th>
190
  <?php _e('Check for mail every', 'postie') ?>
@@ -537,6 +537,34 @@
537
  "postie-settings-selected_imagetemplate", "smiling.jpg", true);' cols='70' rows='7' id='postie-settings-imagetemplate' name='postie-settings[imagetemplate]'>
538
  <?php echo esc_attr($imagetemplate) ?>
539
  </textarea>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
540
  </td>
541
  </tr>
542
  <?php echo BuildBooleanSelect("Use custom image field", "postie-settings[custom_image_field]", $custom_image_field, "When true, images will not appear in the post. Instead the url to the image will be input into a custom field named 'image'."); ?>
@@ -820,7 +848,7 @@
820
  <input type="hidden" name="page_options"
821
  value="postie-settings" />
822
 
823
- <input type="submit" name="Submit" value="<?php _e('Save Changes') ?>" />
824
 
825
  </p>
826
  </form>
1
  <div class="wrap">
2
  <div style="float:right; width: 220px; border: 1px solid darkgrey; padding:2px;border-radius:10px;margin-left: 10px;" >
3
+ <p class="" style="text-align:center;font-weight: bolder; margin-top: 0px; margin-bottom: 2px;">Please Donate, Every $ Helps!</p>
4
  <p style="margin-top: 0;margin-bottom: 2px;">Your generous donation allows me to continue developing Postie for the WordPress community.</p>
5
  <form style="" action="https://www.paypal.com/cgi-bin/webscr" method="post">
6
  <input type="hidden" name="cmd" value="_s-xclick">
160
  <br/><input name='postie-settings[mail_server_port]' type="text" id='postie-settings-mail_server_port' value="<?php echo esc_attr($mail_server_port); ?>" size="6" />
161
  </td>
162
  </tr>
 
 
 
 
 
 
 
 
 
 
163
  <tr valign="top">
164
  <th scope="row"><?php _e('Mail Server:', 'postie') ?></th>
165
  <td><input name='postie-settings[mail_server]' type="text" id='postie-settings-mail_server' value="<?php echo esc_attr($mail_server); ?>" size="40" />
175
  <input name='postie-settings[mail_password]' type="password" id='postie-settings-mail_password' autocomplete='off' value="<?php echo esc_attr($mail_password); ?>" size="40" />
176
  </td>
177
  </tr>
178
+ <tr>
179
+ <th scope="row"><?php _e('Postie Time Correction:', 'postie') ?>
180
+ <br />
181
+ <span class='recommendation'><?php _e("Should be the same as your normal offset - but this lets you adjust it in cases where that doesn't work.", 'postie'); ?></span>
182
+ </th>
183
+ <td><input name='postie-settings[time_offset]' type="text" id='postie-settings-time_offset' size="2" value="<?php echo esc_attr($time_offset); ?>" />
184
+ <?php _e('hours', 'postie') ?>
185
+
186
+ </td>
187
+ </tr>
188
  <tr>
189
  <th>
190
  <?php _e('Check for mail every', 'postie') ?>
537
  "postie-settings-selected_imagetemplate", "smiling.jpg", true);' cols='70' rows='7' id='postie-settings-imagetemplate' name='postie-settings[imagetemplate]'>
538
  <?php echo esc_attr($imagetemplate) ?>
539
  </textarea>
540
+ <div class='recommendation'>
541
+ <ul>
542
+ <li>{CAPTION} gets replaced with the caption you specified (if any)</li>
543
+ <li>{FILELINK} gets replaced with the url to the media</li>
544
+ <li>{FILENAME} gets replaced with the name of the attachment from the email</li>
545
+ <li>{FULL} same as {FILELINK}</li>
546
+ <li>{HEIGHT} gets replaced with the height of the photo</li>
547
+ <li>{ID} gets replaced with the post id</li>
548
+ <li>{IMAGE} same as {FILELINK}</li>
549
+ <li>{LARGEHEIGHT} gets replaced with the height of a large image</li>
550
+ <li>{LARGEWIDTH} gets replaced with the width of a large image</li>
551
+ <li>{LARGE} gets replaced with the url to the large-sized image</li>
552
+ <li>{MEDIUMHEIGHT} gets replaced with the height of a medium image</li>
553
+ <li>{MEDIUMWIDTH} gets replaced with the width of a medium image</li>
554
+ <li>{MEDIUM} gets replaced with the url to the medium-sized image</li>
555
+ <li>{PAGELINK} gets replaced with the URL of the file in WordPress</li>
556
+ <li>{POSTTITLE} gets replaced with the post title (subject)</li>
557
+ <li>{RELFILENAME} gets replaced with the relative path to the full-size image</li>
558
+ <li>{THUMBHEIGHT} gets replaced with the height of a thumbnail image</li>
559
+ <li>{THUMB} gets replaced with the url to the thumbnail image</li>
560
+ <li>{THUMBNAIL} same as {THUMB}</li>
561
+ <li>{THUMBWIDTH} gets replaced with the width of a thumbnail image</li>
562
+ <li>{TITLE} same as {POSTTITLE}</li>
563
+ <li>{URL} same as {FILELINK}</li>
564
+ <li>{WIDTH} gets replaced with width of the photo</li>
565
+ <li>{ICON} insert the icon for the attachment (for non-audio/image/video attachments only)</li>
566
+ </ul>
567
+ </div>
568
  </td>
569
  </tr>
570
  <?php echo BuildBooleanSelect("Use custom image field", "postie-settings[custom_image_field]", $custom_image_field, "When true, images will not appear in the post. Instead the url to the image will be input into a custom field named 'image'."); ?>
848
  <input type="hidden" name="page_options"
849
  value="postie-settings" />
850
 
851
+ <input type="submit" name="Submit" value="<?php _e('Save Changes') ?>" class="button" />
852
 
853
  </p>
854
  </form>
css/style.css CHANGED
@@ -20,7 +20,7 @@ table.form-table th {
20
  width:40%;
21
  font-weight:bold;
22
  }
23
- span.recommendation {
24
  font-size: 10px;
25
  font-weight:normal;
26
  color:#222;
20
  width:40%;
21
  font-weight:bold;
22
  }
23
+ .recommendation {
24
  font-size: 10px;
25
  font-weight:normal;
26
  color:#222;
docs/Changes.txt CHANGED
@@ -22,6 +22,11 @@ All script, style and body tags are stripped from html emails.
22
  Attachments are now processed in the order they were attached.
23
 
24
  == CHANGELOG ==
 
 
 
 
 
25
  = 1.5.9 (2013.05.18) =
26
  * Fixed a bug where valid users can post via email even though they don't have role permissions.
27
  * Fixed a bug where nice_name was being used in the settings screen even though user_login was needed.
22
  Attachments are now processed in the order they were attached.
23
 
24
  == CHANGELOG ==
25
+ = 1.5.10 (2013.05.31) =
26
+ * Added template field descriptions to image tab.
27
+ * Fixed a bug where caption placeholder in templates wasn't being properly set.
28
+ * Additional test to see if wp-config.php can be found.
29
+
30
  = 1.5.9 (2013.05.18) =
31
  * Fixed a bug where valid users can post via email even though they don't have role permissions.
32
  * Fixed a bug where nice_name was being used in the settings screen even though user_login was needed.
docs/Postie.txt CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://PostiePlugin.com/
6
  Tags: e-mail, email
7
  Requires at least: 3.0
8
  Tested up to: 3.5.1
9
- Stable tag: 1.5.9
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
6
  Tags: e-mail, email
7
  Requires at least: 3.0
8
  Tested up to: 3.5.1
9
+ Stable tag: 1.5.10
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
docs/TODO.txt CHANGED
@@ -10,6 +10,7 @@ Enhance #img# to specify the featured image
10
  Update tag_* and filter_* to handle HTML (per tag_Tags)
11
  "yoast" style admin sidebar - see clicky by yoast
12
  handle condition where only one of text/plain & text/html is supplied, but Preferred Text Type is set to the opposite.
 
13
  gallery logic dosen't handle both images and non-images
14
 
15
  standardize tags
10
  Update tag_* and filter_* to handle HTML (per tag_Tags)
11
  "yoast" style admin sidebar - see clicky by yoast
12
  handle condition where only one of text/plain & text/html is supplied, but Preferred Text Type is set to the opposite.
13
+ dynamically determine video size (height/width) - https://code.google.com/p/phpvideotoolkit/
14
  gallery logic dosen't handle both images and non-images
15
 
16
  standardize tags
get_mail.php CHANGED
@@ -4,8 +4,10 @@
4
  $wp_config_path = dirname(dirname(dirname(dirname(__FILE__))));
5
  if (file_exists($wp_config_path . DIRECTORY_SEPARATOR . "wp-config.php")) {
6
  include_once ($wp_config_path . DIRECTORY_SEPARATOR . "wp-config.php");
7
- } else {
8
  include_once (dirname($wp_config_path)) . DIRECTORY_SEPARATOR . "wp-config.php";
 
 
9
  }
10
 
11
  require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mimedecode.php');
4
  $wp_config_path = dirname(dirname(dirname(dirname(__FILE__))));
5
  if (file_exists($wp_config_path . DIRECTORY_SEPARATOR . "wp-config.php")) {
6
  include_once ($wp_config_path . DIRECTORY_SEPARATOR . "wp-config.php");
7
+ } elseif (file_exists(dirname($wp_config_path) . DIRECTORY_SEPARATOR . "wp-config.php")) {
8
  include_once (dirname($wp_config_path)) . DIRECTORY_SEPARATOR . "wp-config.php";
9
+ } else {
10
+ die("wp-config.php could not be found.");
11
  }
12
 
13
  require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mimedecode.php');
languages/postie-it_IT.mo ADDED
Binary file
languages/postie-it_IT.po ADDED
@@ -0,0 +1,640 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Postie Translation File
2
+ # Copyright (C) 2005 Dirk Elmendorf <headgeek@economysizegeek.com>
3
+ # This file is distributed under the same license as Postie.
4
+ # Dirk Elmendorf <headgeek@economysizegeek.com>, 2005
5
+ #
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: Postie\n"
9
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/src\n"
10
+ "POT-Creation-Date: 2012-11-14 22:30:13+00:00\n"
11
+ "PO-Revision-Date: 2013-05-30 11:27+0100\n"
12
+ "Last-Translator: \n"
13
+ "Language-Team: Max Guglielmino <info@maxguglielmino.com>\n"
14
+ "MIME-Version: 1.0\n"
15
+ "Content-Type: text/plain; charset=UTF-8\n"
16
+ "Content-Transfer-Encoding: 8bit\n"
17
+ "X-Poedit-Language: Italian\n"
18
+ "X-Poedit-Country: ITALY\n"
19
+ "X-Poedit-SourceCharset: utf-8\n"
20
+
21
+ #: config_form.php:4
22
+ #: config_form.php:35
23
+ msgid "Postie Options"
24
+ msgstr "Opzioni Postie"
25
+
26
+ #: config_form.php:55
27
+ msgid "Configuration successfully updated!"
28
+ msgstr "Configurazione aggiornata con successo!"
29
+
30
+ #: config_form.php:56
31
+ msgid "Error - unable to save configuration"
32
+ msgstr "Errore - non è stato possibile di salvare la configurazione"
33
+
34
+ #: config_form.php:63
35
+ msgid "Reset Settings To Defaults"
36
+ msgstr "Reimposta configurazione ai valori predefiniti"
37
+
38
+ #: config_form.php:67
39
+ msgid "Run Postie"
40
+ msgstr "Avvia Postie"
41
+
42
+ #: config_form.php:68
43
+ msgid "(To run the check mail script manually)"
44
+ msgstr "(Per avviare lo script di controllo mail manualmente)"
45
+
46
+ #: config_form.php:72
47
+ msgid "Test Config"
48
+ msgstr "Test Configurazione"
49
+
50
+ #: config_form.php:73
51
+ msgid "this will run a special script to test your configuration options"
52
+ msgstr "questo avvia uno script speciale per testare le tue opzioni di configurazione"
53
+
54
+ #: config_form.php:81
55
+ msgid "Mailserver"
56
+ msgstr "Server Mail:"
57
+
58
+ #: config_form.php:82
59
+ msgid "User"
60
+ msgstr "Utente"
61
+
62
+ #: config_form.php:83
63
+ msgid "Message"
64
+ msgstr "Messaggio"
65
+
66
+ #: config_form.php:84
67
+ msgid "Image"
68
+ msgstr "Immagine"
69
+
70
+ #: config_form.php:85
71
+ msgid "Video and Audio"
72
+ msgstr "Video e Audio"
73
+
74
+ #: config_form.php:86
75
+ msgid "Attachments"
76
+ msgstr "Allegati"
77
+
78
+ #: config_form.php:87
79
+ msgid "Help"
80
+ msgstr "Aiuto"
81
+
82
+ #: config_form.php:88
83
+ msgid "FAQ"
84
+ msgstr "FAQ"
85
+
86
+ #: config_form.php:95
87
+ msgid "Mail Protocol:"
88
+ msgstr "Protocollo Mail:"
89
+
90
+ #: config_form.php:111
91
+ msgid "Port:"
92
+ msgstr "Porta:"
93
+
94
+ #: config_form.php:112
95
+ msgid "Standard Ports:"
96
+ msgstr "Porte Standard:"
97
+
98
+ #: config_form.php:113
99
+ msgid "POP3"
100
+ msgstr "POP3"
101
+
102
+ #: config_form.php:114
103
+ msgid "IMAP"
104
+ msgstr "IMAP"
105
+
106
+ #: config_form.php:115
107
+ msgid "IMAP-SSL"
108
+ msgstr "IMAP-SSL"
109
+
110
+ #: config_form.php:116
111
+ msgid "POP3-SSL"
112
+ msgstr "POP3-SSL"
113
+
114
+ #: config_form.php:124
115
+ msgid "Postie Time Correction:"
116
+ msgstr "Correzione Orario per Postie:"
117
+
118
+ #: config_form.php:126
119
+ msgid "Should be the same as your normal offset - but this lets you adjust it in cases where that doesn't work."
120
+ msgstr "Dovrebbe essere lo stesso del tuo normale fuso orario, ma questo ti permette di aggiustarlo nel caso non funzioni."
121
+
122
+ #: config_form.php:129
123
+ msgid "hours"
124
+ msgstr "ore"
125
+
126
+ #: config_form.php:134
127
+ msgid "Mail Server:"
128
+ msgstr "Server Mail:"
129
+
130
+ #: config_form.php:139
131
+ msgid "Mail Userid:"
132
+ msgstr "Nome Utente Mail:"
133
+
134
+ #: config_form.php:143
135
+ msgid "Mail Password:"
136
+ msgstr "Password Mail:"
137
+
138
+ #: config_form.php:149
139
+ msgid "Check for mail every"
140
+ msgstr "Controlla mail ogni"
141
+
142
+ #: config_form.php:157
143
+ msgid "Once weekly"
144
+ msgstr "Una volta alla settimana"
145
+
146
+ #: config_form.php:162
147
+ msgid "daily"
148
+ msgstr "giornalmente"
149
+
150
+ #: config_form.php:167
151
+ msgid "hourly"
152
+ msgstr "ogni ora"
153
+
154
+ #: config_form.php:172
155
+ msgid "twice per hour"
156
+ msgstr "due volte l'ora"
157
+
158
+ #: config_form.php:177
159
+ msgid "every ten minutes"
160
+ msgstr "ogni dieci minuti"
161
+
162
+ #: config_form.php:183
163
+ msgid "check manually"
164
+ msgstr "controlla manualmente"
165
+
166
+ #: config_form.php:195
167
+ msgid "Roles That Can Post:"
168
+ msgstr "Ruoli che possono pubblicare:"
169
+
170
+ #: config_form.php:197
171
+ msgid "This allows you to grant access to other users to post if they have the proper access level"
172
+ msgstr "Questo consente di concedere accesso ad altri utenti per pubblicare se hanno il livello d'accesso giusto"
173
+
174
+ #: config_form.php:221
175
+ msgid "Post status:"
176
+ msgstr "Stato della pubblicazione:"
177
+
178
+ #: config_form.php:253
179
+ msgid "Admin username:"
180
+ msgstr "Nome Utente Admin:"
181
+
182
+ #: config_form.php:263
183
+ msgid "Default post by mail category:"
184
+ msgstr "Categoria Articolo-da-mail predefinita:"
185
+
186
+ #: config_form.php:272
187
+ msgid "Default post by mail tag(s)"
188
+ msgstr "Tag(s) predefiniti pubblicazione da mail"
189
+
190
+ #: config_form.php:274
191
+ msgid "separated by commas"
192
+ msgstr "separato da virgole"
193
+
194
+ #: config_form.php:282
195
+ msgid "Default Title:"
196
+ msgstr "Titolo Predefinito:"
197
+
198
+ #: config_form.php:289
199
+ msgid "Preferred Text Type:"
200
+ msgstr "Tipo di testo preferito:"
201
+
202
+ #: config_form.php:302
203
+ msgid "Tag Of Message Start:"
204
+ msgstr "Tag Inizio Messaggio:"
205
+
206
+ #: config_form.php:303
207
+ msgid "Use to remove any text from a message that the email provider puts at the top of the message"
208
+ msgstr "Utilizzato per rimuovere testo che il provider mette in cima al messaggio"
209
+
210
+ #: config_form.php:309
211
+ msgid "Tag Of Message End:"
212
+ msgstr "Tag Fine Messaggio:"
213
+
214
+ #: config_form.php:310
215
+ msgid "Use to remove any text from a message that the email provider puts at the end of the message"
216
+ msgstr "Utilizzato per rimuovere testo che il provider mette alla fine del messaggio"
217
+
218
+ #: config_form.php:327
219
+ msgid "Send post confirmation e-mail to"
220
+ msgstr "Invia email conferma pubblicazione a:"
221
+
222
+ #: config_form.php:332
223
+ msgid "sender"
224
+ msgstr "mittente"
225
+
226
+ #: config_form.php:333
227
+ msgid "administrator"
228
+ msgstr "amministratore"
229
+
230
+ #: config_form.php:334
231
+ msgid "sender and administrator"
232
+ msgstr "mittente e amministratore"
233
+
234
+ #: config_form.php:335
235
+ msgid "none"
236
+ msgstr "nessuno"
237
+
238
+ #: config_form.php:345
239
+ msgid "Encoding for pages and feeds:"
240
+ msgstr "Encoding per pagine e feeds:"
241
+
242
+ #: config_form.php:348
243
+ msgid "should handle ISO-8859-1 as well"
244
+ msgstr "dovrebbe gestire anche ISO-8859-1"
245
+
246
+ #: config_form.php:369
247
+ msgid "Image Place Holder Tag:"
248
+ msgstr "Tag segnaposto immagine:"
249
+
250
+ #: config_form.php:375
251
+ msgid "Image Template"
252
+ msgstr "Template Immagine"
253
+
254
+ #: config_form.php:376
255
+ #: config_form.php:425
256
+ #: config_form.php:468
257
+ #: config_form.php:512
258
+ msgid "Choose a default template, then customize to your liking in the text box"
259
+ msgstr "Scegli una template predefinita, quindi personalizza a tuo piacimento nel box di testo"
260
+
261
+ #: config_form.php:377
262
+ msgid "Sizes for thumbnail, medium, and large images can be chosen in the <a href=\"options-media.php\">Media Settings</a>. The samples here use the default sizes, and will not reflect the sizes you have chosen."
263
+ msgstr "Dimensioni per immagini miniatura, media, e larga possono essere scelte nelle <a href=\"options-media.php\">Impostazioni Media</a>. L'esempio qui mostra le misure predefinite, e non riflette le dimensioni da te scelte."
264
+
265
+ #: config_form.php:405
266
+ #: config_form.php:452
267
+ #: config_form.php:494
268
+ #: config_form.php:539
269
+ #: config_form.php:614
270
+ msgid "Preview"
271
+ msgstr "Anteprima"
272
+
273
+ #: config_form.php:424
274
+ msgid "Video template 1"
275
+ msgstr "Template video 1"
276
+
277
+ #: config_form.php:461
278
+ msgid "Video 1 file types:"
279
+ msgstr "Tipi di file video 1:"
280
+
281
+ #: config_form.php:462
282
+ msgid "Use the video template 1 for these files types (separated by commas)"
283
+ msgstr "Usa la template video 1 per questi tipi di file (separati da virgole)"
284
+
285
+ #: config_form.php:467
286
+ msgid "Video template 2"
287
+ msgstr "Template video 2"
288
+
289
+ #: config_form.php:505
290
+ msgid "Video 2 file types:"
291
+ msgstr "Tipi di file video 2:"
292
+
293
+ #: config_form.php:506
294
+ msgid "Use the video template 2 for these files types (separated by commas)"
295
+ msgstr "Usa la template video 2 per questi tipi di file (separati da virgole)"
296
+
297
+ #: config_form.php:511
298
+ msgid "Audio template"
299
+ msgstr "Template audio:"
300
+
301
+ #: config_form.php:548
302
+ msgid "Audio file types:"
303
+ msgstr "Tipi fi file audio:"
304
+
305
+ #: config_form.php:550
306
+ msgid "Use the audio template for these files types (separated by commas)"
307
+ msgstr "Usa la template audio per questi tipi di file (separati da virgole)"
308
+
309
+ #: config_form.php:563
310
+ msgid "Attachment icon set"
311
+ msgstr "Set icone allegati"
312
+
313
+ #: config_form.php:590
314
+ msgid "Attachment icon size (in pixels)"
315
+ msgstr "Set icone allegati (in pixels)"
316
+
317
+ #: config_form.php:635
318
+ msgid "Save Changes"
319
+ msgstr "Salva Modifiche"
320
+
321
+ #: get_mail.php:21
322
+ msgid "Dang, message is empty!"
323
+ msgstr "Messaggio vuoto!"
324
+
325
+ #: get_mail.php:24
326
+ #: postie-functions.php:449
327
+ msgid "There does not seem to be any new mail."
328
+ msgstr "Sembra che non ci siano nuove mail."
329
+
330
+ #: postie-functions.php:1387
331
+ msgid "The uploaded file exceeds the <code>upload_max_filesize</code> directive in <code>php.ini</code>."
332
+ msgstr "Il file caricato supera il <code>upload_max_filesize</code> definito nel <code>php.ini</code>."
333
+
334
+ #: postie-functions.php:1388
335
+ msgid "The uploaded file exceeds the <em>MAX_FILE_SIZE</em> directive that was specified in the HTML form."
336
+ msgstr "Il file caricato supera il <code>MAX_FILE_SIZE</code> definito nel modulo HTML."
337
+
338
+ #: postie-functions.php:1389
339
+ msgid "The uploaded file was only partially uploaded."
340
+ msgstr "Il file è stato solo parzialmente caricato."
341
+
342
+ #: postie-functions.php:1390
343
+ msgid "No file was uploaded."
344
+ msgstr "Nessun file caricato."
345
+
346
+ #: postie-functions.php:1392
347
+ msgid "Missing a temporary folder."
348
+ msgstr "Manca una cartella temporaria."
349
+
350
+ #: postie-functions.php:1393
351
+ msgid "Failed to write file to disk."
352
+ msgstr "Impossibile scrivere il file su disco."
353
+
354
+ #: postie-functions.php:1409
355
+ msgid "Invalid form submission."
356
+ msgstr "Invio del modulo non valido."
357
+
358
+ #: postie-functions.php:1417
359
+ msgid "File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini."
360
+ msgstr "Il file è vuoto. Si prega di caricare qualcosa di più sostanzioso. Questo errore potrebbe essere causato anche da caricamento disattivato nel tuo php.ini."
361
+
362
+ #: postie-functions.php:1421
363
+ msgid "Specified file failed upload test."
364
+ msgstr "Il file specificato non ha superato il test di caricamento."
365
+
366
+ #: postie-functions.php:1429
367
+ msgid "File type does not meet security guidelines. Try another."
368
+ msgstr "Il tipo di file non rispetta le linee guida di sicurezza. Provare con un altro."
369
+
370
+ #: postie-functions.php:1449
371
+ msgid "The uploaded file could not be moved to %s."
372
+ msgstr "Il file caricato non può essere spostato in %s."
373
+
374
+ #: postie-functions.php:2059
375
+ msgid "Yes"
376
+ msgstr "Si"
377
+
378
+ #: postie-functions.php:2061
379
+ msgid "No"
380
+ msgstr "No"
381
+
382
+ #: postie.php:82
383
+ msgid "Edit Plugins"
384
+ msgstr "Modifica Plugins"
385
+
386
+ #: postie.php:161
387
+ msgid "Postie is almost ready."
388
+ msgstr "Postie è quasi pronto."
389
+
390
+ #: postie.php:162
391
+ msgid "You must <a href=\"%1$s\">enter your email settings</a> for it to work."
392
+ msgstr "Devi <a href=\"%1$s\">inserire le tue impostazioni email</a> per funzionare."
393
+
394
+ #: postie.php:172
395
+ msgid "Warning: the IMAP php extension is not installed."
396
+ msgstr "Attenzione: l'estensione php IMAP non è installata."
397
+
398
+ #: postie.php:173
399
+ msgid "Postie may not function correctly without this extension (especially for non-English messages)."
400
+ msgstr "Postie potrebbe non funzionare correttamente senza questa estensione (in particolare per messaggi non in Inglese)"
401
+
402
+ #: postie.php:176
403
+ msgid "Please see the <a href=\"%1$s\">FAQ </a> for more information."
404
+ msgstr "Per favore leggere le <a href=\"%1$s\">FAQ </a> per maggiori informazioni."
405
+
406
+ #: postie_test.php:10
407
+ msgid "Postie Diagnosis"
408
+ msgstr "Diagnosi Postie"
409
+
410
+ #: postie_test.php:41
411
+ msgid "Only required for international character set support"
412
+ msgstr "Richiesto solo per supporto di set caratteri internazionali"
413
+
414
+ #: postie_test.php:45
415
+ #: postie_test.php:49
416
+ msgid "yes"
417
+ msgstr "si"
418
+
419
+ #: util/wp-i18n/pomo/sample/app.php:56
420
+ msgid "Welcome %s!"
421
+ msgstr "Benvenuto %s!"
422
+
423
+ #: util/wp-i18n/pomo/sample/app.php:60
424
+ msgid "A string with low priority!"
425
+ msgstr "Una stringa con bassa priorità!"
426
+
427
+ #: util/wp-i18n/pomo/sample/app.php:62
428
+ msgid "Bye\n"
429
+ msgstr "Addio\n"
430
+
431
+ #~ msgid ""
432
+ #~ "If you would like to start over - you can click the button on the right "
433
+ #~ "to reset all configurations to the default."
434
+ #~ msgstr ""
435
+ #~ "Se vuoi ricominciare - puoi cliccare il pulsante sulla destra per "
436
+ #~ "reimpostare tutte le configurazioni ai valori predefiniti."
437
+
438
+ #~ msgid "Authorization Settings"
439
+ #~ msgstr "Impostazioni Autorizzazione"
440
+
441
+ #~ msgid "Allow Anyone To Post Via Email"
442
+ #~ msgstr "Permetti a chiunque di pubblicare tramite email"
443
+
444
+ #~ msgid ""
445
+ #~ "Changing this to yes is NOT RECOMMEDED - anything that gets sent in will "
446
+ #~ "automatically be posted. This could make it easier to compromise your "
447
+ #~ "server - YOU HAVE BEEN WARNED."
448
+ #~ msgstr ""
449
+ #~ "Modificare questo parametro NON È RACCOMANDATO - qualsiasi cosa venga "
450
+ #~ "spedita verrà automaticamente pubblicata. Questo può facilitare la "
451
+ #~ "compromissione del tuo server - SEI STATO AVVISATO."
452
+
453
+ #~ msgid "Minimum Access Level Required To Post:"
454
+ #~ msgstr "Livello di accesso minimo richiesto per pubblicare:"
455
+
456
+ #~ msgid "Authorized Addresses"
457
+ #~ msgstr "Indirizzi Autorizzati"
458
+
459
+ #~ msgid ""
460
+ #~ "Put each email address on a single line. Posts from emails in this list "
461
+ #~ "will be treated as if they came from the admin. If you would prefer to "
462
+ #~ "have users post under their own name - create a WordPress user with the "
463
+ #~ "correct access level."
464
+ #~ msgstr ""
465
+ #~ "Metti ogni indirizzo email su una riga. Articoli da indirizzi in questa "
466
+ #~ "lista verranno trattati come se venissero direttamente "
467
+ #~ "dall'amministrazione. Se preferisci che gli utenti pubblichino a loro "
468
+ #~ "nome, crea l'utente WordPress col corretto livello d'accesso."
469
+
470
+ #~ msgid "Directory Settings"
471
+ #~ msgstr "Impostazione Cartella"
472
+
473
+ #~ msgid "Directory For Photos:"
474
+ #~ msgstr "Cartella per foto:"
475
+
476
+ #~ msgid "Recommended"
477
+ #~ msgstr "Raccomandato"
478
+
479
+ #~ msgid "Directory For Files:"
480
+ #~ msgstr "Cartella per files:"
481
+
482
+ #~ msgid "Live from the field"
483
+ #~ msgstr "Live dal campo"
484
+
485
+ #~ msgid "plain"
486
+ #~ msgstr "semplice"
487
+
488
+ #~ msgid "html"
489
+ #~ msgstr "html"
490
+
491
+ #~ msgid "Forward Rejected Mail"
492
+ #~ msgstr "Inoltra mail rifiutate"
493
+
494
+ #~ msgid "Allow Subject In Mail"
495
+ #~ msgstr "Permetti oggetto in mail"
496
+
497
+ #~ msgid "Allow HTML In Mail Subject"
498
+ #~ msgstr "Permetti HTML in oggetto mail"
499
+
500
+ #~ msgid "Allow HTML In Mail Body"
501
+ #~ msgstr "Permetti HTML nel corpo mail"
502
+
503
+ #~ msgid "UTF-8"
504
+ #~ msgstr "UTF-8"
505
+
506
+ #~ msgid "Decode Quoted Printable Data"
507
+ #~ msgstr "Decodifica dati stampabili quotati"
508
+
509
+ #~ msgid "Should be yes in most cases."
510
+ #~ msgstr "Dovrebbe essere 'si' in generale."
511
+
512
+ #~ msgid "Supported File Types"
513
+ #~ msgstr "Tipi di file accettati"
514
+
515
+ #~ msgid "Put each type on a single line."
516
+ #~ msgstr "Metti ogni tipo in una riga."
517
+
518
+ #~ msgid "Banned File Names"
519
+ #~ msgstr "Nomi file bannati"
520
+
521
+ #~ msgid ""
522
+ #~ "Put each file name on a single line.Files matching this list will never "
523
+ #~ "be posted to your blog."
524
+ #~ msgstr ""
525
+ #~ "Metti ogni nome in una riga. I file che coincidono con questa lista non "
526
+ #~ "verranno pubblicati."
527
+
528
+ #~ msgid "Drop The Signature From Mail"
529
+ #~ msgstr "Cancella la firma dalla mail"
530
+
531
+ #~ msgid "Signature Patterns"
532
+ #~ msgstr "Modelli firma"
533
+
534
+ #~ msgid ""
535
+ #~ "Put each pattern on a seperate line and make sure to escape any special "
536
+ #~ "characters."
537
+ #~ msgstr ""
538
+ #~ "Metti ogni modello in una riga e assicurati di trasformare (escape) ogni "
539
+ #~ "carattere speciale."
540
+
541
+ #~ msgid "Image Settings"
542
+ #~ msgstr "Impostazioni Immagine"
543
+
544
+ #~ msgid "No GD Support"
545
+ #~ msgstr "Nessun supporto GD"
546
+
547
+ #~ msgid ""
548
+ #~ "Currently your installation of PHP does not have GD installed so no image "
549
+ #~ "resizing can occur."
550
+ #~ msgstr ""
551
+ #~ "La tua installazione di PHP non ha GD installato, quindi nessun "
552
+ #~ "ridimensionamento immagine può essere effettuato."
553
+
554
+ #~ msgid "Post Images At End"
555
+ #~ msgstr "Pubblica immagini alla fine"
556
+
557
+ #~ msgid "No means they will be put before the text of the message."
558
+ #~ msgstr "'No' significa che verranno messe prima del testo del messaggio."
559
+
560
+ #~ msgid "Resize Large Images"
561
+ #~ msgstr "Ridimensiona immagini larghe"
562
+
563
+ #~ msgid "Maximum Image Width:"
564
+ #~ msgstr "Larghezza immagine massima:"
565
+
566
+ #~ msgid "pixels"
567
+ #~ msgstr "pixels"
568
+
569
+ #~ msgid "JPEG Compression:"
570
+ #~ msgstr "Compressione JPEG:"
571
+
572
+ #~ msgid "%"
573
+ #~ msgstr "%"
574
+
575
+ #~ msgid "Use ImageMagick"
576
+ #~ msgstr "Usa ImageMagick"
577
+
578
+ #~ msgid "convert binary location:"
579
+ #~ msgstr "località convert in binary:"
580
+
581
+ #~ msgid "only needed if you are using ImageMagick"
582
+ #~ msgstr "necessario solo se usi ImageMagick"
583
+
584
+ #~ msgid "should be /usr/bin/convert"
585
+ #~ msgstr "dovrebbe essere /usr/bin/convert"
586
+
587
+ #~ msgid "identify binary location:"
588
+ #~ msgstr "località identify binary:"
589
+
590
+ #~ msgid "should be /usr/bin/identify"
591
+ #~ msgstr "dovrebbe essere /usr/bin/identify"
592
+
593
+ #~ msgid "Start Image Count At 0"
594
+ #~ msgstr "Inizia conteggio immagine a 0"
595
+
596
+ #~ msgid "Image CSS Class:"
597
+ #~ msgstr "Classe CSS immagine:"
598
+
599
+ #~ msgid "Image CSS Style:"
600
+ #~ msgstr "Stile CSS immagine:"
601
+
602
+ #~ msgid "3GP"
603
+ #~ msgstr "3GP"
604
+
605
+ #~ msgid "Embed 3GP videos as QuickTime"
606
+ #~ msgstr "Incorpora video 3GP come QuickTime"
607
+
608
+ #~ msgid ""
609
+ #~ "This controls if the video is just a link or embeded in the page using "
610
+ #~ "QuickTime"
611
+ #~ msgstr ""
612
+ #~ "Questo controlla se un video è un semplice link o viene incorporato nella "
613
+ #~ "pagina utilizzando QuickTime"
614
+
615
+ #~ msgid "Location of ffmpeg:"
616
+ #~ msgstr "Località di ffmpeg:"
617
+
618
+ #~ msgid ""
619
+ #~ "only needed if you are on a Linux server and use 3gp video,and don't "
620
+ #~ "embed the video. This allows postie to make thumbnail of the very first "
621
+ #~ "frame"
622
+ #~ msgstr ""
623
+ #~ "necessario solo se sei su un server Linux, utilizzi video 3GP e non li "
624
+ #~ "incorpori. Questo permette a Postie di creare una miniatura del primo "
625
+ #~ "fotogramma."
626
+
627
+ #~ msgid "should be /usr/bin/ffmpeg"
628
+ #~ msgstr "dovrebbe essere /usr/bin/ffmpeg"
629
+
630
+ #~ msgid "3GP CSS Class:"
631
+ #~ msgstr "Classe CSS 3GP:"
632
+
633
+ #~ msgid "Mailserver Settings"
634
+ #~ msgstr "Impostazioni Server di Posta"
635
+
636
+ #~ msgid "IMAP/IMAP-SSL/POP3-SSL unavailable"
637
+ #~ msgstr "IMAP/IMAP-SSL/POP3-SSL non disponibili"
638
+
639
+ #~ msgid "Update Options"
640
+ #~ msgstr "Aggiorna Opzioni"
postie-functions.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  /*
4
- $Id: postie-functions.php 715036 2013-05-18 18:44:20Z WayneAllen $
5
  */
6
 
7
  //to turn on debug output add the following line to wp-config.php
@@ -705,7 +705,7 @@ function IMAPMessageFetch($server = NULL, $port = NULL, $email = NULL, $password
705
  $mail_server->TLSOn();
706
  }
707
  EchoInfo("Connecting to $server:$port ($protocol)" . ($tls ? " with TLS" : ""));
708
- if ($mail_server->connect($server, $port, $email, $password)) {
709
  $msg_count = $mail_server->getNumberOfMessages();
710
  } else {
711
  EchoInfo("Mail Connection Time Out");
@@ -747,7 +747,7 @@ function POP3MessageFetch($server = NULL, $port = NULL, $email = NULL, $password
747
 
748
  EchoInfo("Connecting to $server:$port ($protocol)");
749
 
750
- if ($pop3->connect($server, $port)) {
751
  $msg_count = $pop3->login($email, $password);
752
  if ($msg_count === false) {
753
  $msg_count = 0;
@@ -868,6 +868,7 @@ function GetContent($part, &$attachments, $post_id, $poster, $config) {
868
  DebugEcho('----');
869
  $meta_return = '';
870
  DebugEcho("GetContent: primary= " . $part->ctype_primary . ", secondary = " . $part->ctype_secondary);
 
871
 
872
  DecodeBase64Part($part);
873
 
@@ -1251,7 +1252,7 @@ function ValidatePoster(&$mimeDecodedEmail, $config) {
1251
  global $wpdb;
1252
  $poster = NULL;
1253
  $from = "";
1254
- if (array_key_exists('from', $mimeDecodedEmail->headers)) {
1255
  $from = RemoveExtraCharactersInEmailAddress(trim($mimeDecodedEmail->headers["from"]));
1256
  $from = apply_filters("postie_filter_email", $from);
1257
  DebugEcho("ValidatePoster: post email filter $from");
@@ -1261,7 +1262,7 @@ function ValidatePoster(&$mimeDecodedEmail, $config) {
1261
  }
1262
 
1263
  $resentFrom = "";
1264
- if (array_key_exists('resent-from', $mimeDecodedEmail->headers)) {
1265
  $resentFrom = RemoveExtraCharactersInEmailAddress(trim($mimeDecodedEmail->headers["resent-from"]));
1266
  }
1267
 
@@ -2177,13 +2178,7 @@ function parseTemplate($id, $type, $template, $orig_filename, $icon = "") {
2177
  $template = str_replace('{RELFILENAME}', $relFileName, $template);
2178
  $template = str_replace('{POSTTITLE}', $the_parent->post_title, $template);
2179
  $template = str_replace('{ICON}', $icon, $template);
2180
- if ($attachment->post_excerpt != '') {
2181
- $template = str_replace('{CAPTION}', $attachment->post_excerpt, $template);
2182
- } elseif (!preg_match("/$attachment->post_title/i", $fileName)) {
2183
- $template = str_replace('{CAPTION}', $attachment->post_title, $template);
2184
- } else {
2185
- $template = str_replace('{CAPTION}', $orig_filename, $template);
2186
- }
2187
  DebugEcho("parseTemplate - after: $template");
2188
  return $template . '<br />';
2189
  }
@@ -2293,14 +2288,15 @@ function filter_ReplaceImagePlaceHolders(&$content, $attachments, $config, $post
2293
  } else {
2294
  DebugEcho("No caption found");
2295
  }
2296
- //DebugEcho("parameterize templete: " . $imageTemplate);
2297
  $imageTemplate = mb_str_replace('{CAPTION}', htmlspecialchars($caption, ENT_QUOTES), $imageTemplate);
2298
- //DebugEcho("populated templete: " . $imageTemplate);
2299
 
2300
  $img_placeholder_temp.='#';
2301
  $eimg_placeholder_temp.='#';
2302
 
2303
  $content = str_ireplace($img_placeholder_temp, $imageTemplate, $content);
 
2304
  $content = str_ireplace($eimg_placeholder_temp, $imageTemplate, $content);
2305
  } else {
2306
  DebugEcho("No $img_placeholder_temp or $eimg_placeholder_temp found");
1
  <?php
2
 
3
  /*
4
+ $Id: postie-functions.php 720921 2013-05-31 16:55:11Z WayneAllen $
5
  */
6
 
7
  //to turn on debug output add the following line to wp-config.php
705
  $mail_server->TLSOn();
706
  }
707
  EchoInfo("Connecting to $server:$port ($protocol)" . ($tls ? " with TLS" : ""));
708
+ if ($mail_server->connect(trim($server), $port, $email, $password)) {
709
  $msg_count = $mail_server->getNumberOfMessages();
710
  } else {
711
  EchoInfo("Mail Connection Time Out");
747
 
748
  EchoInfo("Connecting to $server:$port ($protocol)");
749
 
750
+ if ($pop3->connect(trim($server), $port)) {
751
  $msg_count = $pop3->login($email, $password);
752
  if ($msg_count === false) {
753
  $msg_count = 0;
868
  DebugEcho('----');
869
  $meta_return = '';
870
  DebugEcho("GetContent: primary= " . $part->ctype_primary . ", secondary = " . $part->ctype_secondary);
871
+ DebugDump($part);
872
 
873
  DecodeBase64Part($part);
874
 
1252
  global $wpdb;
1253
  $poster = NULL;
1254
  $from = "";
1255
+ if (property_exists($mimeDecodedEmail, "headers") && array_key_exists('from', $mimeDecodedEmail->headers)) {
1256
  $from = RemoveExtraCharactersInEmailAddress(trim($mimeDecodedEmail->headers["from"]));
1257
  $from = apply_filters("postie_filter_email", $from);
1258
  DebugEcho("ValidatePoster: post email filter $from");
1262
  }
1263
 
1264
  $resentFrom = "";
1265
+ if (property_exists($mimeDecodedEmail, "headers")&& array_key_exists('resent-from', $mimeDecodedEmail->headers)) {
1266
  $resentFrom = RemoveExtraCharactersInEmailAddress(trim($mimeDecodedEmail->headers["resent-from"]));
1267
  }
1268
 
2178
  $template = str_replace('{RELFILENAME}', $relFileName, $template);
2179
  $template = str_replace('{POSTTITLE}', $the_parent->post_title, $template);
2180
  $template = str_replace('{ICON}', $icon, $template);
2181
+
 
 
 
 
 
 
2182
  DebugEcho("parseTemplate - after: $template");
2183
  return $template . '<br />';
2184
  }
2288
  } else {
2289
  DebugEcho("No caption found");
2290
  }
2291
+ DebugEcho("parameterize templete: " . $imageTemplate);
2292
  $imageTemplate = mb_str_replace('{CAPTION}', htmlspecialchars($caption, ENT_QUOTES), $imageTemplate);
2293
+ DebugEcho("populated template: " . $imageTemplate);
2294
 
2295
  $img_placeholder_temp.='#';
2296
  $eimg_placeholder_temp.='#';
2297
 
2298
  $content = str_ireplace($img_placeholder_temp, $imageTemplate, $content);
2299
+ DebugEcho("post replace: $content");
2300
  $content = str_ireplace($eimg_placeholder_temp, $imageTemplate, $content);
2301
  } else {
2302
  DebugEcho("No $img_placeholder_temp or $eimg_placeholder_temp found");
postie.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Postie
5
  Plugin URI: http://PostiePlugin.com/
6
  Description: Signifigantly upgrades the posting by mail features of Word Press (See <a href='options-general.php?page=postie/postie.php'>Settings and options</a>) to configure your e-mail settings. See the <a href='http://wordpress.org/extend/plugins/postie/other_notes'>Readme</a> for usage. Visit the <a href='http://wordpress.org/support/plugin/postie'>postie forum</a> for support.
7
- Version: 1.5.9
8
  Author: Wayne Allen
9
  Author URI: http://allens-home.com/
10
  License: GPL2
@@ -27,10 +27,10 @@
27
  */
28
 
29
  /*
30
- $Id: postie.php 715038 2013-05-18 18:46:28Z WayneAllen $
31
  */
32
 
33
- define('POSTIE_VERSION', '1.5.9');
34
  define("POSTIE_ROOT", dirname(__FILE__));
35
  define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
36
 
4
  Plugin Name: Postie
5
  Plugin URI: http://PostiePlugin.com/
6
  Description: Signifigantly upgrades the posting by mail features of Word Press (See <a href='options-general.php?page=postie/postie.php'>Settings and options</a>) to configure your e-mail settings. See the <a href='http://wordpress.org/extend/plugins/postie/other_notes'>Readme</a> for usage. Visit the <a href='http://wordpress.org/support/plugin/postie'>postie forum</a> for support.
7
+ Version: 1.5.10
8
  Author: Wayne Allen
9
  Author URI: http://allens-home.com/
10
  License: GPL2
27
  */
28
 
29
  /*
30
+ $Id: postie.php 720922 2013-05-31 16:57:18Z WayneAllen $
31
  */
32
 
33
+ define('POSTIE_VERSION', '1.5.10');
34
  define("POSTIE_ROOT", dirname(__FILE__));
35
  define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
36
 
postieIMAP.php CHANGED
@@ -37,6 +37,7 @@ class PostieIMAP {
37
  */
38
  function TLSOn() {
39
  $this->_tls_on = true;
 
40
  }
41
 
42
  /**
@@ -78,10 +79,12 @@ class PostieIMAP {
78
  } else {
79
  $this->_server_string = "{" . $server . ":" . $port . $option . "}";
80
  }
 
81
  $this->_connection = imap_open($this->_server_string, $login, $password);
82
 
83
  if ($this->_connection) {
84
  $this->_connected = true;
 
85
  } else {
86
  LogInfo("imap_open failed: " . imap_last_error());
87
  }
@@ -94,13 +97,12 @@ class PostieIMAP {
94
  */
95
  function getNumberOfMessages() {
96
  $status = imap_status($this->_connection, $this->_server_string, SA_ALL); //get all messages in debug mode so we can reprocess them
97
- //DebugEcho($this->_server_string);
98
- //DebugDump($status);
99
  if ($status)
100
  return $status->messages;
101
  else {
102
  LogInfo("Error imap_status did not return a value");
103
- DebugDump($this);
104
  return 0;
105
  }
106
  }
@@ -112,6 +114,7 @@ class PostieIMAP {
112
  function fetchEmail($index) {
113
 
114
  $header_info = imap_headerinfo($this->_connection, $index);
 
115
 
116
  if (IsDebugMode() || $header_info->Recent == 'N' || $header_info->Unseen == 'U') {
117
  $email = imap_fetchheader($this->_connection, $index);
@@ -127,6 +130,7 @@ class PostieIMAP {
127
  * Marks a message for deletion
128
  */
129
  function deleteMessage($index) {
 
130
  imap_delete($this->_connection, $index);
131
  }
132
 
@@ -134,6 +138,7 @@ class PostieIMAP {
134
  * Handles purging any files that are marked for deletion
135
  */
136
  function expungeMessages() {
 
137
  imap_expunge($this->_connection);
138
  }
139
 
@@ -141,6 +146,7 @@ class PostieIMAP {
141
  * Handles disconnecting from the server
142
  */
143
  function disconnect() {
 
144
  imap_close($this->_connection);
145
  $this->_connection = false;
146
  }
@@ -149,7 +155,7 @@ class PostieIMAP {
149
  * @return string
150
  */
151
  function error() {
152
- //echo(print_r(imap_errors(), true));
153
  return(imap_last_error());
154
  }
155
 
37
  */
38
  function TLSOn() {
39
  $this->_tls_on = true;
40
+ DebugEcho("IMAP: TLS enabled");
41
  }
42
 
43
  /**
79
  } else {
80
  $this->_server_string = "{" . $server . ":" . $port . $option . "}";
81
  }
82
+ DebugEcho("IMAP: connection string - {$this->_server_string}");
83
  $this->_connection = imap_open($this->_server_string, $login, $password);
84
 
85
  if ($this->_connection) {
86
  $this->_connected = true;
87
+ DebugEcho("IMAP: connected");
88
  } else {
89
  LogInfo("imap_open failed: " . imap_last_error());
90
  }
97
  */
98
  function getNumberOfMessages() {
99
  $status = imap_status($this->_connection, $this->_server_string, SA_ALL); //get all messages in debug mode so we can reprocess them
100
+ DebugDump($status);
 
101
  if ($status)
102
  return $status->messages;
103
  else {
104
  LogInfo("Error imap_status did not return a value");
105
+ //DebugDump($this);
106
  return 0;
107
  }
108
  }
114
  function fetchEmail($index) {
115
 
116
  $header_info = imap_headerinfo($this->_connection, $index);
117
+ DebugDump($header_info);
118
 
119
  if (IsDebugMode() || $header_info->Recent == 'N' || $header_info->Unseen == 'U') {
120
  $email = imap_fetchheader($this->_connection, $index);
130
  * Marks a message for deletion
131
  */
132
  function deleteMessage($index) {
133
+ DebugEcho("IMAP: deleting message $index");
134
  imap_delete($this->_connection, $index);
135
  }
136
 
138
  * Handles purging any files that are marked for deletion
139
  */
140
  function expungeMessages() {
141
+ DebugEcho("IMAP: expunge");
142
  imap_expunge($this->_connection);
143
  }
144
 
146
  * Handles disconnecting from the server
147
  */
148
  function disconnect() {
149
+ DebugEcho("IMAP: closing connection");
150
  imap_close($this->_connection);
151
  $this->_connection = false;
152
  }
155
  * @return string
156
  */
157
  function error() {
158
+ DebugDump(imap_errors());
159
  return(imap_last_error());
160
  }
161
 
postie_test.php CHANGED
@@ -80,7 +80,7 @@ DebugEcho("Error log: " . ini_get('error_log'));
80
 
81
  <?php
82
  if (!$mail_server || !$mail_server_port || !$mail_userid) {
83
- EchoInfo("NO - check server settings");
84
  } else {
85
  DebugEcho("checking");
86
  }
@@ -103,6 +103,7 @@ DebugEcho("Error log: " . ini_get('error_log'));
103
  } else {
104
  EchoInfo("Successful " . strtoupper($config['input_protocol']) . " connection on port {$config["mail_server_port"]}");
105
  EchoInfo("# of waiting messages: " . $mail_server->getNumberOfMessages());
 
106
  }
107
  }
108
  break;
80
 
81
  <?php
82
  if (!$mail_server || !$mail_server_port || !$mail_userid) {
83
+ EchoInfo("FAIL - server settings not complete");
84
  } else {
85
  DebugEcho("checking");
86
  }
103
  } else {
104
  EchoInfo("Successful " . strtoupper($config['input_protocol']) . " connection on port {$config["mail_server_port"]}");
105
  EchoInfo("# of waiting messages: " . $mail_server->getNumberOfMessages());
106
+ $mail_server->disconnect();
107
  }
108
  }
109
  break;
readme.html CHANGED
@@ -1,278 +1,7 @@
1
- <h3>Installation</h3>
2
- <ul>
3
- <li>Either:
4
-
5
- <ul>
6
- <li>Put the postie.zip file in wp-content/plugins/ and unzip it</li>
7
- </ul></li>
8
- <li>Or:
9
-
10
- <ul>
11
- <li>Use the automatic installer (WP 2.7+)</li>
12
- </ul></li>
13
- <li>Login to WordPress as an administrator</li>
14
- <li>Goto the Plugins tab in the WordPress Admin Site</li>
15
- <li>Activate "Postie"</li>
16
- <li>Goto to the "Settings" tab and click on the sub-tab "Postie" to configure it.</li>
17
- <li>Make sure you enter the mailserver information correctly, including the type
18
- of connection and the port number. Common port configurations:
19
-
20
- <ul>
21
- <li>pop3: 110 </li>
22
- <li>pop3-ssl: 995</li>
23
- <li>imap: 143</li>
24
- <li>imap-ssl: 993</li>
25
- </ul></li>
26
- <li>(Postie ignores the settings under Settings-&gt;Writing-&gt;Writing-by-Email)</li>
27
- </ul>
28
-
29
- <h4>Automating checking e-mail</h4>
30
-
31
- <p>WordPress cron (which Postie relies on) doesn't run unless a page is accessed on
32
- the site. So if you send an email, but nobody accesses the site for 3 days Postie
33
- won't be given the chance to fetch the email and publish the post.</p>
34
-
35
- <p>To ensure that Postie runs smoothly on a low or no volume site you need to ensure
36
- that a page gets hit (any page is fine). Use something like cron + curl on Linux
37
- or install curl on Windows and use the Scheduled Tasks control panel. If you are
38
- using a hosting company that doesn't allow you access to cron you can use a service
39
- like SetCronJob.</p>
40
-
41
- <p>By default, postie checks for new e-mail every 30 minutes. You can select from
42
- a number of different checking intervals in the settings page, under the
43
- Mailserver tab.</p>
44
-
45
- <h4>Forcing e-mail check</h4>
46
-
47
- <p>If you would prefer to have more fine-grained control of how postie checks
48
- for mail, you can also set up a crontab. This is for advanced users only.</p>
49
-
50
- <p>Setup a cronjob to pull down the get&#095;mail.php - note that every time you access
51
- get&#095;mail.php Postie will run - it is like clicking Run Postie on the Admin screen.</p>
52
-
53
- <h4>Linux</h4>
54
-
55
- <p>If your site runs on a UNIX/linux server, and you have shell access, you can
56
- enable mail checking using cron.</p>
57
-
58
- <p>Examples:</p>
59
-
60
- <p>*/5 * * * * /usr/bin/lynx --source <a href="http://blog.robfelty.com/wp-content/plugins/postie/get&#095;mail.php" rel="nofollow">http://blog.robfelty.com/wp-content/plugins/postie/get&#095;mail.php</a> &gt;/dev/null 2&gt;&amp;1</p>
61
-
62
- <p>This fetches the mail every five minutes with lynx</p>
63
-
64
- <p>*/10 * * * * /usr/bin/wget -O /dev/null <a href="http://blog.robfelty.com/wp-content/plugins/postie/get&#095;mail.php" rel="nofollow">http://blog.robfelty.com/wp-content/plugins/postie/get&#095;mail.php</a> &gt;/dev/null 2&gt;&amp;1</p>
65
-
66
- <p>This fetches the mail every ten minutes with wget</p>
67
-
68
- <h4>Windows</h4>
69
-
70
- <p>You will need to install <a href="http://gnuwin32.sourceforge.net/packages/wget.htm">wget</a> or <a href="http://curl.haxx.se/dlwiz/">curl</a>
71
- Then use the Task Scheduler control panel to call wget or cron.</p> <hr />
72
-
73
- <h3>Upgrade Notice</h3>
74
- <dl>
75
- <dt>1.5.3</dt>
76
- <dd>Postie can now set the first image in an email to be the &quot;Featured&quot; image. There is a new setting &quot;Use First Image as Featured Image&quot; which is off by default.
77
- Postie now supports Use Transport Layer Security (TLS)</dd>
78
- <dt>1.5.0</dt>
79
- <dd>New filter postie_filter_email. Used to map &quot;from&quot; to any other email. Allows custom user mapping.</dd>
80
- <dt>1.4.41</dt>
81
- <dd>Post format is now supported. You can specify any of the WordPress supported post formats using the Post type syntax.
82
- Post status can now be specified using the status: tag.
83
- Post status setting was renamed to Default Post Status and moved to the Message tab.</dd>
84
- <dt>1.4.18</dt>
85
- <dd>Many method names have been changed. Any custom filters may need to be updated.</dd>
86
- <dt>1.4.10</dt>
87
- <dd>All script, style and body tags are stripped from html emails.</dd>
88
- <dt>1.4.6</dt>
89
- <dd>Attachments are now processed in the order they were attached.</dd>
90
- </dl>
91
-
92
- <h3 id='Usage'>Usage</h3>
93
- <h4>Specifying Beginning and Ending of Post</h4>
94
-
95
- <ul>
96
- <li>If you put in :start - the message processing won't start until it sees that string.</li>
97
- <li>If you put in :end - the message processing will stop once it sees that string.</li>
98
- </ul>
99
-
100
- <h4>Post Status</h4>
101
-
102
- <ul>
103
- <li>Posts can have their status set to draft, publish, pending or private. This will override the Default Post Status set in the settings screen.
104
-
105
- <ul>
106
- <li>status: private</li>
107
- <li>status: draft</li>
108
- </ul></li>
109
- </ul>
110
-
111
- <h4>Post Date</h4>
112
-
113
- <ul>
114
- <li>Posts can have a specific publication date such as Apr 14, 2013. Relative dates like "tomorrow", "monday", "first day of next month" are also supported.
115
-
116
- <ul>
117
- <li>date: date</li>
118
- <li>date: date time</li>
119
- </ul></li>
120
- <li>Posts can be delayed by adding a line with delayXdXhXm where X is a number.
121
-
122
- <ul>
123
- <li>delay:1d - 1 day</li>
124
- <li>delay:1h - 1 hour</li>
125
- <li>delay:1m - 1 minute</li>
126
- <li>delay:1d2h4m - 1 day 2 hours 4m</li>
127
- </ul></li>
128
- </ul>
129
-
130
- <h4>Comment Control</h4>
131
-
132
- <ul>
133
- <li>By putting comments:X in your message you can control if comments are allowed
134
-
135
- <ul>
136
- <li>comments:0 - means closed</li>
137
- <li>comments:1 - means open</li>
138
- <li>comments:2 - means registered only</li>
139
- </ul></li>
140
- <li>Replying to an e-mail gets posted as a comment.
141
-
142
- <ul>
143
- <li>For example, you e-mailed a post with the subject line "foo".
144
- If you then send an e-mail with the subject line "Re: foo", it will
145
- get posted as a comment to the "foo" post. This works by the subject
146
- line, so if you have two posts with titles "foo", then the comment
147
- will get placed in the more recent post.</li>
148
- </ul></li>
149
- </ul>
150
-
151
- <h4>Post Excerpt</h4>
152
-
153
- <ul>
154
- <li>Custom excerpt
155
-
156
- <ul>
157
- <li>You can include a custom excerpt of an e-mail by putting it between
158
- :excerptstart and :excerptend</li>
159
- <li>You can include images in the excerpt by using the shortcode #eimg1#,
160
- #eimg2# etc.</li>
161
- </ul></li>
162
- </ul>
163
-
164
- <h4>Post type/format</h4>
165
-
166
- <p>You can specify the post type or format by including it as the first part of the subject.
167
- E.g. aside//real subject</p>
168
-
169
- <h4>Categories</h4>
170
-
171
- <ul>
172
- <li>If you put a category name in the subject with a : it will be used
173
- as the category for the post</li>
174
- <li>If you put a category id number in the subject with a : it will
175
- be used as the category for the post</li>
176
- <li><p>If you put the first part of a category name it will be posted in
177
- the first category that the system finds that matches - so if you put</p>
178
-
179
- <p>Gen: New News</p>
180
-
181
- <p>The system will post that in General. Note you must turn on the "Match short category"
182
- setting for this to work (on by default).</p></li>
183
- <li><p>All of the above also applies if you put the category in brackets []</p></li>
184
- <li><p>Using [] or you can post to multiple categories at once</p>
185
-
186
- <p>Subject: [1] [Mo] [Br] My Subject</p>
187
-
188
- <p>On my blog it would post to General (Id 1), Moblog, and Brewing all at one time</p></li>
189
- <li><p>Using - or you can post to multiple categories at once</p>
190
-
191
- <p>Subject: -1- -Mo- -Br- My Subject</p>
192
-
193
- <p>On my blog it would post to General (Id 1), Moblog, and Brewing all at one time</p></li>
194
- </ul>
195
-
196
- <h4>Tags</h4>
197
-
198
- <ul>
199
- <li>You can add tags by adding a line in the body of the message like so:
200
- tags: foo, bar</li>
201
- <li>You can also set a default tag to be applied if no tags are included.</li>
202
- </ul>
203
-
204
- <h4>Image Handling</h4>
205
-
206
- <p>Note you can only use this feature if your "Preferred Text Type" is set to "plain"</p>
207
-
208
- <ul>
209
- <li>Allows you to attach images to your email and automatically post
210
- them to your blog</li>
211
- <li>You can publish images in the text of your message by using #img1#
212
- #img2# - each one will be replaced with the HTML for the image
213
- you attached</li>
214
- <li><p>Captions - you can also add a caption like so:</p>
215
-
216
- <ul>
217
- <li>#img1 caption='foo'#</li>
218
- <li>#img2 caption='bar'#</li>
219
- </ul>
220
-
221
- <p>Or, if you use IPTC captions, this caption will be used (adding a caption
222
- in many photo editing programs (for example Picasa), will add an IPTC caption)</p>
223
-
224
- <p>Note that the images are processed in the order they are attached as of version
225
- 1.4.6.</p></li>
226
- <li><p>Image templates
227
- Postie now uses the default wordpress image template, but you can specify a
228
- different one if you wish.</p>
229
-
230
- <p>You can also specify a custom image template. I use the following custom
231
- template:</p>
232
-
233
- <p><code>&lt;div class='imageframe alignleft'&gt;&lt;a href='{IMAGE}'&gt;&lt;img src="{THUMBNAIL}"
234
- alt="{CAPTION}" title="{CAPTION}"
235
- class="attachment" /&gt;&lt;/a&gt;&lt;div
236
- class='imagecaption'&gt;{CAPTION}&lt;/div&gt;&lt;/div&gt;</code></p>
237
-
238
- <ul>
239
- <li>{CAPTION} gets replaced with the caption you specified (if any)</li>
240
- <li>{FILELINK} gets replaced with the url to the media</li>
241
- <li>{FILENAME} gets replaced with the name of the attachment from the email</li>
242
- <li>{FULL} same as {FILELINK}</li>
243
- <li>{HEIGHT} gets replaced with the height of the photo</li>
244
- <li>{ID} gets replaced with the post id</li>
245
- <li>{IMAGE} same as {FILELINK}</li>
246
- <li>{LARGEHEIGHT} gets replaced with the height of a large image</li>
247
- <li>{LARGEWIDTH} gets replaced with the width of a large image</li>
248
- <li>{LARGE} gets replaced with the url to the large-sized image</li>
249
- <li>{MEDIUMHEIGHT} gets replaced with the height of a medium image</li>
250
- <li>{MEDIUMWIDTH} gets replaced with the width of a medium image</li>
251
- <li>{MEDIUM} gets replaced with the url to the medium-sized image</li>
252
- <li>{PAGELINK} gets replaced with the URL of the file in WordPress</li>
253
- <li>{POSTTITLE} gets replaced with the post title (subject)</li>
254
- <li>{RELFILENAME} gets replaced with the relative path to the full-size image</li>
255
- <li>{THUMBHEIGHT} gets replaced with the height of a thumbnail image</li>
256
- <li>{THUMB} gets replaced with the url to the thumbnail image</li>
257
- <li>{THUMBNAIL} same as {THUMB}</li>
258
- <li>{THUMBWIDTH} gets replaced with the width of a thumbnail image</li>
259
- <li>{TITLE} same as {POSTTITLE}</li>
260
- <li>{URL} same as {FILELINK}</li>
261
- <li>{WIDTH} gets replaced with width of the photo</li>
262
- <li>{ICON} insert the icon for the attachment (for non-audio/image/video attachments only)</li>
263
- </ul></li>
264
- </ul>
265
-
266
- <h4>Interoperability</h4>
267
-
268
- <ul>
269
- <li>If your mail client doesn't support setting the subject (nokia) you
270
- can do so by putting #your subject/title here# at the beginning of your message</li>
271
- <li>POP3,POP3-SSL,IMAP,IMAP-SSL now supported - last three require
272
- php-imap support</li>
273
- <li>The program understands enough about mime to not duplicate post
274
- if you send an HTML and plain text message</li>
275
- <li>Automatically confirms that you are installed correctly</li>
276
- </ul>
277
- <hr />
278
-
1
+ <html>
2
+ <head><title>301 Moved Permanently</title></head>
3
+ <body bgcolor="white">
4
+ <center><h1>301 Moved Permanently</h1></center>
5
+ <hr><center>nginx</center>
6
+ </body>
7
+ </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://PostiePlugin.com/
6
  Tags: e-mail, email
7
  Requires at least: 3.0
8
  Tested up to: 3.5.1
9
- Stable tag: 1.5.9
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -445,6 +445,11 @@ All script, style and body tags are stripped from html emails.
445
  Attachments are now processed in the order they were attached.
446
 
447
  == CHANGELOG ==
 
 
 
 
 
448
  = 1.5.9 (2013.05.18) =
449
  * Fixed a bug where valid users can post via email even though they don't have role permissions.
450
  * Fixed a bug where nice_name was being used in the settings screen even though user_login was needed.
6
  Tags: e-mail, email
7
  Requires at least: 3.0
8
  Tested up to: 3.5.1
9
+ Stable tag: 1.5.10
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
445
  Attachments are now processed in the order they were attached.
446
 
447
  == CHANGELOG ==
448
+ = 1.5.10 (2013.05.31) =
449
+ * Added template field descriptions to image tab.
450
+ * Fixed a bug where caption placeholder in templates wasn't being properly set.
451
+ * Additional test to see if wp-config.php can be found.
452
+
453
  = 1.5.9 (2013.05.18) =
454
  * Fixed a bug where valid users can post via email even though they don't have role permissions.
455
  * Fixed a bug where nice_name was being used in the settings screen even though user_login was needed.
test/inlineimageTest.php CHANGED
@@ -76,7 +76,7 @@ class postiefunctions2Test extends PHPUnit_Framework_TestCase {
76
  $config['prefer_text_type'] = 'html';
77
 
78
  $post = $this->process_file("data/ics-attachment.var", $config);
79
- $this->assertEquals("<div dir='ltr'>sample text<div><br></div></div> <a href='http://example.net/wp-content/uploads/filename'><img src='localhost/postie/icons/silver/default-32.png' alt='default icon' />sample.ics</a> ", $post['post_content']);
80
  }
81
 
82
  function testTagsImg() {
@@ -152,79 +152,83 @@ class postiefunctions2Test extends PHPUnit_Framework_TestCase {
152
 
153
  $attachements = array("image.jpg" => '<img title="{CAPTION}" />');
154
 
155
- filter_ReplaceImagePlaceHolders($c, array(), $config);
156
  $this->assertEquals("", $c);
157
 
158
- filter_ReplaceImagePlaceHolders($c, $attachements, $config);
159
  $this->assertEquals('<img title="" />', $c);
160
 
161
  $c = "#img1#";
162
- filter_ReplaceImagePlaceHolders($c, $attachements, $config);
163
  $this->assertEquals('<img title="" />', $c);
164
 
165
  $c = "test #img1# test";
166
- filter_ReplaceImagePlaceHolders($c, $attachements, $config);
167
  $this->assertEquals('test <img title="" /> test', $c);
168
 
169
  $c = "test #img1 caption='1'# test";
170
- filter_ReplaceImagePlaceHolders($c, $attachements, $config);
171
  $this->assertEquals('test <img title="1" /> test', $c);
172
 
173
  $c = "test #img1 caption=# test";
174
- filter_ReplaceImagePlaceHolders($c, $attachements, $config);
175
  $this->assertEquals('test <img title="" /> test', $c);
176
 
177
  $c = "test #img1 caption=1# test";
178
- filter_ReplaceImagePlaceHolders($c, $attachements, $config);
179
  $this->assertEquals('test <img title="1" /> test', $c);
180
 
181
  $c = "test #img1 caption='! @ % ^ & * ( ) ~ \"Test\"'# test";
182
- filter_ReplaceImagePlaceHolders($c, $attachements, $config);
183
  $this->assertEquals('test <img title="! @ % ^ &amp; * ( ) ~ &quot;Test&quot;" /> test', $c);
184
 
185
  $c = "test <div>#img1 caption=&#39;! @ % ^ &amp; * ( ) ~ &quot;Test&quot;&#39;#</div> test";
186
- filter_ReplaceImagePlaceHolders($c, $attachements, $config);
187
  $this->assertEquals('test <div><img title="&amp;" />39;! @ % ^ &amp; * ( ) ~ &quot;Test&quot;&#39;#</div> test', $c);
188
 
189
  $c = "test #img1 caption=\"I'd like some cheese.\"# test";
190
- filter_ReplaceImagePlaceHolders($c, $attachements, $config);
191
  $this->assertEquals('test <img title="I&#039;d like some cheese." /> test', $c);
192
 
193
  $c = "test #img1 caption=\"Eiskernbrecher mögens laut\"# test";
194
- filter_ReplaceImagePlaceHolders($c, $attachements, $config);
195
  $this->assertEquals('test <img title="Eiskernbrecher mögens laut" /> test', $c);
196
 
197
  $c = "test #img1 caption='[image-caption]'# test";
198
- filter_ReplaceImagePlaceHolders($c, $attachements, $config);
199
  $this->assertEquals('test <img title="[image-caption]" /> test', $c);
200
 
201
  $c = "test #img1 caption='1'# test #img2 caption='2'#";
202
- filter_ReplaceImagePlaceHolders($c, $attachements, $config);
203
  $this->assertEquals('test <img title="1" /> test #img2 caption=\'2\'#', $c);
204
 
205
  $attachements = array("image1.jpg" => 'template with {CAPTION}', "image2.jpg" => 'template with {CAPTION}');
206
  $c = "test #img1 caption='1'# test #img2 caption='2'#";
207
- filter_ReplaceImagePlaceHolders($c, $attachements, $config);
208
  $this->assertEquals("test template with 1 test template with 2", $c);
209
 
210
  $config['auto_gallery'] = true;
211
  $config['images_append'] = false;
 
 
 
212
  $c = "test";
213
- filter_ReplaceImagePlaceHolders($c, $attachements, $config);
214
  $this->assertEquals("[gallery]\ntest", $c);
215
 
216
  $config['images_append'] = true;
217
  $c = "test";
218
- filter_ReplaceImagePlaceHolders($c, $attachements, $config);
219
  $this->assertEquals("test\n[gallery]", $c);
220
 
221
  $config['images_append'] = true;
222
  $c = "test";
223
- filter_ReplaceImagePlaceHolders($c, $attachements, $config);
224
  $this->assertEquals("test\n[gallery]", $c);
225
 
 
226
  $c = "test";
227
- filter_ReplaceImagePlaceHolders($c, array(), $config);
228
  $this->assertEquals("test", $c);
229
  }
230
  }
76
  $config['prefer_text_type'] = 'html';
77
 
78
  $post = $this->process_file("data/ics-attachment.var", $config);
79
+ $this->assertEquals("<div dir='ltr'>sample text<div><br></div></div> <a href='http://example.net/wp-content/uploads/filename'><img src='localhost/postie/icons/silver/default-32.png' alt='default icon' />sample.ics</a>", trim($post['post_content']));
80
  }
81
 
82
  function testTagsImg() {
152
 
153
  $attachements = array("image.jpg" => '<img title="{CAPTION}" />');
154
 
155
+ filter_ReplaceImagePlaceHolders($c, array(), $config, 1);
156
  $this->assertEquals("", $c);
157
 
158
+ filter_ReplaceImagePlaceHolders($c, $attachements, $config, 1);
159
  $this->assertEquals('<img title="" />', $c);
160
 
161
  $c = "#img1#";
162
+ filter_ReplaceImagePlaceHolders($c, $attachements, $config, 1);
163
  $this->assertEquals('<img title="" />', $c);
164
 
165
  $c = "test #img1# test";
166
+ filter_ReplaceImagePlaceHolders($c, $attachements, $config, 1);
167
  $this->assertEquals('test <img title="" /> test', $c);
168
 
169
  $c = "test #img1 caption='1'# test";
170
+ filter_ReplaceImagePlaceHolders($c, $attachements, $config, 1);
171
  $this->assertEquals('test <img title="1" /> test', $c);
172
 
173
  $c = "test #img1 caption=# test";
174
+ filter_ReplaceImagePlaceHolders($c, $attachements, $config, 1);
175
  $this->assertEquals('test <img title="" /> test', $c);
176
 
177
  $c = "test #img1 caption=1# test";
178
+ filter_ReplaceImagePlaceHolders($c, $attachements, $config, 1);
179
  $this->assertEquals('test <img title="1" /> test', $c);
180
 
181
  $c = "test #img1 caption='! @ % ^ & * ( ) ~ \"Test\"'# test";
182
+ filter_ReplaceImagePlaceHolders($c, $attachements, $config, 1);
183
  $this->assertEquals('test <img title="! @ % ^ &amp; * ( ) ~ &quot;Test&quot;" /> test', $c);
184
 
185
  $c = "test <div>#img1 caption=&#39;! @ % ^ &amp; * ( ) ~ &quot;Test&quot;&#39;#</div> test";
186
+ filter_ReplaceImagePlaceHolders($c, $attachements, $config, 1);
187
  $this->assertEquals('test <div><img title="&amp;" />39;! @ % ^ &amp; * ( ) ~ &quot;Test&quot;&#39;#</div> test', $c);
188
 
189
  $c = "test #img1 caption=\"I'd like some cheese.\"# test";
190
+ filter_ReplaceImagePlaceHolders($c, $attachements, $config, 1);
191
  $this->assertEquals('test <img title="I&#039;d like some cheese." /> test', $c);
192
 
193
  $c = "test #img1 caption=\"Eiskernbrecher mögens laut\"# test";
194
+ filter_ReplaceImagePlaceHolders($c, $attachements, $config, 1);
195
  $this->assertEquals('test <img title="Eiskernbrecher mögens laut" /> test', $c);
196
 
197
  $c = "test #img1 caption='[image-caption]'# test";
198
+ filter_ReplaceImagePlaceHolders($c, $attachements, $config, 1);
199
  $this->assertEquals('test <img title="[image-caption]" /> test', $c);
200
 
201
  $c = "test #img1 caption='1'# test #img2 caption='2'#";
202
+ filter_ReplaceImagePlaceHolders($c, $attachements, $config, 1);
203
  $this->assertEquals('test <img title="1" /> test #img2 caption=\'2\'#', $c);
204
 
205
  $attachements = array("image1.jpg" => 'template with {CAPTION}', "image2.jpg" => 'template with {CAPTION}');
206
  $c = "test #img1 caption='1'# test #img2 caption='2'#";
207
+ filter_ReplaceImagePlaceHolders($c, $attachements, $config, 1);
208
  $this->assertEquals("test template with 1 test template with 2", $c);
209
 
210
  $config['auto_gallery'] = true;
211
  $config['images_append'] = false;
212
+ global $g_get_posts;
213
+ $g_get_posts = array(1);
214
+
215
  $c = "test";
216
+ filter_ReplaceImagePlaceHolders($c, $attachements, $config, 1);
217
  $this->assertEquals("[gallery]\ntest", $c);
218
 
219
  $config['images_append'] = true;
220
  $c = "test";
221
+ filter_ReplaceImagePlaceHolders($c, $attachements, $config, 1);
222
  $this->assertEquals("test\n[gallery]", $c);
223
 
224
  $config['images_append'] = true;
225
  $c = "test";
226
+ filter_ReplaceImagePlaceHolders($c, $attachements, $config, 1);
227
  $this->assertEquals("test\n[gallery]", $c);
228
 
229
+ $g_get_posts = array();
230
  $c = "test";
231
+ filter_ReplaceImagePlaceHolders($c, array(), $config, 1);
232
  $this->assertEquals("test", $c);
233
  }
234
  }
test/postie-functionsTest.php CHANGED
@@ -381,10 +381,6 @@ class postiefunctionsTest extends PHPUnit_Framework_TestCase {
381
  $this->assertEquals("<strong>test</strong>", filter_CleanHtml("<strong>test</strong>"));
382
  }
383
 
384
- public function testSafeFileName() {
385
- $this->assertEquals("testtest", SafeFileName('test\/:*?"<>|test'));
386
- }
387
-
388
  public function test_Remove_signature() {
389
  $config = config_GetDefaults();
390
 
@@ -518,6 +514,29 @@ class postiefunctionsTest extends PHPUnit_Framework_TestCase {
518
  $this->assertEquals("<div><font face=Calibri></font></div>", $c);
519
  }
520
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
521
  public function test_filter_linkify() {
522
  $this->assertEquals("", filter_linkify(""));
523
  $this->assertEquals("test", filter_linkify("test"));
381
  $this->assertEquals("<strong>test</strong>", filter_CleanHtml("<strong>test</strong>"));
382
  }
383
 
 
 
 
 
384
  public function test_Remove_signature() {
385
  $config = config_GetDefaults();
386
 
514
  $this->assertEquals("<div><font face=Calibri></font></div>", $c);
515
  }
516
 
517
+ public function test_filter_ReplaceImagePlaceHolders() {
518
+ global $g_get_posts;
519
+
520
+ $config = config_GetDefaults();
521
+
522
+ $g_get_posts = array();
523
+ $c = "";
524
+ $a = array();
525
+ filter_ReplaceImagePlaceHolders($c, $a, $config, 1);
526
+ $this->assertEquals("", $c);
527
+
528
+ $g_get_posts = array(1);
529
+ $c = "#img1#";
530
+ $a = array("template with {CAPTION}");
531
+ filter_ReplaceImagePlaceHolders($c, $a, $config, 1);
532
+ $this->assertEquals("template with ", $c);
533
+
534
+ $c = "#img1 caption='CAPTION'#";
535
+ $a = array("template with {CAPTION}");
536
+ filter_ReplaceImagePlaceHolders($c, $a, $config, 1);
537
+ $this->assertEquals("template with CAPTION", $c);
538
+ }
539
+
540
  public function test_filter_linkify() {
541
  $this->assertEquals("", filter_linkify(""));
542
  $this->assertEquals("test", filter_linkify("test"));
test/wpstub.php CHANGED
@@ -62,8 +62,7 @@ function __($t) {
62
  return $t;
63
  }
64
 
65
- function endsWith($haystack, $needle)
66
- {
67
  return substr($haystack, -strlen($needle)) == $needle;
68
  }
69
 
@@ -71,9 +70,9 @@ function wp_check_filetype($filename) {
71
  if (empty($filename))
72
  return null;
73
  if (endsWith($filename, ".png"))
74
- return array('ext' => 'png', 'type' => 'image/png');
75
  if (endsWith($filename, ".ics"))
76
- return array('ext' => 'ics', 'type' => 'text/calendar');
77
  return array('ext' => 'xxx', 'type' => 'xxx/xxx');
78
  }
79
 
@@ -172,7 +171,23 @@ function get_post_format_slugs() {
172
  return array('standard' => 'standard', 'video' => 'video', 'image' => 'image', 'aside' => 'aside');
173
  }
174
 
175
- function has_post_thumbnail(){
176
  return false;
177
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  ?>
62
  return $t;
63
  }
64
 
65
+ function endsWith($haystack, $needle) {
 
66
  return substr($haystack, -strlen($needle)) == $needle;
67
  }
68
 
70
  if (empty($filename))
71
  return null;
72
  if (endsWith($filename, ".png"))
73
+ return array('ext' => 'png', 'type' => 'image/png');
74
  if (endsWith($filename, ".ics"))
75
+ return array('ext' => 'ics', 'type' => 'text/calendar');
76
  return array('ext' => 'xxx', 'type' => 'xxx/xxx');
77
  }
78
 
171
  return array('standard' => 'standard', 'video' => 'video', 'image' => 'image', 'aside' => 'aside');
172
  }
173
 
174
+ function has_post_thumbnail() {
175
  return false;
176
  }
177
+
178
+ function sanitize_file_name($name) {
179
+ return $name;
180
+ }
181
+
182
+ $g_get_posts = array();
183
+
184
+ function get_posts() {
185
+ global $g_get_posts;
186
+ return $g_get_posts;
187
+ }
188
+
189
+ function SafeFileName() {
190
+
191
+ }
192
+
193
  ?>