Version Description
(2015-09-18) = * Add FILEID to image and video templates
Download this release
Release Info
Developer | WayneAllen |
Plugin | Postie |
Version | 1.7.11 |
Comparing to | |
See all releases |
Code changes from version 1.7.10 to 1.7.11
- config_form.php +2 -0
- docs/Changes.txt +3 -0
- docs/Postie.txt +1 -1
- postie-functions.php +8 -7
- postie.php +3 -3
- readme.txt +4 -1
config_form.php
CHANGED
@@ -563,6 +563,7 @@
|
|
563 |
<li>{CAPTION} gets replaced with the caption you specified (if any)</li>
|
564 |
<li>{FILELINK} gets replaced with the url to the media</li>
|
565 |
<li>{FILENAME} gets replaced with the name of the attachment from the email</li>
|
|
|
566 |
<li>{FULL} same as {FILELINK}</li>
|
567 |
<li>{HEIGHT} gets replaced with the height of the photo</li>
|
568 |
<li>{ID} gets replaced with the post id</li>
|
@@ -976,6 +977,7 @@
|
|
976 |
previewHTML = previewHTML.replace(/{LARGEWIDTH}/, 1024);
|
977 |
previewHTML = previewHTML.replace(/{LARGEHEIGHT}/, 682);
|
978 |
previewHTML = previewHTML.replace(/{ID}/, 9999);
|
|
|
979 |
previewHTML = previewHTML.replace(/{POSTTITLE}/g, 'Post title');
|
980 |
previewHTML = previewHTML.replace(/{CAPTION}/g, 'Spencer smiling');
|
981 |
preview.innerHTML = previewHTML;
|
563 |
<li>{CAPTION} gets replaced with the caption you specified (if any)</li>
|
564 |
<li>{FILELINK} gets replaced with the url to the media</li>
|
565 |
<li>{FILENAME} gets replaced with the name of the attachment from the email</li>
|
566 |
+
<li>{FILEID} gets replaced with the ID of the media</li>
|
567 |
<li>{FULL} same as {FILELINK}</li>
|
568 |
<li>{HEIGHT} gets replaced with the height of the photo</li>
|
569 |
<li>{ID} gets replaced with the post id</li>
|
977 |
previewHTML = previewHTML.replace(/{LARGEWIDTH}/, 1024);
|
978 |
previewHTML = previewHTML.replace(/{LARGEHEIGHT}/, 682);
|
979 |
previewHTML = previewHTML.replace(/{ID}/, 9999);
|
980 |
+
previewHTML = previewHTML.replace(/{FILEID}/, 9999);
|
981 |
previewHTML = previewHTML.replace(/{POSTTITLE}/g, 'Post title');
|
982 |
previewHTML = previewHTML.replace(/{CAPTION}/g, 'Spencer smiling');
|
983 |
preview.innerHTML = previewHTML;
|
docs/Changes.txt
CHANGED
@@ -27,6 +27,9 @@ All script, style and body tags are stripped from html emails.
|
|
27 |
Attachments are now processed in the order they were attached.
|
28 |
|
29 |
== CHANGELOG ==
|
|
|
|
|
|
|
30 |
= 1.7.10 (2015-09-16) =
|
31 |
* added 15 and 30 second cron schedules
|
32 |
|
27 |
Attachments are now processed in the order they were attached.
|
28 |
|
29 |
== CHANGELOG ==
|
30 |
+
= 1.7.11 (2015-09-18) =
|
31 |
+
* Add FILEID to image and video templates
|
32 |
+
|
33 |
= 1.7.10 (2015-09-16) =
|
34 |
* added 15 and 30 second cron schedules
|
35 |
|
docs/Postie.txt
CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://PostiePlugin.com/
|
|
6 |
Tags: e-mail, email, post-by-email
|
7 |
Requires at least: 3.3.0
|
8 |
Tested up to: 4.3.1
|
9 |
-
Stable tag: 1.7.
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
Text Domain: postie
|
6 |
Tags: e-mail, email, post-by-email
|
7 |
Requires at least: 3.3.0
|
8 |
Tested up to: 4.3.1
|
9 |
+
Stable tag: 1.7.11
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
Text Domain: postie
|
postie-functions.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
$Id: postie-functions.php
|
4 |
*/
|
5 |
|
6 |
//to turn on debug output add the following line to wp-config.php
|
@@ -2357,7 +2357,7 @@ function chooseAttachmentIcon($file, $primary, $secondary, $iconSet = 'silver',
|
|
2357 |
return $iconHtml;
|
2358 |
}
|
2359 |
|
2360 |
-
function parseTemplate($
|
2361 |
DebugEcho("parseTemplate - before: $template");
|
2362 |
$size = 'medium';
|
2363 |
/* we check template for thumb, thumbnail, large, full and use that as
|
@@ -2372,7 +2372,7 @@ function parseTemplate($id, $type, $template, $orig_filename, $icon = "") {
|
|
2372 |
DebugFiltersFor('image_downsize'); //possible overrides for image_downsize()
|
2373 |
|
2374 |
for ($i = 0; $i < count($sizes); $i++) {
|
2375 |
-
list( $img_src[$i], $widths[$i], $heights[$i] ) = image_downsize($
|
2376 |
$hwstrings[$i] = image_hwstring($widths[$i], $heights[$i]);
|
2377 |
}
|
2378 |
DebugEcho('Sources');
|
@@ -2383,17 +2383,17 @@ function parseTemplate($id, $type, $template, $orig_filename, $icon = "") {
|
|
2383 |
DebugDump($widths);
|
2384 |
}
|
2385 |
|
2386 |
-
$attachment = get_post($
|
2387 |
$the_parent = get_post($attachment->post_parent);
|
2388 |
$uploadDir = wp_upload_dir();
|
2389 |
$fileName = basename($attachment->guid);
|
2390 |
$absFileName = $uploadDir['path'] . '/' . $fileName;
|
2391 |
$relFileName = str_replace(ABSPATH, '', $absFileName);
|
2392 |
-
$fileLink = wp_get_attachment_url($
|
2393 |
-
$pageLink = get_attachment_link($
|
2394 |
|
2395 |
$template = str_replace('{TITLE}', $attachment->post_title, $template);
|
2396 |
-
$template = str_replace('{ID}', $
|
2397 |
if ($type == 'image') {
|
2398 |
$template = str_replace('{THUMBNAIL}', $img_src[0], $template);
|
2399 |
$template = str_replace('{THUMB}', $img_src[0], $template);
|
@@ -2414,6 +2414,7 @@ function parseTemplate($id, $type, $template, $orig_filename, $icon = "") {
|
|
2414 |
$template = str_replace('{URL}', $fileLink, $template);
|
2415 |
$template = str_replace('{RELFILENAME}', $relFileName, $template);
|
2416 |
$template = str_replace('{ICON}', $icon, $template);
|
|
|
2417 |
|
2418 |
DebugEcho("parseTemplate - after: $template");
|
2419 |
return $template . '<br />';
|
1 |
<?php
|
2 |
/*
|
3 |
+
$Id: postie-functions.php 1248885 2015-09-18 23:32:56Z WayneAllen $
|
4 |
*/
|
5 |
|
6 |
//to turn on debug output add the following line to wp-config.php
|
2357 |
return $iconHtml;
|
2358 |
}
|
2359 |
|
2360 |
+
function parseTemplate($fileid, $type, $template, $orig_filename, $icon = "") {
|
2361 |
DebugEcho("parseTemplate - before: $template");
|
2362 |
$size = 'medium';
|
2363 |
/* we check template for thumb, thumbnail, large, full and use that as
|
2372 |
DebugFiltersFor('image_downsize'); //possible overrides for image_downsize()
|
2373 |
|
2374 |
for ($i = 0; $i < count($sizes); $i++) {
|
2375 |
+
list( $img_src[$i], $widths[$i], $heights[$i] ) = image_downsize($fileid, $sizes[$i]);
|
2376 |
$hwstrings[$i] = image_hwstring($widths[$i], $heights[$i]);
|
2377 |
}
|
2378 |
DebugEcho('Sources');
|
2383 |
DebugDump($widths);
|
2384 |
}
|
2385 |
|
2386 |
+
$attachment = get_post($fileid);
|
2387 |
$the_parent = get_post($attachment->post_parent);
|
2388 |
$uploadDir = wp_upload_dir();
|
2389 |
$fileName = basename($attachment->guid);
|
2390 |
$absFileName = $uploadDir['path'] . '/' . $fileName;
|
2391 |
$relFileName = str_replace(ABSPATH, '', $absFileName);
|
2392 |
+
$fileLink = wp_get_attachment_url($fileid);
|
2393 |
+
$pageLink = get_attachment_link($fileid);
|
2394 |
|
2395 |
$template = str_replace('{TITLE}', $attachment->post_title, $template);
|
2396 |
+
$template = str_replace('{ID}', $fileid, $template);
|
2397 |
if ($type == 'image') {
|
2398 |
$template = str_replace('{THUMBNAIL}', $img_src[0], $template);
|
2399 |
$template = str_replace('{THUMB}', $img_src[0], $template);
|
2414 |
$template = str_replace('{URL}', $fileLink, $template);
|
2415 |
$template = str_replace('{RELFILENAME}', $relFileName, $template);
|
2416 |
$template = str_replace('{ICON}', $icon, $template);
|
2417 |
+
$template = str_replace('{FILEID}', $fileid, $template);
|
2418 |
|
2419 |
DebugEcho("parseTemplate - after: $template");
|
2420 |
return $template . '<br />';
|
postie.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Postie
|
5 |
Plugin URI: http://PostiePlugin.com/
|
6 |
Description: Create posts via email. Signifigantly upgrades the Post by Email features of Word Press.
|
7 |
-
Version: 1.7.
|
8 |
Author: Wayne Allen
|
9 |
Author URI: http://PostiePlugin.com/
|
10 |
License: GPL2
|
@@ -27,11 +27,11 @@
|
|
27 |
*/
|
28 |
|
29 |
/*
|
30 |
-
$Id: postie.php
|
31 |
*/
|
32 |
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "postie-functions.php");
|
33 |
|
34 |
-
define('POSTIE_VERSION', '1.7.
|
35 |
define("POSTIE_ROOT", dirname(__FILE__));
|
36 |
define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
|
37 |
define('POSTIE_SLUG', 'postie');
|
4 |
Plugin Name: Postie
|
5 |
Plugin URI: http://PostiePlugin.com/
|
6 |
Description: Create posts via email. Signifigantly upgrades the Post by Email features of Word Press.
|
7 |
+
Version: 1.7.11
|
8 |
Author: Wayne Allen
|
9 |
Author URI: http://PostiePlugin.com/
|
10 |
License: GPL2
|
27 |
*/
|
28 |
|
29 |
/*
|
30 |
+
$Id: postie.php 1248887 2015-09-18 23:33:58Z WayneAllen $
|
31 |
*/
|
32 |
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "postie-functions.php");
|
33 |
|
34 |
+
define('POSTIE_VERSION', '1.7.11');
|
35 |
define("POSTIE_ROOT", dirname(__FILE__));
|
36 |
define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
|
37 |
define('POSTIE_SLUG', 'postie');
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://PostiePlugin.com/
|
|
6 |
Tags: e-mail, email, post-by-email
|
7 |
Requires at least: 3.3.0
|
8 |
Tested up to: 4.3.1
|
9 |
-
Stable tag: 1.7.
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
Text Domain: postie
|
@@ -236,6 +236,9 @@ All script, style and body tags are stripped from html emails.
|
|
236 |
Attachments are now processed in the order they were attached.
|
237 |
|
238 |
== CHANGELOG ==
|
|
|
|
|
|
|
239 |
= 1.7.10 (2015-09-16) =
|
240 |
* added 15 and 30 second cron schedules
|
241 |
|
6 |
Tags: e-mail, email, post-by-email
|
7 |
Requires at least: 3.3.0
|
8 |
Tested up to: 4.3.1
|
9 |
+
Stable tag: 1.7.11
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
Text Domain: postie
|
236 |
Attachments are now processed in the order they were attached.
|
237 |
|
238 |
== CHANGELOG ==
|
239 |
+
= 1.7.11 (2015-09-18) =
|
240 |
+
* Add FILEID to image and video templates
|
241 |
+
|
242 |
= 1.7.10 (2015-09-16) =
|
243 |
* added 15 and 30 second cron schedules
|
244 |
|