Postie - Version 1.5.6

Version Description

(future) = * Fixed bug where default post format was empty when the theme didn't support any formats. * Removed all hard coded references to wp-content. * Fixed bug where caption wasn't being filled out in templates. * Updated direct DB access to use standard methods. * Added attachment template for non-audio/image/video attachments. * Added additional checks to the test screen. * Added new template variable {ICON}

Download this release

Release Info

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

Code changes from version 1.5.5 to 1.5.6

Revision CHANGED
@@ -1,2 +0,0 @@
1
- Revision: 706597
2
- Last Changed Date: 2013-04-16 18:46:28 -0700 (Tue, 16 Apr 2013)
 
 
config_form.php CHANGED
@@ -12,7 +12,10 @@
12
  </div>
13
  <h2>
14
  <a style='text-decoration:none' href='options-general.php?page=postie/postie.php'>
15
- <img src="../wp-content/plugins/postie/images/mail.png" alt="postie" /><?php _e('Postie Settings', 'postie'); ?>
 
 
 
16
  </a>
17
  <span class="description">(v<?php _e(POSTIE_VERSION, 'postie'); ?>)</span>
18
  </h2>
@@ -370,14 +373,17 @@
370
  <?php
371
  $formats = get_theme_support('post-formats');
372
  if (is_array($formats[0])) {
373
- array_unshift($formats[0], "standard");
374
- foreach ($formats[0] as $format) {
375
- $selected = "";
376
- if ($config['post_format'] == $format) {
377
- $selected = " selected='selected'";
378
- }
379
- echo "<option value='$format'$selected>$format</option>";
 
 
380
  }
 
381
  }
382
  ?>
383
  </select>
@@ -522,8 +528,9 @@
522
  }
523
  ?>
524
  </select>
525
- &nbsp;&nbsp;
526
- <?php _e('Preview', 'postie'); ?>
 
527
  <div id='imageTemplatePreview'></div>
528
  <textarea onchange='changeStyle("imageTemplatePreview", "postie-settings-imagetemplate", "imagetemplateselect",
529
  "postie-settings-selected_imagetemplate", "smiling.jpg", true);' cols='70' rows='7' id='postie-settings-imagetemplate' name='postie-settings[imagetemplate]'>
@@ -572,8 +579,9 @@
572
  }
573
  ?>
574
  </select>
575
- &nbsp;&nbsp;
576
- <?php _e('Preview', 'postie'); ?>
 
577
  <div id='video1TemplatePreview'></div>
578
  <textarea onchange="changeStyle('video1TemplatePreview', 'postie-settings-video1template',
579
  'video1templateselect', 'postie-settings-selected_video1template', 'hi.mp4', true);" cols='70' rows='7' id='postie-settings-video1template'
@@ -619,8 +627,9 @@
619
  }
620
  ?>
621
  </select>
622
- &nbsp;&nbsp;
623
- <?php _e('Preview', 'postie'); ?>
 
624
  <div id='video2TemplatePreview'></div>
625
  <textarea onchange="changeStyle('video2TemplatePreview', 'postie-settings-video2template',
626
  'video2templateselect', 'postie-settings-selected_video2template', 'hi.flv', true);" cols='70' rows='7' id='postie-settings-video2template'
@@ -640,7 +649,8 @@
640
  </td>
641
  </tr>
642
  <tr><td colspan="2"><hr /></td></tr>
643
- <tr><th scope='row'><?php _e('Audio template', 'postie') ?><br />
 
644
  <span class='recommendation'><?php _e('Choose a default template, then customize to your liking in the text box', 'postie') ?></span>
645
  <br />
646
  <span class='recommendation'><?php _e('Note that this template are only used if the "Preferred Text Type" setting is set to "plain"', 'postie'); ?></span><br />
@@ -670,8 +680,9 @@
670
  }
671
  ?>
672
  </select>
673
- &nbsp;&nbsp;
674
- <?php _e('Preview', 'postie'); ?>
 
675
  <div id='audioTemplatePreview'></div>
676
  <textarea onchange="changeStyle('audioTemplatePreview', 'postie-settings-audiotemplate',
677
  'audiotemplateselect', 'postie-settings-selected_audiotemplate', 'funky.mp3', true);" cols='70' rows='7' id='postie-settings-audiotemplate'
@@ -719,9 +730,11 @@
719
  }
720
  ?>
721
  </select>
 
722
  </td>
723
  </tr>
724
- <tr><th scope='row'><?php _e('Attachment icon size (in pixels)', 'postie') ?><br />
 
725
  <td>
726
  <input type='hidden' id='postie-settings-icon_size' name='postie-settings[icon_size]'
727
  value="<?php echo esc_attr($icon_size) ?>" />
@@ -743,12 +756,52 @@
743
  </select>
744
  </td>
745
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
746
  <tr>
747
  <th style='height:64px'>
748
  <?php _e('Preview', 'postie'); ?>
749
  </th>
750
  <td>
751
- <span id='postie-settings-attachment_preview'></span>
752
  </td>
753
  </tr>
754
  </table>
@@ -803,17 +856,12 @@
803
  hiddenInput.value = selectBox.options[i].value;
804
  }
805
  }
806
- var fileTypes = new Array('doc', 'pdf', 'xls', 'ppt');
807
  preview.innerHTML = '';
808
  for (j = 0; j < fileTypes.length; j++) {
809
  preview.innerHTML += "<img src='" + iconDir + iconSet.value + '/' +
810
  fileTypes[j] + '-' + iconSize.value + ".png' />";
811
  }
812
- preview.innerHTML += '<br />Here is some sample text with a link to a ' +
813
- 'word document that I think you might find interesting<br />' +
814
- "<a href='#'><img style='text-decoration:none' src='" +
815
- iconDir + iconSet.value + '/doc' +
816
- '-' + iconSize.value + ".png' />Interesting document</a>";
817
  }
818
 
819
  function changeStyle(preview, template, select, selected, sample, custom) {
12
  </div>
13
  <h2>
14
  <a style='text-decoration:none' href='options-general.php?page=postie/postie.php'>
15
+ <?php
16
+ echo '<img src="' . plugins_url('images/mail.png', __FILE__) . '" alt="postie" />';
17
+ _e('Postie Settings', 'postie');
18
+ ?>
19
  </a>
20
  <span class="description">(v<?php _e(POSTIE_VERSION, 'postie'); ?>)</span>
21
  </h2>
373
  <?php
374
  $formats = get_theme_support('post-formats');
375
  if (is_array($formats[0])) {
376
+ $formats = $formats[0];
377
+ } else {
378
+ $formats = array();
379
+ }
380
+ array_unshift($formats, "standard");
381
+ foreach ($formats as $format) {
382
+ $selected = "";
383
+ if ($config['post_format'] == $format) {
384
+ $selected = " selected='selected'";
385
  }
386
+ echo "<option value='$format'$selected>$format</option>";
387
  }
388
  ?>
389
  </select>
528
  }
529
  ?>
530
  </select>
531
+ <div>
532
+ <?php _e('Preview', 'postie'); ?>
533
+ </div>
534
  <div id='imageTemplatePreview'></div>
535
  <textarea onchange='changeStyle("imageTemplatePreview", "postie-settings-imagetemplate", "imagetemplateselect",
536
  "postie-settings-selected_imagetemplate", "smiling.jpg", true);' cols='70' rows='7' id='postie-settings-imagetemplate' name='postie-settings[imagetemplate]'>
579
  }
580
  ?>
581
  </select>
582
+ <div>
583
+ <?php _e('Preview', 'postie'); ?>
584
+ </div>
585
  <div id='video1TemplatePreview'></div>
586
  <textarea onchange="changeStyle('video1TemplatePreview', 'postie-settings-video1template',
587
  'video1templateselect', 'postie-settings-selected_video1template', 'hi.mp4', true);" cols='70' rows='7' id='postie-settings-video1template'
627
  }
628
  ?>
629
  </select>
630
+ <div>
631
+ <?php _e('Preview', 'postie'); ?>
632
+ </div>
633
  <div id='video2TemplatePreview'></div>
634
  <textarea onchange="changeStyle('video2TemplatePreview', 'postie-settings-video2template',
635
  'video2templateselect', 'postie-settings-selected_video2template', 'hi.flv', true);" cols='70' rows='7' id='postie-settings-video2template'
649
  </td>
650
  </tr>
651
  <tr><td colspan="2"><hr /></td></tr>
652
+ <tr>
653
+ <th scope='row'><?php _e('Audio template', 'postie') ?><br />
654
  <span class='recommendation'><?php _e('Choose a default template, then customize to your liking in the text box', 'postie') ?></span>
655
  <br />
656
  <span class='recommendation'><?php _e('Note that this template are only used if the "Preferred Text Type" setting is set to "plain"', 'postie'); ?></span><br />
680
  }
681
  ?>
682
  </select>
683
+ <div>
684
+ <?php _e('Preview', 'postie'); ?>
685
+ </div>
686
  <div id='audioTemplatePreview'></div>
687
  <textarea onchange="changeStyle('audioTemplatePreview', 'postie-settings-audiotemplate',
688
  'audiotemplateselect', 'postie-settings-selected_audiotemplate', 'funky.mp3', true);" cols='70' rows='7' id='postie-settings-audiotemplate'
730
  }
731
  ?>
732
  </select>
