Postie - Version 1.2.1

Version Description

Download this release

Release Info

Developer robfelty
Plugin Icon 128x128 Postie
Version 1.2.1
Comparing to
See all releases

Code changes from version 1.2 to 1.2.1

config_form.php CHANGED
@@ -3,16 +3,16 @@
3
  require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'postie-functions.php');
4
  global $wpdb,$wp_roles;
5
 
6
- if (!TestWPVersion()) {
7
- print("<h1>Warning!</h1>
8
- <p>Postie only works on on Word Press version 2.0 and above</p>");
9
- exit();
10
- }
11
  $title = __('Postie Options', 'postie');
12
  $parent_file = 'options-general.php';
13
  $config = GetConfig();
14
- $messages[1] = "Configuration successfully updated!";
15
- $messages[2] = "Error - unable to save configuration";
16
 
17
  ?>
18
  <style type='text/css'>
@@ -48,6 +48,23 @@ fieldset {border: 1px solid black;}
48
  </form>
49
  <form name="postie-options" method="post" action="<?php echo get_option('siteurl') . "/wp-content/plugins/postie/config_handler.php"?>">
50
  <input type="hidden" name="action" value="config" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  <table width="100%" cellspacing="2" cellpadding="5" class="editform">
52
 
53
 
@@ -275,6 +292,9 @@ fieldset {border: 1px solid black;}
275
  <br />
276
  </td>
277
  </tr>
 
 
 
278
  <?php echo BuildBooleanSelect("Replace newline characters with
279
  html line breaks (&lt;br
280
  /&gt;)","CONVERTNEWLINE",$config["CONVERTNEWLINE"]);?>
@@ -293,7 +313,11 @@ fieldset {border: 1px solid black;}
293
  </tr>
294
  <?php echo BuildBooleanSelect("Decode Quoted Printable Data","MESSAGE_DEQUOTE",$config["MESSAGE_DEQUOTE"], "Should be yes in most cases.");?>
295
  <?php echo BuildTextArea("Supported File Types","SUPPORTED_FILE_TYPES",$config["SUPPORTED_FILE_TYPES"],"Put each type on a single line.");?>
296
- <?php echo BuildTextArea("Banned File Names","BANNED_FILES_LIST",$config["BANNED_FILES_LIST"],"Put each file name on a single line.Files matching this list will never be posted to your blog.");?>
 
 
 
 
297
  <tr>
298
  <th width="33%" valign="top" scope="row"><?php _e('Tag Of Message Start:', 'postie') ?> </th>
299
  <td>
@@ -520,6 +544,8 @@ Recommended:
520
  </p>
521
  </form>
522
 
523
- <a href="http://validator.w3.org/check?uri=referer"><img src="images/valid-xhtml11.png" alt="Valid XHTML 1.0!" style="height:20px; width:65px; border:0;" /></a>
524
- <a href="http://jigsaw.w3.org/css-validator/check/referer"><img style="border:0;width:65px;height:20px;" src="images/vcss.gif" alt="Valid CSS!" /></a><br />
 
 
525
  </div>
3
  require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'postie-functions.php');
4
  global $wpdb,$wp_roles;
5
 
6
+ // if (!TestWPVersion()) {
7
+ // print("<h1>Warning!</h1>
8
+ // <p>Postie only works on on Word Press version 2.0 and above</p>");
9
+ // exit();
10
+ // }
11
  $title = __('Postie Options', 'postie');
12
  $parent_file = 'options-general.php';
13
  $config = GetConfig();
14
+ $messages[1] = __("Configuration successfully updated!",'postie');
15
+ $messages[2] = __("Error - unable to save configuration",'postie');
16
 
17
  ?>
18
  <style type='text/css'>
48
  </form>
49
  <form name="postie-options" method="post" action="<?php echo get_option('siteurl') . "/wp-content/plugins/postie/config_handler.php"?>">
50
  <input type="hidden" name="action" value="config" />
51
+ <?php if (isset($config['CRONLESS']) && $config['CRONLESS']!='') {
52
+ ?>
53
+ <fieldset class="options">
54
+ <legend><?php _e('Cronless postie settings', 'postie');?></legend>
55
+ <p><?php _e('Cronless postie should check for mail', 'postie') ?>
56
+ <select name='CRONLESS' id='CRONLESS'>
57
+ <option value="weekly" <?php if($config["CRONLESS"] == "weekly") { echo "selected='selected'";} ?>><?php _e('Once weekly', 'postie') ?></option>
58
+ <option value="daily"<?php if($config["CRONLESS"] == "daily") { echo "selected='selected'";} ?>><?php _e('daily', 'postie') ?></option>
59
+ <option value="hourly" <?php if($config["CRONLESS"] == "hourly") { echo "selected='selected'";} ?>><?php _e('hourly', 'postie') ?></option>
60
+ <option value="twiceperhour" <?php if($config["CRONLESS"] == "twiceperhour") { echo "selected='selected'";} ?>><?php _e('twice per hour', 'postie') ?></option>
61
+ <option value="tenminutes" <?php if($config["CRONLESS"] == "tenminutes") { echo "selected='selected'";} ?>><?php _e('every ten minutes', 'postie') ?></option>
62
+ </select>
63
+ </fieldset>
64
+ </p>
65
+ <?php
66
+ }
67
+ ?>
68
  <table width="100%" cellspacing="2" cellpadding="5" class="editform">
69
 
70
 
292
  <br />
293
  </td>
294
  </tr>
295
+ <?php echo BuildBooleanSelect("Filter
296
+ newlines","FILTERNEWLINES",$config["FILTERNEWLINES"], "Set to no
297
+ if using markdown or textitle syntax");?>
298
  <?php echo BuildBooleanSelect("Replace newline characters with
299
  html line breaks (&lt;br
300
  /&gt;)","CONVERTNEWLINE",$config["CONVERTNEWLINE"]);?>
313
  </tr>
314
  <?php echo BuildBooleanSelect("Decode Quoted Printable Data","MESSAGE_DEQUOTE",$config["MESSAGE_DEQUOTE"], "Should be yes in most cases.");?>
315
  <?php echo BuildTextArea("Supported File Types","SUPPORTED_FILE_TYPES",$config["SUPPORTED_FILE_TYPES"],"Put each type on a single line.");?>
316
+ <?php echo BuildTextArea("Banned File
317
+ Names","BANNED_FILES_LIST",$config["BANNED_FILES_LIST"],"Put each
318
+ file name on a single line.Files matching this list will never be
319
+ posted to your blog. You can use wildcards such as *.xls, or *.* for
320
+ all files");?>
321
  <tr>
322
  <th width="33%" valign="top" scope="row"><?php _e('Tag Of Message Start:', 'postie') ?> </th>
323
  <td>
544
  </p>
545
  </form>
546
 
547
+ <a href="http://validator.w3.org/check?uri=referer">valid xhtml</a>
548
+ <a href="http://jigsaw.w3.org/css-validator/check/referer">valid css</a><br />
549
+ Postie Version:
550
+ $Id: config_form.php 116012 2009-05-06 21:22:27Z robfelty $
551
  </div>
cronless_postie.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
  /*
3
  Plugin Name: Cronless Postie
4
- Plugin URI: http://www.economysizegeek.com/?page_id=395
5
- Description: This plugin allows you to setup your rss feeds to trigger postie (See <a href="../wp-content/plugins/postie/cronless_postie.php?cronless_postie_read_me=1">Quick Readme</a>)
6
- Author: Dirk Elmendorf
7
- Version: 1.2
8
- Author URI: http://www.economysizegeek.com/
9
  */
10
 
11
  include_once (dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR. "wp-config.php");
@@ -32,9 +32,6 @@ function check_postie() {
32
  #var_dump($page);
33
  fclose($fp);
34
  }
35
- function cronless_read_me() {
36
- include_once("cronless_read_me.php");
37
- }
38
  if (isset($_GET["cronless_postie_read_me"])) {
39
  include_once(ABSPATH . "wp-admin/admin.php");
40
  $title = __("Edit Plugins");
@@ -46,16 +43,20 @@ if (isset($_GET["cronless_postie_read_me"])) {
46
  }
47
 
48
 
49
- //add_action('init','postie_cron');
50
- register_activation_hook(__FILE__,'postie_cron');
51
- add_action('check_postie_hook', 'check_postie');
52
  function postie_cron() {
53
  $config=GetConfig();
 
 
 
 
54
  wp_schedule_event(time(),$config['CRONLESS'],'check_postie_hook');
55
  }
56
- register_deactivation_hook(__FILE__,'postie_decron');
57
  function postie_decron() {
58
  wp_clear_scheduled_hook('check_postie_hook');
 
 
 
 
59
  }
60
 
61
  /* here we add some more options for how often to check for e-mail */
@@ -67,4 +68,8 @@ function more_reccurences() {
67
  );
68
  }
69
  add_filter('cron_schedules', 'more_reccurences');
 
 
 
 
70
  ?>
1
  <?php
2
  /*
3
  Plugin Name: Cronless Postie
4
+ Plugin URI: http://blog.robfelty.com/plugins/postie
5
+ Description: Checks e-mail periodically using wordpress's built-in scheduling mechanism
6
+ Author: Robert Felty
7
+ Version: 1.2.1
8
+ Author URI: http://blog.robfelty.com
9
  */
10
 
11
  include_once (dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR. "wp-config.php");
32
  #var_dump($page);
33
  fclose($fp);
34
  }
 
 
 
35
  if (isset($_GET["cronless_postie_read_me"])) {
36
  include_once(ABSPATH . "wp-admin/admin.php");
37
  $title = __("Edit Plugins");
43
  }
44
 
45
 
 
 
 
46
  function postie_cron() {
47
  $config=GetConfig();
48
+ if (!$config['CRONLESS'] || $config['CRONLESS']=='') {
49
+ $config['CRONLESS']='hourly';
50
+ WriteConfig($config);
51
+ }
52
  wp_schedule_event(time(),$config['CRONLESS'],'check_postie_hook');
53
  }
 
54
  function postie_decron() {
55
  wp_clear_scheduled_hook('check_postie_hook');
56
+ //TODO: make sure that clearing the cronless option works right
57
+ // $config=GetConfig();
58
+ // $config['CRONLESS']='';
59
+ //WriteConfig($config);
60
  }
61
 
62
  /* here we add some more options for how often to check for e-mail */
68
  );
69
  }
70
  add_filter('cron_schedules', 'more_reccurences');
71
+ register_activation_hook(__FILE__,'postie_cron');
72
+ register_deactivation_hook(__FILE__,'postie_decron');
73
+ add_action('check_postie_hook', 'check_postie');
74
+ //add_action('init','postie_cron');
75
  ?>
get_mail.php CHANGED
@@ -6,10 +6,10 @@ include_once (dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR
6
  require_once (dirname(__FILE__). DIRECTORY_SEPARATOR . 'mimedecode.php');
7
  require_once (dirname(__FILE__). DIRECTORY_SEPARATOR . 'postie-functions.php');
8
 
9
- if (!TestWPVersion()) {
10
- print("<p>Postie Only Works For Word Press 2.0 and above.</p>");
11
- exit();
12
- }
13
 
14
  /* END OF USER VARIABLES */
15
  //some variables
6
  require_once (dirname(__FILE__). DIRECTORY_SEPARATOR . 'mimedecode.php');
7
  require_once (dirname(__FILE__). DIRECTORY_SEPARATOR . 'postie-functions.php');
8
 
9
+ //if (!TestWPVersion()) {
10
+ //print("<p>Postie Only Works For Word Press 2.0 and above.</p>");
11
+ //exit();
12
+ //}
13
 
14
  /* END OF USER VARIABLES */
15
  //some variables
languages/postie-nl_NL.mo ADDED
Binary file
languages/postie-nl_NL.po ADDED
@@ -0,0 +1,356 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Postie\n"
4
+ "POT-Creation-Date: \n"
5
+ "PO-Revision-Date: \n"
6
+ "Last-Translator: Gideon van Melle <gvmelle@gmail.com>\n"
7
+ "Language-Team: EconomysizeGeek <headgeek@economysizegeek.com>\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=utf-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "X-Poedit-Language: Dutch\n"
12
+ "X-Poedit-Country: NETHERLANDS\n"
13
+ "X-Poedit-SourceCharset: utf-8\n"
14
+ "X-Poedit-KeywordsList: __\n"
15
+
16
+ #: config_form.php:18
17
+ msgid "Postie Options"
18
+ msgstr "Postie Opties"
19
+
20
+ #: config_form.php:18
21
+ msgid "Reset Configs To Default"
22
+ msgstr "Herstel de standaard configuratie"
23
+
24
+ #: config_form.php:2
25
+ msgid "If you would like to start over - you can click the button on the right to reset all configurations to the default."
26
+ msgstr "Wanneer u opneuw wilt beginnen, kunt u klikken op de knop aan de rechterkant om de configuratie naar de standaard instellingen terug te zetten."
27
+
28
+ #: config_form.php:30
29
+ msgid "To run the check mail script manually"
30
+ msgstr "Om het check mail script handmatig uit te voeren"
31
+
32
+ #: config_form.php:32
33
+ msgid "Run Postie"
34
+ msgstr "Postie uitvoeren"
35
+
36
+ #: config_form.php:39
37
+ msgid "If you have problems with Postie this will run a special script to test your configuraiton options"
38
+ msgstr "Wanneer u problemen hebt met Postie voert dit een speciaal script uit om uw configuratie instellingen te testen"
39
+
40
+ #: config_form.php:41
41
+ msgid "Test Config"
42
+ msgstr "Test Config"
43
+
44
+ msgid "Recommended"
45
+ msgstr "Aaanbevolen"
46
+
47
+ msgid "Yes"
48
+ msgstr "Ja"
49
+
50
+ msgid "No"
51
+ msgstr "Nee"
52
+
53
+ #: config_form.php
54
+ msgid "Authorization Settings"
55
+ msgstr "Autorisatie Instellingen"
56
+
57
+ #: config_form.php
58
+ msgid "Allow Anyone To Post Via Email"
59
+ msgstr "Sta iedereen toe via e-mail te posten"
60
+
61
+ #: config_form.php
62
+ msgid "Changing this to yes is NOT RECOMMEDED - anything that gets sent in will automatically be posted. This could make it easier to compromise your server - YOU HAVE BEEN WARNED."
63
+ msgstr "Dit naar Ja veranderen wordt NIET AANBEVOLEN - alles wat wordt verzonden zal automatisch worden gepost. Dit kan het compromiteren van uw server eenvoudiger maken - U BENT GEWAARSCHUWD!"
64
+
65
+ #: config_form.php
66
+ msgid "Minimum Access Level Required To Post:"
67
+ msgstr "Minimaal Toegangssniveau Vereist Voor Posten:"
68
+
69
+ #: config_form.php
70
+ msgid "This allows you to grant access to other users to post if they have the proper access level"
71
+ msgstr "Hierme kunt u andere gebruikers het recht verlenen te posten wanneer ze het juiste toegangsniveau hebben"
72
+
73
+ #: config_form.php
74
+ msgid "Authorized Addresses"
75
+ msgstr "Geautoriseerde adressen"
76
+
77
+ #: config_form.php
78
+ msgid "Put each email address on a single line. Posts from emails in this list will be treated as if they came from the admin. If you would prefer to have users post under their own name - create a WordPress user with the correct access level."
79
+ msgstr "Zet elk e-mail adres op een aparte regel. Postings van e-mails uit deze lijst zullen worden beschouwd aslof ze weren versutrrd door de beheerder. Als u liever hebt dat gebruikers onder hun eigen naam posten, kunt u een WordPress gebruiker aanmaken met het correcte toegangsniveau."
80
+
81
+ #: config_form.php
82
+ msgid "Directory Settings"
83
+ msgstr "Map instellingen"
84
+
85
+ #: config_form.php
86
+ msgid "Directory For Photos:"
87
+ msgstr "Map voor Afbeeldingen:"
88
+
89
+ #: config_form.php
90
+ msgid "Directory For Files:"
91
+ msgstr "Map voor Documenten:"
92
+
93
+ #: config_form.php
94
+ msgid "Message Settings"
95
+ msgstr "Bericht Instellingen"
96
+
97
+ #: config_form.php
98
+ msgid "Default post by mail category:"
99
+ msgstr "Standaard post via e-mail categorie:"
100
+
101
+ #: config_form.php
102
+ msgid "Default Title:"
103
+ msgstr "Standaard Titel:"
104
+
105
+ #: config_form.php
106
+ msgid "Live from the field"
107
+ msgstr "Vers van de Pers"
108
+
109
+ #: config_form.php
110
+ msgid "Prefered Text Type (HTML/plain):"
111
+ msgstr "Voorkeur tekstsoort (HTML/plat): "
112
+
113
+ #: config_form.php
114
+ msgid "plain"
115
+ msgstr "platte tekst"
116
+
117
+ #: config_form.php
118
+ msgid "html"
119
+ msgstr "html"
120
+
121
+ #: config_form.php
122
+ msgid "Forward Rejected Mail"
123
+ msgstr "Doorsturen verworpen e-mail"
124
+
125
+ #: config_form.php
126
+ msgid "Allow Subject In Mail"
127
+ msgstr "Toestaan Onderwerp in E-mail"
128
+
129
+ #: config_form.php
130
+ msgid "Allow HTML In Mail Subject"
131
+ msgstr "Toestaan HTML in onderwerpregel E-mail"
132
+
133
+ #: config_form.php
134
+ msgid "Allow HTML In Mail Body"
135
+ msgstr "Toestaan HTML in Hoofdtekst E-mail"
136
+
137
+ #: config_form.php
138
+ msgid "Encoding for pages and feeds:"
139
+ msgstr "Encoding voor pagina's en feeds:"
140
+
141
+ #: config_form.php
142
+ msgid "UTF-8"
143
+ msgstr "UTF-8"
144
+
145
+ #: config_form.php
146
+ msgid "it should handle ISO-8859-1 as well"
147
+ msgstr "Het moet ook ISO-8859-1 aankunnen"
148
+
149
+ #: config_form.php
150
+ msgid "Decode Quoted Printable Data"
151
+ msgstr "Decoderen Quoted Printable Data"
152
+
153
+ #: config_form.php
154
+ msgid "Should be yes in most cases."
155
+ msgstr "Moet JA zijn in de meeste gevallen."
156
+
157
+ #: config_form.php
158
+ msgid "Supported File Types"
159
+ msgstr "Ondersteunde bestandstypen"
160
+
161
+ #: config_form.php
162
+ msgid "Put each type on a single line."
163
+ msgstr "Zet elke type op een aparte regel."
164
+
165
+ #: config_form.php
166
+ msgid "Banned File Names"
167
+ msgstr "Verboden Bestandsnamen"
168
+
169
+ #: config_form.php
170
+ msgid "Put each file name on a single line.Files matching this list will never be posted to your blog."
171
+ msgstr "Zet elke bestandsnaam op een aparte regel. Bestanden die in de lijst staan zullen nooit naar uw blog worden verzonden."
172
+
173
+ #: config_form.php
174
+ msgid "Drop The Signature From Mail"
175
+ msgstr "Weglaten van de E-mail handtekening"
176
+
177
+ #: config_form.php
178
+ msgid "Signature Patterns"
179
+ msgstr "Handtekening herkenningselementen"
180
+
181
+ #: config_form.php
182
+ msgid "Put each pattern on a seperate line and make sure to escape any special characters."
183
+ msgstr "Zet elk herkenningselement op een aparte regel en escape elk speciaal letterteken."
184
+
185
+ #: config_form.php
186
+ msgid "Image Settings"
187
+ msgstr "Afbeelding Instellingen"
188
+
189
+ #: config_form.php
190
+ msgid "No GD Support"
191
+ msgstr "Geen GD Ondersteuning"
192
+
193
+ #: config_form.php
194
+ msgid "Currently your installation of PHP does not have GD installed so no image resizing can occur."
195
+ msgstr "Uw huidige installatie van PHP heeft geen GD geïnstalleerd. Afbeeldingen kunnen niet worden verkleind."
196
+
197
+ #: config_form.php
198
+ msgid "Post Images At End"
199
+ msgstr "Zet afbeeldingen aan het einde van de tekst"
200
+
201
+ #: config_form.php
202
+ msgid "No means they will be put before the text of the message."
203
+ msgstr "Nee betekent dat ze aan het begin van het bericht worden geplaatst."
204
+
205
+ #: config_form.php
206
+ msgid "Resize Large Images"
207
+ msgstr "Verklein grote afbeeldingen"
208
+
209
+ #: config_form.php
210
+ msgid "Maximum Image Width:"
211
+ msgstr "Maximale afbeeldings breedte (width):"
212
+
213
+ #: config_form.php
214
+ msgid "pixels"
215
+ msgstr "pixels"
216
+
217
+ #: config_form.php
218
+ msgid "JPEG Compression:"
219
+ msgstr "JPEG Compressie:"
220
+
221
+ #: config_form.php
222
+ msgid "%"
223
+ msgstr "%"
224
+
225
+ #: config_form.php
226
+ msgid "Use ImageMagick"
227
+ msgstr "Gebruik ImageMagick"
228
+
229
+ #: config_form.php
230
+ msgid "convert binary location:"
231
+ msgstr "convert binary locatie:"
232
+
233
+ #: config_form.php
234
+ msgid "only needed if you are using ImageMagick"
235
+ msgstr "allee nodig als u ImageMagick gebruikt"
236
+
237
+ #: config_form.php
238
+ msgid "should be /usr/bin/convert"
239
+ msgstr "moet /usr/bin/convert zijn"
240
+
241
+ #: config_form.php
242
+ msgid "identify binary location:"
243
+ msgstr "identificeer binaire locatie:"
244
+
245
+ #: config_form.php
246
+ msgid "should be /usr/bin/identify"
247
+ msgstr "moet /usr/bin/identify zijn"
248
+
249
+ #: config_form.php
250
+ msgid "Start Image Count At 0"
251
+ msgstr "Start tellen Afbeeldingen bij 0"
252
+
253
+ #: config_form.php
254
+ msgid "Image Place Holder Tag:"
255
+ msgstr "Afbeelding Place Holder Tag:"
256
+
257
+ #: config_form.php
258
+ msgid "Image CSS Class:"
259
+ msgstr "Afbeelding CSS Class:"
260
+
261
+ #: config_form.php
262
+ msgid "Image CSS Style:"
263
+ msgstr "Afbeelding CSS Stijl:"
264
+
265
+ #: config_form.php
266
+ msgid "3GP"
267
+ msgstr "3GP"
268
+
269
+ #: config_form.php
270
+ msgid "Embed 3GP videos as QuickTime"
271
+ msgstr "Ingebedde 3GP videos in QuickTime formaat"
272
+
273
+ #: config_form.php
274
+ msgid "This controls if the video is just a link or embeded in the page using QuickTime"
275
+ msgstr "Dit bepaalt of de video alleen mar een snelkoppeling is of ingebed in de pagina bij gebruik van QuickTime"
276
+
277
+ #: config_form.php
278
+ msgid "Location of ffmpeg:"
279
+ msgstr "Locatie van ffmpeg:"
280
+
281
+ #: config_form.php
282
+ msgid "only needed if you are on a Linux server and use 3gp video,and don't embed the video. This allows postie to make thumbnail of the very first frame"
283
+ msgstr "alleen nodig als u op een Linux server bent en 3gp video gebruikt en de video niet inbed. Dit laat Postie miniatuurafbeeldingen maken van het eerste frame"
284
+
285
+ #: config_form.php
286
+ msgid "should be /usr/bin/ffmpeg"
287
+ msgstr "moet /usr/bin/ffmpeg zijn"
288
+
289
+ #: config_form.php
290
+ msgid "3GP CSS Class:"
291
+ msgstr "3GP CSS Class:"
292
+
293
+ #: config_form.php
294
+ msgid "Mailserver Settings"
295
+ msgstr "E-Mail server Instellingen"
296
+
297
+ #: config_form.php
298
+ msgid "Mail Protocol:"
299
+ msgstr "E-Mail Protocol:"
300
+
301
+ #: config_form.php
302
+ msgid "IMAP/IMAP-SSL/POP3-SSL unavailable"
303
+ msgstr "IMAP/IMAP-SSL/POP3-SSL niet beschikbaar"
304
+
305
+ #: config_form.php
306
+ msgid "Standard Ports:"
307
+ msgstr "Standaard Poorten:"
308
+
309
+ #: config_form.php
310
+ msgid "POP3"
311
+ msgstr "POP3"
312
+
313
+ #: config_form.php
314
+ msgid "IMAP"
315
+ msgstr "IMAP"
316
+
317
+ #: config_form.php
318
+ msgid "IMAP-SSL"
319
+ msgstr "IMAP-SSL"
320
+
321
+ #: config_form.php
322
+ msgid "POP3-SSL"
323
+ msgstr "POP3-SSL"
324
+
325
+ #: config_form.php
326
+ msgid "Postie Time Correction:"
327
+ msgstr "Postie Tijd Correctie:"
328
+
329
+ #: config_form.php
330
+ msgid "hours"
331
+ msgstr "uren"
332
+
333
+ #: config_form.php
334
+ msgid "Should be the same as your normal offset - but this lets you adjust it in cases where that doesn't work."
335
+ msgstr "Moet hetselfde zijn als het normale tijdsverschil - maar laat u dit aanpassen waar dat niet werkt."
336
+
337
+ #: config_form.php
338
+ msgid "Mail Server:"
339
+ msgstr "E-Mail Server:"
340
+
341
+ #: config_form.php
342
+ msgid "Port:"
343
+ msgstr "Poort:"
344
+
345
+ #: config_form.php
346
+ msgid "Mail Userid:"
347
+ msgstr "E-Mail Gebruikers ID:"
348
+
349
+ #: config_form.php
350
+ msgid "Mail Password:"
351
+ msgstr "E-Mail Wachtwoord:"
352
+
353
+ #: config_form.php
354
+ msgid "Update Options"
355
+ msgstr "Update Opties"
356
+
postie-functions.php CHANGED
@@ -1,13 +1,27 @@
1
  <?php
 
 
 
 
2
  #global $config,$debug;
3
  #$debug=true;
4
  #$config=GetConfig();
5
 
6
- //TODO excerpt option
7
  include_once (dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . "wp-config.php");
8
  define("POSTIE_ROOT",dirname(__FILE__));
9
  define("POSTIE_TABLE",$GLOBALS["table_prefix"]. "postie_config");
10
 
 
 
 
 
 
 
 
 
 
 
 
11
  /**
12
  * This is the main handler for all of the processing
13
  */
@@ -55,7 +69,8 @@ function PostEmail($poster,$mimeDecodedEmail) {
55
 
56
  ubb2HTML($content);
57
 
58
- $content = FilterNewLines($content);
 
59
  //$content = FixEmailQuotes($content);
60
 
61
  $id=checkReply($subject);
@@ -483,12 +498,14 @@ function PostToDB($details) {
483
  * @return boolean
484
  */
485
  function BannedFileName($filename) {
486
- $config = GetConfig();
487
- if (in_array($filename,$config["BANNED_FILES_LIST"])) {
488
- print("<p>Ignoreing $filename - it is on the banned files list.");
489
- return(true);
 
490
  }
491
- return(false);
 
492
  }
493
 
494
  //tear apart the meta part for useful information
@@ -580,7 +597,8 @@ function GetContent ($part,&$attachments) {
580
  if ($config["USE_IMAGEMAGICK"] && $config["AUTO_SMART_SHARP"]) {
581
  ImageMagickSharpen($file);
582
  }
583
- $mimeTag = '<!--Mime Type of File is '.$part->ctype_primary."/".$part->ctype_secondary.' -->';
 
584
  $thumbImage = NULL;
585
  $cid = trim($part->headers["content-id"],"<>");; //cids are in <cid>
586
  if ($config["RESIZE_LARGE_IMAGES"]) {
@@ -659,13 +677,13 @@ function GetContent ($part,&$attachments) {
659
  'width="' . $config['VIDEO_WIDTH'] . '" '.
660
  'height="' . $config['VIDEO_HEIGHT'] . '"> '.
661
  '<param name="src" VALUE="'. $config["URLFILESDIR"] . $filename .'"> '.
662
- '<param name="autoplay" VALUE="$autoplay"> '.
663
  '<param name="controller" VALUE="true"> '.
664
  '<embed '.
665
  'src="'. $config["URLFILESDIR"] . $filename .'" '.
666
  'width="' . $config['VIDEO_WIDTH'] . '" '.
667
  'height="' . $config['VIDEO_HEIGHT'] . '"'.
668
- 'autoplay="$autoplay" '.
669
  'controller="true" '.
670
  'type="video/quicktime" '.
671
  'pluginspage="http://www.apple.com/quicktime/download/" '.
@@ -1134,6 +1152,8 @@ function DetermineImageSizeWithImageMagick($file) {
1134
  preg_match('/Caption="(.*)"/', $caption, $matches);
1135
  if (isset($matches[1])) {
1136
  $caption = $matches[1];
 
 
1137
  }
1138
  }
1139
  return(array($size,$caption));
@@ -1394,7 +1414,7 @@ function ResizeImageWithGD($file,$type) {
1394
  $scaledFileName = "thumb.".$fileName;
1395
  $scaledFile = $config["REALPHOTOSDIR"] . $scaledFileName;
1396
  $scaledImage = imagecreatetruecolor($scaledW,$scaledH);
1397
- imagecopyresized($scaledImage,$sourceImage,0,0,0,0,
1398
  $scaledW,$scaledH,
1399
  $sizeInfo[0],$sizeInfo[1]);
1400
  imagejpeg($scaledImage,$scaledFile,$config["JPEGQUALITY"]);
@@ -1473,10 +1493,10 @@ function DeterminePostDate(&$content, $message_date = NULL) {
1473
  $post_date = gmdate('Y-m-d H:i:s',$dateInSeconds + ($config["TIME_OFFSET"] * 3600));
1474
  $post_date_gmt = gmdate('Y-m-d H:i:s',$dateInSeconds);
1475
 
1476
- echo "--------------------DELAY------------\n";
1477
- echo "delay=$delay, dateInSeconds = $dateInSeconds\n";
1478
- echo "post_date=$post_date\n";
1479
- echo "--------------------DELAY------------\n";
1480
  return(array($post_date,$post_date_gmt));
1481
  }
1482
  /**
@@ -1856,19 +1876,13 @@ function GetPostExcerpt(&$content) {
1856
  global $wpdb;
1857
  $post_excerpt = '';
1858
  //try and determine excerpt
1859
- echo "CONTENT ------
1860
- $content
1861
- -------";
1862
  if ( preg_match('/:excerptstart ?(.*):excerptend/s', $content, $matches)) {
1863
  $content = str_replace($matches[0], "", $content);
1864
  $post_excerpt = $matches[1];
1865
  print_r($matches);
1866
- echo "NOW CONTENT ------
1867
- $content
1868
- -------";
1869
- echo "excerpt ------
1870
- $post_excerpt
1871
- -------";
1872
  }
1873
  return($post_excerpt);
1874
  }
@@ -2185,6 +2199,8 @@ function GetDBConfig() {
2185
  $config["POST_STATUS"] = 'publish';
2186
  if (!isset($config["IMAGE_NEW_WINDOW"]))
2187
  $config["IMAGE_NEW_WINDOW"] = false;
 
 
2188
  if (!isset($config["IMAGETEMPLATE"])) { $config["IMAGETEMPLATE"] =
2189
  "<div class='imageframe alignleft'><a href='{IMAGE}'><img src='{THUMBNAIL}' alt='{CAPTION}' title='{CAPTION}' class='attachment' /></a><div class='imagecaption'>{CAPTION}</div></div>";
2190
  }
@@ -2293,7 +2309,7 @@ function HasGDInstalled($display = true) {
2293
  "imagecreatefrompng",
2294
  "imagecreatetruecolor",
2295
  "imagecreatetruecolor",
2296
- "imagecopyresized",
2297
  "imagejpeg",
2298
  "imagedestroy");
2299
  return(HasFunctions($function_list,$display));
1
  <?php
2
+ /*TODO
3
+ * check if image height is being consulted
4
+ * html purify
5
+ */
6
  #global $config,$debug;
7
  #$debug=true;
8
  #$config=GetConfig();
9
 
 
10
  include_once (dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . "wp-config.php");
11
  define("POSTIE_ROOT",dirname(__FILE__));
12
  define("POSTIE_TABLE",$GLOBALS["table_prefix"]. "postie_config");
13
 
14
+ /* this function is necessary for wildcard matching on non-posix systems */
15
+ if (!function_exists('fnmatch')) {
16
+ function fnmatch($pattern, $string) {
17
+ $pattern = strtr(preg_quote($pattern, '#'), array('\*' => '.*', '\?' =>
18
+ '.', '\[' => '[', '\]' => ']'));
19
+ return @preg_match(
20
+ '/^' . strtr(addcslashes($pattern, '/\\.+^$(){}=!<>|'),
21
+ array('*' => '.*', '?' => '.?')) . '$/i', $string
22
+ );
23
+ }
24
+ }
25
  /**
26
  * This is the main handler for all of the processing
27
  */
69
 
70
  ubb2HTML($content);
71
 
72
+ if ($config['FILTERNEWLINES'])
73
+ $content = FilterNewLines($content);
74
  //$content = FixEmailQuotes($content);
75
 
76
  $id=checkReply($subject);
498
  * @return boolean
499
  */
500
  function BannedFileName($filename) {
501
+ $config = GetConfig();
502
+ foreach ($config["BANNED_FILES_LIST"] as $bannedFile) {
503
+ if (fnmatch($bannedFile, $filename)) {
504
+ print("<p>Ignoreing $filename - it is on the banned files list.");
505
+ return(true);
506
  }
507
+ }
508
+ return(false);
509
  }
510
 
511
  //tear apart the meta part for useful information
597
  if ($config["USE_IMAGEMAGICK"] && $config["AUTO_SMART_SHARP"]) {
598
  ImageMagickSharpen($file);
599
  }
600
+ $mimeTag = '<!--Mime Type of File is
601
+ '.$part->ctype_primary."/".$part->ctype_secondary.' --></p>';
602
  $thumbImage = NULL;
603
  $cid = trim($part->headers["content-id"],"<>");; //cids are in <cid>
604
  if ($config["RESIZE_LARGE_IMAGES"]) {
677
  'width="' . $config['VIDEO_WIDTH'] . '" '.
678
  'height="' . $config['VIDEO_HEIGHT'] . '"> '.
679
  '<param name="src" VALUE="'. $config["URLFILESDIR"] . $filename .'"> '.
680
+ "<param name=\"autoplay\" VALUE=\"$autoplay\"> ".
681
  '<param name="controller" VALUE="true"> '.
682
  '<embed '.
683
  'src="'. $config["URLFILESDIR"] . $filename .'" '.
684
  'width="' . $config['VIDEO_WIDTH'] . '" '.
685
  'height="' . $config['VIDEO_HEIGHT'] . '"'.
686
+ "autoplay=\"$autoplay\" ".
687
  'controller="true" '.
688
  'type="video/quicktime" '.
689
  'pluginspage="http://www.apple.com/quicktime/download/" '.
1152
  preg_match('/Caption="(.*)"/', $caption, $matches);
1153
  if (isset($matches[1])) {
1154
  $caption = $matches[1];
1155
+ } else {
1156
+ $caption='';
1157
  }
1158
  }
1159
  return(array($size,$caption));
1414
  $scaledFileName = "thumb.".$fileName;
1415
  $scaledFile = $config["REALPHOTOSDIR"] . $scaledFileName;
1416
  $scaledImage = imagecreatetruecolor($scaledW,$scaledH);
1417
+ imagecopyresampled($scaledImage,$sourceImage,0,0,0,0,
1418
  $scaledW,$scaledH,
1419
  $sizeInfo[0],$sizeInfo[1]);
1420
  imagejpeg($scaledImage,$scaledFile,$config["JPEGQUALITY"]);
1493
  $post_date = gmdate('Y-m-d H:i:s',$dateInSeconds + ($config["TIME_OFFSET"] * 3600));
1494
  $post_date_gmt = gmdate('Y-m-d H:i:s',$dateInSeconds);
1495
 
1496
+ //echo "--------------------DELAY------------\n";
1497
+ //echo "delay=$delay, dateInSeconds = $dateInSeconds\n";
1498
+ //echo "post_date=$post_date\n";
1499
+ //echo "--------------------DELAY------------\n";
1500
  return(array($post_date,$post_date_gmt));
1501
  }
1502
  /**
1876
  global $wpdb;
1877
  $post_excerpt = '';
1878
  //try and determine excerpt
1879
+ //echo "CONTENT ------
1880
+ //$content
1881
+ //-------";
1882
  if ( preg_match('/:excerptstart ?(.*):excerptend/s', $content, $matches)) {
1883
  $content = str_replace($matches[0], "", $content);
1884
  $post_excerpt = $matches[1];
1885
  print_r($matches);
 
 
 
 
 
 
1886
  }
1887
  return($post_excerpt);
1888
  }
2199
  $config["POST_STATUS"] = 'publish';
2200
  if (!isset($config["IMAGE_NEW_WINDOW"]))
2201
  $config["IMAGE_NEW_WINDOW"] = false;
2202
+ if (!isset($config["FILTERNEWLINES"]))
2203
+ $config["FILTERNEWLINES"] = true;
2204
  if (!isset($config["IMAGETEMPLATE"])) { $config["IMAGETEMPLATE"] =
2205
  "<div class='imageframe alignleft'><a href='{IMAGE}'><img src='{THUMBNAIL}' alt='{CAPTION}' title='{CAPTION}' class='attachment' /></a><div class='imagecaption'>{CAPTION}</div></div>";
2206
  }
2309
  "imagecreatefrompng",
2310
  "imagecreatetruecolor",
2311
  "imagecreatetruecolor",
2312
+ "imagecopyresampled",
2313
  "imagejpeg",
2314
  "imagedestroy");
2315
  return(HasFunctions($function_list,$display));
postie.php CHANGED
@@ -2,14 +2,16 @@
2
  /*
3
  Plugin Name: Postie
4
  Plugin URI: http://blog.robfelty.com/plugins/postie
5
- 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://wordpres.org/extend/plugins/postie/other_notes'>Readme</a> for usage. Visit the <a href='http://forum.robfelty.com/forum/postie'>postie forum</a> for support.
6
- Version: 1.2
 
 
7
  Author: Robert Felty
8
  Author URI: http://blog.robfelty.com/
9
  */
10
 
11
  /*
12
- $Id: postie.php 112555 2009-04-22 14:31:22Z robfelty $
13
  * -= Requests Pending =-
14
  * German Umlats don't work
15
  * Problems under PHP5
@@ -59,8 +61,14 @@ if (is_admin()) {
59
  if(function_exists('load_plugin_textdomain')){
60
  //load_plugin_textdomain('postie', false, dirname( plugin_basename(__FILE__)) .
61
  //'/languages');
62
- $plugin_dir = basename(dirname(__FILE__)) . '/languages';
63
- load_plugin_textdomain( 'postie', 'wp-content/plugins/' . $plugin_dir, $plugin_dir );
 
 
 
 
 
 
64
  }
65
  }
66
  ?>
2
  /*
3
  Plugin Name: Postie
4
  Plugin URI: http://blog.robfelty.com/plugins/postie
5
+ Description: Signifigantly upgrades the posting by mail features of Word Press
6
+ (See <a href='options-general.php?page=postie/postie.php'>Settings and
7
+ 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://forum.robfelty.com/forum/postie'>postie forum</a> for support.
8
+ Version: 1.2.1
9
  Author: Robert Felty
10
  Author URI: http://blog.robfelty.com/
11
  */
12
 
13
  /*
14
+ $Id: postie.php 116205 2009-05-07 18:03:18Z robfelty $
15
  * -= Requests Pending =-
16
  * German Umlats don't work
17
  * Problems under PHP5
61
  if(function_exists('load_plugin_textdomain')){
62
  //load_plugin_textdomain('postie', false, dirname( plugin_basename(__FILE__)) .
63
  //'/languages');
64
+ $plugin_dir = WP_PLUGIN_DIR . '/' . basename(dirname(__FILE__));
65
+ //load_plugin_textdomain( 'postie', 'wp-content/plugins/' . $plugin_dir, $plugin_dir );
66
+ function postie_load_domain() {
67
+ load_plugin_textdomain( 'postie', $plugin_dir."/languages/",
68
+ basename(dirname(__FILE__)). '/languages/');
69
+ //load_plugin_textdomain( 'postie', "wp-content/plugins/postie/languages/");
70
+ }
71
+ add_action('init', 'postie_load_domain');
72
  }
73
  }
74
  ?>
postie_test.php CHANGED
@@ -34,11 +34,11 @@ get_currentuserinfo();
34
  <br/>
35
  <?php
36
 
37
- if (!TestWPVersion()) {
38
- print("<h1>Warning!</h1>
39
- <p>Postie only works on on Word Press version 2.0 and above</p>");
40
- exit();
41
- }
42
  ?>
43
 
44
  <br/>
34
  <br/>
35
  <?php
36
 
37
+ // if (!TestWPVersion()) {
38
+ // print("<h1>Warning!</h1>
39
+ // <p>Postie only works on on Word Press version 2.0 and above</p>");
40
+ // exit();
41
+ // }
42
  ?>
43
 
44
  <br/>
readme.txt CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://blog.robfelty.com/plugins/postie
5
  Tags: e-mail
6
  Requires at least: 2.3
7
  Tested up to: 2.7.1
8
- Stable tag: 1.2
9
 
10
  The Postie plugin allows you to blog via e-mail, including many advanced
11
  features not found in wordpress's default post by e-mail feature.
@@ -17,34 +17,16 @@ videos, and automatically strip off signatures. It also has support for both
17
  imap and pop3, with the option for ssl with both. For usage notes, see the
18
  [other notes](other_notes) page
19
 
20
- = What's new in 1.2 =
21
- * More video options:
22
- * Can embed 3gp, mp4, mov videos
23
- * Can specify video width, video height, player width, and player height
24
- in the settings page
25
- * Can specify custom image template
26
- * Image handling improvements:
27
- * Only downscale images, not up-scale (thanks Jarven)
28
- * More custom image template options
29
- * IPTC captions now also work when not resizing images
30
- * Added option to use custom field for images (for Datapusher)
31
- * Fixed some issues with image templates and line break handling
32
- * Custom image template now works even when not resizing images
33
- * Documentation improvements:
34
- * Added links to settings, forum, and readme in plugin description
35
- * Updated readme (thanks to Venkatraman Dhamodaran)
36
- * Added better instructions on how to use cronless postie
37
- * Text processing improvements:
38
- * Added option to automatically convert urls into links
39
- * Added feature to include a custom excerpt
40
- * Miscellaneous improvements
41
- * Improved internationalization (thanks to Håvard Broberg
42
- (nanablag@nanablag.com))
43
- * Bug Fixes
44
- * Removed debugging info in get_mail.php (security issue) thanks to
45
- [Jens]( http://svalgaard.net/jens/)
46
- * No longer directly including pluggable.php (should
47
- prevent conflicts with other plugins such as registerplus
48
 
49
  == Installation ==
50
  * Make sure all postie code is its own directory inside of wp-content/plugins/postie
@@ -83,12 +65,16 @@ This fetches the mail every ten minutes with wget
83
  = Cronless Postie =
84
 
85
  If you don't have access to cron, you can run postie without it.
 
86
  * Activate the cronless postie plugin (it is included with the postie plugin,
87
  so if you have downloaded postie, you don't need to download anything else
88
- * By default, cronless postie checks for new e-mail once every hour. Currently
89
- * the only other option currently is daily. If you wish to change this, edit
90
- * the line in postie_cronless.php to:
91
-
 
 
 
92
 
93
  == Options and Settings ==
94
 
@@ -216,6 +202,17 @@ class='imagecaption'&gt;{CAPTION}&lt;/div&gt;&lt;/div&gt;
216
 
217
 
218
  == History ==
 
 
 
 
 
 
 
 
 
 
 
219
  * 1.2 (2009.04.22)
220
  * More video options:
221
  * Can embed 3gp, mp4, mov videos
5
  Tags: e-mail
6
  Requires at least: 2.3
7
  Tested up to: 2.7.1
8
+ Stable tag: 1.2.1
9
 
10
  The Postie plugin allows you to blog via e-mail, including many advanced
11
  features not found in wordpress's default post by e-mail feature.
17
  imap and pop3, with the option for ssl with both. For usage notes, see the
18
  [other notes](other_notes) page
19
 
20
+ = What's new in 1.2.1 =
21
+ * Got rid of stupid version checking
22
+ * Improved cronless postie instructions and configuration
23
+ * Internationalization is working now
24
+ * Dutch localization (thanks to gvmelle http://gvmelle.com)
25
+ * Fixed caption bug when using image magick
26
+ * Added option to not filter new lines (when using markdown syntax)
27
+ * Fixed autoplay option
28
+ * Can now use wildcards in excluding filenames
29
+ * Producing better quality thumbnails (thanks to robcarey)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
 
31
  == Installation ==
32
  * Make sure all postie code is its own directory inside of wp-content/plugins/postie
65
  = Cronless Postie =
66
 
67
  If you don't have access to cron, you can run postie without it.
68
+
69
  * Activate the cronless postie plugin (it is included with the postie plugin,
70
  so if you have downloaded postie, you don't need to download anything else
71
+ * By default, cronless postie checks for new e-mail once every hour. To select
72
+ a different rate, change the cronless postie setting in the postie settings
73
+ page.
74
+ * Note that timing with cronless postie is not very accurate. It depends
75
+ on people visiting your website. If you select to check every 10 minutes, but
76
+ you only get one visit every 30 minutes, then it might take 30 minutes for a
77
+ post to show up.
78
 
79
  == Options and Settings ==
80
 
202
 
203
 
204
  == History ==
205
+ * 1.2.1 (2009.05.07)
206
+ * Got rid of stupid version checking
207
+ * Improved cronless postie instructions and configuration
208
+ * Internationalization is working now
209
+ * Dutch localization (thanks to gvmelle http://gvmelle.com)
210
+ * Fixed caption bug when using image magick
211
+ * Added option to not filter new lines (when using markdown syntax)
212
+ * Fixed autoplay option
213
+ * Can now use wildcards in excluding filenames
214
+ * Producing better quality thumbnails (thanks to robcarey)
215
+
216
  * 1.2 (2009.04.22)
217
  * More video options:
218
  * Can embed 3gp, mp4, mov videos