Version Description
- workflow-enhancement: change the way the plugin handled same image-ratios (faster editing and less warnings)
- the image-size with the biggest dimensions now is used for the min-boundaries (jcrop)
- if the min-boundaries (jcrop) are bigger than original image the min-boundaries turned off
Download this release
Release Info
Developer | Volkmar Kantor |
Plugin | Crop-Thumbnails |
Version | 0.7.0 |
Comparing to | |
See all releases |
Code changes from version 0.6.0 to 0.7.0
- crop-thumbnails.php +2 -2
- css/cpt-window.css +7 -1
- functions/editor.php +27 -6
- functions/save.php +14 -0
- js/cpt-crop.js +57 -67
- lang/cpt_lang-de_DE.mo +0 -0
- lang/cpt_lang-de_DE.po +64 -43
- lang/cpt_lang-default.mo +0 -0
- lang/cpt_lang-default.po +49 -41
- readme.txt +10 -7
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- screenshot-4.png +0 -0
- screenshot-5.png +0 -0
crop-thumbnails.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin URI: http://wordpress.org/extend/plugins/crop-thumbnails/
|
5 |
* Author: Volkmar Kantor
|
6 |
* Author URI: http://www.totalmedial.de
|
7 |
-
* Version: 0.
|
8 |
* Description: Crop your thumbnails, the easy way.
|
9 |
* Text Domain: cpt_lang
|
10 |
*
|
@@ -27,7 +27,7 @@
|
|
27 |
|
28 |
//cpt - stands for crop-post-thumbnail
|
29 |
define('CPT_LANG','cpt_lang');
|
30 |
-
define('CPT_VERSION','0.
|
31 |
|
32 |
function cpt_plugin_init() {
|
33 |
load_plugin_textdomain( CPT_LANG, false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
|
4 |
* Plugin URI: http://wordpress.org/extend/plugins/crop-thumbnails/
|
5 |
* Author: Volkmar Kantor
|
6 |
* Author URI: http://www.totalmedial.de
|
7 |
+
* Version: 0.7.0
|
8 |
* Description: Crop your thumbnails, the easy way.
|
9 |
* Text Domain: cpt_lang
|
10 |
*
|
27 |
|
28 |
//cpt - stands for crop-post-thumbnail
|
29 |
define('CPT_LANG','cpt_lang');
|
30 |
+
define('CPT_VERSION','0.7.0');
|
31 |
|
32 |
function cpt_plugin_init() {
|
33 |
load_plugin_textdomain( CPT_LANG, false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
|
css/cpt-window.css
CHANGED
@@ -16,12 +16,18 @@
|
|
16 |
.thumbnail-list li.active { background-color:#aad6f4; border:1px solid #aad6f4; }
|
17 |
.thumbnail-list li span { display:block; font-size:0.8em; }
|
18 |
.thumbnail-list li img { max-width:100%; height: auto;}
|
|
|
|
|
|
|
19 |
|
20 |
.selectionArea { width:300px; padding:5px; float:left; }
|
21 |
.selectionArea img { max-width:300px; height:auto; }
|
22 |
.selectionArea h3 { margin:0;}
|
23 |
#cpt-generate { width: 300px; height:2em; padding:0.5em 0; display:block; }
|
24 |
-
|
|
|
|
|
|
|
25 |
|
26 |
.postTypeDisabledMsg, .waitingWindow { font-size: 2em; font-weight:bold; width: 100%; height:10em; text-align: center; padding: 3em 0; background: transparent url(../images/loading.gif) no-repeat center center; }
|
27 |
.postTypeDisabledMsg { background: none; }
|
16 |
.thumbnail-list li.active { background-color:#aad6f4; border:1px solid #aad6f4; }
|
17 |
.thumbnail-list li span { display:block; font-size:0.8em; }
|
18 |
.thumbnail-list li img { max-width:100%; height: auto;}
|
19 |
+
.thumbnail-list li .lowResWarning { font-style: italic; color:#990000;}
|
20 |
+
|
21 |
+
.lbl-cpt-same-ratio {font-size:0.9em;}
|
22 |
|
23 |
.selectionArea { width:300px; padding:5px; float:left; }
|
24 |
.selectionArea img { max-width:300px; height:auto; }
|
25 |
.selectionArea h3 { margin:0;}
|
26 |
#cpt-generate { width: 300px; height:2em; padding:0.5em 0; display:block; }
|
27 |
+
|
28 |
+
h4 { margin-bottom:0em;}
|
29 |
+
.step-info { font-size:0.9em; }
|
30 |
+
|
31 |
|
32 |
.postTypeDisabledMsg, .waitingWindow { font-size: 2em; font-weight:bold; width: 100%; height:10em; text-align: center; padding: 3em 0; background: transparent url(../images/loading.gif) no-repeat center center; }
|
33 |
.postTypeDisabledMsg { background: none; }
|
functions/editor.php
CHANGED
@@ -98,6 +98,7 @@ class CropPostThumbnailsEditor {
|
|
98 |
|
99 |
//the content
|
100 |
ob_start();?>
|
|
|
101 |
<ul class="image-list">
|
102 |
<?php
|
103 |
$counter = 1;
|
@@ -170,7 +171,7 @@ class CropPostThumbnailsEditor {
|
|
170 |
jQuery(document).ready(function($) {
|
171 |
cpt_lang = new Object();
|
172 |
cpt_lang['bug'] = "<?php _e('bug - this case shouldnt be happend',CPT_LANG);?>";
|
173 |
-
cpt_lang['
|
174 |
cpt_lang['selectOne'] = "<?php _e('First, select one image. Then, click once again.',CPT_LANG);?>";
|
175 |
cpt_ajax_nonce = "<?php echo wp_create_nonce($cptSettings->getNonceBase()); ?>";
|
176 |
});
|
@@ -201,19 +202,20 @@ jQuery(document).ready(function($) {
|
|
201 |
<div class="waitingWindow hidden"><?php _e('Please wait until the Images are cropped.',CPT_LANG); ?></div>
|
202 |
<div class="mainWindow">
|
203 |
<div class="selectionArea left">
|
204 |
-
<h3><?php _e('Raw'); ?>: <?php echo $orig_img[1].' '.__('pixel',CPT_LANG)?> x <?php echo $orig_img[2].' '.__('pixel',CPT_LANG) ?></h3>
|
205 |
<img src="<?php echo $orig_img[0]?>" data-values='{"id":<?php echo $image_obj->ID; ?>,"parentId":<?php echo $post_id_attached ?>,"width":<?php echo $orig_img[1]?>,"height":<?php echo $orig_img[2] ?>}' />
|
206 |
<button id="cpt-generate" class="button"><?php _e('save crop',CPT_LANG);?></button>
|
|
|
207 |
<ul class="step-info">
|
208 |
<li><?php _e('Step 1: Choose an image from the right.',CPT_LANG); ?></li>
|
209 |
<li><?php _e('Step 2: Use the mouse change the size of the rectangle on the image above.',CPT_LANG); ?></li>
|
210 |
<li><?php _e('Step 3: Click on "save crop".',CPT_LANG); ?></li>
|
211 |
-
<li><?php _e('Hint: If you have one image selected, you can click on "select images with same ratio", to select all with the ratio of these image.',CPT_LANG); ?></li>
|
212 |
</ul>
|
213 |
</div>
|
214 |
<div class="right">
|
215 |
-
<
|
216 |
-
<
|
|
|
217 |
<ul class="thumbnail-list">
|
218 |
<?php
|
219 |
foreach($all_image_sizes as $img_size_name=>$value) :
|
@@ -232,9 +234,15 @@ jQuery(document).ready(function($) {
|
|
232 |
}
|
233 |
$img_data = wp_get_attachment_image_src($image_obj->ID, $img_size_name);
|
234 |
$ratio = ($value['width']/$gcd) / ($value['height']/$gcd);
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
?>
|
236 |
<li class="<?php echo $_class; ?>" rel="<?php echo $print_ratio; ?>">
|
237 |
-
<strong><?php echo $img_size_name; ?></strong>
|
238 |
<span class="dimensions"><?php _e('Dimensions:',CPT_LANG) ?> <?php echo $value['width'].' '.__('pixel',CPT_LANG)?> x <?php echo $value['height'].' '.__('pixel',CPT_LANG) ?> <?php echo $print_cropped ?></span>
|
239 |
<span class="ratio"><?php _e('Ratio:',CPT_LANG) ?> <?php echo $print_ratio; ?></span>
|
240 |
<img src="<?php echo $img_data[0]?>?<?php echo $cache_breaker ?>" data-values='{"name":"<?php echo $img_size_name; ?>","width":<?php echo $value['width']; ?>,"height":<?php echo $value['height']; ?>,"ratio":<?php echo $ratio ?>,"crop":<?php echo $crop ?>}' />
|
@@ -314,6 +322,19 @@ jQuery(document).ready(function($) {
|
|
314 |
return $images;
|
315 |
}
|
316 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
317 |
function isUserPermitted() {
|
318 |
$return = false;
|
319 |
if(current_user_can('upload_files') && current_user_can('edit_pages')) {
|
98 |
|
99 |
//the content
|
100 |
ob_start();?>
|
101 |
+
<div class="header"><strong><?php _e('Choose the image you want to crop.',CPT_LANG); ?></strong></div>
|
102 |
<ul class="image-list">
|
103 |
<?php
|
104 |
$counter = 1;
|
171 |
jQuery(document).ready(function($) {
|
172 |
cpt_lang = new Object();
|
173 |
cpt_lang['bug'] = "<?php _e('bug - this case shouldnt be happend',CPT_LANG);?>";
|
174 |
+
cpt_lang['warningOriginalToSmall'] = "<?php _e('Warning: the original image is to small to be cropped in good quality with this thumbnail-size.',CPT_LANG);?>";
|
175 |
cpt_lang['selectOne'] = "<?php _e('First, select one image. Then, click once again.',CPT_LANG);?>";
|
176 |
cpt_ajax_nonce = "<?php echo wp_create_nonce($cptSettings->getNonceBase()); ?>";
|
177 |
});
|
202 |
<div class="waitingWindow hidden"><?php _e('Please wait until the Images are cropped.',CPT_LANG); ?></div>
|
203 |
<div class="mainWindow">
|
204 |
<div class="selectionArea left">
|
205 |
+
<h3><?php _e('Raw',CPT_LANG); ?>: <?php echo $orig_img[1].' '.__('pixel',CPT_LANG)?> x <?php echo $orig_img[2].' '.__('pixel',CPT_LANG) ?></h3>
|
206 |
<img src="<?php echo $orig_img[0]?>" data-values='{"id":<?php echo $image_obj->ID; ?>,"parentId":<?php echo $post_id_attached ?>,"width":<?php echo $orig_img[1]?>,"height":<?php echo $orig_img[2] ?>}' />
|
207 |
<button id="cpt-generate" class="button"><?php _e('save crop',CPT_LANG);?></button>
|
208 |
+
<h4><?php _e('Quick-Instructions',CPT_LANG);?></h4>
|
209 |
<ul class="step-info">
|
210 |
<li><?php _e('Step 1: Choose an image from the right.',CPT_LANG); ?></li>
|
211 |
<li><?php _e('Step 2: Use the mouse change the size of the rectangle on the image above.',CPT_LANG); ?></li>
|
212 |
<li><?php _e('Step 3: Click on "save crop".',CPT_LANG); ?></li>
|
|
|
213 |
</ul>
|
214 |
</div>
|
215 |
<div class="right">
|
216 |
+
<input type="checkbox" name="cpt-same-ratio" value="1" id="cpt-same-ratio" checked="checked" />
|
217 |
+
<label for="cpt-same-ratio" class="lbl-cpt-same-ratio"><?php _e('select images with same ratio at once',CPT_LANG); ?></label>
|
218 |
+
<button id="cpt-deselect" class="button"><?php _e('deselect all',CPT_LANG); ?></button>
|
219 |
<ul class="thumbnail-list">
|
220 |
<?php
|
221 |
foreach($all_image_sizes as $img_size_name=>$value) :
|
234 |
}
|
235 |
$img_data = wp_get_attachment_image_src($image_obj->ID, $img_size_name);
|
236 |
$ratio = ($value['width']/$gcd) / ($value['height']/$gcd);
|
237 |
+
|
238 |
+
$_lowResWarning = '';
|
239 |
+
if($this->isLowRes($value,$orig_img)) {
|
240 |
+
$_lowResWarning = ' <span class="lowResWarning">'.__('Original image to small for good crop-quality!',CPT_LANG).'</span>';
|
241 |
+
}
|
242 |
+
|
243 |
?>
|
244 |
<li class="<?php echo $_class; ?>" rel="<?php echo $print_ratio; ?>">
|
245 |
+
<strong><?php echo $img_size_name.$_lowResWarning; ?></strong>
|
246 |
<span class="dimensions"><?php _e('Dimensions:',CPT_LANG) ?> <?php echo $value['width'].' '.__('pixel',CPT_LANG)?> x <?php echo $value['height'].' '.__('pixel',CPT_LANG) ?> <?php echo $print_cropped ?></span>
|
247 |
<span class="ratio"><?php _e('Ratio:',CPT_LANG) ?> <?php echo $print_ratio; ?></span>
|
248 |
<img src="<?php echo $img_data[0]?>?<?php echo $cache_breaker ?>" data-values='{"name":"<?php echo $img_size_name; ?>","width":<?php echo $value['width']; ?>,"height":<?php echo $value['height']; ?>,"ratio":<?php echo $ratio ?>,"crop":<?php echo $crop ?>}' />
|
322 |
return $images;
|
323 |
}
|
324 |
|
325 |
+
/**
|
326 |
+
* Checks if the thumb-image-dimensions are bigger than the actuall image.
|
327 |
+
* @param array thumbnail-data from the add_image_size-funtion (width, height)
|
328 |
+
* @param array original image-data-array (url, width, height)
|
329 |
+
* @return true if the original is smaller than the thumbnail-size
|
330 |
+
*/
|
331 |
+
function isLowRes($thumb,$orig) {
|
332 |
+
if($thumb['width']>$orig[1] || $thumb['height']>$orig[2]) {
|
333 |
+
return true;
|
334 |
+
}
|
335 |
+
return false;
|
336 |
+
}
|
337 |
+
|
338 |
function isUserPermitted() {
|
339 |
$return = false;
|
340 |
if(current_user_can('upload_files') && current_user_can('edit_pages')) {
|
functions/save.php
CHANGED
@@ -53,13 +53,24 @@ class CptSaveThumbnail {
|
|
53 |
$_changed_image_format = false;
|
54 |
$_processing_error = array();
|
55 |
foreach($targetImgData as $_imageSize) {
|
|
|
56 |
if(!$this->isImageSizeValid($_imageSize,$imageSizes)) {
|
57 |
continue;
|
58 |
}
|
59 |
if(empty($post_metadata['sizes'][$_imageSize->name])) {
|
60 |
$_changed_image_format = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
}
|
62 |
|
|
|
|
|
63 |
$_filepath = $this->generateFilename($sourceImgPath, $_imageSize->width, $_imageSize->height);
|
64 |
$_filepath_info = pathinfo($_filepath);
|
65 |
$_tmp_filepath = $tmp_dir.$_filepath_info['basename'];
|
@@ -84,6 +95,9 @@ class CptSaveThumbnail {
|
|
84 |
$_processing_error[] = sprintf(__('Cant generate filesize "%s".',CPT_LANG),$_imageSize->name);
|
85 |
$_error = true;
|
86 |
} else {
|
|
|
|
|
|
|
87 |
if(!@copy($result,$_filepath)) {
|
88 |
$_processing_error[] = sprintf(__('Cant copy temporary file to media-library.',CPT_LANG));
|
89 |
$_error = true;
|
53 |
$_changed_image_format = false;
|
54 |
$_processing_error = array();
|
55 |
foreach($targetImgData as $_imageSize) {
|
56 |
+
$_delete_old_file = '';
|
57 |
if(!$this->isImageSizeValid($_imageSize,$imageSizes)) {
|
58 |
continue;
|
59 |
}
|
60 |
if(empty($post_metadata['sizes'][$_imageSize->name])) {
|
61 |
$_changed_image_format = true;
|
62 |
+
} else {
|
63 |
+
//the old size hasent got the right image-size/image-ratio --> delete it or nobody will ever delete it correct
|
64 |
+
if($post_metadata['sizes'][$_imageSize->name]['width'] != intval($_imageSize->width)
|
65 |
+
|| $post_metadata['sizes'][$_imageSize->name]['height'] != intval($_imageSize->height) ) {
|
66 |
+
|
67 |
+
$_delete_old_file = $post_metadata['sizes'][$_imageSize->name]['file'];
|
68 |
+
$_changed_image_format = true;
|
69 |
+
}
|
70 |
}
|
71 |
|
72 |
+
|
73 |
+
|
74 |
$_filepath = $this->generateFilename($sourceImgPath, $_imageSize->width, $_imageSize->height);
|
75 |
$_filepath_info = pathinfo($_filepath);
|
76 |
$_tmp_filepath = $tmp_dir.$_filepath_info['basename'];
|
95 |
$_processing_error[] = sprintf(__('Cant generate filesize "%s".',CPT_LANG),$_imageSize->name);
|
96 |
$_error = true;
|
97 |
} else {
|
98 |
+
if(!empty($_delete_old_file)) {
|
99 |
+
@unlink($_filepath_info['dirname'].'/'.$_delete_old_file);
|
100 |
+
}
|
101 |
if(!@copy($result,$_filepath)) {
|
102 |
$_processing_error[] = sprintf(__('Cant copy temporary file to media-library.',CPT_LANG));
|
103 |
$_error = true;
|
js/cpt-crop.js
CHANGED
@@ -8,47 +8,47 @@ jQuery(document).ready(function($) {
|
|
8 |
//cropping object: holds jcrop-object and image to use the crop on
|
9 |
var cropping = {api:-1, img : $('.selectionArea img')};
|
10 |
|
11 |
-
//active ration: use as object to get call by reference
|
12 |
-
var active_ratio = {'state':''};//initial
|
13 |
-
|
14 |
/*needed cause the js-logic is currently not handle the hidden objects in dependence with "select all of the same ratio"*/
|
15 |
$('.thumbnail-list li.hidden').remove();
|
16 |
|
17 |
cropping.img.fadeTo(0, 0.3);
|
18 |
|
|
|
19 |
$('.thumbnail-list li').click(function() {
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
//check if something is active
|
24 |
-
if($('.thumbnail-list li.active').length>0) {
|
25 |
-
activateArea(cropping,$(this));
|
26 |
-
} else {
|
27 |
-
deactivateArea(cropping);
|
28 |
-
}
|
29 |
-
}
|
30 |
});
|
31 |
|
32 |
-
|
|
|
|
|
33 |
var active = $('.thumbnail-list li.active');
|
34 |
-
if(
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
38 |
} else {
|
39 |
-
|
|
|
|
|
|
|
40 |
}
|
41 |
});
|
42 |
|
|
|
43 |
$('#cpt-deselect').click(function() {
|
44 |
$('.thumbnail-list li.active').removeClass('active');
|
45 |
deactivateArea(cropping);
|
46 |
-
active_ratio.state = '';
|
47 |
});
|
48 |
|
49 |
|
50 |
$('#cpt-generate').click(function() {
|
51 |
var active = $('.thumbnail-list li.active');
|
|
|
|
|
|
|
|
|
52 |
var selection = cropping.api.tellSelect();
|
53 |
if(active.length>0 && selection.w>0 && selection.h>0) {
|
54 |
doProcessing(active,cropping);
|
@@ -113,47 +113,14 @@ jQuery(document).ready(function($) {
|
|
113 |
});
|
114 |
}
|
115 |
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
if(elem.hasClass('active')) {
|
125 |
-
//bug - this case shouldnt be happend
|
126 |
-
alert(cpt_lang.bug);
|
127 |
-
} else {
|
128 |
-
active_ratio.state=ratio;
|
129 |
-
return true;
|
130 |
-
}
|
131 |
-
} else {//ratio already defined
|
132 |
-
if(elem.hasClass('active')) {
|
133 |
-
//good
|
134 |
-
if($('.thumbnail-list li.active').length==1) {
|
135 |
-
active_ratio.state = '';
|
136 |
-
}
|
137 |
-
return true;
|
138 |
-
} else {
|
139 |
-
if(ratio==active_ratio.state) {
|
140 |
-
//good
|
141 |
-
return true;
|
142 |
-
} else {
|
143 |
-
//bad
|
144 |
-
var text = cpt_lang.wrongRatio;
|
145 |
-
text = text.replace( (new RegExp("<br \>","g")) ,'\n');
|
146 |
-
|
147 |
-
//want to release selection?
|
148 |
-
if(confirm(text)) {
|
149 |
-
//release selection
|
150 |
-
$('.thumbnail-list li.active').removeClass('active');
|
151 |
-
deactivateArea(cropping);
|
152 |
-
active_ratio.state = '';
|
153 |
-
}
|
154 |
-
return false;
|
155 |
-
}
|
156 |
-
}
|
157 |
}
|
158 |
}
|
159 |
|
@@ -166,21 +133,44 @@ jQuery(document).ready(function($) {
|
|
166 |
|
167 |
function activateArea(c,li) {
|
168 |
deactivateArea(c);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
|
170 |
-
var thumb = $(li.find('img')[0]);
|
171 |
|
172 |
-
var scale = c.img.width() /
|
173 |
var preSelect = [ 0, 0, Math.round(scale*c.img.width()), Math.round(scale*c.img.height()) ];
|
174 |
-
var minSize = [
|
|
|
|
|
175 |
|
176 |
var options = {}
|
177 |
options.boxWidth = c.img.width();
|
178 |
options.boxHeight = c.img.height();
|
179 |
options.trueSize = [cropping.img.data('values').width,c.img.data('values').height];
|
180 |
-
options.aspectRatio =
|
181 |
options.setSelect = preSelect;
|
182 |
-
|
183 |
-
|
|
|
|
|
|
|
|
|
184 |
|
185 |
c.api = $.Jcrop(c.img, options);
|
186 |
}
|
8 |
//cropping object: holds jcrop-object and image to use the crop on
|
9 |
var cropping = {api:-1, img : $('.selectionArea img')};
|
10 |
|
|
|
|
|
|
|
11 |
/*needed cause the js-logic is currently not handle the hidden objects in dependence with "select all of the same ratio"*/
|
12 |
$('.thumbnail-list li.hidden').remove();
|
13 |
|
14 |
cropping.img.fadeTo(0, 0.3);
|
15 |
|
16 |
+
//handle click on an entry
|
17 |
$('.thumbnail-list li').click(function() {
|
18 |
+
selectAllWithSameRatio($(this));
|
19 |
+
activateArea(cropping);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
});
|
21 |
|
22 |
+
|
23 |
+
//handle checkbox for selecting all with same ratio
|
24 |
+
$('#cpt-same-ratio').change(function() {
|
25 |
var active = $('.thumbnail-list li.active');
|
26 |
+
if($(this).attr('checked')==='checked') {
|
27 |
+
if(active.length>0) {
|
28 |
+
selectAllWithSameRatio($(active[0]));
|
29 |
+
activateArea(cropping);
|
30 |
+
}
|
31 |
} else {
|
32 |
+
if(active.length>1) {
|
33 |
+
$('.thumbnail-list li').removeClass('active');
|
34 |
+
deactivateArea(cropping);
|
35 |
+
}
|
36 |
}
|
37 |
});
|
38 |
|
39 |
+
|
40 |
$('#cpt-deselect').click(function() {
|
41 |
$('.thumbnail-list li.active').removeClass('active');
|
42 |
deactivateArea(cropping);
|
|
|
43 |
});
|
44 |
|
45 |
|
46 |
$('#cpt-generate').click(function() {
|
47 |
var active = $('.thumbnail-list li.active');
|
48 |
+
if(active.length===0) {
|
49 |
+
alert(cpt_lang['selectOne']);
|
50 |
+
return;
|
51 |
+
}
|
52 |
var selection = cropping.api.tellSelect();
|
53 |
if(active.length>0 && selection.w>0 && selection.h>0) {
|
54 |
doProcessing(active,cropping);
|
113 |
});
|
114 |
}
|
115 |
|
116 |
+
function selectAllWithSameRatio(elem) {
|
117 |
+
$('.thumbnail-list li').removeClass('active');
|
118 |
+
if($('#cpt-same-ratio').attr('checked')==='checked') {
|
119 |
+
var ratio = elem.attr('rel');
|
120 |
+
var elements = $('.thumbnail-list li[rel="'+ratio+'"]');
|
121 |
+
elements.addClass('active');
|
122 |
+
} else {
|
123 |
+
elem.addClass('active');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
}
|
125 |
}
|
126 |
|
133 |
|
134 |
function activateArea(c,li) {
|
135 |
deactivateArea(c);
|
136 |
+
var allActiveThumbs = $('.thumbnail-list li.active img');
|
137 |
+
var largestWidth = 0;
|
138 |
+
var largestHeight = 0;
|
139 |
+
var ratio = 0;
|
140 |
+
allActiveThumbs.each(function() {
|
141 |
+
if(ratio === 0) {
|
142 |
+
ratio = $(this).data('values').ratio;//initial
|
143 |
+
}
|
144 |
+
if(ratio != $(this).data('values').ratio) {
|
145 |
+
alert(cpt_lang['bug']);
|
146 |
+
}
|
147 |
+
|
148 |
+
//we only need to check in one dimension, cause per definition all images have to use the same ratio
|
149 |
+
if($(this).data('values').width > largestWidth) {
|
150 |
+
largestWidth = $(this).data('values').width;
|
151 |
+
largestHeight = $(this).data('values').height;
|
152 |
+
}
|
153 |
+
});
|
154 |
|
|
|
155 |
|
156 |
+
var scale = c.img.width() / largestWidth;
|
157 |
var preSelect = [ 0, 0, Math.round(scale*c.img.width()), Math.round(scale*c.img.height()) ];
|
158 |
+
var minSize = [ largestWidth, largestHeight ];
|
159 |
+
|
160 |
+
|
161 |
|
162 |
var options = {}
|
163 |
options.boxWidth = c.img.width();
|
164 |
options.boxHeight = c.img.height();
|
165 |
options.trueSize = [cropping.img.data('values').width,c.img.data('values').height];
|
166 |
+
options.aspectRatio = ratio;
|
167 |
options.setSelect = preSelect;
|
168 |
+
if(largestWidth>cropping.img.data('values').width || largestHeight>cropping.img.data('values').height) {
|
169 |
+
alert(cpt_lang['warningOriginalToSmall']);
|
170 |
+
} else {
|
171 |
+
options.minSize = minSize;
|
172 |
+
}
|
173 |
+
console.log('options',options);
|
174 |
|
175 |
c.api = $.Jcrop(c.img, options);
|
176 |
}
|
lang/cpt_lang-de_DE.mo
CHANGED
Binary file
|
lang/cpt_lang-de_DE.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Crop-Post-Thumbnails\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2012-11-
|
6 |
-
"PO-Revision-Date: 2012-11-
|
7 |
"Last-Translator: Volkmar Kantor <volkmar.kantor@gmx.de>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -13,7 +13,7 @@ msgstr ""
|
|
13 |
"X-Poedit-Basepath: .\n"
|
14 |
"X-Poedit-SearchPath-0: ..\n"
|
15 |
|
16 |
-
#: ../crop-thumbnails.php:
|
17 |
msgid "Crop your thumbnails, the easy way."
|
18 |
msgstr "Zuschnitt ihrer Artikelbilder - einfach gemacht."
|
19 |
|
@@ -22,7 +22,7 @@ msgid "An error happend!"
|
|
22 |
msgstr "Es ist ein Fehler aufgetretten!"
|
23 |
|
24 |
#: ../functions/editor.php:76
|
25 |
-
#: ../functions/editor.php:
|
26 |
msgid "Cropping is disabled for this post-type."
|
27 |
msgstr "Das Zuschneiden ist für diesen Eintragstyp deaktiviert."
|
28 |
|
@@ -30,118 +30,126 @@ msgstr "Das Zuschneiden ist für diesen Eintragstyp deaktiviert."
|
|
30 |
msgid "No images in this post yet. You have to upload some via upload dialog."
|
31 |
msgstr "Zu diesem Eintrag wurden bisher keine Bilder hinzugefügt."
|
32 |
|
33 |
-
#: ../functions/editor.php:
|
|
|
|
|
|
|
|
|
34 |
msgid "Post Thumbnail"
|
35 |
msgstr "Artikel-Vorschaubild"
|
36 |
|
37 |
-
#: ../functions/editor.php:
|
38 |
#, php-format
|
39 |
msgid "Image %d"
|
40 |
msgstr "Bild %d"
|
41 |
|
42 |
-
#: ../functions/editor.php:
|
43 |
msgid "bug - this case shouldnt be happend"
|
44 |
msgstr "BUG - dieser Fall hätte nie eintretten drüfen - Plugin-Autor benachrichtigen."
|
45 |
|
46 |
-
#: ../functions/editor.php:173
|
47 |
-
msgid "Wrong ratio!<br \\>OK - release images selected so far.<br \\>Cancel - keep selected images so far."
|
48 |
-
msgstr "Falsches Seitenverhältnis!<br \\>OK - bisher gewählte Bilder abwählen<br \\>Abbrechen - bisher gewählte Bilder belassen."
|
49 |
-
|
50 |
#: ../functions/editor.php:174
|
|
|
|
|
|
|
|
|
51 |
msgid "First, select one image. Then, click once again."
|
52 |
msgstr "Erst ein Bild auswählen, danach erneut probieren."
|
53 |
|
54 |
-
#: ../functions/editor.php:
|
55 |
msgid "back to image-list"
|
56 |
msgstr "Zurück zur Bild-Übersicht"
|
57 |
|
58 |
-
#: ../functions/editor.php:
|
59 |
msgid "Please wait until the Images are cropped."
|
60 |
msgstr "Bitte warten Sie bis die Bilder zugeschnitten wurden."
|
61 |
|
62 |
-
#: ../functions/editor.php:
|
63 |
msgid "Raw"
|
64 |
msgstr "Original-Bild"
|
65 |
|
66 |
-
#: ../functions/editor.php:
|
67 |
-
#: ../functions/editor.php:
|
68 |
msgid "pixel"
|
69 |
msgstr "Pixel"
|
70 |
|
71 |
-
#: ../functions/editor.php:
|
72 |
msgid "save crop"
|
73 |
msgstr "Zuschnitt übernehmen"
|
74 |
|
75 |
#: ../functions/editor.php:208
|
|
|
|
|
|
|
|
|
76 |
msgid "Step 1: Choose an image from the right."
|
77 |
msgstr "Schritt 1: Wählen Sie ein Bild von der rechten Seite."
|
78 |
|
79 |
-
#: ../functions/editor.php:
|
80 |
msgid "Step 2: Use the mouse change the size of the rectangle on the image above."
|
81 |
msgstr "Schritt 2: Benutzen Sie die Maus um die Größe des Rechtecks im oberen Bild zu ändern."
|
82 |
|
83 |
-
#: ../functions/editor.php:
|
84 |
msgid "Step 3: Click on \"save crop\"."
|
85 |
msgstr "Schritt 3: Klicken Sie auf \"Zuschnitt übernehmen\"."
|
86 |
|
87 |
-
#: ../functions/editor.php:
|
88 |
-
msgid "
|
89 |
-
msgstr "
|
90 |
-
|
91 |
-
#: ../functions/editor.php:215
|
92 |
-
msgid "select images with same ratio"
|
93 |
-
msgstr "alle Bilder mit diesem Seitenverhältnis auswählen"
|
94 |
|
95 |
-
#: ../functions/editor.php:
|
96 |
msgid "deselect all"
|
97 |
msgstr "nichts auswählen"
|
98 |
|
99 |
-
#: ../functions/editor.php:
|
100 |
msgid "cropped"
|
101 |
msgstr "zugeschnitten"
|
102 |
|
103 |
-
#: ../functions/editor.php:
|
|
|
|
|
|
|
|
|
104 |
msgid "Dimensions:"
|
105 |
msgstr "Größe:"
|
106 |
|
107 |
-
#: ../functions/editor.php:
|
108 |
msgid "Ratio:"
|
109 |
msgstr "Seitenverhältnis:"
|
110 |
|
111 |
-
#: ../functions/save.php:
|
112 |
#, php-format
|
113 |
msgid "Cant generate filesize \"%s\"."
|
114 |
msgstr "Cant generate filesize \"%s\"."
|
115 |
|
116 |
-
#: ../functions/save.php:
|
117 |
msgid "Cant copy temporary file to media-library."
|
118 |
msgstr "Kopieren vom temporären Verzeichnis in die Mediathek fehlgeschlagen."
|
119 |
|
120 |
-
#: ../functions/save.php:
|
121 |
msgid "Cant delete temporary file."
|
122 |
msgstr "Löschen der temporären Datei fehlgeschlagen."
|
123 |
|
124 |
-
#: ../functions/save.php:
|
125 |
msgid "ERROR: Security Check failed (maybe a timeout - please try again)."
|
126 |
msgstr "Fehler: Sicherheitsüberprüfung fehlgeschlagen (vielleicht eine Zeitüberschreitung - bitte versuchen Sie es noch einmal)."
|
127 |
|
128 |
-
#: ../functions/save.php:
|
129 |
msgid "ERROR: Submitted data are not complete."
|
130 |
msgstr "Fehler: Übermittelte Daten sind nicht vollständig."
|
131 |
|
132 |
-
#: ../functions/save.php:
|
133 |
msgid "A cropping with this dimensions on these Image ist not possible."
|
134 |
msgstr "Das Zuschneiden mit diesen Einstellungen ist bei diesem Bild nicht möglich."
|
135 |
|
136 |
-
#: ../functions/save.php:
|
137 |
msgid "ERROR: Can`t find original Image in Database!"
|
138 |
msgstr "Fehler: Konnte die Original Bild nicht in der Datenbank finden!"
|
139 |
|
140 |
-
#: ../functions/save.php:
|
141 |
msgid "ERROR: Can`t find original Imagefile!"
|
142 |
msgstr "Fehler: Konnte die Original-Bilddatei nicht finden!"
|
143 |
|
144 |
-
#: ../functions/save.php:
|
145 |
msgid "ERROR: Can`t find original Image-Metadata!"
|
146 |
msgstr "Fehler: Konnte Original-Bild-Metadaten nicht finden!"
|
147 |
|
@@ -173,22 +181,35 @@ msgstr "Unterstützen Sie den Plugin Entwickler"
|
|
173 |
msgid "You can support the plugin-author <br />(and let him know you love this plugin) <br />by donating via Paypal. Thanks a lot!"
|
174 |
msgstr "Sie können den Entwickler unterstützen <br />(und ihn so wissen lassen, dass sie dieses Plugin lieben) <br />indem sie ihm eine Paypal-Spende zukommen lassen. <br />Vielen Dank!"
|
175 |
|
176 |
-
#: ../functions/settings.php:
|
177 |
msgid "Sizes and Posttypes"
|
178 |
msgstr "Größen und Eintragstypen"
|
179 |
|
180 |
-
#: ../functions/settings.php:
|
181 |
msgid "Choose the image-sizes you want to hide. Choose a post-type to prevent any use of the plugin for these entries."
|
182 |
msgstr "Wählen sie die Bildgrößen die ausgeblendet werden sollen. Wählen Sie einen Eintragstyp um das Zuschneiden in diesen Einträge komplett zu verhindern."
|
183 |
|
184 |
-
#: ../functions/settings.php:
|
185 |
msgid "Crop-Thumbnails is created to make cropping easy for the user. Often times the user only need to crop one, in dependence of the post-type. But the system will create also all other sizes. So, here you can select for what post-type what sizes should be visible in the plugin interface."
|
186 |
msgstr "Crop Thumbnails wurde erstellt um das Zuschneiden von Bildern für den Benutzer zu erleichtern. Oft muss der Nutzer nur eine Bildgröße zuschneiden, abhängig vom Typ des Eintrags. Das System (Wordpress) wird aber immer alle größen erstellen. Hier können Sie auswählen für welche Eintragstypen welche Bildgrößen in der Plugin-Oberfläche angezeigt werden sollen."
|
187 |
|
188 |
-
#: ../functions/settings.php:
|
189 |
msgid "Crop-Thumbnails will only show croped images - sizes with no crop will always be hidden."
|
190 |
msgstr "Crop Thumbnails wird nur Bilder anzeigen die einen Zuschnitt besitzen. Bildgrößen ohne Zuschnitt werden immer ausgeblendet."
|
191 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
#~ msgid ""
|
193 |
#~ "Choose the post-types you want to show the crop-editor and define what "
|
194 |
#~ "sizes the editor should be working on. <strong>Only cropped image sizes "
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Crop-Post-Thumbnails\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2012-11-21 01:56+0100\n"
|
6 |
+
"PO-Revision-Date: 2012-11-21 02:02+0100\n"
|
7 |
"Last-Translator: Volkmar Kantor <volkmar.kantor@gmx.de>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
13 |
"X-Poedit-Basepath: .\n"
|
14 |
"X-Poedit-SearchPath-0: ..\n"
|
15 |
|
16 |
+
#: ../crop-thumbnails.php:35
|
17 |
msgid "Crop your thumbnails, the easy way."
|
18 |
msgstr "Zuschnitt ihrer Artikelbilder - einfach gemacht."
|
19 |
|
22 |
msgstr "Es ist ein Fehler aufgetretten!"
|
23 |
|
24 |
#: ../functions/editor.php:76
|
25 |
+
#: ../functions/editor.php:196
|
26 |
msgid "Cropping is disabled for this post-type."
|
27 |
msgstr "Das Zuschneiden ist für diesen Eintragstyp deaktiviert."
|
28 |
|
30 |
msgid "No images in this post yet. You have to upload some via upload dialog."
|
31 |
msgstr "Zu diesem Eintrag wurden bisher keine Bilder hinzugefügt."
|
32 |
|
33 |
+
#: ../functions/editor.php:101
|
34 |
+
msgid "Choose the image you want to crop."
|
35 |
+
msgstr "Wählen Sie das Bild aus, das Sie zuschneiden wollen."
|
36 |
+
|
37 |
+
#: ../functions/editor.php:107
|
38 |
msgid "Post Thumbnail"
|
39 |
msgstr "Artikel-Vorschaubild"
|
40 |
|
41 |
+
#: ../functions/editor.php:107
|
42 |
#, php-format
|
43 |
msgid "Image %d"
|
44 |
msgstr "Bild %d"
|
45 |
|
46 |
+
#: ../functions/editor.php:173
|
47 |
msgid "bug - this case shouldnt be happend"
|
48 |
msgstr "BUG - dieser Fall hätte nie eintretten drüfen - Plugin-Autor benachrichtigen."
|
49 |
|
|
|
|
|
|
|
|
|
50 |
#: ../functions/editor.php:174
|
51 |
+
msgid "Warning: the original image is to small to be cropped in good quality with this thumbnail-size."
|
52 |
+
msgstr "Warung: das Original-Bild ist zu klein um für diese Thumbnail-Größe es in guter Qualität zuzuschneiden."
|
53 |
+
|
54 |
+
#: ../functions/editor.php:175
|
55 |
msgid "First, select one image. Then, click once again."
|
56 |
msgstr "Erst ein Bild auswählen, danach erneut probieren."
|
57 |
|
58 |
+
#: ../functions/editor.php:201
|
59 |
msgid "back to image-list"
|
60 |
msgstr "Zurück zur Bild-Übersicht"
|
61 |
|
62 |
+
#: ../functions/editor.php:202
|
63 |
msgid "Please wait until the Images are cropped."
|
64 |
msgstr "Bitte warten Sie bis die Bilder zugeschnitten wurden."
|
65 |
|
66 |
+
#: ../functions/editor.php:205
|
67 |
msgid "Raw"
|
68 |
msgstr "Original-Bild"
|
69 |
|
70 |
+
#: ../functions/editor.php:205
|
71 |
+
#: ../functions/editor.php:246
|
72 |
msgid "pixel"
|
73 |
msgstr "Pixel"
|
74 |
|
75 |
+
#: ../functions/editor.php:207
|
76 |
msgid "save crop"
|
77 |
msgstr "Zuschnitt übernehmen"
|
78 |
|
79 |
#: ../functions/editor.php:208
|
80 |
+
msgid "Quick-Instructions"
|
81 |
+
msgstr "Schnell-Anleitung"
|
82 |
+
|
83 |
+
#: ../functions/editor.php:210
|
84 |
msgid "Step 1: Choose an image from the right."
|
85 |
msgstr "Schritt 1: Wählen Sie ein Bild von der rechten Seite."
|
86 |
|
87 |
+
#: ../functions/editor.php:211
|
88 |
msgid "Step 2: Use the mouse change the size of the rectangle on the image above."
|
89 |
msgstr "Schritt 2: Benutzen Sie die Maus um die Größe des Rechtecks im oberen Bild zu ändern."
|
90 |
|
91 |
+
#: ../functions/editor.php:212
|
92 |
msgid "Step 3: Click on \"save crop\"."
|
93 |
msgstr "Schritt 3: Klicken Sie auf \"Zuschnitt übernehmen\"."
|
94 |
|
95 |
+
#: ../functions/editor.php:217
|
96 |
+
msgid "select images with same ratio at once"
|
97 |
+
msgstr "bei gleichem Seitenverhältnis gemeinsam auswählen"
|
|
|
|
|
|
|
|
|
98 |
|
99 |
+
#: ../functions/editor.php:218
|
100 |
msgid "deselect all"
|
101 |
msgstr "nichts auswählen"
|
102 |
|
103 |
+
#: ../functions/editor.php:230
|
104 |
msgid "cropped"
|
105 |
msgstr "zugeschnitten"
|
106 |
|
107 |
+
#: ../functions/editor.php:240
|
108 |
+
msgid "Original image to small for good crop-quality!"
|
109 |
+
msgstr "Original-Bild ist zu klein für guten Bildzuschnitt!"
|
110 |
+
|
111 |
+
#: ../functions/editor.php:246
|
112 |
msgid "Dimensions:"
|
113 |
msgstr "Größe:"
|
114 |
|
115 |
+
#: ../functions/editor.php:247
|
116 |
msgid "Ratio:"
|
117 |
msgstr "Seitenverhältnis:"
|
118 |
|
119 |
+
#: ../functions/save.php:95
|
120 |
#, php-format
|
121 |
msgid "Cant generate filesize \"%s\"."
|
122 |
msgstr "Cant generate filesize \"%s\"."
|
123 |
|
124 |
+
#: ../functions/save.php:102
|
125 |
msgid "Cant copy temporary file to media-library."
|
126 |
msgstr "Kopieren vom temporären Verzeichnis in die Mediathek fehlgeschlagen."
|
127 |
|
128 |
+
#: ../functions/save.php:106
|
129 |
msgid "Cant delete temporary file."
|
130 |
msgstr "Löschen der temporären Datei fehlgeschlagen."
|
131 |
|
132 |
+
#: ../functions/save.php:172
|
133 |
msgid "ERROR: Security Check failed (maybe a timeout - please try again)."
|
134 |
msgstr "Fehler: Sicherheitsüberprüfung fehlgeschlagen (vielleicht eine Zeitüberschreitung - bitte versuchen Sie es noch einmal)."
|
135 |
|
136 |
+
#: ../functions/save.php:176
|
137 |
msgid "ERROR: Submitted data are not complete."
|
138 |
msgstr "Fehler: Übermittelte Daten sind nicht vollständig."
|
139 |
|
140 |
+
#: ../functions/save.php:184
|
141 |
msgid "A cropping with this dimensions on these Image ist not possible."
|
142 |
msgstr "Das Zuschneiden mit diesen Einstellungen ist bei diesem Bild nicht möglich."
|
143 |
|
144 |
+
#: ../functions/save.php:195
|
145 |
msgid "ERROR: Can`t find original Image in Database!"
|
146 |
msgstr "Fehler: Konnte die Original Bild nicht in der Datenbank finden!"
|
147 |
|
148 |
+
#: ../functions/save.php:198
|
149 |
msgid "ERROR: Can`t find original Imagefile!"
|
150 |
msgstr "Fehler: Konnte die Original-Bilddatei nicht finden!"
|
151 |
|
152 |
+
#: ../functions/save.php:201
|
153 |
msgid "ERROR: Can`t find original Image-Metadata!"
|
154 |
msgstr "Fehler: Konnte Original-Bild-Metadaten nicht finden!"
|
155 |
|
181 |
msgid "You can support the plugin-author <br />(and let him know you love this plugin) <br />by donating via Paypal. Thanks a lot!"
|
182 |
msgstr "Sie können den Entwickler unterstützen <br />(und ihn so wissen lassen, dass sie dieses Plugin lieben) <br />indem sie ihm eine Paypal-Spende zukommen lassen. <br />Vielen Dank!"
|
183 |
|
184 |
+
#: ../functions/settings.php:60
|
185 |
msgid "Sizes and Posttypes"
|
186 |
msgstr "Größen und Eintragstypen"
|
187 |
|
188 |
+
#: ../functions/settings.php:61
|
189 |
msgid "Choose the image-sizes you want to hide. Choose a post-type to prevent any use of the plugin for these entries."
|
190 |
msgstr "Wählen sie die Bildgrößen die ausgeblendet werden sollen. Wählen Sie einen Eintragstyp um das Zuschneiden in diesen Einträge komplett zu verhindern."
|
191 |
|
192 |
+
#: ../functions/settings.php:66
|
193 |
msgid "Crop-Thumbnails is created to make cropping easy for the user. Often times the user only need to crop one, in dependence of the post-type. But the system will create also all other sizes. So, here you can select for what post-type what sizes should be visible in the plugin interface."
|
194 |
msgstr "Crop Thumbnails wurde erstellt um das Zuschneiden von Bildern für den Benutzer zu erleichtern. Oft muss der Nutzer nur eine Bildgröße zuschneiden, abhängig vom Typ des Eintrags. Das System (Wordpress) wird aber immer alle größen erstellen. Hier können Sie auswählen für welche Eintragstypen welche Bildgrößen in der Plugin-Oberfläche angezeigt werden sollen."
|
195 |
|
196 |
+
#: ../functions/settings.php:67
|
197 |
msgid "Crop-Thumbnails will only show croped images - sizes with no crop will always be hidden."
|
198 |
msgstr "Crop Thumbnails wird nur Bilder anzeigen die einen Zuschnitt besitzen. Bildgrößen ohne Zuschnitt werden immer ausgeblendet."
|
199 |
|
200 |
+
#~ msgid ""
|
201 |
+
#~ "Wrong ratio!<br \\>OK - release images selected so far.<br \\>Cancel - "
|
202 |
+
#~ "keep selected images so far."
|
203 |
+
#~ msgstr ""
|
204 |
+
#~ "Falsches Seitenverhältnis!<br \\>OK - bisher gewählte Bilder abwählen<br "
|
205 |
+
#~ "\\>Abbrechen - bisher gewählte Bilder belassen."
|
206 |
+
#~ msgid ""
|
207 |
+
#~ "Hint: If you have one image selected, you can click on \"select images "
|
208 |
+
#~ "with same ratio\", to select all with the ratio of these image."
|
209 |
+
#~ msgstr ""
|
210 |
+
#~ "Tipp: Wenn Sie ein Bild ausgewählt haben, und auf \"alle Bilder mit "
|
211 |
+
#~ "diesem Seitenverhältnis auswählen\" klicken, werden automatisch alle "
|
212 |
+
#~ "Einträgen mit diesem Seitenverhältnis ausgewählt."
|
213 |
#~ msgid ""
|
214 |
#~ "Choose the post-types you want to show the crop-editor and define what "
|
215 |
#~ "sizes the editor should be working on. <strong>Only cropped image sizes "
|
lang/cpt_lang-default.mo
CHANGED
Binary file
|
lang/cpt_lang-default.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Crop-Post-Thumbnails\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2012-11-
|
6 |
-
"PO-Revision-Date: 2012-11-
|
7 |
"Last-Translator: Volkmar Kantor <volkmar.kantor@gmx.de>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -13,7 +13,7 @@ msgstr ""
|
|
13 |
"X-Poedit-Basepath: .\n"
|
14 |
"X-Poedit-SearchPath-0: ..\n"
|
15 |
|
16 |
-
#: ../crop-thumbnails.php:
|
17 |
msgid "Crop your thumbnails, the easy way."
|
18 |
msgstr ""
|
19 |
|
@@ -22,7 +22,7 @@ msgid "An error happend!"
|
|
22 |
msgstr ""
|
23 |
|
24 |
#: ../functions/editor.php:76
|
25 |
-
#: ../functions/editor.php:
|
26 |
msgid "Cropping is disabled for this post-type."
|
27 |
msgstr ""
|
28 |
|
@@ -30,118 +30,126 @@ msgstr ""
|
|
30 |
msgid "No images in this post yet. You have to upload some via upload dialog."
|
31 |
msgstr ""
|
32 |
|
33 |
-
#: ../functions/editor.php:
|
|
|
|
|
|
|
|
|
34 |
msgid "Post Thumbnail"
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: ../functions/editor.php:
|
38 |
#, php-format
|
39 |
msgid "Image %d"
|
40 |
msgstr ""
|
41 |
|
42 |
-
#: ../functions/editor.php:
|
43 |
msgid "bug - this case shouldnt be happend"
|
44 |
msgstr ""
|
45 |
|
46 |
-
#: ../functions/editor.php:
|
47 |
-
msgid "
|
48 |
msgstr ""
|
49 |
|
50 |
-
#: ../functions/editor.php:
|
51 |
msgid "First, select one image. Then, click once again."
|
52 |
msgstr ""
|
53 |
|
54 |
-
#: ../functions/editor.php:
|
55 |
msgid "back to image-list"
|
56 |
msgstr ""
|
57 |
|
58 |
-
#: ../functions/editor.php:
|
59 |
msgid "Please wait until the Images are cropped."
|
60 |
msgstr ""
|
61 |
|
62 |
-
#: ../functions/editor.php:
|
63 |
msgid "Raw"
|
64 |
msgstr ""
|
65 |
|
66 |
-
#: ../functions/editor.php:
|
67 |
-
#: ../functions/editor.php:
|
68 |
msgid "pixel"
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: ../functions/editor.php:
|
72 |
msgid "save crop"
|
73 |
msgstr ""
|
74 |
|
75 |
#: ../functions/editor.php:208
|
|
|
|
|
|
|
|
|
76 |
msgid "Step 1: Choose an image from the right."
|
77 |
msgstr ""
|
78 |
|
79 |
-
#: ../functions/editor.php:
|
80 |
msgid "Step 2: Use the mouse change the size of the rectangle on the image above."
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: ../functions/editor.php:
|
84 |
msgid "Step 3: Click on \"save crop\"."
|
85 |
msgstr ""
|
86 |
|
87 |
-
#: ../functions/editor.php:
|
88 |
-
msgid "
|
89 |
-
msgstr ""
|
90 |
-
|
91 |
-
#: ../functions/editor.php:215
|
92 |
-
msgid "select images with same ratio"
|
93 |
msgstr ""
|
94 |
|
95 |
-
#: ../functions/editor.php:
|
96 |
msgid "deselect all"
|
97 |
msgstr ""
|
98 |
|
99 |
-
#: ../functions/editor.php:
|
100 |
msgid "cropped"
|
101 |
msgstr ""
|
102 |
|
103 |
-
#: ../functions/editor.php:
|
|
|
|
|
|
|
|
|
104 |
msgid "Dimensions:"
|
105 |
msgstr ""
|
106 |
|
107 |
-
#: ../functions/editor.php:
|
108 |
msgid "Ratio:"
|
109 |
msgstr ""
|
110 |
|
111 |
-
#: ../functions/save.php:
|
112 |
#, php-format
|
113 |
msgid "Cant generate filesize \"%s\"."
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: ../functions/save.php:
|
117 |
msgid "Cant copy temporary file to media-library."
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: ../functions/save.php:
|
121 |
msgid "Cant delete temporary file."
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: ../functions/save.php:
|
125 |
msgid "ERROR: Security Check failed (maybe a timeout - please try again)."
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: ../functions/save.php:
|
129 |
msgid "ERROR: Submitted data are not complete."
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: ../functions/save.php:
|
133 |
msgid "A cropping with this dimensions on these Image ist not possible."
|
134 |
msgstr ""
|
135 |
|
136 |
-
#: ../functions/save.php:
|
137 |
msgid "ERROR: Can`t find original Image in Database!"
|
138 |
msgstr ""
|
139 |
|
140 |
-
#: ../functions/save.php:
|
141 |
msgid "ERROR: Can`t find original Imagefile!"
|
142 |
msgstr ""
|
143 |
|
144 |
-
#: ../functions/save.php:
|
145 |
msgid "ERROR: Can`t find original Image-Metadata!"
|
146 |
msgstr ""
|
147 |
|
@@ -173,19 +181,19 @@ msgstr ""
|
|
173 |
msgid "You can support the plugin-author <br />(and let him know you love this plugin) <br />by donating via Paypal. Thanks a lot!"
|
174 |
msgstr ""
|
175 |
|
176 |
-
#: ../functions/settings.php:
|
177 |
msgid "Sizes and Posttypes"
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: ../functions/settings.php:
|
181 |
msgid "Choose the image-sizes you want to hide. Choose a post-type to prevent any use of the plugin for these entries."
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: ../functions/settings.php:
|
185 |
msgid "Crop-Thumbnails is created to make cropping easy for the user. Often times the user only need to crop one, in dependence of the post-type. But the system will create also all other sizes. So, here you can select for what post-type what sizes should be visible in the plugin interface."
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: ../functions/settings.php:
|
189 |
msgid "Crop-Thumbnails will only show croped images - sizes with no crop will always be hidden."
|
190 |
msgstr ""
|
191 |
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Crop-Post-Thumbnails\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2012-11-21 01:56+0100\n"
|
6 |
+
"PO-Revision-Date: 2012-11-21 01:56+0100\n"
|
7 |
"Last-Translator: Volkmar Kantor <volkmar.kantor@gmx.de>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
13 |
"X-Poedit-Basepath: .\n"
|
14 |
"X-Poedit-SearchPath-0: ..\n"
|
15 |
|
16 |
+
#: ../crop-thumbnails.php:35
|
17 |
msgid "Crop your thumbnails, the easy way."
|
18 |
msgstr ""
|
19 |
|
22 |
msgstr ""
|
23 |
|
24 |
#: ../functions/editor.php:76
|
25 |
+
#: ../functions/editor.php:196
|
26 |
msgid "Cropping is disabled for this post-type."
|
27 |
msgstr ""
|
28 |
|
30 |
msgid "No images in this post yet. You have to upload some via upload dialog."
|
31 |
msgstr ""
|
32 |
|
33 |
+
#: ../functions/editor.php:101
|
34 |
+
msgid "Choose the image you want to crop."
|
35 |
+
msgstr ""
|
36 |
+
|
37 |
+
#: ../functions/editor.php:107
|
38 |
msgid "Post Thumbnail"
|
39 |
msgstr ""
|
40 |
|
41 |
+
#: ../functions/editor.php:107
|
42 |
#, php-format
|
43 |
msgid "Image %d"
|
44 |
msgstr ""
|
45 |
|
46 |
+
#: ../functions/editor.php:173
|
47 |
msgid "bug - this case shouldnt be happend"
|
48 |
msgstr ""
|
49 |
|
50 |
+
#: ../functions/editor.php:174
|
51 |
+
msgid "Warning: the original image is to small to be cropped in good quality with this thumbnail-size."
|
52 |
msgstr ""
|
53 |
|
54 |
+
#: ../functions/editor.php:175
|
55 |
msgid "First, select one image. Then, click once again."
|
56 |
msgstr ""
|
57 |
|
58 |
+
#: ../functions/editor.php:201
|
59 |
msgid "back to image-list"
|
60 |
msgstr ""
|
61 |
|
62 |
+
#: ../functions/editor.php:202
|
63 |
msgid "Please wait until the Images are cropped."
|
64 |
msgstr ""
|
65 |
|
66 |
+
#: ../functions/editor.php:205
|
67 |
msgid "Raw"
|
68 |
msgstr ""
|
69 |
|
70 |
+
#: ../functions/editor.php:205
|
71 |
+
#: ../functions/editor.php:246
|
72 |
msgid "pixel"
|
73 |
msgstr ""
|
74 |
|
75 |
+
#: ../functions/editor.php:207
|
76 |
msgid "save crop"
|
77 |
msgstr ""
|
78 |
|
79 |
#: ../functions/editor.php:208
|
80 |
+
msgid "Quick-Instructions"
|
81 |
+
msgstr ""
|
82 |
+
|
83 |
+
#: ../functions/editor.php:210
|
84 |
msgid "Step 1: Choose an image from the right."
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: ../functions/editor.php:211
|
88 |
msgid "Step 2: Use the mouse change the size of the rectangle on the image above."
|
89 |
msgstr ""
|
90 |
|
91 |
+
#: ../functions/editor.php:212
|
92 |
msgid "Step 3: Click on \"save crop\"."
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: ../functions/editor.php:217
|
96 |
+
msgid "select images with same ratio at once"
|
|
|
|
|
|
|
|
|
97 |
msgstr ""
|
98 |
|
99 |
+
#: ../functions/editor.php:218
|
100 |
msgid "deselect all"
|
101 |
msgstr ""
|
102 |
|
103 |
+
#: ../functions/editor.php:230
|
104 |
msgid "cropped"
|
105 |
msgstr ""
|
106 |
|
107 |
+
#: ../functions/editor.php:240
|
108 |
+
msgid "Original image to small for good crop-quality!"
|
109 |
+
msgstr ""
|
110 |
+
|
111 |
+
#: ../functions/editor.php:246
|
112 |
msgid "Dimensions:"
|
113 |
msgstr ""
|
114 |
|
115 |
+
#: ../functions/editor.php:247
|
116 |
msgid "Ratio:"
|
117 |
msgstr ""
|
118 |
|
119 |
+
#: ../functions/save.php:95
|
120 |
#, php-format
|
121 |
msgid "Cant generate filesize \"%s\"."
|
122 |
msgstr ""
|
123 |
|
124 |
+
#: ../functions/save.php:102
|
125 |
msgid "Cant copy temporary file to media-library."
|
126 |
msgstr ""
|
127 |
|
128 |
+
#: ../functions/save.php:106
|
129 |
msgid "Cant delete temporary file."
|
130 |
msgstr ""
|
131 |
|
132 |
+
#: ../functions/save.php:172
|
133 |
msgid "ERROR: Security Check failed (maybe a timeout - please try again)."
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: ../functions/save.php:176
|
137 |
msgid "ERROR: Submitted data are not complete."
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: ../functions/save.php:184
|
141 |
msgid "A cropping with this dimensions on these Image ist not possible."
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: ../functions/save.php:195
|
145 |
msgid "ERROR: Can`t find original Image in Database!"
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: ../functions/save.php:198
|
149 |
msgid "ERROR: Can`t find original Imagefile!"
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: ../functions/save.php:201
|
153 |
msgid "ERROR: Can`t find original Image-Metadata!"
|
154 |
msgstr ""
|
155 |
|
181 |
msgid "You can support the plugin-author <br />(and let him know you love this plugin) <br />by donating via Paypal. Thanks a lot!"
|
182 |
msgstr ""
|
183 |
|
184 |
+
#: ../functions/settings.php:60
|
185 |
msgid "Sizes and Posttypes"
|
186 |
msgstr ""
|
187 |
|
188 |
+
#: ../functions/settings.php:61
|
189 |
msgid "Choose the image-sizes you want to hide. Choose a post-type to prevent any use of the plugin for these entries."
|
190 |
msgstr ""
|
191 |
|
192 |
+
#: ../functions/settings.php:66
|
193 |
msgid "Crop-Thumbnails is created to make cropping easy for the user. Often times the user only need to crop one, in dependence of the post-type. But the system will create also all other sizes. So, here you can select for what post-type what sizes should be visible in the plugin interface."
|
194 |
msgstr ""
|
195 |
|
196 |
+
#: ../functions/settings.php:67
|
197 |
msgid "Crop-Thumbnails will only show croped images - sizes with no crop will always be hidden."
|
198 |
msgstr ""
|
199 |
|
readme.txt
CHANGED
@@ -39,21 +39,24 @@ If you had viewed your image on the site before, your browser has cached the ima
|
|
39 |
Currently not.
|
40 |
|
41 |
= What ideas for further releases you have? =
|
|
|
42 |
* allow not cropped image-sizes
|
43 |
* allow new crop sizes beside the ones added with the add_image_size() function
|
44 |
* reset standard image
|
45 |
-
* write test cases
|
46 |
-
* currently the last selected image-size in the crop-editor decides how big the min-boundaries are --> the one with the biggest dimmensions have to use for the min-boundaries
|
47 |
|
48 |
== Screenshots ==
|
49 |
|
50 |
-
1.
|
51 |
-
2.
|
52 |
-
3.
|
53 |
-
4. Crop-Thumbnails integrated in the media library.
|
54 |
-
5. Choose what image-sizes should be hidden
|
55 |
|
56 |
== Changelog ==
|
|
|
|
|
|
|
|
|
57 |
|
58 |
= 0.6.0 =
|
59 |
* add a settings link in the plugin-listing
|
39 |
Currently not.
|
40 |
|
41 |
= What ideas for further releases you have? =
|
42 |
+
* allow cropping window in frontside
|
43 |
* allow not cropped image-sizes
|
44 |
* allow new crop sizes beside the ones added with the add_image_size() function
|
45 |
* reset standard image
|
|
|
|
|
46 |
|
47 |
== Screenshots ==
|
48 |
|
49 |
+
1. You have access to Crop-Thumbnails on post / page / custom-post-types.
|
50 |
+
2. All images attached to this post, will shown in a overlay. You have to choose the one you want to crop.
|
51 |
+
3. Choose one or more images (with the same ratio).
|
52 |
+
4. Crop-Thumbnails is also integrated in the media library.
|
53 |
+
5. Choose what image-sizes should be hidden (for what post-types), for better usability.
|
54 |
|
55 |
== Changelog ==
|
56 |
+
= 0.7.0 =
|
57 |
+
* workflow-enhancement: change the way the plugin handled same image-ratios (faster editing and less warnings)
|
58 |
+
* the image-size with the biggest dimensions now is used for the min-boundaries (jcrop)
|
59 |
+
* if the min-boundaries (jcrop) are bigger than original image the min-boundaries turned off
|
60 |
|
61 |
= 0.6.0 =
|
62 |
* add a settings link in the plugin-listing
|
screenshot-1.png
DELETED
Binary file
|
screenshot-2.png
DELETED
Binary file
|
screenshot-3.png
DELETED
Binary file
|
screenshot-4.png
DELETED
Binary file
|
screenshot-5.png
DELETED
Binary file
|