733
+ <div id='postie-settings-attachment_preview'></div>
734
  </td>
735
  </tr>
736
+ <tr>
737
+ <th scope='row'><?php _e('Attachment icon size (in pixels)', 'postie') ?><br /></th>
738
  <td>
739
  <input type='hidden' id='postie-settings-icon_size' name='postie-settings[icon_size]'
740
  value="<?php echo esc_attr($icon_size) ?>" />
756
  </select>
757
  </td>
758
  </tr>
759
+ <tr>
760
+ <th scope='row'><?php _e('Attachment template', 'postie') ?><br />
761
+ <span class='recommendation'><?php _e('Choose a default template, then customize to your liking in the text box', 'postie') ?></span>
762
+ <br />
763
+ <span class='recommendation'><?php _e('Note that this template are only used if the "Preferred Text Type" setting is set to "plain"', 'postie'); ?></span><br />
764
+ </th>
765
+ <td>
766
+ <input type='hidden' id='postie-settings-selected_generaltemplate' name='postie-settings[selected_generaltemplate]'
767
+ value="<?php echo esc_attr($selected_generaltemplate) ?>" />
768
+ <select name='generaltemplateselect' id='generaltemplateselect'
769
+ onchange="changeStyle('generalTemplatePreview', 'postie-settings-generaltemplate',
770
+ 'generaltemplateselect', 'postie-settings-selected_generaltemplate', 'interesting_document.doc', false);" >
771
+ <?php
772
+ include('templates/general_template.php');
773
+ $styleOptions = $generalTemplates;
774
+ $selected = $selected_generaltemplate;
775
+ foreach ($styleOptions as $key => $value) {
776
+ if ($key != 'selected') {
777
+ if ($key == $selected) {
778
+ $select = ' selected="selected" ';
779
+ } else {
780
+ $select = ' ';
781
+ }
782
+ if ($key == 'custom')
783
+ $value = $generaltemplate;
784
+ echo '<option' . $select . 'value="' . esc_attr($value) . '" >' . $key . '</option>';
785
+ }
786
+ }
787
+ ?>
788
+ </select>
789
+ <div>
790
+ <?php _e('Preview', 'postie'); ?>
791
+ </div>
792
+ <div id='generalTemplatePreview'></div>
793
+ <textarea onchange="changeStyle('generalTemplatePreview', 'postie-settings-generaltemplate', 'generaltemplateselect', 'postie-settings-selected_generaltemplate', 'interesting_document.doc', true);"
794
+ cols='70' rows='7'
795
+ id='postie-settings-generaltemplate'
796
+ name='postie-settings[generaltemplate]'><?php echo esc_attr($generaltemplate) ?></textarea>
797
+ </td>
798
+ </tr>
799
  <tr>
800
  <th style='height:64px'>
801
  <?php _e('Preview', 'postie'); ?>
802
  </th>
803
  <td>
804
+
805
  </td>
806
  </tr>
807
  </table>
856
  hiddenInput.value = selectBox.options[i].value;
857
  }
858
  }
859
+ var fileTypes = new Array('doc', 'pdf', 'xls', 'default');
860
  preview.innerHTML = '';
861
  for (j = 0; j < fileTypes.length; j++) {
862
  preview.innerHTML += "<img src='" + iconDir + iconSet.value + '/' +
863
  fileTypes[j] + '-' + iconSize.value + ".png' />";
864
  }
 
 
 
 
 
865
  }
866
 
867
  function changeStyle(preview, template, select, selected, sample, custom) {
docs/Changes.txt CHANGED
@@ -22,6 +22,15 @@ 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.5 (2013.05.02) =
26
  * Added ability to run a manual check with debugging output.
27
  * Added support for default post type.
@@ -441,7 +450,6 @@ Attachments are now processed in the order they were attached.
441
  * No longer directly including pluggable.php (should
442
  prevent conflicts with other plugins such as registerplus
443
 
444
-
445
  = 1.1.5 (2009.03.10) =
446
  * Added option to have postie posts be pending review, published, or draft
447
  * Settings panel only shows up for administrators
@@ -468,8 +476,7 @@ Attachments are now processed in the order they were attached.
468
  * replying to an e*mail adds a comment to a post
469
  * fixed category handling to work with taxonomy
470
  * fixed one syntax error
471
- * added option to wrap posts and comments in <pre%gt; tags
472
-
473
 
474
  = 1.1.1 =
475
 
@@ -505,13 +512,14 @@ plugin. And the rest is history :)
505
 
506
  = 0.9.9.3.2 =
507
  * BUGFIX: Typo
 
508
  = 0.9.9.3.1 =
509
  * BUGFIX: Removed debugging code
510
 
511
  = 0.9.9.3 =
512
  * BUGFIX: If your email address matches an existing user - then it will post as that user - even if you allow anyone to post.
513
  * BUGFIX: Replaced get_settings('home') with get_settings('siteurl')
514
- * BUGFIX: Better handling for Japanese charactersets - Thanks to http://www.souzouzone.jp/blog/archives/009531.html
515
  * BUGFIX: Better thumbnail window opening code - thanks to Gabi & Duntello!
516
  * FEATURE: Added an option to set the MAX Height of an image - idea from Duntello
517
  * BUGFIX: Modified the FilterNewLines for better flowed text handling - You now HAVE TO PUT TWO NEW LINES to end a paragraph.
@@ -519,8 +527,6 @@ plugin. And the rest is history :)
519
  * BUGFIX: Tries to use the date in the message (Thanks Ravan) I tried this once before and it never worked - hopefully this time it will.
520
  * BUGFIX: Added a workaround to fix the problem with Subscribe2 - it will now notify on posts that are not set to show up in the future.
521
 
522
-
523
-
524
  = 0.9.9.2 =
525
  * BUGFIX: Looks for the NOOP error and disgards it
526
  * FEATURE: Postie now detects the version of WordPress being used
@@ -551,6 +557,7 @@ plugin. And the rest is history :)
551
  * FEATURE: Added option to turn of quoted printable decoding
552
  * FEATURE: :start tag - now postie looks for this tag before looking for you message - handy if your service provider prepends a message
553
  * FEATURE: Template for translation now included
 
554
  = 0.9.8.4 =
555
  * BUGFIX: Fixed problem with config_form.php - select had "NULL" instead of ""
556
  * BUGFIX: 3g2 now supported
@@ -573,7 +580,7 @@ plugin. And the rest is history :)
573
  * BUGFIX: Email that has both Plain and HTML content will show the HTML content and not the plain if html is preferred
574
 
575
  = 0.9.8.2 =
576
- * BUGFIX: Fixed an extra new line after attachin non-image files.
577
  * BUGFIX: The Test system now displays any missing gd functions
578
  * BUGFIX: The test system was only using ImageMagick
579
 
@@ -610,7 +617,7 @@ plugin. And the rest is history :)
610
  * FEATURE: Option to embed 3GP in QuickTime Controller.
611
 
612
  = 0.9.5.2 =
613
- * BUGFIX: gmt varialble not being set correctly
614
  * BUGFIX: Changed the name of the Check Mail button to fix an issue with mod_security
615
  * BUGFIX: Fixed issue with Cronless-Postie
616
  * BUGFIX: There was an argument passed by reference incorrectly
@@ -635,7 +642,6 @@ plugin. And the rest is history :)
635
  * BUGFIX: fixed issue of compatability with cjd-notepad
636
  * BUGFIX: Windows Works Now
637
 
638
-
639
  = 0.9.4 =
640
  * BUGFIX: Cronless Postie - fixed the include statement
641
  * BUGFIX: Authorized Addresses now supports a single address
@@ -649,16 +655,20 @@ plugin. And the rest is history :)
649
 
650
  = 0.9.3 =
651
  * Bug fixes for IIS
 
652
  = 0.9.2 =
653
  * Moved to more of a DIRECTORY_SEPARATOR structure
 
654
  = 0.9.1 =
655
  * Added a define to fix a problem with over including
 
656
  = 0.9 =
657
  * Converted to an honest to god plugin
658
  * BUGFIX: If you put a single category:subject it now works
659
  * BUGFIX: ? Special characters may be supported? The test post now shows a lot of umlats and accents?
660
  * BUGFIX: The last ] in a subject with categories is now filtered out
661
  * FEATURE: -1- subject - will put the post in category 1
 
662
  = 0.312.13 =
663
  * Code clean up - The main loop is finally readable by even non programmers
664
  * FEATURE - You can now post to multiple categories at one time by using the [#],[Category Name], [Cat] in the subject
@@ -670,40 +680,48 @@ plugin. And the rest is history :)
670
  * BUG FIX: Able to handle mis-mime typed images as long as they are named with .jpg/.gif/.png
671
 
672
  = 0.312.12 =
673
- * Code clean up - slowing shrinking the main to make it easiery to fix things
674
  * FEATURE: Be able to turn on/off allowing comments in an email
675
  * BUG FIX: AppleDouble now mostly supported
676
  * BUG FIX: MIME handling improved.
677
  * BUG FIX: Fix issue with timing delay
 
678
  = 0.312.11 =
679
  * FEATURE: Patterns to define where a sig starts are user configurable
680
  * FEATURE: Add filter options for banned file names
681
  * BUG FIX: Made it possible to turn off posting to the db for testing purposes
 
682
  = 0.312.10 =
683
  * FEATURE: Added in code to diplay the mime type of the file being linked to
