Version Description
Download this release
Release Info
Developer | qqworld |
Plugin | QQWorld Auto Save Images |
Version | 1.7.4 |
Comparing to | |
See all releases |
Code changes from version 1.7.3 to 1.7.4
- css/style.css +48 -0
- images/photo.jpg +0 -0
- images/watermark.png +0 -0
- js/{script.js → admin.js} +169 -7
- js/{script-post.js → manual.js} +1 -4
- lang/qqworld_auto_save_images-zh_CN.mo +0 -0
- lang/qqworld_auto_save_images-zh_CN.po +192 -94
- qqworld-auto-save-images.php +173 -48
css/style.css
CHANGED
@@ -44,6 +44,54 @@
|
|
44 |
display: none;
|
45 |
}
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
#banner {
|
48 |
max-width: 100%;
|
49 |
display: block;
|
44 |
display: none;
|
45 |
}
|
46 |
|
47 |
+
#watermark-align-to {
|
48 |
+
border-collapse: collapse;
|
49 |
+
border: 3px solid #ddd;
|
50 |
+
|
51 |
+
}
|
52 |
+
#watermark-align-to td {
|
53 |
+
border: 1px solid #ddd;
|
54 |
+
background: #fff;
|
55 |
+
padding: 5px;
|
56 |
+
}
|
57 |
+
#watermark-align-to td:hover {
|
58 |
+
background: #f4f4f4;
|
59 |
+
}
|
60 |
+
#watermark-align-to td input {
|
61 |
+
margin: 0;
|
62 |
+
}
|
63 |
+
|
64 |
+
#watermark-position {
|
65 |
+
border: 10px solid #fff;
|
66 |
+
display: inline-block;
|
67 |
+
box-shadow: 3px 3px 3px rgba(0,0,0,.1);
|
68 |
+
position: relative;
|
69 |
+
width: 800px;
|
70 |
+
height: 450px;
|
71 |
+
}
|
72 |
+
#watermark-test {
|
73 |
+
position: absolute;
|
74 |
+
cursor: move;
|
75 |
+
}
|
76 |
+
#upload-watermark-image img {
|
77 |
+
width: auto;
|
78 |
+
height: auto;
|
79 |
+
}
|
80 |
+
|
81 |
+
.readme {
|
82 |
+
background: #fff;
|
83 |
+
margin: 25px 0 15px;
|
84 |
+
border-left: 4px solid #7ad03a;
|
85 |
+
padding: 1px 12px;
|
86 |
+
background-color: #fff;
|
87 |
+
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
88 |
+
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
89 |
+
}
|
90 |
+
.readme p {
|
91 |
+
margin: .5em 0;
|
92 |
+
padding: 2px;
|
93 |
+
}
|
94 |
+
|
95 |
#banner {
|
96 |
max-width: 100%;
|
97 |
display: block;
|
images/photo.jpg
ADDED
Binary file
|
images/watermark.png
ADDED
Binary file
|
js/{script.js → admin.js}
RENAMED
@@ -5,6 +5,21 @@ QQWorld_auto_save_images.scan_posts = function() {
|
|
5 |
noty_theme = typeof qqworld_ajax == 'object' ? 'qqworldTheme' : 'defaultTheme',
|
6 |
wait_img = '<img src=" data:image/gif;base64,R0lGODlhgAAPAKIAALCvsMPCwz8/PwAAAPv6+wAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQECgAAACwAAAAAgAAPAAAD50ixS/6sPRfDpPGqfKv2HTeBowiZGLORq1lJqfuW7Gud9YzLud3zQNVOGCO2jDZaEHZk+nRFJ7R5i1apSuQ0OZT+nleuNetdhrfob1kLXrvPariZLGfPuz66Hr8f8/9+gVh4YoOChYhpd4eKdgwAkJEAE5KRlJWTD5iZDpuXlZ+SoZaamKOQp5wEm56loK6isKSdprKotqqttK+7sb2zq6y8wcO6xL7HwMbLtb+3zrnNycKp1bjW0NjT0cXSzMLK3uLd5Mjf5uPo5eDa5+Hrz9vt6e/qosO/GvjJ+sj5F/sC+uMHcCCoBAAh+QQECgAAACwAAAAABwAPAAADEUiyq/wwyknjuDjrzfsmGpEAACH5BAQKAAAALAsAAAAHAA8AAAMRSLKr/DDKSeO4OOvN+yYakQAAIfkEBAoAAAAsFgAAAAcADwAAAxFIsqv8MMpJ47g46837JhqRAAAh+QQECgAAACwhAAAABwAPAAADEUiyq/wwyknjuDjrzfsmGpEAACH5BAQKAAAALCwAAAAHAA8AAAMRSLKr/DDKSeO4OOvN+yYakQAAIfkEBAoAAAAsNwAAAAcADwAAAxFIsqv8MMpJ47g46837JhqRAAAh+QQECgAAACxCAAAABwAPAAADEUiyq/wwyknjuDjrzfsmGpEAACH5BAQKAAAALE0AAAAHAA8AAAMRSLKr/DDKSeO4OOvN+yYakQAAIfkEBAoAAAAsWAAAAAcADwAAAxFIsqv8MMpJ47g46837JhqRAAAh+QQECgAAACxjAAAABwAPAAADEUiyq/wwyknjuDjrzfsmGpEAACH5BAQKAAAALG4AAAAHAA8AAAMRSLKr/DDKSeO4OOvN+yYakQAAIfkEBAoAAAAseQAAAAcADwAAAxFIsqv8MMpJ47g46837JhqRAAA7" />';
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
this.lib = {};
|
9 |
this.lib.sprintf = function() {
|
10 |
var str_repeat = function(i, m) {
|
@@ -53,6 +68,22 @@ QQWorld_auto_save_images.scan_posts = function() {
|
|
53 |
}
|
54 |
|
55 |
this.action = {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
this.action.catch_errors = function(XMLHttpRequest, textStatus, errorThrown) {
|
57 |
var error='', args=new Array;
|
58 |
error += '<div style="text-align: left;">';
|
@@ -265,7 +296,7 @@ QQWorld_auto_save_images.scan_posts = function() {
|
|
265 |
$('#second_level').fadeOut('fast');
|
266 |
});
|
267 |
$('#scan_old_posts').on('click', function() {
|
268 |
-
if (jQuery('input[name="
|
269 |
var n = noty({
|
270 |
text: QASI.are_your_sure,
|
271 |
type: 'warning',
|
@@ -325,7 +356,7 @@ QQWorld_auto_save_images.scan_posts = function() {
|
|
325 |
} else _this.action.if_not_select_post_type();
|
326 |
});
|
327 |
$('#list_all_posts').on('click', function() {
|
328 |
-
if (jQuery('input[name="
|
329 |
$('#scan-post-block').slideUp('normal');
|
330 |
$('#scan_old_posts').attr('disabled', true);
|
331 |
$('#list_all_posts').attr('disabled', true);
|
@@ -363,9 +394,8 @@ QQWorld_auto_save_images.scan_posts = function() {
|
|
363 |
} else _this.action.if_not_select_post_type();
|
364 |
});
|
365 |
$(document).on('click', '#scan_old_post_list .fetch-remote-images', function() {
|
366 |
-
var wait = '<img src="data:image/gif;base64,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" />';
|
367 |
var post_id = $(this).attr('post-id');
|
368 |
-
$(this).hide().after(
|
369 |
var data = 'action=save_remote_images_after_scan&post_id[]='+post_id;
|
370 |
$.ajax({
|
371 |
type: 'POST',
|
@@ -399,8 +429,8 @@ QQWorld_auto_save_images.scan_posts = function() {
|
|
399 |
}
|
400 |
});
|
401 |
|
402 |
-
$(document).on('click', 'input[name="
|
403 |
-
var checked = $('input[name="
|
404 |
if (checked.length) {
|
405 |
$('#categories_block').html(wait_img);
|
406 |
var temp = '';
|
@@ -413,7 +443,7 @@ QQWorld_auto_save_images.scan_posts = function() {
|
|
413 |
url: ajaxurl,
|
414 |
data: data,
|
415 |
success: function(data) {
|
416 |
-
if (
|
417 |
data = $(data);
|
418 |
$('#categories_block').html(data);
|
419 |
data.hide().fadeIn('normal');
|
@@ -429,10 +459,142 @@ QQWorld_auto_save_images.scan_posts = function() {
|
|
429 |
$('#categories_block').html(QASI.pls_select_post_types);
|
430 |
}
|
431 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
432 |
};
|
433 |
|
434 |
this.create.init = function() {
|
435 |
_this.create.events();
|
|
|
436 |
};
|
437 |
this.create.init();
|
438 |
};
|
5 |
noty_theme = typeof qqworld_ajax == 'object' ? 'qqworldTheme' : 'defaultTheme',
|
6 |
wait_img = '<img src=" data:image/gif;base64,R0lGODlhgAAPAKIAALCvsMPCwz8/PwAAAPv6+wAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQECgAAACwAAAAAgAAPAAAD50ixS/6sPRfDpPGqfKv2HTeBowiZGLORq1lJqfuW7Gud9YzLud3zQNVOGCO2jDZaEHZk+nRFJ7R5i1apSuQ0OZT+nleuNetdhrfob1kLXrvPariZLGfPuz66Hr8f8/9+gVh4YoOChYhpd4eKdgwAkJEAE5KRlJWTD5iZDpuXlZ+SoZaamKOQp5wEm56loK6isKSdprKotqqttK+7sb2zq6y8wcO6xL7HwMbLtb+3zrnNycKp1bjW0NjT0cXSzMLK3uLd5Mjf5uPo5eDa5+Hrz9vt6e/qosO/GvjJ+sj5F/sC+uMHcCCoBAAh+QQECgAAACwAAAAABwAPAAADEUiyq/wwyknjuDjrzfsmGpEAACH5BAQKAAAALAsAAAAHAA8AAAMRSLKr/DDKSeO4OOvN+yYakQAAIfkEBAoAAAAsFgAAAAcADwAAAxFIsqv8MMpJ47g46837JhqRAAAh+QQECgAAACwhAAAABwAPAAADEUiyq/wwyknjuDjrzfsmGpEAACH5BAQKAAAALCwAAAAHAA8AAAMRSLKr/DDKSeO4OOvN+yYakQAAIfkEBAoAAAAsNwAAAAcADwAAAxFIsqv8MMpJ47g46837JhqRAAAh+QQECgAAACxCAAAABwAPAAADEUiyq/wwyknjuDjrzfsmGpEAACH5BAQKAAAALE0AAAAHAA8AAAMRSLKr/DDKSeO4OOvN+yYakQAAIfkEBAoAAAAsWAAAAAcADwAAAxFIsqv8MMpJ47g46837JhqRAAAh+QQECgAAACxjAAAABwAPAAADEUiyq/wwyknjuDjrzfsmGpEAACH5BAQKAAAALG4AAAAHAA8AAAMRSLKr/DDKSeO4OOvN+yYakQAAIfkEBAoAAAAseQAAAAcADwAAAxFIsqv8MMpJ47g46837JhqRAAA7" />';
|
7 |
|
8 |
+
this.file_frame;
|
9 |
+
|
10 |
+
this.watermark = {};
|
11 |
+
this.image = {};
|
12 |
+
this.offset = {
|
13 |
+
top: {
|
14 |
+
half: 0,
|
15 |
+
full: 0
|
16 |
+
},
|
17 |
+
left: {
|
18 |
+
half: 0,
|
19 |
+
full: 0
|
20 |
+
}
|
21 |
+
};
|
22 |
+
|
23 |
this.lib = {};
|
24 |
this.lib.sprintf = function() {
|
25 |
var str_repeat = function(i, m) {
|
68 |
}
|
69 |
|
70 |
this.action = {};
|
71 |
+
|
72 |
+
this.action.set_watermark_opacity = function() {
|
73 |
+
var opacity = $('#watermark-opacity').val();
|
74 |
+
$('#watermark-test').fadeTo('normal', opacity/100);
|
75 |
+
};
|
76 |
+
this.action.get_watermark_size = function() {
|
77 |
+
_this.watermark.width = $('#watermark-test').width();
|
78 |
+
_this.watermark.height = $('#watermark-test').height();
|
79 |
+
_this.image.width = $('#photo-test').width();
|
80 |
+
_this.image.height = $('#photo-test').height();
|
81 |
+
_this.offset.top.full = parseInt(_this.image.height - _this.watermark.height);
|
82 |
+
_this.offset.left.full = parseInt(_this.image.width - _this.watermark.width);
|
83 |
+
_this.offset.top.half = parseInt(_this.offset.top.full/2);
|
84 |
+
_this.offset.left.half = parseInt(_this.offset.left.full/2);
|
85 |
+
};
|
86 |
+
|
87 |
this.action.catch_errors = function(XMLHttpRequest, textStatus, errorThrown) {
|
88 |
var error='', args=new Array;
|
89 |
error += '<div style="text-align: left;">';
|
296 |
$('#second_level').fadeOut('fast');
|
297 |
});
|
298 |
$('#scan_old_posts').on('click', function() {
|
299 |
+
if (jQuery('input[name="qqworld_auto_save_images_post_types[]"]:checked').length) {
|
300 |
var n = noty({
|
301 |
text: QASI.are_your_sure,
|
302 |
type: 'warning',
|
356 |
} else _this.action.if_not_select_post_type();
|
357 |
});
|
358 |
$('#list_all_posts').on('click', function() {
|
359 |
+
if (jQuery('input[name="qqworld_auto_save_images_post_types[]"]:checked').length) {
|
360 |
$('#scan-post-block').slideUp('normal');
|
361 |
$('#scan_old_posts').attr('disabled', true);
|
362 |
$('#list_all_posts').attr('disabled', true);
|
394 |
} else _this.action.if_not_select_post_type();
|
395 |
});
|
396 |
$(document).on('click', '#scan_old_post_list .fetch-remote-images', function() {
|
|
|
397 |
var post_id = $(this).attr('post-id');
|
398 |
+
$(this).hide().after(wait_img);
|
399 |
var data = 'action=save_remote_images_after_scan&post_id[]='+post_id;
|
400 |
$.ajax({
|
401 |
type: 'POST',
|
429 |
}
|
430 |
});
|
431 |
|
432 |
+
$(document).on('click', 'input[name="qqworld_auto_save_images_post_types[]"]', function() {
|
433 |
+
var checked = $('input[name="qqworld_auto_save_images_post_types[]"]:checked');
|
434 |
if (checked.length) {
|
435 |
$('#categories_block').html(wait_img);
|
436 |
var temp = '';
|
443 |
url: ajaxurl,
|
444 |
data: data,
|
445 |
success: function(data) {
|
446 |
+
if (data.search(/<div>/)>0) {
|
447 |
data = $(data);
|
448 |
$('#categories_block').html(data);
|
449 |
data.hide().fadeIn('normal');
|
459 |
$('#categories_block').html(QASI.pls_select_post_types);
|
460 |
}
|
461 |
});
|
462 |
+
|
463 |
+
$(document).on('change', '#watermark-opacity', _this.action.set_watermark_opacity).on('keyup', '#watermark-opacity', _this.action.set_watermark_opacity);
|
464 |
+
|
465 |
+
// watermark postion
|
466 |
+
$(document).on('click', 'input[name="qqworld-auto-save-images-watermark-align-to"]', function() {
|
467 |
+
var id = $(this).attr('id'),
|
468 |
+
top, right, bottom, left,
|
469 |
+
default_offset = 20,
|
470 |
+
offset = {};
|
471 |
+
switch (id) {
|
472 |
+
case 'lt': offset.x = offset.y = default_offset; top = default_offset; left = default_offset; break;
|
473 |
+
case 'ct': offset.x = 0; offset.y = default_offset; top = default_offset; left = _this.offset.left.half; break;
|
474 |
+
case 'rt': offset.x = -default_offset; offset.y = default_offset; top = default_offset; left = _this.offset.left.full-default_offset; break;
|
475 |
+
case 'lc': offset.x = default_offset; offset.y = 0; top = _this.offset.top.half; left = default_offset; break;
|
476 |
+
case 'cc': offset.x = 0; offset.y = 0; top = _this.offset.top.half; left = _this.offset.left.half; break;
|
477 |
+
case 'rc': offset.x = -default_offset; offset.y = 0; top = _this.offset.top.half; left = _this.offset.left.full-default_offset; break;
|
478 |
+
case 'lb': offset.x = default_offset; offset.y = -default_offset; top = _this.offset.top.full-default_offset; left = default_offset; break;
|
479 |
+
case 'cb': offset.x = 0; offset.y = -default_offset; top = _this.offset.top.full-default_offset; left = _this.offset.left.half; break;
|
480 |
+
case 'rb': offset.x = -default_offset; offset.y = -default_offset; top = _this.offset.top.full-default_offset; left = _this.offset.left.full-default_offset; break;
|
481 |
+
};
|
482 |
+
$('#watermark-test').animate({
|
483 |
+
top : top,
|
484 |
+
left: left
|
485 |
+
}, 'fast');
|
486 |
+
$('#offset-x').val(offset.x);
|
487 |
+
$('#offset-y').val(offset.y);
|
488 |
+
});
|
489 |
+
|
490 |
+
$(document).on('click', '#upload-watermark-image', function(event) {
|
491 |
+
event.preventDefault();
|
492 |
+
var title = $(this).attr('title'),
|
493 |
+
id = $(this).attr('id');
|
494 |
+
if ( typeof _this.file_frame == 'object' ) {
|
495 |
+
_this.file_frame.open();
|
496 |
+
return;
|
497 |
+
}
|
498 |
+
_this.file_frame = wp.media.frames.file_frame = wp.media({
|
499 |
+
title: title,
|
500 |
+
button: {
|
501 |
+
text: title,
|
502 |
+
},
|
503 |
+
multiple: false
|
504 |
+
});
|
505 |
+
_this.file_frame.on( 'open', function() {
|
506 |
+
var selection = _this.file_frame.state().get('selection');
|
507 |
+
var attachment_id = $('input[name="qqworld-auto-save-images-watermark-image"]').val();
|
508 |
+
if (attachment_id) {
|
509 |
+
var attachment = wp.media.attachment(attachment_id);
|
510 |
+
attachment.fetch();
|
511 |
+
selection.add( attachment ? [ attachment ] : [] );
|
512 |
+
}
|
513 |
+
});
|
514 |
+
_this.file_frame.on('select', function() {
|
515 |
+
var attachment = _this.file_frame.state().get('selection').first().toJSON();
|
516 |
+
var id = attachment.id;
|
517 |
+
$('input[name="qqworld-auto-save-images-watermark-image"]').val(id);
|
518 |
+
var url = attachment.url;
|
519 |
+
$('#upload-watermark-image img').attr('src', url);
|
520 |
+
$('#watermark-test').attr({
|
521 |
+
src: url,
|
522 |
+
width: attachment.sizes.full.width,
|
523 |
+
height: attachment.sizes.full.height
|
524 |
+
});
|
525 |
+
$('#lt').click();
|
526 |
+
_this.action.get_watermark_size();
|
527 |
+
$('#default-watermark').fadeIn();
|
528 |
+
});
|
529 |
+
_this.file_frame.open();
|
530 |
+
});
|
531 |
+
|
532 |
+
$(document).on('click', '#default-watermark', function() {
|
533 |
+
var src = QASI.default_watermark.src;
|
534 |
+
$('#upload-watermark-image img').attr('src', src);
|
535 |
+
$('#watermark-test').attr({
|
536 |
+
src: src,
|
537 |
+
width: QASI.default_watermark.width,
|
538 |
+
height: QASI.default_watermark.height
|
539 |
+
});
|
540 |
+
$('input[name="qqworld-auto-save-images-watermark-image"]').val('');
|
541 |
+
$('#lt').click();
|
542 |
+
_this.action.get_watermark_size();
|
543 |
+
});
|
544 |
+
|
545 |
+
$(document).on('click', '#Preview Watermark', function() {
|
546 |
+
tb_show($(this).attr('title'), $(this).attr('href'));
|
547 |
+
});
|
548 |
+
};
|
549 |
+
|
550 |
+
this.create.watermark_init = function() {
|
551 |
+
_this.action.get_watermark_size();
|
552 |
+
$('#watermark-test').draggable({
|
553 |
+
containment: "parent",
|
554 |
+
drag: function() {
|
555 |
+
var id = $('input[name="qqworld-auto-save-images-watermark-align-to"]:checked').val(),
|
556 |
+
position = $('#watermark-test').position(),
|
557 |
+
left = position.left,
|
558 |
+
top = position.top,
|
559 |
+
x,y;
|
560 |
+
switch (id) {
|
561 |
+
case 'lt': x = left; y = top; break;
|
562 |
+
case 'ct': x = left-_this.offset.left.half; y = top; break;
|
563 |
+
case 'rt': x = left-_this.offset.left.full; y = top; break;
|
564 |
+
case 'lc': x = left; y = top-_this.offset.top.half; break;
|
565 |
+
case 'cc': x = left-_this.offset.left.half; y = top-_this.offset.top.half; break;
|
566 |
+
case 'rc': x = left-_this.offset.left.full; y = top-_this.offset.top.half; break;
|
567 |
+
case 'lb': x = left; y = top-_this.offset.top.full; break;
|
568 |
+
case 'cb': x = left-_this.offset.left.half; y = top-_this.offset.top.full; break;
|
569 |
+
case 'rb': x = left-_this.offset.left.full; y = top-_this.offset.top.full; break;
|
570 |
+
};
|
571 |
+
//console.log('x:' + x + ', left: ' + left + ' - fullleft: ' + _this.offset.left.full);
|
572 |
+
$('#offset-x').val(x);
|
573 |
+
$('#offset-y').val(y);
|
574 |
+
}
|
575 |
+
});
|
576 |
+
// set $('#watermark-test') position
|
577 |
+
var id = $('input[name="qqworld-auto-save-images-watermark-align-to"]:checked').val(),
|
578 |
+
left = parseInt(QASI.watermark_offset.x),
|
579 |
+
top = parseInt(QASI.watermark_offset.y);
|
580 |
+
switch (id) {
|
581 |
+
case 'lt': x = left; y = top; break;
|
582 |
+
case 'ct': x = left+_this.offset.left.half; y = top; break;
|
583 |
+
case 'rt': x = left+_this.offset.left.full; y = top; break;
|
584 |
+
case 'lc': x = left; y = top+_this.offset.top.half; break;
|
585 |
+
case 'cc': x = left+_this.offset.left.half; y = top+_this.offset.top.half; break;
|
586 |
+
case 'rc': x = left+_this.offset.left.full; y = top+_this.offset.top.half; break;
|
587 |
+
case 'lb': x = left; y = top+_this.offset.top.full; break;
|
588 |
+
case 'cb': x = left+_this.offset.left.half; y = top+_this.offset.top.full; break;
|
589 |
+
case 'rb': x = left+_this.offset.left.full; y = top+_this.offset.top.full; break;
|
590 |
+
};
|
591 |
+
$('#watermark-test').css({ left: x, top: y });
|
592 |
+
_this.action.set_watermark_opacity();
|
593 |
};
|
594 |
|
595 |
this.create.init = function() {
|
596 |
_this.create.events();
|
597 |
+
_this.create.watermark_init();
|
598 |
};
|
599 |
this.create.init();
|
600 |
};
|
js/{script-post.js → manual.js}
RENAMED
@@ -51,10 +51,7 @@ jQuery(function($) {
|
|
51 |
}
|
52 |
$('#save-remote-images-button').data('noty').close();
|
53 |
var n = noty(options);
|
54 |
-
if (respond.content)
|
55 |
-
console.log(respond.content)
|
56 |
-
$('#content').val(respond.content);
|
57 |
-
}
|
58 |
},
|
59 |
error: function() {
|
60 |
console.log(1);
|
51 |
}
|
52 |
$('#save-remote-images-button').data('noty').close();
|
53 |
var n = noty(options);
|
54 |
+
if (respond.content) $('#content').val(respond.content);
|
|
|
|
|
|
|
55 |
},
|
56 |
error: function() {
|
57 |
console.log(1);
|
lang/qqworld_auto_save_images-zh_CN.mo
CHANGED
Binary file
|
lang/qqworld_auto_save_images-zh_CN.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: QQworld Auto Save Images\n"
|
4 |
"Report-Msgid-Bugs-To: http://www.qqworld.org\n"
|
5 |
-
"POT-Creation-Date: 2014-10-
|
6 |
-
"PO-Revision-Date: 2014-10-
|
7 |
"Last-Translator: Michael Wang <admin@qqworld.org>\n"
|
8 |
"Language-Team: QQWorld <admin@qqworld.org>\n"
|
9 |
"Language: zh_CN\n"
|
@@ -21,15 +21,15 @@ msgstr ""
|
|
21 |
"X-Poedit-Basepath: ..\n"
|
22 |
"X-Poedit-SearchPath-0: .\n"
|
23 |
|
24 |
-
#: qqworld-auto-save-images.php:
|
25 |
msgid "Michael Wang"
|
26 |
msgstr "王晓骞"
|
27 |
|
28 |
-
#: qqworld-auto-save-images.php:
|
29 |
msgid "Notice:"
|
30 |
msgstr ""
|
31 |
|
32 |
-
#: qqworld-auto-save-images.php:
|
33 |
#, php-format
|
34 |
msgid ""
|
35 |
"Ever since the QQWorld-Auto-Save-Image v1.7.2 released, the plugin core had "
|
@@ -38,248 +38,260 @@ msgstr ""
|
|
38 |
"自动 QQWorld自动保存图片 v1.7.2发布,插件核心有较大更新,请重新<a href=\"%s"
|
39 |
"\">设置</a>。"
|
40 |
|
41 |
-
#: qqworld-auto-save-images.php:
|
42 |
msgid "No taxonomies found."
|
43 |
msgstr "没有相关分类方法。"
|
44 |
|
45 |
-
#: qqworld-auto-save-images.php:
|
46 |
-
#: qqworld-auto-save-images.php:
|
47 |
msgid "All remote images have been saved."
|
48 |
msgstr "已保存所有远程图像。"
|
49 |
|
50 |
-
#: qqworld-auto-save-images.php:
|
51 |
#, php-format
|
52 |
msgid " <a href=\"%s\">View</a>"
|
53 |
msgstr " <a href=\"%s\">查看</a>"
|
54 |
|
55 |
-
#: qqworld-auto-save-images.php:
|
56 |
msgid "Has missing images or image which could not download."
|
57 |
msgstr "内容包含 不存在/无法下载 的图像。"
|
58 |
|
59 |
-
#: qqworld-auto-save-images.php:
|
60 |
msgid "In Process..."
|
61 |
msgstr "正在保存……"
|
62 |
|
63 |
-
#: qqworld-auto-save-images.php:
|
64 |
msgid ""
|
65 |
"Are you sure?<br />Before you click the yes button, I recommend backup site "
|
66 |
"database."
|
67 |
msgstr "你确定吗?<br />在点击确定按钮之前,我建议你备份网站的数据库。"
|
68 |
|
69 |
-
#: qqworld-auto-save-images.php:
|
70 |
msgid "Please select post types."
|
71 |
msgstr "请选择文章类型。"
|
72 |
|
73 |
-
#: qqworld-auto-save-images.php:
|
74 |
msgid "May be a problem with some posts: "
|
75 |
msgstr "也许一些文章有问题:"
|
76 |
|
77 |
-
#: qqworld-auto-save-images.php:
|
78 |
#, php-format
|
79 |
msgid "%d post has been scanned."
|
80 |
msgstr "已扫描%d篇文章。"
|
81 |
|
82 |
-
#: qqworld-auto-save-images.php:
|
83 |
#, php-format
|
84 |
msgid "%d posts have been scanned."
|
85 |
msgstr "已扫描%d篇文章。"
|
86 |
|
87 |
-
#: qqworld-auto-save-images.php:
|
88 |
#, php-format
|
89 |
msgid "%d post included remote images processed."
|
90 |
msgstr "已处理%d篇包含远程图像的文章。"
|
91 |
|
92 |
-
#: qqworld-auto-save-images.php:
|
93 |
#, php-format
|
94 |
msgid "%d posts included remote images processed."
|
95 |
msgstr "已处理%d篇包含远程图像的文章。"
|
96 |
|
97 |
-
#: qqworld-auto-save-images.php:
|
98 |
#, php-format
|
99 |
msgid "%d post has missing images couldn't be processed."
|
100 |
msgstr "%d篇包含不存在的远程图像的文章无法处理。"
|
101 |
|
102 |
-
#: qqworld-auto-save-images.php:
|
103 |
#, php-format
|
104 |
msgid "%d posts have missing images couldn't be processed."
|
105 |
msgstr "%d篇包含不存在的远程图像的文章无法处理。"
|
106 |
|
107 |
-
#: qqworld-auto-save-images.php:
|
108 |
#, php-format
|
109 |
msgid "found %d post including remote images."
|
110 |
msgstr "找到%d篇包含远程图像的文章。"
|
111 |
|
112 |
-
#: qqworld-auto-save-images.php:
|
113 |
#, php-format
|
114 |
msgid "found %d posts including remote images."
|
115 |
msgstr "找到%d篇包含远程图像的文章。"
|
116 |
|
117 |
-
#: qqworld-auto-save-images.php:
|
118 |
#, php-format
|
119 |
msgid "And with %d post has missing images."
|
120 |
msgstr "其中有%d篇文章包含不存在的远程图像。"
|
121 |
|
122 |
-
#: qqworld-auto-save-images.php:
|
123 |
#, php-format
|
124 |
msgid "And with %d posts have missing images."
|
125 |
msgstr "其中有%d篇文章包含不存在的远程图像。"
|
126 |
|
127 |
-
#: qqworld-auto-save-images.php:
|
128 |
msgid "No posts processed."
|
129 |
msgstr "未处理任何文章。"
|
130 |
|
131 |
-
#: qqworld-auto-save-images.php:
|
132 |
msgid "No post has remote images found."
|
133 |
msgstr "没有文章包含远程图像。"
|
134 |
|
135 |
-
#: qqworld-auto-save-images.php:
|
136 |
msgid "No posts found."
|
137 |
msgstr "未找到任何文章。"
|
138 |
|
139 |
-
#: qqworld-auto-save-images.php:
|
140 |
msgid "All done."
|
141 |
msgstr "全部完成。"
|
142 |
|
143 |
-
#: qqworld-auto-save-images.php:
|
144 |
msgid "Yes"
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: qqworld-auto-save-images.php:
|
148 |
msgid "No"
|
149 |
msgstr ""
|
150 |
|
151 |
-
#: qqworld-auto-save-images.php:
|
152 |
msgid "Scanning..."
|
153 |
msgstr "扫描中……"
|
154 |
|
155 |
-
#: qqworld-auto-save-images.php:
|
156 |
msgid "Listing..."
|
157 |
msgstr "显示列表中……"
|
158 |
|
159 |
-
#: qqworld-auto-save-images.php:
|
160 |
msgid "ID"
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: qqworld-auto-save-images.php:
|
164 |
msgid "Post Type"
|
165 |
msgstr "文章类型"
|
166 |
|
167 |
-
#: qqworld-auto-save-images.php:
|
168 |
msgid "Title"
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: qqworld-auto-save-images.php:
|
172 |
msgid "Status"
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: qqworld-auto-save-images.php:
|
176 |
msgid "Control"
|
177 |
msgstr "控制"
|
178 |
|
179 |
-
#: qqworld-auto-save-images.php:
|
180 |
msgid "Done"
|
181 |
msgstr ""
|
182 |
|
183 |
-
#: qqworld-auto-save-images.php:
|
184 |
msgid "Delete"
|
185 |
msgstr ""
|
186 |
|
187 |
-
#: qqworld-auto-save-images.php:
|
188 |
msgid "Has missing images."
|
189 |
msgstr "有不存在的远程图像。"
|
190 |
|
191 |
-
#: qqworld-auto-save-images.php:
|
192 |
msgid "Normal"
|
193 |
msgstr "正常"
|
194 |
|
195 |
-
#: qqworld-auto-save-images.php:
|
196 |
msgid "Fetch"
|
197 |
msgstr "抓取"
|
198 |
|
199 |
-
#: qqworld-auto-save-images.php:
|
200 |
msgid "Save Remote Images"
|
201 |
msgstr "保存远程图片"
|
202 |
|
203 |
-
#: qqworld-auto-save-images.php:
|
204 |
msgid "Settings"
|
205 |
msgstr ""
|
206 |
|
207 |
-
#: qqworld-auto-save-images.php:
|
|
|
|
|
|
|
|
|
208 |
msgid "QQWorld Auto Save Images"
|
209 |
msgstr "QQWorld自动保存图片"
|
210 |
|
211 |
-
#: qqworld-auto-save-images.php:
|
212 |
msgid ""
|
213 |
"Automatically keep the all remote picture to the local, and automatically "
|
214 |
"set featured image."
|
215 |
msgstr ""
|
216 |
"自动保存远程图片到本地,自动设置特色图片,并且支持机器人采集软件从外部提交。"
|
217 |
|
218 |
-
#: qqworld-auto-save-images.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
msgid "Scan Posts"
|
220 |
msgstr "扫描文章"
|
221 |
|
222 |
-
#: qqworld-auto-save-images.php:
|
223 |
msgid "Mode"
|
224 |
msgstr "模式"
|
225 |
|
226 |
-
#: qqworld-auto-save-images.php:
|
227 |
-
#: qqworld-auto-save-images.php:
|
228 |
-
#: qqworld-auto-save-images.php:
|
229 |
msgid "Automatic"
|
230 |
msgstr "自动"
|
231 |
|
232 |
-
#: qqworld-auto-save-images.php:
|
233 |
msgid ""
|
234 |
"Automatically save all remote images to local media libary when you save or "
|
235 |
"publish post."
|
236 |
msgstr "在保存或发布文章时,自动将所有远程图像保存到本地媒体库。"
|
237 |
|
238 |
-
#: qqworld-auto-save-images.php:
|
239 |
msgid "Manual"
|
240 |
msgstr "手动"
|
241 |
|
242 |
-
#: qqworld-auto-save-images.php:
|
243 |
msgid ""
|
244 |
"Manually save all remote images to local media libary when you click the "
|
245 |
"button on the top of editor."
|
246 |
msgstr "当单击编辑器顶部的按钮时,手动将所有远程图像保存到本地媒体库。"
|
247 |
|
248 |
-
#: qqworld-auto-save-images.php:
|
249 |
msgid "When"
|
250 |
msgstr "什么时候"
|
251 |
|
252 |
-
#: qqworld-auto-save-images.php:
|
253 |
msgid "Save post (Publish, save draft or pedding review)."
|
254 |
msgstr "保存文章时(发布文章,保存草稿或提交审核)。"
|
255 |
|
256 |
-
#: qqworld-auto-save-images.php:
|
257 |
msgid "Publish post only."
|
258 |
msgstr "仅发布文章时。"
|
259 |
|
260 |
-
#: qqworld-auto-save-images.php:
|
261 |
msgid "Remote Publishing"
|
262 |
msgstr "远程发布"
|
263 |
|
264 |
-
#: qqworld-auto-save-images.php:
|
265 |
msgid ""
|
266 |
"Save remote images via remote publishing from IFTTT or other way using "
|
267 |
"XMLRPC."
|
268 |
msgstr "保存通过IFTTT或其他使用XMLRPC方法远程发布的远程图片。"
|
269 |
|
270 |
-
#: qqworld-auto-save-images.php:
|
271 |
msgid "Set Featured Image"
|
272 |
msgstr "设置特色图片"
|
273 |
|
274 |
-
#: qqworld-auto-save-images.php:
|
275 |
msgid "Set first one of the remote images as featured image."
|
276 |
msgstr "设置远程图片中的第1个为特色图片。"
|
277 |
|
278 |
-
#: qqworld-auto-save-images.php:
|
279 |
msgid "Change Image Filename"
|
280 |
msgstr "更改图片文件名"
|
281 |
|
282 |
-
#: qqworld-auto-save-images.php:
|
283 |
msgid ""
|
284 |
"If you checked this, when the remote image filename have Chinese or other "
|
285 |
"East Asian characters. system will automatically change image filename. I "
|
@@ -288,23 +300,98 @@ msgstr ""
|
|
288 |
"如果勾选了此项,当远程图片名包含中文或其他东亚字符的时候,将自动更改图片文件"
|
289 |
"名。建议开启。"
|
290 |
|
291 |
-
#: qqworld-auto-save-images.php:
|
292 |
msgid "Exclude Domain/Keyword"
|
293 |
msgstr "排除域名/关键词"
|
294 |
|
295 |
-
#: qqworld-auto-save-images.php:
|
296 |
msgid "Images will not be saved, if that url contains Exclude-Domain/Keyword."
|
297 |
msgstr "如果图片地址包含排除域名/关键词,则不会保存该图片。"
|
298 |
|
299 |
-
#: qqworld-auto-save-images.php:
|
300 |
msgid "Add a Domain/Keyword"
|
301 |
msgstr "添加域名/关键词"
|
302 |
|
303 |
-
#: qqworld-auto-save-images.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
304 |
msgid "Select post types"
|
305 |
msgstr "选择文章类型"
|
306 |
|
307 |
-
#: qqworld-auto-save-images.php:
|
308 |
msgid ""
|
309 |
"If you have too many posts to be scan, sometimes in process looks like "
|
310 |
"stopping, but it may be fake. please be patient."
|
@@ -312,19 +399,19 @@ msgstr ""
|
|
312 |
"如果有太多文章需要扫描,有时候在扫描过程中看起来像是停止了,但可能是假停止,"
|
313 |
"请耐心等待。"
|
314 |
|
315 |
-
#: qqworld-auto-save-images.php:
|
316 |
msgid "Categories"
|
317 |
msgstr ""
|
318 |
|
319 |
-
#: qqworld-auto-save-images.php:
|
320 |
msgid "Default empty to scan all categories."
|
321 |
msgstr "默认留空扫描所有分类。"
|
322 |
|
323 |
-
#: qqworld-auto-save-images.php:
|
324 |
msgid "Scope of Post ID"
|
325 |
msgstr "文章ID范围"
|
326 |
|
327 |
-
#: qqworld-auto-save-images.php:
|
328 |
msgid ""
|
329 |
"Default empty for scan all posts ID. If you want to scan posts ID from 50 to "
|
330 |
"100. please type '50' and '100' or '100' and '50', The order in which two "
|
@@ -335,16 +422,12 @@ msgstr ""
|
|
335 |
"者'100'和'50',两个数字的顺序可以颠倒。如果你只输入了1个数字,则系统只会扫描"
|
336 |
"该ID。"
|
337 |
|
338 |
-
#: qqworld-auto-save-images.php:
|
339 |
#, php-format
|
340 |
msgid "From %1$s to %2$s"
|
341 |
msgstr "从 %1$s 到 %2$s"
|
342 |
|
343 |
-
#: qqworld-auto-save-images.php:
|
344 |
-
msgid "Offset"
|
345 |
-
msgstr "偏移"
|
346 |
-
|
347 |
-
#: qqworld-auto-save-images.php:477
|
348 |
msgid ""
|
349 |
"Default scan all posts. If you want to scan 50-150 posts, please type '50' "
|
350 |
"in the textfield and select '100'."
|
@@ -352,62 +435,62 @@ msgstr ""
|
|
352 |
"默认扫秒全部文章,如果想扫描50-150篇文章,请在文本框中输入“50”并在下拉菜单中"
|
353 |
"选择“100”。"
|
354 |
|
355 |
-
#: qqworld-auto-save-images.php:
|
356 |
#, php-format
|
357 |
msgid "Start from %s to Scan"
|
358 |
msgstr "从 %s 开始扫描"
|
359 |
|
360 |
-
#: qqworld-auto-save-images.php:
|
361 |
msgid "All"
|
362 |
msgstr ""
|
363 |
|
364 |
-
#: qqworld-auto-save-images.php:
|
365 |
msgid "Posts"
|
366 |
msgstr ""
|
367 |
|
368 |
-
#: qqworld-auto-save-images.php:
|
369 |
msgid "Any"
|
370 |
msgstr "任意"
|
371 |
|
372 |
-
#: qqworld-auto-save-images.php:
|
373 |
msgid "Order By"
|
374 |
msgstr "排序依据"
|
375 |
|
376 |
-
#: qqworld-auto-save-images.php:
|
377 |
msgid "Author"
|
378 |
msgstr ""
|
379 |
|
380 |
-
#: qqworld-auto-save-images.php:
|
381 |
msgid "Date"
|
382 |
msgstr ""
|
383 |
|
384 |
-
#: qqworld-auto-save-images.php:
|
385 |
msgid "Last Modified"
|
386 |
msgstr ""
|
387 |
|
388 |
-
#: qqworld-auto-save-images.php:
|
389 |
msgid "Comment Count"
|
390 |
msgstr "评论数"
|
391 |
|
392 |
-
#: qqworld-auto-save-images.php:
|
393 |
msgid "Order"
|
394 |
msgstr ""
|
395 |
|
396 |
-
#: qqworld-auto-save-images.php:
|
397 |
msgid "Speed"
|
398 |
msgstr "速度"
|
399 |
|
400 |
-
#: qqworld-auto-save-images.php:
|
401 |
msgid "If the server is too much stress may be appropriately reduced speed."
|
402 |
msgstr "如果服务器压力过大,可以适当调低速度。"
|
403 |
|
404 |
-
#: qqworld-auto-save-images.php:
|
405 |
msgid ""
|
406 |
"Scan posts and keep remote images in all posts to local media library. Maybe "
|
407 |
"take a long time."
|
408 |
msgstr "扫描所有的文章,将所有远程图片保存到本地,可能需要很长时间。"
|
409 |
|
410 |
-
#: qqworld-auto-save-images.php:
|
411 |
msgid ""
|
412 |
"The list displayed will show you which posts including remote images, then "
|
413 |
"you can keep them to local manually via click \"Fetch\" button."
|
@@ -415,14 +498,29 @@ msgstr ""
|
|
415 |
"显示的列表中将告诉你哪些文章包含远程图片,然后你可以通过点击“抓取”按钮手动保"
|
416 |
"存。"
|
417 |
|
418 |
-
#: qqworld-auto-save-images.php:
|
419 |
msgid "Has Missing/Undownloadable images."
|
420 |
msgstr "有 不存在/不可下载 的远程图像。"
|
421 |
|
422 |
-
#: qqworld-auto-save-images.php:
|
423 |
msgid "No remote images found."
|
424 |
msgstr "没有远程图像。"
|
425 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
426 |
#, fuzzy
|
427 |
#~ msgid "Change Image File Name"
|
428 |
#~ msgstr "更改图片文件名"
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: QQworld Auto Save Images\n"
|
4 |
"Report-Msgid-Bugs-To: http://www.qqworld.org\n"
|
5 |
+
"POT-Creation-Date: 2014-10-19 09:35+0800\n"
|
6 |
+
"PO-Revision-Date: 2014-10-19 09:35+0800\n"
|
7 |
"Last-Translator: Michael Wang <admin@qqworld.org>\n"
|
8 |
"Language-Team: QQWorld <admin@qqworld.org>\n"
|
9 |
"Language: zh_CN\n"
|
21 |
"X-Poedit-Basepath: ..\n"
|
22 |
"X-Poedit-SearchPath-0: .\n"
|
23 |
|
24 |
+
#: qqworld-auto-save-images.php:29
|
25 |
msgid "Michael Wang"
|
26 |
msgstr "王晓骞"
|
27 |
|
28 |
+
#: qqworld-auto-save-images.php:81
|
29 |
msgid "Notice:"
|
30 |
msgstr ""
|
31 |
|
32 |
+
#: qqworld-auto-save-images.php:82
|
33 |
#, php-format
|
34 |
msgid ""
|
35 |
"Ever since the QQWorld-Auto-Save-Image v1.7.2 released, the plugin core had "
|
38 |
"自动 QQWorld自动保存图片 v1.7.2发布,插件核心有较大更新,请重新<a href=\"%s"
|
39 |
"\">设置</a>。"
|
40 |
|
41 |
+
#: qqworld-auto-save-images.php:98
|
42 |
msgid "No taxonomies found."
|
43 |
msgstr "没有相关分类方法。"
|
44 |
|
45 |
+
#: qqworld-auto-save-images.php:106 qqworld-auto-save-images.php:279
|
46 |
+
#: qqworld-auto-save-images.php:794
|
47 |
msgid "All remote images have been saved."
|
48 |
msgstr "已保存所有远程图像。"
|
49 |
|
50 |
+
#: qqworld-auto-save-images.php:106 qqworld-auto-save-images.php:107
|
51 |
#, php-format
|
52 |
msgid " <a href=\"%s\">View</a>"
|
53 |
msgstr " <a href=\"%s\">查看</a>"
|
54 |
|
55 |
+
#: qqworld-auto-save-images.php:107
|
56 |
msgid "Has missing images or image which could not download."
|
57 |
msgstr "内容包含 不存在/无法下载 的图像。"
|
58 |
|
59 |
+
#: qqworld-auto-save-images.php:128
|
60 |
msgid "In Process..."
|
61 |
msgstr "正在保存……"
|
62 |
|
63 |
+
#: qqworld-auto-save-images.php:150
|
64 |
msgid ""
|
65 |
"Are you sure?<br />Before you click the yes button, I recommend backup site "
|
66 |
"database."
|
67 |
msgstr "你确定吗?<br />在点击确定按钮之前,我建议你备份网站的数据库。"
|
68 |
|
69 |
+
#: qqworld-auto-save-images.php:151 qqworld-auto-save-images.php:618
|
70 |
msgid "Please select post types."
|
71 |
msgstr "请选择文章类型。"
|
72 |
|
73 |
+
#: qqworld-auto-save-images.php:152
|
74 |
msgid "May be a problem with some posts: "
|
75 |
msgstr "也许一些文章有问题:"
|
76 |
|
77 |
+
#: qqworld-auto-save-images.php:153
|
78 |
#, php-format
|
79 |
msgid "%d post has been scanned."
|
80 |
msgstr "已扫描%d篇文章。"
|
81 |
|
82 |
+
#: qqworld-auto-save-images.php:154
|
83 |
#, php-format
|
84 |
msgid "%d posts have been scanned."
|
85 |
msgstr "已扫描%d篇文章。"
|
86 |
|
87 |
+
#: qqworld-auto-save-images.php:155
|
88 |
#, php-format
|
89 |
msgid "%d post included remote images processed."
|
90 |
msgstr "已处理%d篇包含远程图像的文章。"
|
91 |
|
92 |
+
#: qqworld-auto-save-images.php:156
|
93 |
#, php-format
|
94 |
msgid "%d posts included remote images processed."
|
95 |
msgstr "已处理%d篇包含远程图像的文章。"
|
96 |
|
97 |
+
#: qqworld-auto-save-images.php:157
|
98 |
#, php-format
|
99 |
msgid "%d post has missing images couldn't be processed."
|
100 |
msgstr "%d篇包含不存在的远程图像的文章无法处理。"
|
101 |
|
102 |
+
#: qqworld-auto-save-images.php:158
|
103 |
#, php-format
|
104 |
msgid "%d posts have missing images couldn't be processed."
|
105 |
msgstr "%d篇包含不存在的远程图像的文章无法处理。"
|
106 |
|
107 |
+
#: qqworld-auto-save-images.php:159
|
108 |
#, php-format
|
109 |
msgid "found %d post including remote images."
|
110 |
msgstr "找到%d篇包含远程图像的文章。"
|
111 |
|
112 |
+
#: qqworld-auto-save-images.php:160
|
113 |
#, php-format
|
114 |
msgid "found %d posts including remote images."
|
115 |
msgstr "找到%d篇包含远程图像的文章。"
|
116 |
|
117 |
+
#: qqworld-auto-save-images.php:161
|
118 |
#, php-format
|
119 |
msgid "And with %d post has missing images."
|
120 |
msgstr "其中有%d篇文章包含不存在的远程图像。"
|
121 |
|
122 |
+
#: qqworld-auto-save-images.php:162
|
123 |
#, php-format
|
124 |
msgid "And with %d posts have missing images."
|
125 |
msgstr "其中有%d篇文章包含不存在的远程图像。"
|
126 |
|
127 |
+
#: qqworld-auto-save-images.php:163
|
128 |
msgid "No posts processed."
|
129 |
msgstr "未处理任何文章。"
|
130 |
|
131 |
+
#: qqworld-auto-save-images.php:164
|
132 |
msgid "No post has remote images found."
|
133 |
msgstr "没有文章包含远程图像。"
|
134 |
|
135 |
+
#: qqworld-auto-save-images.php:165
|
136 |
msgid "No posts found."
|
137 |
msgstr "未找到任何文章。"
|
138 |
|
139 |
+
#: qqworld-auto-save-images.php:166
|
140 |
msgid "All done."
|
141 |
msgstr "全部完成。"
|
142 |
|
143 |
+
#: qqworld-auto-save-images.php:167
|
144 |
msgid "Yes"
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: qqworld-auto-save-images.php:168
|
148 |
msgid "No"
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: qqworld-auto-save-images.php:169
|
152 |
msgid "Scanning..."
|
153 |
msgstr "扫描中……"
|
154 |
|
155 |
+
#: qqworld-auto-save-images.php:170
|
156 |
msgid "Listing..."
|
157 |
msgstr "显示列表中……"
|
158 |
|
159 |
+
#: qqworld-auto-save-images.php:171 qqworld-auto-save-images.php:660
|
160 |
msgid "ID"
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: qqworld-auto-save-images.php:172
|
164 |
msgid "Post Type"
|
165 |
msgstr "文章类型"
|
166 |
|
167 |
+
#: qqworld-auto-save-images.php:173 qqworld-auto-save-images.php:662
|
168 |
msgid "Title"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: qqworld-auto-save-images.php:174 qqworld-auto-save-images.php:640
|
172 |
msgid "Status"
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: qqworld-auto-save-images.php:175
|
176 |
msgid "Control"
|
177 |
msgstr "控制"
|
178 |
|
179 |
+
#: qqworld-auto-save-images.php:176
|
180 |
msgid "Done"
|
181 |
msgstr ""
|
182 |
|
183 |
+
#: qqworld-auto-save-images.php:177 qqworld-auto-save-images.php:465
|
184 |
msgid "Delete"
|
185 |
msgstr ""
|
186 |
|
187 |
+
#: qqworld-auto-save-images.php:279 qqworld-auto-save-images.php:313
|
188 |
msgid "Has missing images."
|
189 |
msgstr "有不存在的远程图像。"
|
190 |
|
191 |
+
#: qqworld-auto-save-images.php:313
|
192 |
msgid "Normal"
|
193 |
msgstr "正常"
|
194 |
|
195 |
+
#: qqworld-auto-save-images.php:314
|
196 |
msgid "Fetch"
|
197 |
msgstr "抓取"
|
198 |
|
199 |
+
#: qqworld-auto-save-images.php:356
|
200 |
msgid "Save Remote Images"
|
201 |
msgstr "保存远程图片"
|
202 |
|
203 |
+
#: qqworld-auto-save-images.php:367 qqworld-auto-save-images.php:389
|
204 |
msgid "Settings"
|
205 |
msgstr ""
|
206 |
|
207 |
+
#: qqworld-auto-save-images.php:374
|
208 |
+
msgid "Auto Save Images"
|
209 |
+
msgstr "自动保存图片"
|
210 |
+
|
211 |
+
#: qqworld-auto-save-images.php:376 qqworld-auto-save-images.php:383
|
212 |
msgid "QQWorld Auto Save Images"
|
213 |
msgstr "QQWorld自动保存图片"
|
214 |
|
215 |
+
#: qqworld-auto-save-images.php:384
|
216 |
msgid ""
|
217 |
"Automatically keep the all remote picture to the local, and automatically "
|
218 |
"set featured image."
|
219 |
msgstr ""
|
220 |
"自动保存远程图片到本地,自动设置特色图片,并且支持机器人采集软件从外部提交。"
|
221 |
|
222 |
+
#: qqworld-auto-save-images.php:390
|
223 |
+
msgid "Watermark"
|
224 |
+
msgstr "水印"
|
225 |
+
|
226 |
+
#: qqworld-auto-save-images.php:390
|
227 |
+
msgid "Trial"
|
228 |
+
msgstr "试用"
|
229 |
+
|
230 |
+
#: qqworld-auto-save-images.php:391
|
231 |
msgid "Scan Posts"
|
232 |
msgstr "扫描文章"
|
233 |
|
234 |
+
#: qqworld-auto-save-images.php:397 qqworld-auto-save-images.php:399
|
235 |
msgid "Mode"
|
236 |
msgstr "模式"
|
237 |
|
238 |
+
#: qqworld-auto-save-images.php:402 qqworld-auto-save-images.php:431
|
239 |
+
#: qqworld-auto-save-images.php:441 qqworld-auto-save-images.php:451
|
240 |
+
#: qqworld-auto-save-images.php:698
|
241 |
msgid "Automatic"
|
242 |
msgstr "自动"
|
243 |
|
244 |
+
#: qqworld-auto-save-images.php:403
|
245 |
msgid ""
|
246 |
"Automatically save all remote images to local media libary when you save or "
|
247 |
"publish post."
|
248 |
msgstr "在保存或发布文章时,自动将所有远程图像保存到本地媒体库。"
|
249 |
|
250 |
+
#: qqworld-auto-save-images.php:406 qqworld-auto-save-images.php:699
|
251 |
msgid "Manual"
|
252 |
msgstr "手动"
|
253 |
|
254 |
+
#: qqworld-auto-save-images.php:407
|
255 |
msgid ""
|
256 |
"Manually save all remote images to local media libary when you click the "
|
257 |
"button on the top of editor."
|
258 |
msgstr "当单击编辑器顶部的按钮时,手动将所有远程图像保存到本地媒体库。"
|
259 |
|
260 |
+
#: qqworld-auto-save-images.php:412 qqworld-auto-save-images.php:414
|
261 |
msgid "When"
|
262 |
msgstr "什么时候"
|
263 |
|
264 |
+
#: qqworld-auto-save-images.php:417
|
265 |
msgid "Save post (Publish, save draft or pedding review)."
|
266 |
msgstr "保存文章时(发布文章,保存草稿或提交审核)。"
|
267 |
|
268 |
+
#: qqworld-auto-save-images.php:421
|
269 |
msgid "Publish post only."
|
270 |
msgstr "仅发布文章时。"
|
271 |
|
272 |
+
#: qqworld-auto-save-images.php:427 qqworld-auto-save-images.php:429
|
273 |
msgid "Remote Publishing"
|
274 |
msgstr "远程发布"
|
275 |
|
276 |
+
#: qqworld-auto-save-images.php:427
|
277 |
msgid ""
|
278 |
"Save remote images via remote publishing from IFTTT or other way using "
|
279 |
"XMLRPC."
|
280 |
msgstr "保存通过IFTTT或其他使用XMLRPC方法远程发布的远程图片。"
|
281 |
|
282 |
+
#: qqworld-auto-save-images.php:437 qqworld-auto-save-images.php:439
|
283 |
msgid "Set Featured Image"
|
284 |
msgstr "设置特色图片"
|
285 |
|
286 |
+
#: qqworld-auto-save-images.php:437
|
287 |
msgid "Set first one of the remote images as featured image."
|
288 |
msgstr "设置远程图片中的第1个为特色图片。"
|
289 |
|
290 |
+
#: qqworld-auto-save-images.php:447 qqworld-auto-save-images.php:449
|
291 |
msgid "Change Image Filename"
|
292 |
msgstr "更改图片文件名"
|
293 |
|
294 |
+
#: qqworld-auto-save-images.php:447
|
295 |
msgid ""
|
296 |
"If you checked this, when the remote image filename have Chinese or other "
|
297 |
"East Asian characters. system will automatically change image filename. I "
|
300 |
"如果勾选了此项,当远程图片名包含中文或其他东亚字符的时候,将自动更改图片文件"
|
301 |
"名。建议开启。"
|
302 |
|
303 |
+
#: qqworld-auto-save-images.php:457 qqworld-auto-save-images.php:459
|
304 |
msgid "Exclude Domain/Keyword"
|
305 |
msgstr "排除域名/关键词"
|
306 |
|
307 |
+
#: qqworld-auto-save-images.php:457
|
308 |
msgid "Images will not be saved, if that url contains Exclude-Domain/Keyword."
|
309 |
msgstr "如果图片地址包含排除域名/关键词,则不会保存该图片。"
|
310 |
|
311 |
+
#: qqworld-auto-save-images.php:469
|
312 |
msgid "Add a Domain/Keyword"
|
313 |
msgstr "添加域名/关键词"
|
314 |
|
315 |
+
#: qqworld-auto-save-images.php:480
|
316 |
+
msgid ""
|
317 |
+
"Just for preview, The complete feature will on the Pro version. Don't worry, "
|
318 |
+
"other features will be free forever."
|
319 |
+
msgstr "仅仅用于预览,专业版将提供完整的功能。别担心,其他功能将永久免费。"
|
320 |
+
|
321 |
+
#: qqworld-auto-save-images.php:484 qqworld-auto-save-images.php:486
|
322 |
+
msgid "Enabled Watermark"
|
323 |
+
msgstr "启用水印"
|
324 |
+
|
325 |
+
#: qqworld-auto-save-images.php:484
|
326 |
+
msgid "Use for both of remote images and the local upload."
|
327 |
+
msgstr "同时用于远程图片和本地上传。"
|
328 |
+
|
329 |
+
#: qqworld-auto-save-images.php:494 qqworld-auto-save-images.php:496
|
330 |
+
msgid "Filter"
|
331 |
+
msgstr "过滤"
|
332 |
+
|
333 |
+
#: qqworld-auto-save-images.php:494
|
334 |
+
msgid "Skip images that smaller than this size."
|
335 |
+
msgstr "跳过比这个尺寸更小的图像。"
|
336 |
+
|
337 |
+
#: qqworld-auto-save-images.php:498
|
338 |
+
msgid "Width:"
|
339 |
+
msgstr "宽度:"
|
340 |
+
|
341 |
+
#: qqworld-auto-save-images.php:498 qqworld-auto-save-images.php:501
|
342 |
+
msgid "(px)"
|
343 |
+
msgstr "(像素)"
|
344 |
+
|
345 |
+
#: qqworld-auto-save-images.php:501
|
346 |
+
msgid "Height:"
|
347 |
+
msgstr "高度:"
|
348 |
+
|
349 |
+
#: qqworld-auto-save-images.php:507
|
350 |
+
msgid "Align To"
|
351 |
+
msgstr "对齐方式"
|
352 |
+
|
353 |
+
#: qqworld-auto-save-images.php:529
|
354 |
+
msgid "Position"
|
355 |
+
msgstr "位置"
|
356 |
+
|
357 |
+
#: qqworld-auto-save-images.php:529
|
358 |
+
msgid "You can try to drag the watermark image."
|
359 |
+
msgstr "你可以试着拖动水印图片。"
|
360 |
+
|
361 |
+
#: qqworld-auto-save-images.php:546 qqworld-auto-save-images.php:548
|
362 |
+
#: qqworld-auto-save-images.php:627
|
363 |
+
msgid "Offset"
|
364 |
+
msgstr "偏移"
|
365 |
+
|
366 |
+
#: qqworld-auto-save-images.php:559 qqworld-auto-save-images.php:561
|
367 |
+
msgid "Opacity"
|
368 |
+
msgstr "不透明度"
|
369 |
+
|
370 |
+
#: qqworld-auto-save-images.php:569 qqworld-auto-save-images.php:571
|
371 |
+
msgid "Upload Watermark Image"
|
372 |
+
msgstr "上传水印图片"
|
373 |
+
|
374 |
+
#: qqworld-auto-save-images.php:573
|
375 |
+
msgid "Insert a Watermark Image"
|
376 |
+
msgstr "插入水印图片"
|
377 |
+
|
378 |
+
#: qqworld-auto-save-images.php:584
|
379 |
+
msgid "Default Watermark"
|
380 |
+
msgstr "默认水印"
|
381 |
+
|
382 |
+
#: qqworld-auto-save-images.php:588
|
383 |
+
msgid "Buy"
|
384 |
+
msgstr "购买"
|
385 |
+
|
386 |
+
#: qqworld-auto-save-images.php:589
|
387 |
+
msgid "Coming.. I don't know when, Who cares.."
|
388 |
+
msgstr "即将…我不知道什么时候,管它呢……"
|
389 |
+
|
390 |
+
#: qqworld-auto-save-images.php:603
|
391 |
msgid "Select post types"
|
392 |
msgstr "选择文章类型"
|
393 |
|
394 |
+
#: qqworld-auto-save-images.php:603
|
395 |
msgid ""
|
396 |
"If you have too many posts to be scan, sometimes in process looks like "
|
397 |
"stopping, but it may be fake. please be patient."
|
399 |
"如果有太多文章需要扫描,有时候在扫描过程中看起来像是停止了,但可能是假停止,"
|
400 |
"请耐心等待。"
|
401 |
|
402 |
+
#: qqworld-auto-save-images.php:617
|
403 |
msgid "Categories"
|
404 |
msgstr ""
|
405 |
|
406 |
+
#: qqworld-auto-save-images.php:617
|
407 |
msgid "Default empty to scan all categories."
|
408 |
msgstr "默认留空扫描所有分类。"
|
409 |
|
410 |
+
#: qqworld-auto-save-images.php:622
|
411 |
msgid "Scope of Post ID"
|
412 |
msgstr "文章ID范围"
|
413 |
|
414 |
+
#: qqworld-auto-save-images.php:622
|
415 |
msgid ""
|
416 |
"Default empty for scan all posts ID. If you want to scan posts ID from 50 to "
|
417 |
"100. please type '50' and '100' or '100' and '50', The order in which two "
|
422 |
"者'100'和'50',两个数字的顺序可以颠倒。如果你只输入了1个数字,则系统只会扫描"
|
423 |
"该ID。"
|
424 |
|
425 |
+
#: qqworld-auto-save-images.php:623
|
426 |
#, php-format
|
427 |
msgid "From %1$s to %2$s"
|
428 |
msgstr "从 %1$s 到 %2$s"
|
429 |
|
430 |
+
#: qqworld-auto-save-images.php:627
|
|
|
|
|
|
|
|
|
431 |
msgid ""
|
432 |
"Default scan all posts. If you want to scan 50-150 posts, please type '50' "
|
433 |
"in the textfield and select '100'."
|
435 |
"默认扫秒全部文章,如果想扫描50-150篇文章,请在文本框中输入“50”并在下拉菜单中"
|
436 |
"选择“100”。"
|
437 |
|
438 |
+
#: qqworld-auto-save-images.php:629
|
439 |
#, php-format
|
440 |
msgid "Start from %s to Scan"
|
441 |
msgstr "从 %s 开始扫描"
|
442 |
|
443 |
+
#: qqworld-auto-save-images.php:631
|
444 |
msgid "All"
|
445 |
msgstr ""
|
446 |
|
447 |
+
#: qqworld-auto-save-images.php:635
|
448 |
msgid "Posts"
|
449 |
msgstr ""
|
450 |
|
451 |
+
#: qqworld-auto-save-images.php:645
|
452 |
msgid "Any"
|
453 |
msgstr "任意"
|
454 |
|
455 |
+
#: qqworld-auto-save-images.php:655
|
456 |
msgid "Order By"
|
457 |
msgstr "排序依据"
|
458 |
|
459 |
+
#: qqworld-auto-save-images.php:661
|
460 |
msgid "Author"
|
461 |
msgstr ""
|
462 |
|
463 |
+
#: qqworld-auto-save-images.php:663
|
464 |
msgid "Date"
|
465 |
msgstr ""
|
466 |
|
467 |
+
#: qqworld-auto-save-images.php:664
|
468 |
msgid "Last Modified"
|
469 |
msgstr ""
|
470 |
|
471 |
+
#: qqworld-auto-save-images.php:665
|
472 |
msgid "Comment Count"
|
473 |
msgstr "评论数"
|
474 |
|
475 |
+
#: qqworld-auto-save-images.php:675
|
476 |
msgid "Order"
|
477 |
msgstr ""
|
478 |
|
479 |
+
#: qqworld-auto-save-images.php:685
|
480 |
msgid "Speed"
|
481 |
msgstr "速度"
|
482 |
|
483 |
+
#: qqworld-auto-save-images.php:685
|
484 |
msgid "If the server is too much stress may be appropriately reduced speed."
|
485 |
msgstr "如果服务器压力过大,可以适当调低速度。"
|
486 |
|
487 |
+
#: qqworld-auto-save-images.php:698
|
488 |
msgid ""
|
489 |
"Scan posts and keep remote images in all posts to local media library. Maybe "
|
490 |
"take a long time."
|
491 |
msgstr "扫描所有的文章,将所有远程图片保存到本地,可能需要很长时间。"
|
492 |
|
493 |
+
#: qqworld-auto-save-images.php:699
|
494 |
msgid ""
|
495 |
"The list displayed will show you which posts including remote images, then "
|
496 |
"you can keep them to local manually via click \"Fetch\" button."
|
498 |
"显示的列表中将告诉你哪些文章包含远程图片,然后你可以通过点击“抓取”按钮手动保"
|
499 |
"存。"
|
500 |
|
501 |
+
#: qqworld-auto-save-images.php:791
|
502 |
msgid "Has Missing/Undownloadable images."
|
503 |
msgstr "有 不存在/不可下载 的远程图像。"
|
504 |
|
505 |
+
#: qqworld-auto-save-images.php:798
|
506 |
msgid "No remote images found."
|
507 |
msgstr "没有远程图像。"
|
508 |
|
509 |
+
#~ msgid "Upload a Watermark Image"
|
510 |
+
#~ msgstr "上传水印图片"
|
511 |
+
|
512 |
+
#~ msgid "Upload"
|
513 |
+
#~ msgstr "上传"
|
514 |
+
|
515 |
+
#~ msgid "Type"
|
516 |
+
#~ msgstr "类型"
|
517 |
+
|
518 |
+
#~ msgid "Text"
|
519 |
+
#~ msgstr "文本"
|
520 |
+
|
521 |
+
#~ msgid "Image"
|
522 |
+
#~ msgstr "图像"
|
523 |
+
|
524 |
#, fuzzy
|
525 |
#~ msgid "Change Image File Name"
|
526 |
#~ msgstr "更改图片文件名"
|
qqworld-auto-save-images.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: QQWorld Auto Save Images
|
4 |
Plugin URI: https://wordpress.org/plugins/qqworld-auto-save-images/
|
5 |
Description: Automatically keep the all remote picture to the local, and automatically set featured image.
|
6 |
-
Version: 1.7.
|
7 |
Author: Michael Wang
|
8 |
Author URI: http://www.qqworld.org
|
9 |
Text Domain: qqworld_auto_save_images
|
@@ -19,6 +19,12 @@ class QQWorld_auto_save_images {
|
|
19 |
var $has_remote_image;
|
20 |
var $has_missing_image;
|
21 |
var $exclude_domain;
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
function __construct() {
|
23 |
__('Michael Wang', 'qqworld_auto_save_images');
|
24 |
$this->mode = get_option('qqworld_auto_save_images_mode', 'publish');
|
@@ -27,6 +33,14 @@ class QQWorld_auto_save_images {
|
|
27 |
$this->featured_image = get_option('qqworld_auto_save_images_set_featured_image', 'yes');
|
28 |
$this->change_image_name = get_option('qqworld_auto_save_images_auto_change_name', 'yes');
|
29 |
$this->exclude_domain = get_option('qqworld-auto-save-images-exclude-domain');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
switch ($this->type) {
|
31 |
case 'auto':
|
32 |
$this->add_actions();
|
@@ -107,7 +121,7 @@ class QQWorld_auto_save_images {
|
|
107 |
if ($GLOBALS['hook_suffix'] == 'post.php') {
|
108 |
wp_register_script('noty', QQWORLD_AUTO_SAVE_IMAGES_URL . 'js/jquery.noty.packaged.min.js', array('jquery') );
|
109 |
wp_enqueue_script('noty');
|
110 |
-
wp_register_script('qqworld-auto-save-images-script-post', QQWORLD_AUTO_SAVE_IMAGES_URL . 'js/
|
111 |
wp_enqueue_script('qqworld-auto-save-images-script-post');
|
112 |
$translation_array = array(
|
113 |
'post_id' => $post->ID,
|
@@ -118,7 +132,7 @@ class QQWorld_auto_save_images {
|
|
118 |
}
|
119 |
|
120 |
public function add_to_page_qqworld_auto_save_images() {
|
121 |
-
if (
|
122 |
wp_register_script('noty-4-save', QQWORLD_AUTO_SAVE_IMAGES_URL . 'js/jquery.noty.packaged.min.js', array('jquery') );
|
123 |
wp_enqueue_script('noty-4-save');
|
124 |
wp_register_style('qqworld-auto-save-images-style', QQWORLD_AUTO_SAVE_IMAGES_URL . 'css/style.css' );
|
@@ -126,10 +140,12 @@ class QQWorld_auto_save_images {
|
|
126 |
wp_register_style('jquery-ui-style', QQWORLD_AUTO_SAVE_IMAGES_URL . 'css/jquery-ui/jquery-ui.min.css' );
|
127 |
wp_enqueue_style('jquery-ui-style');
|
128 |
wp_enqueue_script('jquery-ui-tooltip');
|
|
|
129 |
wp_enqueue_script('jquery-effects-core');
|
130 |
wp_enqueue_script('jquery-effects-shake');
|
131 |
-
wp_register_script('qqworld-auto-save-images-script', QQWORLD_AUTO_SAVE_IMAGES_URL . 'js/
|
132 |
wp_enqueue_script('qqworld-auto-save-images-script');
|
|
|
133 |
$translation_array = array(
|
134 |
'are_your_sure' => __('Are you sure?<br />Before you click the yes button, I recommend backup site database.', 'qqworld_auto_save_images'),
|
135 |
'pls_select_post_types' => __('Please select post types.', 'qqworld_auto_save_images'),
|
@@ -159,7 +175,13 @@ class QQWorld_auto_save_images {
|
|
159 |
'control' => __('Control', 'qqworld_auto_save_images'),
|
160 |
'done' => __('Done'),
|
161 |
'delete' => __('Delete'),
|
162 |
-
'scheme' => is_ssl() ? 'https://' : 'http://'
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
);
|
164 |
wp_localize_script('qqworld-auto-save-images-script', 'QASI', $translation_array, '3.0.0');
|
165 |
}
|
@@ -170,7 +192,7 @@ class QQWorld_auto_save_images {
|
|
170 |
$args = array();
|
171 |
|
172 |
//post types
|
173 |
-
$post_types = isset($_REQUEST['
|
174 |
$args['post_type'] = $post_types;
|
175 |
|
176 |
//cagegory
|
@@ -278,7 +300,7 @@ class QQWorld_auto_save_images {
|
|
278 |
$content = $post->post_content;
|
279 |
$title = $post->post_title;
|
280 |
|
281 |
-
$content = $this->content_save_pre($content, $post_id);
|
282 |
|
283 |
if ($this->has_remote_image) :
|
284 |
$post_type_object = get_post_type_object($post_type);
|
@@ -348,7 +370,11 @@ class QQWorld_auto_save_images {
|
|
348 |
}
|
349 |
|
350 |
function admin_menu() {
|
351 |
-
|
|
|
|
|
|
|
|
|
352 |
}
|
353 |
|
354 |
function fn() {
|
@@ -358,9 +384,10 @@ class QQWorld_auto_save_images {
|
|
358 |
<p><?php _e('Automatically keep the all remote picture to the local, and automatically set featured image.', 'qqworld_auto_save_images'); ?>
|
359 |
<form action="options.php" method="post" id="form">
|
360 |
<?php settings_fields('qqworld_auto_save_images_settings'); ?>
|
361 |
-
<img src="https://ps.w.org/qqworld-auto-save-images/assets/banner-772x250.png" width="772" height="250" id="banner" />
|
362 |
<ul id="qqworld-auto-save-images-tabs">
|
363 |
<li class="current"><?php _e('Settings'); ?></li>
|
|
|
364 |
<li><?php _e('Scan Posts', 'qqworld_auto_save_images'); ?></li>
|
365 |
</ul>
|
366 |
<div class="tab-content">
|
@@ -447,6 +474,125 @@ class QQWorld_auto_save_images {
|
|
447 |
<?php submit_button(); ?>
|
448 |
</div>
|
449 |
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
450 |
<form action="" method="post" id="scan">
|
451 |
<div class="tab-content hidden">
|
452 |
<div id="scan-result"></div>
|
@@ -460,7 +606,7 @@ class QQWorld_auto_save_images {
|
|
460 |
<ul id="post_types_list">
|
461 |
<?php foreach ($post_types as $name => $post_type) :
|
462 |
if ( !in_array($name, array('attachment', 'revision', 'nav_menu_item') )) : ?>
|
463 |
-
<li><label><input name="
|
464 |
<?php endif;
|
465 |
endforeach;
|
466 |
?></ul>
|
@@ -565,6 +711,13 @@ class QQWorld_auto_save_images {
|
|
565 |
register_setting('qqworld_auto_save_images_settings', 'qqworld_auto_save_images_set_featured_image');
|
566 |
register_setting('qqworld_auto_save_images_settings', 'qqworld_auto_save_images_auto_change_name');
|
567 |
register_setting('qqworld_auto_save_images_settings', 'qqworld-auto-save-images-exclude-domain');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
568 |
}
|
569 |
|
570 |
/**
|
@@ -675,7 +828,7 @@ class QQWorld_auto_save_images {
|
|
675 |
if ($this->remote_publishing) add_action('xmlrpc_publish_post', array($this, 'fetch_images') );
|
676 |
}
|
677 |
|
678 |
-
public function content_save_pre($content, $post_id=null) {
|
679 |
$preg = preg_match_all('/<img.*?src=[\"\']((?![\"\']).*?)[\"\']/i', stripslashes($content), $matches);
|
680 |
if($preg){
|
681 |
foreach($matches[1] as $image_url) {
|
@@ -690,7 +843,7 @@ class QQWorld_auto_save_images {
|
|
690 |
$pos=strpos($image_url,get_bloginfo('url'));
|
691 |
if($pos===false){
|
692 |
$this->has_remote_image = 1;
|
693 |
-
if ($res=$this->save_images($image_url,$post_id)) {
|
694 |
$replace=$res['url'];
|
695 |
$content=str_replace($image_url,$replace,$content);
|
696 |
}
|
@@ -749,43 +902,15 @@ class QQWorld_auto_save_images {
|
|
749 |
$strInfo = @unpack("C2chars", $bin);
|
750 |
$typeCode = intval($strInfo['chars1'].$strInfo['chars2']);
|
751 |
switch ($typeCode) {
|
752 |
-
case 7790:
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
case
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
case 8297:
|
761 |
-
$fileType = 'rar';
|
762 |
-
return false;
|
763 |
-
break;
|
764 |
-
case 255216:
|
765 |
-
$fileType = 'jpg';
|
766 |
-
$mime = 'image/jpeg';
|
767 |
-
return $fileType;
|
768 |
-
break;
|
769 |
-
case 7173:
|
770 |
-
$fileType = 'gif';
|
771 |
-
$mime = 'image/gif';
|
772 |
-
return $fileType;
|
773 |
-
break;
|
774 |
-
case 6677:
|
775 |
-
$fileType = 'bmp';
|
776 |
-
$mime = 'image/bmp';
|
777 |
-
return $fileType;
|
778 |
-
break;
|
779 |
-
case 13780:
|
780 |
-
$fileType = 'png';
|
781 |
-
$mime = 'image/png';
|
782 |
-
return $fileType;
|
783 |
-
break;
|
784 |
-
default:
|
785 |
-
return false;
|
786 |
-
break;
|
787 |
}
|
788 |
-
return false;
|
789 |
}
|
790 |
|
791 |
//insert attachment
|
3 |
Plugin Name: QQWorld Auto Save Images
|
4 |
Plugin URI: https://wordpress.org/plugins/qqworld-auto-save-images/
|
5 |
Description: Automatically keep the all remote picture to the local, and automatically set featured image.
|
6 |
+
Version: 1.7.4
|
7 |
Author: Michael Wang
|
8 |
Author URI: http://www.qqworld.org
|
9 |
Text Domain: qqworld_auto_save_images
|
19 |
var $has_remote_image;
|
20 |
var $has_missing_image;
|
21 |
var $exclude_domain;
|
22 |
+
|
23 |
+
var $watermark_enabled;
|
24 |
+
var $filter_size;
|
25 |
+
var $align_to;
|
26 |
+
var $offset;
|
27 |
+
var $watermark_opacity;
|
28 |
function __construct() {
|
29 |
__('Michael Wang', 'qqworld_auto_save_images');
|
30 |
$this->mode = get_option('qqworld_auto_save_images_mode', 'publish');
|
33 |
$this->featured_image = get_option('qqworld_auto_save_images_set_featured_image', 'yes');
|
34 |
$this->change_image_name = get_option('qqworld_auto_save_images_auto_change_name', 'yes');
|
35 |
$this->exclude_domain = get_option('qqworld-auto-save-images-exclude-domain');
|
36 |
+
|
37 |
+
$this->watermark_enabled = get_option('qqworld-auto-save-images-watermark-enabled', 'no');
|
38 |
+
$this->filter_size = get_option('qqworld-auto-save-images-watermark-filter-size', array('width'=>300, 'height'=>300));
|
39 |
+
$this->align_to = get_option('qqworld-auto-save-images-watermark-align-to', 'lt');
|
40 |
+
$this->offset = get_option('qqworld-auto-save-images-watermark-offset', array('x'=>0, 'y'=>0));
|
41 |
+
$this->watermark_opacity = get_option('qqworld-auto-save-images-watermark-opacity', 100);
|
42 |
+
$this->watermark_image = get_option('qqworld-auto-save-images-watermark-image');
|
43 |
+
|
44 |
switch ($this->type) {
|
45 |
case 'auto':
|
46 |
$this->add_actions();
|
121 |
if ($GLOBALS['hook_suffix'] == 'post.php') {
|
122 |
wp_register_script('noty', QQWORLD_AUTO_SAVE_IMAGES_URL . 'js/jquery.noty.packaged.min.js', array('jquery') );
|
123 |
wp_enqueue_script('noty');
|
124 |
+
wp_register_script('qqworld-auto-save-images-script-post', QQWORLD_AUTO_SAVE_IMAGES_URL . 'js/manual.js', array('jquery') );
|
125 |
wp_enqueue_script('qqworld-auto-save-images-script-post');
|
126 |
$translation_array = array(
|
127 |
'post_id' => $post->ID,
|
132 |
}
|
133 |
|
134 |
public function add_to_page_qqworld_auto_save_images() {
|
135 |
+
if ( preg_match('/qqworld-auto-save-images$/i', $GLOBALS['hook_suffix'], $matche) ) {
|
136 |
wp_register_script('noty-4-save', QQWORLD_AUTO_SAVE_IMAGES_URL . 'js/jquery.noty.packaged.min.js', array('jquery') );
|
137 |
wp_enqueue_script('noty-4-save');
|
138 |
wp_register_style('qqworld-auto-save-images-style', QQWORLD_AUTO_SAVE_IMAGES_URL . 'css/style.css' );
|
140 |
wp_register_style('jquery-ui-style', QQWORLD_AUTO_SAVE_IMAGES_URL . 'css/jquery-ui/jquery-ui.min.css' );
|
141 |
wp_enqueue_style('jquery-ui-style');
|
142 |
wp_enqueue_script('jquery-ui-tooltip');
|
143 |
+
wp_enqueue_script('jquery-ui-draggable');
|
144 |
wp_enqueue_script('jquery-effects-core');
|
145 |
wp_enqueue_script('jquery-effects-shake');
|
146 |
+
wp_register_script('qqworld-auto-save-images-script', QQWORLD_AUTO_SAVE_IMAGES_URL . 'js/admin.js', array('jquery') );
|
147 |
wp_enqueue_script('qqworld-auto-save-images-script');
|
148 |
+
wp_enqueue_media();
|
149 |
$translation_array = array(
|
150 |
'are_your_sure' => __('Are you sure?<br />Before you click the yes button, I recommend backup site database.', 'qqworld_auto_save_images'),
|
151 |
'pls_select_post_types' => __('Please select post types.', 'qqworld_auto_save_images'),
|
175 |
'control' => __('Control', 'qqworld_auto_save_images'),
|
176 |
'done' => __('Done'),
|
177 |
'delete' => __('Delete'),
|
178 |
+
'scheme' => is_ssl() ? 'https://' : 'http://',
|
179 |
+
'watermark_offset' => $this->offset,
|
180 |
+
'default_watermark' => array(
|
181 |
+
'src' => QQWORLD_AUTO_SAVE_IMAGES_URL . 'images/watermark.png',
|
182 |
+
'width' => 205,
|
183 |
+
'height' => 61
|
184 |
+
)
|
185 |
);
|
186 |
wp_localize_script('qqworld-auto-save-images-script', 'QASI', $translation_array, '3.0.0');
|
187 |
}
|
192 |
$args = array();
|
193 |
|
194 |
//post types
|
195 |
+
$post_types = isset($_REQUEST['qqworld_auto_save_images_post_types']) ? $_REQUEST['qqworld_auto_save_images_post_types'] : 'post';
|
196 |
$args['post_type'] = $post_types;
|
197 |
|
198 |
//cagegory
|
300 |
$content = $post->post_content;
|
301 |
$title = $post->post_title;
|
302 |
|
303 |
+
$content = $this->content_save_pre($content, $post_id, 'scan');
|
304 |
|
305 |
if ($this->has_remote_image) :
|
306 |
$post_type_object = get_post_type_object($post_type);
|
370 |
}
|
371 |
|
372 |
function admin_menu() {
|
373 |
+
if ( is_plugin_active( 'qqworld-collector/qqworld-collector.php' ) ) {
|
374 |
+
add_submenu_page('qqworld-collector', __('Auto Save Images', 'qqworld_auto_save_images'), __('Auto Save Images', 'qqworld_auto_save_images'), 'manage_options', 'qqworld-auto-save-images', array($this, 'fn'));
|
375 |
+
} else {
|
376 |
+
add_submenu_page('options-general.php', __('QQWorld Auto Save Images', 'qqworld_auto_save_images'), __('QQWorld Auto Save Images', 'qqworld_auto_save_images'), 'manage_options', 'qqworld-auto-save-images', array($this, 'fn'));
|
377 |
+
}
|
378 |
}
|
379 |
|
380 |
function fn() {
|
384 |
<p><?php _e('Automatically keep the all remote picture to the local, and automatically set featured image.', 'qqworld_auto_save_images'); ?>
|
385 |
<form action="options.php" method="post" id="form">
|
386 |
<?php settings_fields('qqworld_auto_save_images_settings'); ?>
|
387 |
+
<img src="https://ps.w.org/qqworld-auto-save-images/assets/banner-772x250.png?rev=1009762" width="772" height="250" id="banner" />
|
388 |
<ul id="qqworld-auto-save-images-tabs">
|
389 |
<li class="current"><?php _e('Settings'); ?></li>
|
390 |
+
<li><?php _e('Watermark', 'qqworld_auto_save_images'); ?> (<?php _e('Trial', 'qqworld_auto_save_images')?>)</li>
|
391 |
<li><?php _e('Scan Posts', 'qqworld_auto_save_images'); ?></li>
|
392 |
</ul>
|
393 |
<div class="tab-content">
|
474 |
<?php submit_button(); ?>
|
475 |
</div>
|
476 |
</form>
|
477 |
+
<form action="options.php" method="post" id="form">
|
478 |
+
<?php settings_fields('qqworld_auto_save_images_watermark'); ?>
|
479 |
+
<div class="tab-content hidden">
|
480 |
+
<div class="readme"><p><strong><?php _e("Just for preview, The complete feature will on the Pro version. Don't worry, other features will be free forever.", 'qqworld_auto_save_images') ?></strong></p></div>
|
481 |
+
<table class="form-table">
|
482 |
+
<tbody>
|
483 |
+
<tr valign="top">
|
484 |
+
<th scope="row"><label><?php _e('Enabled Watermark', 'qqworld_auto_save_images'); ?></label> <span class="icon help" title="<?php _e("Use for both of remote images and the local upload.", 'qqworld_auto_save_images'); ?>"></span></th>
|
485 |
+
<td><fieldset>
|
486 |
+
<legend class="screen-reader-text"><span><?php _e('Enabled Watermark', 'qqworld_auto_save_images'); ?></span></legend>
|
487 |
+
<label for="qqworld-auto-save-images-watermark-enable">
|
488 |
+
<input name="qqworld-auto-save-images-watermark-enabled" type="checkbox" id="qqworld-auto-save-images-watermark-enabled" value="yes" <?php checked('yes', $this->watermark_enabled); ?> />
|
489 |
+
</label>
|
490 |
+
</fieldset>
|
491 |
+
</td>
|
492 |
+
</tr>
|
493 |
+
<tr valign="top">
|
494 |
+
<th scope="row"><label><?php _e('Filter', 'qqworld_auto_save_images'); ?></label> <span class="icon help" title="<?php _e("Skip images that smaller than this size.", 'qqworld_auto_save_images'); ?>"></span></th>
|
495 |
+
<td><fieldset>
|
496 |
+
<legend class="screen-reader-text"><span><?php _e('Filter', 'qqworld_auto_save_images'); ?></span></legend>
|
497 |
+
<label for="filter-size-width">
|
498 |
+
<?php _e('Width:', 'qqworld_auto_save_images'); ?> <input name="qqworld-auto-save-images-watermark-filter-size[width]" type="number" id="filter-size-width" value="<?php echo $this->filter_size['width']; ?>" class="small-text" /> <?php _e('(px)', 'qqworld_auto_save_images'); ?>
|
499 |
+
</label><br />
|
500 |
+
<label for="filter-size-height">
|
501 |
+
<?php _e('Height:', 'qqworld_auto_save_images'); ?> <input name="qqworld-auto-save-images-watermark-filter-size[height]" type="number" id="filter-size-height" value="<?php echo $this->filter_size['height']; ?>" class="small-text" /> <?php _e('(px)', 'qqworld_auto_save_images'); ?>
|
502 |
+
</label>
|
503 |
+
</fieldset>
|
504 |
+
</td>
|
505 |
+
</tr>
|
506 |
+
<tr valign="top">
|
507 |
+
<th scope="row"><label><?php _e('Align To', 'qqworld_auto_save_images'); ?></label></th>
|
508 |
+
<td>
|
509 |
+
<table id="watermark-align-to">
|
510 |
+
<tr>
|
511 |
+
<td><input type="radio" value="lt" id="lt" name="qqworld-auto-save-images-watermark-align-to" <?php checked('lt', $this->align_to)?> /></td>
|
512 |
+
<td><input type="radio" value="ct" id="ct" name="qqworld-auto-save-images-watermark-align-to" <?php checked('ct', $this->align_to)?> /></td>
|
513 |
+
<td><input type="radio" value="rt" id="rt" name="qqworld-auto-save-images-watermark-align-to" <?php checked('rt', $this->align_to)?> /></td>
|
514 |
+
</tr>
|
515 |
+
<tr>
|
516 |
+
<td><input type="radio" value="lc" id="lc" name="qqworld-auto-save-images-watermark-align-to" <?php checked('lc', $this->align_to)?> /></td>
|
517 |
+
<td><input type="radio" value="cc" id="cc" name="qqworld-auto-save-images-watermark-align-to" <?php checked('cc', $this->align_to)?> /></td>
|
518 |
+
<td><input type="radio" value="rc" id="rc" name="qqworld-auto-save-images-watermark-align-to" <?php checked('rc', $this->align_to)?> /></td>
|
519 |
+
</tr>
|
520 |
+
<tr>
|
521 |
+
<td><input type="radio" value="lb" id="lb" name="qqworld-auto-save-images-watermark-align-to" <?php checked('lb', $this->align_to)?> /></td>
|
522 |
+
<td><input type="radio" value="cb" id="cb" name="qqworld-auto-save-images-watermark-align-to" <?php checked('cb', $this->align_to)?> /></td>
|
523 |
+
<td><input type="radio" value="rb" id="rb" name="qqworld-auto-save-images-watermark-align-to" <?php checked('rb', $this->align_to)?> /></td>
|
524 |
+
</tr>
|
525 |
+
</table>
|
526 |
+
</td>
|
527 |
+
</tr>
|
528 |
+
<tr valign="top">
|
529 |
+
<th scope="row"><label><?php _e('Position', 'qqworld_auto_save_images'); ?></label> <span class="icon help" title="<?php _e("You can try to drag the watermark image.", 'qqworld_auto_save_images'); ?>"></span></th>
|
530 |
+
<td>
|
531 |
+
<div id="watermark-position">
|
532 |
+
<?php
|
533 |
+
if ($this->watermark_image) :
|
534 |
+
$attr = array(
|
535 |
+
'id' => 'watermark-test'
|
536 |
+
);
|
537 |
+
echo wp_get_attachment_image($this->watermark_image, 'full', null, $attr);
|
538 |
+
else : ?>
|
539 |
+
<img id="watermark-test" src="<?php echo QQWORLD_AUTO_SAVE_IMAGES_URL; ?>images/watermark.png" width="205" height="61" />
|
540 |
+
<?php endif; ?>
|
541 |
+
<img id="photo-test" src="<?php echo QQWORLD_AUTO_SAVE_IMAGES_URL; ?>images/photo.jpg" width="800" height="450" />
|
542 |
+
</div>
|
543 |
+
</td>
|
544 |
+
</tr>
|
545 |
+
<tr valign="top">
|
546 |
+
<th scope="row"><label><?php _e('Offset', 'qqworld_auto_save_images'); ?></label></th>
|
547 |
+
<td><fieldset>
|
548 |
+
<legend class="screen-reader-text"><span><?php _e('Offset', 'qqworld_auto_save_images'); ?></span></legend>
|
549 |
+
<label for="offset-x">
|
550 |
+
X: <input name="qqworld-auto-save-images-watermark-offset[x]" type="text" id="offset-x" value="<?php echo $this->offset['x']; ?>" class="small-text" readonly />
|
551 |
+
</label>
|
552 |
+
<label for="offset-y">
|
553 |
+
Y: <input name="qqworld-auto-save-images-watermark-offset[y]" type="text" id="offset-y" value="<?php echo $this->offset['y']; ?>" class="small-text" readonly />
|
554 |
+
</label>
|
555 |
+
</fieldset>
|
556 |
+
</td>
|
557 |
+
</tr>
|
558 |
+
<tr valign="top">
|
559 |
+
<th scope="row"><label><?php _e('Opacity', 'qqworld_auto_save_images'); ?></label></th>
|
560 |
+
<td><fieldset>
|
561 |
+
<legend class="screen-reader-text"><span><?php _e('Opacity', 'qqworld_auto_save_images'); ?></span></legend>
|
562 |
+
<label for="qqworld-auto-save-images-watermark-opacity">
|
563 |
+
<input name="qqworld-auto-save-images-watermark-opacity" type="number" id="watermark-opacity" value="<?php echo $this->watermark_opacity; ?>" class="small-text" /> (0-100)
|
564 |
+
</label>
|
565 |
+
</fieldset>
|
566 |
+
</td>
|
567 |
+
</tr>
|
568 |
+
<tr valign="top">
|
569 |
+
<th scope="row"><label><?php _e('Upload Watermark Image', 'qqworld_auto_save_images'); ?></label></th>
|
570 |
+
<td><fieldset>
|
571 |
+
<legend class="screen-reader-text"><span><?php _e('Upload Watermark Image', 'qqworld_auto_save_images'); ?></span></legend>
|
572 |
+
<label for="qqworld-auto-save-images-watermark-image">
|
573 |
+
<a href="javascript:" id="upload-watermark-image" title="<?php _e('Insert a Watermark Image', 'qqworld_auto_save_images'); ?>">
|
574 |
+
<?php
|
575 |
+
if ($this->watermark_image) :
|
576 |
+
echo wp_get_attachment_image($this->watermark_image, 'full');
|
577 |
+
else : ?>
|
578 |
+
<img src="<?php echo QQWORLD_AUTO_SAVE_IMAGES_URL; ?>images/watermark.png" width="205" height="61" />
|
579 |
+
<?php endif; ?>
|
580 |
+
</a>
|
581 |
+
<input name="qqworld-auto-save-images-watermark-image" type="hidden" title="" value="<?php echo $this->watermark_image; ?>" />
|
582 |
+
</label>
|
583 |
+
</fieldset>
|
584 |
+
<input type="button" class="button<?php if (!$this->watermark_image) echo ' hidden'; ?>" id="default-watermark" value="<?php _e('Default Watermark', 'qqworld_auto_save_images'); ?>">
|
585 |
+
</td>
|
586 |
+
</tr>
|
587 |
+
<tr valign="top">
|
588 |
+
<th scope="row"><label><?php _e('Buy', 'qqworld_auto_save_images'); ?></label></th>
|
589 |
+
<td><?php _e("Coming.. I don't know when, Who cares..", 'qqworld_auto_save_images'); ?></td>
|
590 |
+
</tr>
|
591 |
+
</tbody>
|
592 |
+
</table>
|
593 |
+
<?php submit_button(); ?>
|
594 |
+
</div>
|
595 |
+
</form>
|
596 |
<form action="" method="post" id="scan">
|
597 |
<div class="tab-content hidden">
|
598 |
<div id="scan-result"></div>
|
606 |
<ul id="post_types_list">
|
607 |
<?php foreach ($post_types as $name => $post_type) :
|
608 |
if ( !in_array($name, array('attachment', 'revision', 'nav_menu_item') )) : ?>
|
609 |
+
<li><label><input name="qqworld_auto_save_images_post_types[]" type="checkbox" value="<?php echo $name; ?>" /> <?php echo $post_type->labels->name; ?> (<?php $count = wp_count_posts($name); echo $count->publish; ?>)</label></li>
|
610 |
<?php endif;
|
611 |
endforeach;
|
612 |
?></ul>
|
711 |
register_setting('qqworld_auto_save_images_settings', 'qqworld_auto_save_images_set_featured_image');
|
712 |
register_setting('qqworld_auto_save_images_settings', 'qqworld_auto_save_images_auto_change_name');
|
713 |
register_setting('qqworld_auto_save_images_settings', 'qqworld-auto-save-images-exclude-domain');
|
714 |
+
|
715 |
+
register_setting('qqworld_auto_save_images_watermark', 'qqworld-auto-save-images-watermark-enabled');
|
716 |
+
register_setting('qqworld_auto_save_images_watermark', 'qqworld-auto-save-images-watermark-filter-size');
|
717 |
+
register_setting('qqworld_auto_save_images_watermark', 'qqworld-auto-save-images-watermark-align-to');
|
718 |
+
register_setting('qqworld_auto_save_images_watermark', 'qqworld-auto-save-images-watermark-offset');
|
719 |
+
register_setting('qqworld_auto_save_images_watermark', 'qqworld-auto-save-images-watermark-opacity');
|
720 |
+
register_setting('qqworld_auto_save_images_watermark', 'qqworld-auto-save-images-watermark-image');
|
721 |
}
|
722 |
|
723 |
/**
|
828 |
if ($this->remote_publishing) add_action('xmlrpc_publish_post', array($this, 'fetch_images') );
|
829 |
}
|
830 |
|
831 |
+
public function content_save_pre($content, $post_id=null, $action='save') {
|
832 |
$preg = preg_match_all('/<img.*?src=[\"\']((?![\"\']).*?)[\"\']/i', stripslashes($content), $matches);
|
833 |
if($preg){
|
834 |
foreach($matches[1] as $image_url) {
|
843 |
$pos=strpos($image_url,get_bloginfo('url'));
|
844 |
if($pos===false){
|
845 |
$this->has_remote_image = 1;
|
846 |
+
if ($action=="save" && $res=$this->save_images($image_url,$post_id)) {
|
847 |
$replace=$res['url'];
|
848 |
$content=str_replace($image_url,$replace,$content);
|
849 |
}
|
902 |
$strInfo = @unpack("C2chars", $bin);
|
903 |
$typeCode = intval($strInfo['chars1'].$strInfo['chars2']);
|
904 |
switch ($typeCode) {
|
905 |
+
case 7790: $fileType = 'exe'; return false;
|
906 |
+
case 7784: $fileType = 'midi'; return false;
|
907 |
+
case 8297: $fileType = 'rar'; return false;
|
908 |
+
case 255216: $fileType = 'jpg'; $mime = 'image/jpeg'; return $fileType;
|
909 |
+
case 7173: $fileType = 'gif'; $mime = 'image/gif'; return $fileType;
|
910 |
+
case 6677: $fileType = 'bmp'; $mime = 'image/bmp'; return $fileType;
|
911 |
+
case 13780: $fileType = 'png'; $mime = 'image/png'; return $fileType;
|
912 |
+
default: return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
913 |
}
|
|
|
914 |
}
|
915 |
|
916 |
//insert attachment
|