684
  * BUG FIX: It now tests for the existance of the directories and makes sure
685
  * that the web server can write to them
 
686
  = 0.312.9 =
687
  * FEATURE:Should handle jpg as well as jpeg as the file type
688
  * BUG FIX: Now correctly handles the subject in the message
689
  * BUG FIX: Should handle Text preferences correctly
 
690
  = 0.312.8 =
691
  * Some general code tidying.
692
- * FEATURE: Can now have email from invalid email addresses automatically forwared
693
  * to the admin's email account. This forward includes all attachments.
694
  * Props to David Luden for getting this started.
695
  * Minor change: The system will continue if it runs into a message that doesn't have
696
  * any content - it will also continue to process if it gets an email from
697
  * someone not in the system. In the past this could result in deleted mail
698
  * if your cron job didn't run often enough.
 
699
  = 0.312.7 =
700
  * Confirm the handling of 3gp video for cell phones o
701
  * Added in new directive SUPPORTED_FILE_TYPES -if the mime type is listed here then the system will try to make a link to it without making a thumb nail.
 
702
  = 0.312.6 =
703
  * Bug Fix: Ok the last bug I fixed - actually caused another bug - man I should set up some unit tests. Now it handles mail from the nokia mail client correctly.
 
704
  = 0.312.5 =
705
- * Bug Fix : The system was accepting all test/* types. Now you can set a preference (defaults to text/plain)
706
  * to use as the main text for the post.
 
707
  = 0.312.4 =
708
  * Added in sanitize_title call suggested by Jemima
709
  * Added in ability to provide a subject in an mms - by using #Subject#
@@ -725,6 +743,7 @@ plugin. And the rest is history :)
725
 
726
  = 0.312.2 =
727
  * BUGFIX: It now removes the delay tag from the message
 
728
  = 0.312.1 =
729
  * Added modification for placeholder support for images (David Luden)
730
  * Added in support to automatically scale down big images (Dirk Elmendorf)
@@ -733,18 +752,17 @@ plugin. And the rest is history :)
733
  * Switch config options to defines to reduce the number of global variables (Dirk Elmendorf)
734
  * Added tests to make sure there is a trailing slash on the DIR definitions (Dirk Elmendorf)
735
  * Add tests to see if they have gd installed (Dirk Elmendorf)
736
- * Seperate the scaling out to a function for easier usage (Dirk Elmendorf)
737
  * Add delay feature for future posting. (Dirk Elmendorf)
738
  * Added in ability to use strtotime if it is available (Dirk ELmendorf)
739
 
740
- * Todo
741
- * Have option to have the email that is rejected forwarded on to another address.
742
- * Fix bug that id still diplays the delay tag in the body
743
  = 0.312 - 2005-03 =
744
  * CHANGE FOR DEFAULT E-mail Categories, instead of [General] Subject you can now use General: Subject in the subject line. Less typing, and there must be a space after the colon.
745
  * Fixed bugs with no default posting for categories and user
 
746
  = 0.311 - 2005-01 =
747
  * eep, major bug for pop3 server. Next time I test my code more before I released, fixed so that pop3 now works.`
 
748
  = 0.31 - 2004-12 & 2005-01 =
749
  * (Has it been this long, best get back into the swing of things... did most of this coding on my holiday as I didn't have a machine to play WoW on :)
750
  * moved the deletion of pop3 emails into a check so that e-mails aren't deleted without proper checking.
22
  Attachments are now processed in the order they were attached.
23
 
24
  == CHANGELOG ==
25
+ = 1.5.6 (future) =
26
+ * Fixed bug where default post format was empty when the theme didn't support any formats.
27
+ * Removed all hard coded references to wp-content.
28
+ * Fixed bug where caption wasn't being filled out in templates.
29
+ * Updated direct DB access to use standard methods.
30
+ * Added attachment template for non-audio/image/video attachments.
31
+ * Added additional checks to the test screen.
32
+ * Added new template variable {ICON}
33
+
34
  = 1.5.5 (2013.05.02) =
35
  * Added ability to run a manual check with debugging output.
36
  * Added support for default post type.
450
  * No longer directly including pluggable.php (should
451
  prevent conflicts with other plugins such as registerplus
452
 
 
453
  = 1.1.5 (2009.03.10) =
454
  * Added option to have postie posts be pending review, published, or draft
455
  * Settings panel only shows up for administrators
476
  * replying to an e*mail adds a comment to a post
477
  * fixed category handling to work with taxonomy
478
  * fixed one syntax error
479
+ * added option to wrap posts and comments in <pre> tags
 
480
 
481
  = 1.1.1 =
482
 
512
 
513
  = 0.9.9.3.2 =
514
  * BUGFIX: Typo
515
+
516
  = 0.9.9.3.1 =
517
  * BUGFIX: Removed debugging code
518
 
519
  = 0.9.9.3 =
520
  * BUGFIX: If your email address matches an existing user - then it will post as that user - even if you allow anyone to post.
521
  * BUGFIX: Replaced get_settings('home') with get_settings('siteurl')
522
+ * BUGFIX: Better handling for Japanese character sets - Thanks to http://www.souzouzone.jp/blog/archives/009531.html
523
  * BUGFIX: Better thumbnail window opening code - thanks to Gabi & Duntello!
524
  * FEATURE: Added an option to set the MAX Height of an image - idea from Duntello
525
  * BUGFIX: Modified the FilterNewLines for better flowed text handling - You now HAVE TO PUT TWO NEW LINES to end a paragraph.
527
  * BUGFIX: Tries to use the date in the message (Thanks Ravan) I tried this once before and it never worked - hopefully this time it will.
528
  * BUGFIX: Added a workaround to fix the problem with Subscribe2 - it will now notify on posts that are not set to show up in the future.
529
 
 
 
530
  = 0.9.9.2 =
531
  * BUGFIX: Looks for the NOOP error and disgards it
532
  * FEATURE: Postie now detects the version of WordPress being used
557
  * FEATURE: Added option to turn of quoted printable decoding
558
  * FEATURE: :start tag - now postie looks for this tag before looking for you message - handy if your service provider prepends a message
559
  * FEATURE: Template for translation now included
560
+
561
  = 0.9.8.4 =
562
  * BUGFIX: Fixed problem with config_form.php - select had "NULL" instead of ""
563
  * BUGFIX: 3g2 now supported
580
  * BUGFIX: Email that has both Plain and HTML content will show the HTML content and not the plain if html is preferred
581
 
582
  = 0.9.8.2 =
583
+ * BUGFIX: Fixed an extra new line after attaching non-image files.
584
  * BUGFIX: The Test system now displays any missing gd functions
585
  * BUGFIX: The test system was only using ImageMagick
586
 
617
  * FEATURE: Option to embed 3GP in QuickTime Controller.
618
 
619
  = 0.9.5.2 =
620
+ * BUGFIX: gmt variable not being set correctly
621
  * BUGFIX: Changed the name of the Check Mail button to fix an issue with mod_security
622
  * BUGFIX: Fixed issue with Cronless-Postie
623
  * BUGFIX: There was an argument passed by reference incorrectly
642
  * BUGFIX: fixed issue of compatability with cjd-notepad
643
  * BUGFIX: Windows Works Now
644
 
 
645
  = 0.9.4 =
646
  * BUGFIX: Cronless Postie - fixed the include statement
647
  * BUGFIX: Authorized Addresses now supports a single address
655
 
656
  = 0.9.3 =
657
  * Bug fixes for IIS
658
+
659
  = 0.9.2 =
660
  * Moved to more of a DIRECTORY_SEPARATOR structure
661
+
662
  = 0.9.1 =
663
  * Added a define to fix a problem with over including
664
+
665
  = 0.9 =
666
  * Converted to an honest to god plugin
667
  * BUGFIX: If you put a single category:subject it now works
668
  * BUGFIX: ? Special characters may be supported? The test post now shows a lot of umlats and accents?
669
  * BUGFIX: The last ] in a subject with categories is now filtered out
670
  * FEATURE: -1- subject - will put the post in category 1
671
+
672
  = 0.312.13 =
673
  * Code clean up - The main loop is finally readable by even non programmers
674
  * FEATURE - You can now post to multiple categories at one time by using the [#],[Category Name], [Cat] in the subject
680
  * BUG FIX: Able to handle mis-mime typed images as long as they are named with .jpg/.gif/.png
681
 
682
  = 0.312.12 =
683
+ * Code clean up - slowing shrinking the main to make it easier to fix things
684
  * FEATURE: Be able to turn on/off allowing comments in an email
685
  * BUG FIX: AppleDouble now mostly supported
686
  * BUG FIX: MIME handling improved.
687
  * BUG FIX: Fix issue with timing delay
688
+
689
  = 0.312.11 =
690
  * FEATURE: Patterns to define where a sig starts are user configurable
691
  * FEATURE: Add filter options for banned file names
692
  * BUG FIX: Made it possible to turn off posting to the db for testing purposes
693
+
694
  = 0.312.10 =
695
  * FEATURE: Added in code to diplay the mime type of the file being linked to
696
  * BUG FIX: It now tests for the existance of the directories and makes sure
697
  * that the web server can write to them
698
+
699
  = 0.312.9 =
700
  * FEATURE:Should handle jpg as well as jpeg as the file type
701
  * BUG FIX: Now correctly handles the subject in the message
702
  * BUG FIX: Should handle Text preferences correctly
703
+
704
  = 0.312.8 =
705
  * Some general code tidying.
706
+ * FEATURE: Can now have email from invalid email addresses automatically forwarded
707
  * to the admin's email account. This forward includes all attachments.
708
  * Props to David Luden for getting this started.
709
  * Minor change: The system will continue if it runs into a message that doesn't have
710
  * any content - it will also continue to process if it gets an email from
711
  * someone not in the system. In the past this could result in deleted mail
712
  * if your cron job didn't run often enough.
713
+
714
  = 0.312.7 =
715
  * Confirm the handling of 3gp video for cell phones o
716
  * Added in new directive SUPPORTED_FILE_TYPES -if the mime type is listed here then the system will try to make a link to it without making a thumb nail.
717
+
718
  = 0.312.6 =
719
  * Bug Fix: Ok the last bug I fixed - actually caused another bug - man I should set up some unit tests. Now it handles mail from the nokia mail client correctly.
720
+
721
  = 0.312.5 =
722
+ * Bug Fix : The system was accepting all text/* types. Now you can set a preference (defaults to text/plain)
723
  * to use as the main text for the post.
724
+
725
  = 0.312.4 =
726
  * Added in sanitize_title call suggested by Jemima
727
  * Added in ability to provide a subject in an mms - by using #Subject#
743
 
744
  = 0.312.2 =
745
  * BUGFIX: It now removes the delay tag from the message
746
+
747
  = 0.312.1 =
748
  * Added modification for placeholder support for images (David Luden)
749
  * Added in support to automatically scale down big images (Dirk Elmendorf)
752
  * Switch config options to defines to reduce the number of global variables (Dirk Elmendorf)
753
  * Added tests to make sure there is a trailing slash on the DIR definitions (Dirk Elmendorf)
754
  * Add tests to see if they have gd installed (Dirk Elmendorf)
755
+ * Separate the scaling out to a function for easier usage (Dirk Elmendorf)
756
  * Add delay feature for future posting. (Dirk Elmendorf)
757
  * Added in ability to use strtotime if it is available (Dirk ELmendorf)
758
 
 
 
 
759
  = 0.312 - 2005-03 =
760
  * CHANGE FOR DEFAULT E-mail Categories, instead of [General] Subject you can now use General: Subject in the subject line. Less typing, and there must be a space after the colon.
761
  * Fixed bugs with no default posting for categories and user
762
+
763
  = 0.311 - 2005-01 =
764
  * eep, major bug for pop3 server. Next time I test my code more before I released, fixed so that pop3 now works.`
765
+
766
  = 0.31 - 2004-12 & 2005-01 =
767
  * (Has it been this long, best get back into the swing of things... did most of this coding on my holiday as I didn't have a machine to play WoW on :)
768
  * moved the deletion of pop3 emails into a check so that e-mails aren't deleted without proper checking.
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.5
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.6
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
docs/TODO.txt CHANGED
@@ -1,5 +1,4 @@
1
  provide a location for custom icons. update docs about location.
2
- handle condition where only one of text/plain & text/html is supplied, but Preferred Text Type is set to the opposite.
3
  replace native imap MIME parser with flourish - http://flourishlib.com/docs/fMailbox
4
  automatically create category if it doesn't exist. new option to allow this feature?
5
  WP MU support
@@ -12,6 +11,8 @@ rework attachment logic. video files can come through as application/octect-stre
12
  date: tag is being detected in body when not wanted
13
  Enhance #img# to specify the featured image
14
  Update tag_* and filter_* to handle HTML (per tag_Tags)
 
 
15
 
16
  standardize tags
17
  fix postie settings http://alisothegeek.com/2011/01/wordpress-settings-api-tutorial-1/
1
  provide a location for custom icons. update docs about location.
 
2
  replace native imap MIME parser with flourish - http://flourishlib.com/docs/fMailbox
3
  automatically create category if it doesn't exist. new option to allow this feature?
4
  WP MU support
11
  date: tag is being detected in body when not wanted
12
  Enhance #img# to specify the featured image
13
  Update tag_* and filter_* to handle HTML (per tag_Tags)
14
+ "yoast" style admin sidebar - see clicky by yoast
15
+ handle condition where only one of text/plain & text/html is supplied, but Preferred Text Type is set to the opposite.
16
 
17
  standardize tags
18
  fix postie settings http://alisothegeek.com/2011/01/wordpress-settings-api-tutorial-1/
docs/Usage.txt CHANGED
@@ -126,6 +126,7 @@ Note you can only use this feature if your "Preferred Text Type" is set to "plai
126
  * {TITLE} same as {POSTTITLE}
127
  * {URL} same as {FILELINK}
128
  * {WIDTH} gets replaced with width of the photo
 
129
 
130
 
131
  = Interoperability =
126
  * {TITLE} same as {POSTTITLE}
127
  * {URL} same as {FILELINK}
128
  * {WIDTH} gets replaced with width of the photo
129
+ * {ICON} insert the icon for the attachment (for non-audio/image/video attachments only)
130
 
131
 
132
  = Interoperability =
get_mail.php CHANGED
@@ -14,13 +14,13 @@ if (!function_exists('file_get_html'))
14
  require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . 'simple_html_dom.php');
15
 
16
  EchoInfo("Starting mail fetch");
17
- EchoInfo("Postie Version: ". POSTIE_VERSION);
18
  EchoInfo("Debug mode: " . (IsDebugMode() ? "On" : "Off"));
19
  EchoInfo("Time: " . date('Y-m-d H:i:s', time()) . " GMT");
20
  $wp_content_path = dirname(dirname(dirname(__FILE__)));
21
  DebugEcho("wp_content_path: $wp_content_path");
22
  if (file_exists($wp_content_path . DIRECTORY_SEPARATOR . "filterPostie.php")) {
23
- DebugEcho("found filterPostie.php in wp-content");
24
  include_once ($wp_content_path . DIRECTORY_SEPARATOR . "filterPostie.php");
25
  }
26
 
14
  require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . 'simple_html_dom.php');
15
 
16
  EchoInfo("Starting mail fetch");
17
+ EchoInfo("Postie Version: " . POSTIE_VERSION);
18
  EchoInfo("Debug mode: " . (IsDebugMode() ? "On" : "Off"));
19
  EchoInfo("Time: " . date('Y-m-d H:i:s', time()) . " GMT");
20
  $wp_content_path = dirname(dirname(dirname(__FILE__)));
21
  DebugEcho("wp_content_path: $wp_content_path");
22
  if (file_exists($wp_content_path . DIRECTORY_SEPARATOR . "filterPostie.php")) {
23
+ DebugEcho("found filterPostie.php in $wp_content_path");
24
  include_once ($wp_content_path . DIRECTORY_SEPARATOR . "filterPostie.php");
25
  }
26
 
postie-functions.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  /*
4
- $Id: postie-functions.php 707119 2013-05-02 19:59:45Z WayneAllen $
5
  */
6
 
7
  //to turn on debug output add the following line to wp-config.php
@@ -945,7 +945,6 @@ function GetContent($part, &$attachments, $post_id, $poster, $config) {
945
  filter_PreferedText($part, $prefer_text_type);
946
  foreach ($part->parts as $section) {
947
  //DebugDump($section->headers);
948
-
949
  $meta_return .= GetContent($section, $attachments, $post_id, $poster, $config);
950
  }
951
  break;
@@ -1126,7 +1125,8 @@ function GetContent($part, &$attachments, $post_id, $poster, $config) {
1126
  DebugEcho("uploaded $file_id ($file)");
1127
  $icon = chooseAttachmentIcon($file, $mimetype_primary, $mimetype_secondary, $icon_set, $icon_size);
1128
  DebugEcho("default: $icon $filename");
1129
- $attachments["html"][$filename] = "<a href='$file'>" . $icon . $filename . '</a>' . "\n";
 
1130
  if (array_key_exists('content-id', $part->headers)) {
1131
  $cid = trim($part->headers["content-id"], "<>");
1132
  if ($cid) {
@@ -1270,8 +1270,9 @@ function ValidatePoster(&$mimeDecodedEmail, $config) {
1270
  //See if the email address is one of the special authorized ones
1271
  if (!empty($from)) {
1272
  EchoInfo("Confirming Access For $from ");
1273
- $sql = 'SELECT id FROM ' . $wpdb->users . ' WHERE user_email=\'' . addslashes($from) . "' LIMIT 1;";
1274
- $user_ID = $wpdb->get_var($sql);
 
1275
  } else {
1276
  $user_ID = "";
1277
  }
@@ -1281,20 +1282,22 @@ function ValidatePoster(&$mimeDecodedEmail, $config) {
1281
  $poster = $user_ID;
1282
  EchoInfo("posting as user $poster");
1283
  } else {
1284
- $poster = $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE user_login = '$admin_username'");
1285
- if (!$poster) {
1286
  EchoInfo("Your 'Admin username' setting '$admin_username' is not a valid WordPress user (1)");
1287
  $poster = 1;
1288
  }
1289
  }
1290
  } elseif ($turn_authorization_off || isEmailAddressAuthorized($from, $authorized_addresses) || isEmailAddressAuthorized($resentFrom, $authorized_addresses)) {
1291
  DebugEcho("ValidatePoster: looking up default user $admin_username");
1292
- $poster = $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE user_login = '$admin_username'");
1293
- DebugEcho("ValidatePoster: found user '$poster'");
1294
- if (empty($poster)) {
1295
  EchoInfo("Your 'Admin username' setting '$admin_username' is not a valid WordPress user (2)");
1296
  $poster = 1;
 
 
1297
  }
 
1298
  }
1299
 
1300
  $validSMTP = isValidSmtpServer($mimeDecodedEmail, $smtp);
@@ -2120,7 +2123,8 @@ function chooseAttachmentIcon($file, $primary, $secondary, $iconSet = 'silver',
2120
  return $iconHtml;
2121
  }
2122
 
2123
- function parseTemplate($id, $type, $template, $orig_filename) {
 
2124
  $size = 'medium';
2125
  /* we check template for thumb, thumbnail, large, full and use that as
2126
  size. If not found, we default to medium */
@@ -2165,14 +2169,15 @@ function parseTemplate($id, $type, $template, $orig_filename) {
2165
  $template = str_replace('{URL}', $fileLink, $template);
2166
  $template = str_replace('{RELFILENAME}', $relFileName, $template);
2167
  $template = str_replace('{POSTTITLE}', $the_parent->post_title, $template);
 
2168
  if ($attachment->post_excerpt != '') {
2169
  $template = str_replace('{CAPTION}', $attachment->post_excerpt, $template);
2170
  } elseif (!preg_match("/$attachment->post_title/i", $fileName)) {
2171
  $template = str_replace('{CAPTION}', $attachment->post_title, $template);
2172
  } else {
2173
-
2174
  }
2175
- DebugEcho("template: $template");
2176
  return $template . '<br />';
2177
  }
2178
 
@@ -2592,6 +2597,7 @@ function config_GetDefaults() {
2592
  include('templates/image_templates.php');
2593
  include('templates/video1_templates.php');
2594
  include('templates/video2_templates.php');
 
2595
  return array(
2596
  'add_meta' => 'no',
2597
  'admin_username' => 'admin',
@@ -2658,7 +2664,10 @@ function config_GetDefaults() {
2658
  'featured_image' => false,
2659
  'email_tls' => false,
2660
  'post_format' => 'standard',
2661
- 'post_type' => 'post'
 
 
 
2662
  );
2663
  }
2664
 
@@ -2790,8 +2799,7 @@ function config_UpgradeOld() {
2790
  if (!isset($config["ICON_SIZE"]))
2791
  $config["ICON_SIZE"] = 32;
2792
 
2793
-
2794
- //audio
2795
  include('templates/audio_templates.php');
2796
  if (!isset($config["SELECTED_AUDIOTEMPLATE"]))
2797
  $config['SELECTED_AUDIOTEMPLATE'] = 'simple_link';
@@ -2801,7 +2809,7 @@ function config_UpgradeOld() {
2801
  if (!isset($config["AUDIOTEMPLATE"]))
2802
  $config["AUDIOTEMPLATE"] = $simple_link;
2803
 
2804
- //video1
2805
  if (!isset($config["VIDEO1TYPES"]))
2806
  $config['VIDEO1TYPES'] = array('mp4', 'mpeg4', '3gp', '3gpp', '3gpp2', '3gp2', 'mov', 'mpeg', 'quicktime');
2807
  if (!isset($config["AUDIOTYPES"]))
@@ -2813,7 +2821,7 @@ function config_UpgradeOld() {
2813
  if (!isset($config["VIDEO1TEMPLATE"]))
2814
  $config["VIDEO1TEMPLATE"] = $simple_link;
2815
 
2816
- //video2
2817
  if (!isset($config["VIDEO2TYPES"]))
2818
  $config['VIDEO2TYPES'] = array('x-flv');
2819
  if (!isset($config["POST_STATUS"]))
@@ -2827,7 +2835,7 @@ function config_UpgradeOld() {
2827
  if (!isset($config["VIDEO2TEMPLATE"]))
2828
  $config["VIDEO2TEMPLATE"] = $simple_link;
2829
 
2830
- //image
2831
  if (!isset($config["SELECTED_IMAGETEMPLATE"]))
2832
  $config['SELECTED_IMAGETEMPLATE'] = 'wordpress_default';
2833
  if (!isset($config["SMTP"]))
@@ -2837,6 +2845,11 @@ function config_UpgradeOld() {
2837
  $config["IMAGETEMPLATE"] = $wordpress_default;
2838
  $config['IMAGETEMPLATES'] = $imageTemplates;
2839
 
 
 
 
 
 
2840
  return($config);
2841
  }
2842
 
1
  <?php
2
 
3
  /*
4
+ $Id: postie-functions.php 709665 2013-05-08 02:16:51Z WayneAllen $
5
  */
6
 
7
  //to turn on debug output add the following line to wp-config.php
945
  filter_PreferedText($part, $prefer_text_type);
946
  foreach ($part->parts as $section) {
947
  //DebugDump($section->headers);
 
948
  $meta_return .= GetContent($section, $attachments, $post_id, $poster, $config);
949
  }
950
  break;
1125
  DebugEcho("uploaded $file_id ($file)");
1126
  $icon = chooseAttachmentIcon($file, $mimetype_primary, $mimetype_secondary, $icon_set, $icon_size);
1127
  DebugEcho("default: $icon $filename");
1128
+ //$attachments["html"][$filename] = "<div class='postie-attachment-general'><a href='$file'>" . $icon . $filename . '</a></div>' . "\n";
1129
+ $attachments["html"][$filename] = parseTemplate($file_id, $mimetype_primary, $generaltemplate, $filename, $icon);
1130
  if (array_key_exists('content-id', $part->headers)) {
1131
  $cid = trim($part->headers["content-id"], "<>");
1132
  if ($cid) {
1270
  //See if the email address is one of the special authorized ones
1271
  if (!empty($from)) {
1272
  EchoInfo("Confirming Access For $from ");
1273
+ $user = get_user_by('email', $from);
1274
+ if ($user !== false)
1275
+ $user_ID = $user->ID;
1276
  } else {
1277
  $user_ID = "";
1278
  }
1282
  $poster = $user_ID;
1283
  EchoInfo("posting as user $poster");
1284
  } else {
1285
+ $user = get_user_by('login', $admin_username);
1286
+ if ($user === false) {
1287
  EchoInfo("Your 'Admin username' setting '$admin_username' is not a valid WordPress user (1)");
1288
  $poster = 1;
1289
  }
1290
  }
1291
  } elseif ($turn_authorization_off || isEmailAddressAuthorized($from, $authorized_addresses) || isEmailAddressAuthorized($resentFrom, $authorized_addresses)) {
1292
  DebugEcho("ValidatePoster: looking up default user $admin_username");
1293
+ $user = get_user_by('login', $admin_username);
1294
+ if ($user === false) {
 
1295
  EchoInfo("Your 'Admin username' setting '$admin_username' is not a valid WordPress user (2)");
1296
  $poster = 1;
1297
+ } else {
1298
+ $poster = $user->ID;
1299
  }
1300
+ DebugEcho("ValidatePoster: found user '$poster'");
1301
  }
1302
 
1303
  $validSMTP = isValidSmtpServer($mimeDecodedEmail, $smtp);
2123
  return $iconHtml;
2124
  }
2125
 
2126
+ function parseTemplate($id, $type, $template, $orig_filename, $icon = "") {
2127
+ DebugEcho("parseTemplate - before: $template");
2128
  $size = 'medium';
2129
  /* we check template for thumb, thumbnail, large, full and use that as
2130
  size. If not found, we default to medium */
2169
  $template = str_replace('{URL}', $fileLink, $template);
2170
  $template = str_replace('{RELFILENAME}', $relFileName, $template);
2171
  $template = str_replace('{POSTTITLE}', $the_parent->post_title, $template);
2172
+ $template = str_replace('{ICON}', $icon, $template);
2173
  if ($attachment->post_excerpt != '') {
2174
  $template = str_replace('{CAPTION}', $attachment->post_excerpt, $template);
2175
  } elseif (!preg_match("/$attachment->post_title/i", $fileName)) {
2176
  $template = str_replace('{CAPTION}', $attachment->post_title, $template);
2177
  } else {
2178
+ $template = str_replace('{CAPTION}', $orig_filename, $template);
2179
  }
2180
+ DebugEcho("parseTemplate - after: $template");
2181
  return $template . '<br />';
2182
  }
2183
 
2597
  include('templates/image_templates.php');
2598
  include('templates/video1_templates.php');
2599
  include('templates/video2_templates.php');
2600
+ include 'templates/general_template.php';
2601
  return array(
2602
  'add_meta' => 'no',
2603
  'admin_username' => 'admin',
2664
  'featured_image' => false,
2665
  'email_tls' => false,
2666
  'post_format' => 'standard',
2667
+ 'post_type' => 'post',
2668
+ 'generaltemplates' => $generalTemplates,
2669
+ 'generaltemplate' => $postie_default,
2670
+ 'selected_generaltemplate' => 'postie_default'
2671
  );
2672
  }
2673
 
2799
  if (!isset($config["ICON_SIZE"]))
2800
  $config["ICON_SIZE"] = 32;
2801
 
2802
+ //audio
 
2803
  include('templates/audio_templates.php');
2804
  if (!isset($config["SELECTED_AUDIOTEMPLATE"]))
2805
  $config['SELECTED_AUDIOTEMPLATE'] = 'simple_link';
2809
  if (!isset($config["AUDIOTEMPLATE"]))
2810
  $config["AUDIOTEMPLATE"] = $simple_link;
2811
 
2812
+ //video1
2813
  if (!isset($config["VIDEO1TYPES"]))
2814
  $config['VIDEO1TYPES'] = array('mp4', 'mpeg4', '3gp', '3gpp', '3gpp2', '3gp2', 'mov', 'mpeg', 'quicktime');
2815
  if (!isset($config["AUDIOTYPES"]))
2821
  if (!isset($config["VIDEO1TEMPLATE"]))
2822
  $config["VIDEO1TEMPLATE"] = $simple_link;
2823
 
2824
+ //video2
2825
  if (!isset($config["VIDEO2TYPES"]))
2826
  $config['VIDEO2TYPES'] = array('x-flv');
2827
  if (!isset($config["POST_STATUS"]))
2835
  if (!isset($config["VIDEO2TEMPLATE"]))
2836
  $config["VIDEO2TEMPLATE"] = $simple_link;
2837
 
2838
+ //image
2839
  if (!isset($config["SELECTED_IMAGETEMPLATE"]))
2840
  $config['SELECTED_IMAGETEMPLATE'] = 'wordpress_default';
2841
  if (!isset($config["SMTP"]))
2845
  $config["IMAGETEMPLATE"] = $wordpress_default;
2846
  $config['IMAGETEMPLATES'] = $imageTemplates;
2847
 
2848
+ //general
2849
+ include('templates/general_templates.php');
2850
+ if (!isset($config["GENERALTEMPLATE"]))
2851
+ $config["GENERALTEMPLATE"] = $postie_default;
2852
+
2853
  return($config);
2854
  }
2855
 
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.5
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 707119 2013-05-02 19:59:45Z WayneAllen $
31
  */
32
 
33
- define('POSTIE_VERSION', '1.5.5');
34
  define("POSTIE_ROOT", dirname(__FILE__));
35
  define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
36
 
@@ -55,10 +55,9 @@ function postie_loadjs_options_page() {
55
  }
56
 
57
  function postie_loadjs_admin_head() {
58
- $plugindir = get_option('siteurl') . '/wp-content/plugins/' . dirname(plugin_basename(__FILE__));
59
- wp_enqueue_script('loadjs', $plugindir . '/js/simpleTabs.jquery.js');
60
- echo '<link type="text/css" rel="stylesheet" href="' . get_bloginfo('wpurl') . '/wp-content/plugins/postie/css/style.css" />' . "\n";
61
- echo '<link type="text/css" rel="stylesheet" href="' . get_bloginfo('wpurl') . '/wp-content/plugins/postie/css/simpleTabs.css" />' . "\n";
62
  }
63
 
64
  if (isset($_GET["postie_read_me"])) {
@@ -206,15 +205,18 @@ function postie_whitelist($options) {
206
  //don't use DebugEcho or EchoInfo here as it is not defined when called as an action
207
  function check_postie() {
208
  error_log("check_postie");
209
- $host = get_option('siteurl');
210
- preg_match("/https?:\/\/(.[^\/]*)(.*)/i", $host, $matches);
 
211
  $host = $matches[1];
 
212
  $url = "";
213
  if (isset($matches[2])) {
214
- $url .= $matches[2];
215
  }
216
- $url .= "/wp-content/plugins/postie/get_mail.php";
217
- $port = 80;
 
218
  $fp = fsockopen($host, $port, $errno, $errstr);
219
  if ($fp) {
220
  fputs($fp, "GET $url HTTP/1.0\r\n");
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.6
8
  Author: Wayne Allen
9
  Author URI: http://allens-home.com/
10
  License: GPL2
27
  */
28
 
29
  /*
30
+ $Id: postie.php 709665 2013-05-08 02:16:51Z WayneAllen $
31
  */
32
 
33
+ define('POSTIE_VERSION', '1.5.6');
34
  define("POSTIE_ROOT", dirname(__FILE__));
35
  define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
36
 
55
  }
56
 
57
  function postie_loadjs_admin_head() {
58
+ wp_enqueue_script('loadjs', plugins_url('js/simpleTabs.jquery.js', __FILE__));
59
+ echo '<link type="text/css" rel="stylesheet" href="' . plugins_url('css/style.css', __FILE__) . "\"/>\n";
60
+ echo '<link type="text/css" rel="stylesheet" href="' . plugins_url('css/simpleTabs.css', __FILE__) . "\"/>\n";
 
61
  }
62
 
63
  if (isset($_GET["postie_read_me"])) {
205
  //don't use DebugEcho or EchoInfo here as it is not defined when called as an action
206
  function check_postie() {
207
  error_log("check_postie");
208
+
209
+ $fullurl = plugins_url("get_mail.php", __FILE__);
210
+ preg_match("/https?:\/\/(.[^\/]*)(.*)/i", $fullurl, $matches);
211
  $host = $matches[1];
212
+
213
  $url = "";
214
  if (isset($matches[2])) {
215
+ $url = $matches[2];
216
  }
217
+
218
+ $port = is_ssl() ? 443 : 80;
219
+
220
  $fp = fsockopen($host, $port, $errno, $errstr);
221
  if ($fp) {
222
  fputs($fp, "GET $url HTTP/1.0\r\n");
postie_test.php CHANGED
@@ -36,6 +36,13 @@ DebugEcho("Error log: " . ini_get('error_log'));
36
  if (defined('DISABLE_WP_CRON') && DISABLE_WP_CRON) {
37
  EchoInfo("WordPress cron is disabled. Postie will not run unless you have an external cron set up.");
38
  }
 
 
 
 
 
 
 
39
  ?>
40
 
41
  <br/>
@@ -87,7 +94,7 @@ DebugEcho("Error log: " . ini_get('error_log'));
87
  } else {
88
  require_once("postieIMAP.php");
89
  $mail_server = &PostieIMAP::Factory($config["input_protocol"]);
90
- if ($email_tls){
91
  $mail_server->TLSOn();
92
  }
93
  if (!$mail_server->connect($config["mail_server"], $config["mail_server_port"], $config["mail_userid"], $config["mail_password"])) {
36
  if (defined('DISABLE_WP_CRON') && DISABLE_WP_CRON) {
37
  EchoInfo("WordPress cron is disabled. Postie will not run unless you have an external cron set up.");
38
  }
39
+
40
+ EchoInfo("Cron: " . (defined('DISABLE_WP_CRON') && DISABLE_WP_CRON === true ? "Of" : "On"));
41
+ EchoInfo("Alternate Cron: " . (defined('ALTERNATE_WP_CRON') && ALTERNATE_WP_CRON === true ? "On" : "Off"));
42
+
43
+ if (defined('WP_CRON_LOCK_TIMEOUT') && WP_CRON_LOCK_TIMEOUT === true) {
44
+ EchoInfo("Cron lock timeout is:" . WP_CRON_LOCK_TIMEOUT);
45
+ }
46
  ?>
47
 
48
  <br/>
94
  } else {
95
  require_once("postieIMAP.php");
96
  $mail_server = &PostieIMAP::Factory($config["input_protocol"]);
97
+ if ($email_tls) {
98
  $mail_server->TLSOn();
99
  }
100
  if (!$mail_server->connect($config["mail_server"], $config["mail_server_port"], $config["mail_userid"], $config["mail_password"])) {
readme.html CHANGED
@@ -111,7 +111,7 @@ Post status setting was renamed to Default Post Status and moved to the Message
111
  <h4>Post Date</h4>
112
 
113
  <ul>
114
- <li>Posts can have a specific publication date. Relative dates like "tomorrow", "monday", "first day of next month" are supported.
115
 
116
  <ul>
117
  <li>date: date</li>
@@ -259,6 +259,7 @@ class='imagecaption'&gt;{CAPTION}&lt;/div&gt;&lt;/div&gt;</code></p>
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
  </ul></li>
263
  </ul>
264
 
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>
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
 
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.5
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -207,6 +207,7 @@ Note you can only use this feature if your "Preferred Text Type" is set to "plai
207
  * {TITLE} same as {POSTTITLE}
208
  * {URL} same as {FILELINK}
209
  * {WIDTH} gets replaced with width of the photo
 
210
 
211
 
212
  = Interoperability =
@@ -443,6 +444,15 @@ All script, style and body tags are stripped from html emails.
443
  Attachments are now processed in the order they were attached.
444
 
445
  == CHANGELOG ==
 
 
 
 
 
 
 
 
 
446
  = 1.5.5 (2013.05.02) =
447
  * Added ability to run a manual check with debugging output.
448
  * Added support for default post type.
@@ -862,7 +872,6 @@ Attachments are now processed in the order they were attached.
862
  * No longer directly including pluggable.php (should
863
  prevent conflicts with other plugins such as registerplus
864
 
865
-
866
  = 1.1.5 (2009.03.10) =
867
  * Added option to have postie posts be pending review, published, or draft
868
  * Settings panel only shows up for administrators
@@ -889,8 +898,7 @@ Attachments are now processed in the order they were attached.
889
  * replying to an e*mail adds a comment to a post
890
  * fixed category handling to work with taxonomy
891
  * fixed one syntax error
892
- * added option to wrap posts and comments in <pre%gt; tags
893
-
894
 
895
  = 1.1.1 =
896
 
@@ -926,13 +934,14 @@ plugin. And the rest is history :)
926
 
927
  = 0.9.9.3.2 =
928
  * BUGFIX: Typo
 
929
  = 0.9.9.3.1 =
930
  * BUGFIX: Removed debugging code
931
 
932
  = 0.9.9.3 =
933
  * BUGFIX: If your email address matches an existing user - then it will post as that user - even if you allow anyone to post.
934
  * BUGFIX: Replaced get_settings('home') with get_settings('siteurl')
935
- * BUGFIX: Better handling for Japanese charactersets - Thanks to http://www.souzouzone.jp/blog/archives/009531.html
936
  * BUGFIX: Better thumbnail window opening code - thanks to Gabi & Duntello!
937
  * FEATURE: Added an option to set the MAX Height of an image - idea from Duntello
938
  * BUGFIX: Modified the FilterNewLines for better flowed text handling - You now HAVE TO PUT TWO NEW LINES to end a paragraph.
@@ -940,8 +949,6 @@ plugin. And the rest is history :)
940
  * BUGFIX: Tries to use the date in the message (Thanks Ravan) I tried this once before and it never worked - hopefully this time it will.
941
  * BUGFIX: Added a workaround to fix the problem with Subscribe2 - it will now notify on posts that are not set to show up in the future.
942
 
943
-
944
-
945
  = 0.9.9.2 =
946
  * BUGFIX: Looks for the NOOP error and disgards it
947
  * FEATURE: Postie now detects the version of WordPress being used
@@ -972,6 +979,7 @@ plugin. And the rest is history :)
972
  * FEATURE: Added option to turn of quoted printable decoding
973
  * FEATURE: :start tag - now postie looks for this tag before looking for you message - handy if your service provider prepends a message
974
  * FEATURE: Template for translation now included
 
975
  = 0.9.8.4 =
976
  * BUGFIX: Fixed problem with config_form.php - select had "NULL" instead of ""
977
  * BUGFIX: 3g2 now supported
@@ -994,7 +1002,7 @@ plugin. And the rest is history :)
994
  * BUGFIX: Email that has both Plain and HTML content will show the HTML content and not the plain if html is preferred
995
 
996
  = 0.9.8.2 =
997
- * BUGFIX: Fixed an extra new line after attachin non-image files.
998
  * BUGFIX: The Test system now displays any missing gd functions
999
  * BUGFIX: The test system was only using ImageMagick
1000
 
@@ -1031,7 +1039,7 @@ plugin. And the rest is history :)
1031
  * FEATURE: Option to embed 3GP in QuickTime Controller.
1032
 
1033
  = 0.9.5.2 =
1034
- * BUGFIX: gmt varialble not being set correctly
1035
  * BUGFIX: Changed the name of the Check Mail button to fix an issue with mod_security
1036
  * BUGFIX: Fixed issue with Cronless-Postie
1037
  * BUGFIX: There was an argument passed by reference incorrectly
@@ -1056,7 +1064,6 @@ plugin. And the rest is history :)
1056
  * BUGFIX: fixed issue of compatability with cjd-notepad
1057
  * BUGFIX: Windows Works Now
1058
 
1059
-
1060
  = 0.9.4 =
1061
  * BUGFIX: Cronless Postie - fixed the include statement
1062
  * BUGFIX: Authorized Addresses now supports a single address
@@ -1070,16 +1077,20 @@ plugin. And the rest is history :)
1070
 
1071
  = 0.9.3 =
1072
  * Bug fixes for IIS
 
1073
  = 0.9.2 =
1074
  * Moved to more of a DIRECTORY_SEPARATOR structure
 
1075
  = 0.9.1 =
1076
  * Added a define to fix a problem with over including
 
1077
  = 0.9 =
1078
  * Converted to an honest to god plugin
1079
  * BUGFIX: If you put a single category:subject it now works
1080
  * BUGFIX: ? Special characters may be supported? The test post now shows a lot of umlats and accents?
1081
  * BUGFIX: The last ] in a subject with categories is now filtered out
1082
  * FEATURE: -1- subject - will put the post in category 1
 
1083
  = 0.312.13 =
1084
  * Code clean up - The main loop is finally readable by even non programmers
1085
  * FEATURE - You can now post to multiple categories at one time by using the [#],[Category Name], [Cat] in the subject
@@ -1091,40 +1102,48 @@ plugin. And the rest is history :)
1091
  * BUG FIX: Able to handle mis-mime typed images as long as they are named with .jpg/.gif/.png
1092
 
1093
  = 0.312.12 =
1094
- * Code clean up - slowing shrinking the main to make it easiery to fix things
1095
  * FEATURE: Be able to turn on/off allowing comments in an email
1096
  * BUG FIX: AppleDouble now mostly supported
1097
  * BUG FIX: MIME handling improved.
1098
  * BUG FIX: Fix issue with timing delay
 
1099
  = 0.312.11 =
1100
  * FEATURE: Patterns to define where a sig starts are user configurable
1101
  * FEATURE: Add filter options for banned file names
1102
  * BUG FIX: Made it possible to turn off posting to the db for testing purposes
 
1103
  = 0.312.10 =
1104
  * FEATURE: Added in code to diplay the mime type of the file being linked to
1105
  * BUG FIX: It now tests for the existance of the directories and makes sure
1106
  * that the web server can write to them
 
1107
  = 0.312.9 =
1108
  * FEATURE:Should handle jpg as well as jpeg as the file type
1109
  * BUG FIX: Now correctly handles the subject in the message
1110
  * BUG FIX: Should handle Text preferences correctly
 
1111
  = 0.312.8 =
1112
  * Some general code tidying.
1113
- * FEATURE: Can now have email from invalid email addresses automatically forwared
1114
  * to the admin's email account. This forward includes all attachments.
1115
  * Props to David Luden for getting this started.
1116
  * Minor change: The system will continue if it runs into a message that doesn't have
1117
  * any content - it will also continue to process if it gets an email from
1118
  * someone not in the system. In the past this could result in deleted mail
1119
  * if your cron job didn't run often enough.
 
1120
  = 0.312.7 =
1121
  * Confirm the handling of 3gp video for cell phones o
1122
  * Added in new directive SUPPORTED_FILE_TYPES -if the mime type is listed here then the system will try to make a link to it without making a thumb nail.
 
1123
  = 0.312.6 =
1124
  * Bug Fix: Ok the last bug I fixed - actually caused another bug - man I should set up some unit tests. Now it handles mail from the nokia mail client correctly.
 
1125
  = 0.312.5 =
1126
- * Bug Fix : The system was accepting all test/* types. Now you can set a preference (defaults to text/plain)
1127
  * to use as the main text for the post.
 
1128
  = 0.312.4 =
1129
  * Added in sanitize_title call suggested by Jemima
1130
  * Added in ability to provide a subject in an mms - by using #Subject#
@@ -1146,6 +1165,7 @@ plugin. And the rest is history :)
1146
 
1147
  = 0.312.2 =
1148
  * BUGFIX: It now removes the delay tag from the message
 
1149
  = 0.312.1 =
1150
  * Added modification for placeholder support for images (David Luden)
1151
  * Added in support to automatically scale down big images (Dirk Elmendorf)
@@ -1154,18 +1174,17 @@ plugin. And the rest is history :)
1154
  * Switch config options to defines to reduce the number of global variables (Dirk Elmendorf)
1155
  * Added tests to make sure there is a trailing slash on the DIR definitions (Dirk Elmendorf)
1156
  * Add tests to see if they have gd installed (Dirk Elmendorf)
1157
- * Seperate the scaling out to a function for easier usage (Dirk Elmendorf)
1158
  * Add delay feature for future posting. (Dirk Elmendorf)
1159
  * Added in ability to use strtotime if it is available (Dirk ELmendorf)
1160
 
1161
- * Todo
1162
- * Have option to have the email that is rejected forwarded on to another address.
1163
- * Fix bug that id still diplays the delay tag in the body
1164
  = 0.312 - 2005-03 =
1165
  * CHANGE FOR DEFAULT E-mail Categories, instead of [General] Subject you can now use General: Subject in the subject line. Less typing, and there must be a space after the colon.
1166
  * Fixed bugs with no default posting for categories and user
 
1167
  = 0.311 - 2005-01 =
1168
  * eep, major bug for pop3 server. Next time I test my code more before I released, fixed so that pop3 now works.`
 
1169
  = 0.31 - 2004-12 & 2005-01 =
1170
  * (Has it been this long, best get back into the swing of things... did most of this coding on my holiday as I didn't have a machine to play WoW on :)
1171
  * moved the deletion of pop3 emails into a check so that e-mails aren't deleted without proper checking.
6
  Tags: e-mail, email
7
  Requires at least: 3.0
8
  Tested up to: 3.5.1
9
+ Stable tag: 1.5.6
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
207
  * {TITLE} same as {POSTTITLE}
208
  * {URL} same as {FILELINK}
209
  * {WIDTH} gets replaced with width of the photo
210
+ * {ICON} insert the icon for the attachment (for non-audio/image/video attachments only)
211
 
212
 
213
  = Interoperability =
444
  Attachments are now processed in the order they were attached.
445
 
446
  == CHANGELOG ==
447
+ = 1.5.6 (future) =
448
+ * Fixed bug where default post format was empty when the theme didn't support any formats.
449
+ * Removed all hard coded references to wp-content.
450
+ * Fixed bug where caption wasn't being filled out in templates.
451
+ * Updated direct DB access to use standard methods.
452
+ * Added attachment template for non-audio/image/video attachments.
453
+ * Added additional checks to the test screen.
454
+ * Added new template variable {ICON}
455
+
456
  = 1.5.5 (2013.05.02) =
457
  * Added ability to run a manual check with debugging output.
458
  * Added support for default post type.
872
  * No longer directly including pluggable.php (should
873
  prevent conflicts with other plugins such as registerplus
874
 
 
875
  = 1.1.5 (2009.03.10) =
876
  * Added option to have postie posts be pending review, published, or draft
877
  * Settings panel only shows up for administrators
898
  * replying to an e*mail adds a comment to a post
899
  * fixed category handling to work with taxonomy
900
  * fixed one syntax error
901
+ * added option to wrap posts and comments in <pre> tags
 
902
 
903
  = 1.1.1 =
904
 
934
 
935
  = 0.9.9.3.2 =
936
  * BUGFIX: Typo
937
+
938
  = 0.9.9.3.1 =
939
  * BUGFIX: Removed debugging code
940
 
941
  = 0.9.9.3 =
942
  * BUGFIX: If your email address matches an existing user - then it will post as that user - even if you allow anyone to post.
943
  * BUGFIX: Replaced get_settings('home') with get_settings('siteurl')
944
+ * BUGFIX: Better handling for Japanese character sets - Thanks to http://www.souzouzone.jp/blog/archives/009531.html
945
  * BUGFIX: Better thumbnail window opening code - thanks to Gabi & Duntello!
946
  * FEATURE: Added an option to set the MAX Height of an image - idea from Duntello
947
  * BUGFIX: Modified the FilterNewLines for better flowed text handling - You now HAVE TO PUT TWO NEW LINES to end a paragraph.
949
  * BUGFIX: Tries to use the date in the message (Thanks Ravan) I tried this once before and it never worked - hopefully this time it will.
950
  * BUGFIX: Added a workaround to fix the problem with Subscribe2 - it will now notify on posts that are not set to show up in the future.
951
 
 
 
952
  = 0.9.9.2 =
953
  * BUGFIX: Looks for the NOOP error and disgards it
954
  * FEATURE: Postie now detects the version of WordPress being used
979
  * FEATURE: Added option to turn of quoted printable decoding
980
  * FEATURE: :start tag - now postie looks for this tag before looking for you message - handy if your service provider prepends a message
981
  * FEATURE: Template for translation now included
982
+
983
  = 0.9.8.4 =
984
  * BUGFIX: Fixed problem with config_form.php - select had "NULL" instead of ""
985
  * BUGFIX: 3g2 now supported
1002
  * BUGFIX: Email that has both Plain and HTML content will show the HTML content and not the plain if html is preferred
1003
 
1004
  = 0.9.8.2 =
1005
+ * BUGFIX: Fixed an extra new line after attaching non-image files.
1006
  * BUGFIX: The Test system now displays any missing gd functions
1007
  * BUGFIX: The test system was only using ImageMagick
1008
 
1039
  * FEATURE: Option to embed 3GP in QuickTime Controller.
1040
 
1041
  = 0.9.5.2 =
1042
+ * BUGFIX: gmt variable not being set correctly
1043
  * BUGFIX: Changed the name of the Check Mail button to fix an issue with mod_security
1044
  * BUGFIX: Fixed issue with Cronless-Postie
1045
  * BUGFIX: There was an argument passed by reference incorrectly
1064
  * BUGFIX: fixed issue of compatability with cjd-notepad
1065
  * BUGFIX: Windows Works Now
1066
 
 
1067
  = 0.9.4 =
1068
  * BUGFIX: Cronless Postie - fixed the include statement
1069
  * BUGFIX: Authorized Addresses now supports a single address
1077
 
1078
  = 0.9.3 =
1079
  * Bug fixes for IIS
1080
+
1081
  = 0.9.2 =
1082
  * Moved to more of a DIRECTORY_SEPARATOR structure
1083
+
1084
  = 0.9.1 =
1085
  * Added a define to fix a problem with over including
1086
+
1087
  = 0.9 =
1088
  * Converted to an honest to god plugin
1089
  * BUGFIX: If you put a single category:subject it now works
1090
  * BUGFIX: ? Special characters may be supported? The test post now shows a lot of umlats and accents?
1091
  * BUGFIX: The last ] in a subject with categories is now filtered out
1092
  * FEATURE: -1- subject - will put the post in category 1
1093
+
1094
  = 0.312.13 =
1095
  * Code clean up - The main loop is finally readable by even non programmers
1096
  * FEATURE - You can now post to multiple categories at one time by using the [#],[Category Name], [Cat] in the subject
1102
  * BUG FIX: Able to handle mis-mime typed images as long as they are named with .jpg/.gif/.png
1103
 
1104
  = 0.312.12 =
1105
+ * Code clean up - slowing shrinking the main to make it easier to fix things
1106
  * FEATURE: Be able to turn on/off allowing comments in an email
1107
  * BUG FIX: AppleDouble now mostly supported
1108
  * BUG FIX: MIME handling improved.
1109
  * BUG FIX: Fix issue with timing delay
1110
+
1111
  = 0.312.11 =
1112
  * FEATURE: Patterns to define where a sig starts are user configurable
1113
  * FEATURE: Add filter options for banned file names
1114
  * BUG FIX: Made it possible to turn off posting to the db for testing purposes
1115
+
1116
  = 0.312.10 =
1117
  * FEATURE: Added in code to diplay the mime type of the file being linked to
1118
  * BUG FIX: It now tests for the existance of the directories and makes sure
1119
  * that the web server can write to them
1120
+
1121
  = 0.312.9 =
1122
  * FEATURE:Should handle jpg as well as jpeg as the file type
1123
  * BUG FIX: Now correctly handles the subject in the message
1124
  * BUG FIX: Should handle Text preferences correctly
1125
+
1126
  = 0.312.8 =
1127
  * Some general code tidying.
1128
+ * FEATURE: Can now have email from invalid email addresses automatically forwarded
1129
  * to the admin's email account. This forward includes all attachments.
1130
  * Props to David Luden for getting this started.
1131
  * Minor change: The system will continue if it runs into a message that doesn't have
1132
  * any content - it will also continue to process if it gets an email from
1133
  * someone not in the system. In the past this could result in deleted mail
1134
  * if your cron job didn't run often enough.
1135
+
1136
  = 0.312.7 =
1137
  * Confirm the handling of 3gp video for cell phones o
1138
  * Added in new directive SUPPORTED_FILE_TYPES -if the mime type is listed here then the system will try to make a link to it without making a thumb nail.
1139
+
1140
  = 0.312.6 =
1141
  * Bug Fix: Ok the last bug I fixed - actually caused another bug - man I should set up some unit tests. Now it handles mail from the nokia mail client correctly.
1142
+
1143
  = 0.312.5 =
1144
+ * Bug Fix : The system was accepting all text/* types. Now you can set a preference (defaults to text/plain)
1145
  * to use as the main text for the post.
1146
+
1147
  = 0.312.4 =
1148
  * Added in sanitize_title call suggested by Jemima
1149
  * Added in ability to provide a subject in an mms - by using #Subject#
1165
 
1166
  = 0.312.2 =
1167
  * BUGFIX: It now removes the delay tag from the message
1168
+
1169
  = 0.312.1 =
1170
  * Added modification for placeholder support for images (David Luden)
1171
  * Added in support to automatically scale down big images (Dirk Elmendorf)
1174
  * Switch config options to defines to reduce the number of global variables (Dirk Elmendorf)
1175
  * Added tests to make sure there is a trailing slash on the DIR definitions (Dirk Elmendorf)
1176
  * Add tests to see if they have gd installed (Dirk Elmendorf)
1177
+ * Separate the scaling out to a function for easier usage (Dirk Elmendorf)
1178
  * Add delay feature for future posting. (Dirk Elmendorf)
1179
  * Added in ability to use strtotime if it is available (Dirk ELmendorf)
1180
 
 
 
 
1181
  = 0.312 - 2005-03 =
1182
  * CHANGE FOR DEFAULT E-mail Categories, instead of [General] Subject you can now use General: Subject in the subject line. Less typing, and there must be a space after the colon.
1183
  * Fixed bugs with no default posting for categories and user
1184
+
1185
  = 0.311 - 2005-01 =
1186
  * eep, major bug for pop3 server. Next time I test my code more before I released, fixed so that pop3 now works.`
1187
+
1188
  = 0.31 - 2004-12 & 2005-01 =
1189
  * (Has it been this long, best get back into the swing of things... did most of this coding on my holiday as I didn't have a machine to play WoW on :)
1190
  * moved the deletion of pop3 emails into a check so that e-mails aren't deleted without proper checking.
templates/general_template.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $postie_default = '<a href="{FILELINK}">{ICON} {FILENAME}</a>';
4
+
5
+ $simple_link = '<a href="{FILELINK}">{FILENAME}</a>';
6
+
7
+ $custom = "";
8
+ if (isset($config)) {
9
+ $custom = (array_key_exists('GENERALTEMPLATE', $config) ? $config['GENERALTEMPLATE'] : "");
10
+ }
11
+
12
+ $generalTemplates = compact('postie_default', 'simple_link', 'custom');
13
+ ?>