Crop-Thumbnails - Version 0.8.4

Version Description

  • fix a bug that may occure on some systems with xdebug enabled and low xdebug.max_nesting_level (see: http://wordpress.org/support/topic/error-when-trying-to-crop-a-certain-image)
  • add dutch language (thanks to Max Gruson)
Download this release

Release Info

Developer Volkmar Kantor
Plugin Icon Crop-Thumbnails
Version 0.8.4
Comparing to
See all releases

Code changes from version 0.8.3 to 0.8.4

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.3
8
  * Description: Crop your thumbnails, the easy way.
9
  *
10
  * License: GPL v3
@@ -26,7 +26,7 @@
26
 
27
  //cpt - stands for crop-post-thumbnail
28
  define('CROP_THUMBS_LANG','cpt_lang');
29
- define('CROP_THUMBS_VERSION','0.8.3');
30
 
31
  function cpt_plugin_init() {
32
  load_plugin_textdomain( CROP_THUMBS_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.8.4
8
  * Description: Crop your thumbnails, the easy way.
9
  *
10
  * License: GPL v3
26
 
27
  //cpt - stands for crop-post-thumbnail
28
  define('CROP_THUMBS_LANG','cpt_lang');
29
+ define('CROP_THUMBS_VERSION','0.8.4');
30
 
31
  function cpt_plugin_init() {
32
  load_plugin_textdomain( CROP_THUMBS_LANG, false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
functions/editor.php CHANGED
@@ -461,9 +461,21 @@ jQuery(document).ready(function($) {
461
  /**
462
  * Greatest cummon divisor
463
  */
464
- function gcd($a, $b){
 
 
 
 
 
 
 
 
 
 
 
 
465
  $b = ( $a == 0 )? 0 : $b;
466
- return ( $a % $b )? $this->gcd($b, abs($a - $b)) : $b;
467
  }
468
 
469
 
461
  /**
462
  * Greatest cummon divisor
463
  */
464
+ function gcd($a, $b) {
465
+ if(function_exists('gmp_gcd')) {
466
+ $gcd = gmp_strval(gmp_gcd($a,$b));
467
+ $this->addDebug("gcd-version", "gmp_gcd:".$gcd);
468
+ return ($gcd);
469
+ } else {
470
+ $gcd = $this->my_gcd($a,$b);
471
+ $this->addDebug("gcd-version", "my_gcd:".$gcd);
472
+ return $gcd;
473
+ }
474
+ }
475
+
476
+ function my_gcd($a, $b) {
477
  $b = ( $a == 0 )? 0 : $b;
478
+ return ( $a % $b )? $this->my_gcd($b, abs($a - $b)) : $b;
479
  }
480
 
481
 
lang/cpt_lang-nl_NL.mo ADDED
Binary file
lang/cpt_lang-nl_NL.po ADDED
@@ -0,0 +1,300 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Crop-Post-Thumbnails\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2013-10-08 00:33+0100\n"
6
+ "PO-Revision-Date: 2013-11-11 16:50+0100\n"
7
+ "Last-Translator: Max Gruson <mgruson@live.nl>\n"
8
+ "Language-Team: \n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: __;_e;esc_attr_e;esc_attr__;esc_html_e\n"
13
+ "X-Poedit-Basepath: .\n"
14
+ "X-Generator: Poedit 1.5.7\n"
15
+ "X-Poedit-SearchPath-0: ..\n"
16
+
17
+ #: ../crop-thumbnails.php:34
18
+ msgid "Crop your thumbnails, the easy way."
19
+ msgstr "Snijd de thumbnails bij op een makkelijke manier."
20
+
21
+ #: ../functions/editor.php:25
22
+ msgid "You are not allowed to do this."
23
+ msgstr "Je hebt geen toestemming dit te doen."
24
+
25
+ #: ../functions/editor.php:41
26
+ msgid "No featured Image set for this post until now."
27
+ msgstr "Er is nog geen Uitgelichte afbeelding ingesteld tot nu toe."
28
+
29
+ #: ../functions/editor.php:45
30
+ msgid "An error happend!"
31
+ msgstr "Er heeft een error plaatsgevonden!"
32
+
33
+ #: ../functions/editor.php:78 ../functions/editor.php:204
34
+ msgid "Cropping is disabled for this post-type."
35
+ msgstr "Bijsnijden is uitgeschakeld voor dit berichttype."
36
+
37
+ #: ../functions/editor.php:80
38
+ msgid "No images in this post yet. You have to upload some via upload dialog."
39
+ msgstr ""
40
+ "Er zijn nog geen afbeeldingen in dit bericht. Je kunt afbeeldingen uploaden "
41
+ "via het upload scherm."
42
+
43
+ #: ../functions/editor.php:101
44
+ msgid "Choose the image you want to crop."
45
+ msgstr "Kies de afbeelding die je bij wilt snijden."
46
+
47
+ #: ../functions/editor.php:107
48
+ msgid "Post Thumbnail"
49
+ msgstr "Bericht afbeelding."
50
+
51
+ #: ../functions/editor.php:107
52
+ #, php-format
53
+ msgid "Image %d"
54
+ msgstr "Afbeelding %d"
55
+
56
+ #: ../functions/editor.php:180
57
+ msgid "bug - this case shouldnt be happend"
58
+ msgstr "Bug - Dit zou niet plaatsgevonden moeten hebben."
59
+
60
+ #: ../functions/editor.php:181
61
+ msgid ""
62
+ "Warning: the original image is to small to be cropped in good quality with "
63
+ "this thumbnail-size."
64
+ msgstr ""
65
+ "Waarschuwing: de originele afbeelding is te klein om met behoud van "
66
+ "kwaliteit bijgesneden te kunnen worden tot deze grootte."
67
+
68
+ #: ../functions/editor.php:182
69
+ msgid "First, select one image. Then, click once again."
70
+ msgstr "Selecteer eerst een afbeelding. Klik vervolgens opnieuw."
71
+
72
+ #: ../functions/editor.php:209
73
+ msgid "back to image-list"
74
+ msgstr "Keer terug naar de lijst met afbeeldingen"
75
+
76
+ #: ../functions/editor.php:210
77
+ msgid "Please wait until the Images are cropped."
78
+ msgstr "Wacht a.u.b. tot de afbeeldingen zijn bijgesneden."
79
+
80
+ #: ../functions/editor.php:213
81
+ msgid "Raw"
82
+ msgstr "Volledig"
83
+
84
+ #: ../functions/editor.php:213 ../functions/editor.php:279
85
+ msgid "pixel"
86
+ msgstr "pixels"
87
+
88
+ #: ../functions/editor.php:215
89
+ msgid "save crop"
90
+ msgstr "Bijgesneden afbeelding opslaan"
91
+
92
+ #: ../functions/editor.php:216
93
+ msgid "Quick-Instructions"
94
+ msgstr "Korte instructie"
95
+
96
+ #: ../functions/editor.php:218
97
+ msgid "Step 1: Choose an image from the right."
98
+ msgstr "Stap 1: Kies een afbeelding aan de rechterkant van dit scherm."
99
+
100
+ #: ../functions/editor.php:219
101
+ msgid ""
102
+ "Step 2: Use the mouse change the size of the rectangle on the image above."
103
+ msgstr ""
104
+ "Stap 2: Gebruik de muis om de grootte van de rechthoek in de afbeelding "
105
+ "hierboven aan te passen."
106
+
107
+ #: ../functions/editor.php:220
108
+ msgid "Step 3: Click on \"save crop\"."
109
+ msgstr "Stap 3: Klik op \"bijgesneden afbeelding opslaan\"."
110
+
111
+ #: ../functions/editor.php:225
112
+ msgid "select images with same ratio at once"
113
+ msgstr "Selecteer afbeeldingen met eenzelfde aspect-ratio tegelijkertijd"
114
+
115
+ #: ../functions/editor.php:226
116
+ msgid "deselect all"
117
+ msgstr "Deselecteer alles"
118
+
119
+ #: ../functions/editor.php:262
120
+ msgid "cropped"
121
+ msgstr "Bijgesneden"
122
+
123
+ #: ../functions/editor.php:271
124
+ msgid "maximum"
125
+ msgstr "Maximum"
126
+
127
+ #: ../functions/editor.php:286
128
+ msgid "Original image to small for good crop-quality!"
129
+ msgstr ""
130
+ "De originele afbeelding is te klein om met goede kwaliteit bij te snijden!"
131
+
132
+ #: ../functions/editor.php:292
133
+ msgid "Dimensions:"
134
+ msgstr "Grootte:"
135
+
136
+ #: ../functions/editor.php:293
137
+ msgid "Ratio:"
138
+ msgstr "Aspect-ratio:"
139
+
140
+ #: ../functions/editor.php:499
141
+ msgid "Crop Thumbnails"
142
+ msgstr "Snijd thumbnails bij"
143
+
144
+ #: ../functions/editor.php:503
145
+ msgid "Crop Featured Image"
146
+ msgstr "Snijd uitgelichte afbeelding bij"
147
+
148
+ #: ../functions/editor.php:517
149
+ msgid "Crop Thumbnail"
150
+ msgstr "Snijd thumbnail bij"
151
+
152
+ #: ../functions/save.php:105
153
+ #, php-format
154
+ msgid "Cant generate filesize \"%s\"."
155
+ msgstr "Kan de bestandsgrootte \"%s\" niet aanmaken."
156
+
157
+ #: ../functions/save.php:112
158
+ msgid "Cant copy temporary file to media-library."
159
+ msgstr ""
160
+ "Het tijdelijke bestand kan niet gekopieerd worden naar de mediabibliotheek."
161
+
162
+ #: ../functions/save.php:116
163
+ msgid "Cant delete temporary file."
164
+ msgstr "Het tijdelijke bestand kan niet verwijderd worden."
165
+
166
+ #: ../functions/save.php:204
167
+ msgid "ERROR: Security Check failed (maybe a timeout - please try again)."
168
+ msgstr ""
169
+ "ERROR: Beveiligingscheck is mislukt (dit is mogelijk een timeout - probeer "
170
+ "het opnieuw)."
171
+
172
+ #: ../functions/save.php:208
173
+ msgid "ERROR: Submitted data are not complete."
174
+ msgstr "ERROR: Toegevoegde data is niet volledig!"
175
+
176
+ #: ../functions/save.php:216
177
+ msgid "A cropping with this dimensions on these Image ist not possible."
178
+ msgstr ""
179
+ "Het bijsnijden met deze afmetingen is niet mogelijk bij deze afbeelding."
180
+
181
+ #: ../functions/save.php:227
182
+ msgid "ERROR: Can`t find original Image in Database!"
183
+ msgstr ""
184
+ "ERROR: De originele afbeelding kan niet in de database gevonden worden!"
185
+
186
+ #: ../functions/save.php:230
187
+ msgid "ERROR: Can`t find original Imagefile!"
188
+ msgstr "ERROR: De originele afbeelding kan niet gevonden worden!"
189
+
190
+ #: ../functions/save.php:233
191
+ msgid "ERROR: Can`t find original Image-Metadata!"
192
+ msgstr ""
193
+ "ERROR: De originele metadata van de de afbeelding kunnen niet gevonden "
194
+ "worden!"
195
+
196
+ #: ../functions/settings.php:24 ../functions/settings.php:38
197
+ msgid "Settings"
198
+ msgstr "Instellingen"
199
+
200
+ #: ../functions/settings.php:31
201
+ msgid "Crop Post Thumbnail Page"
202
+ msgstr "Bericht thumbnail bijsnijd pagina"
203
+
204
+ #: ../functions/settings.php:44
205
+ msgid "Save Changes"
206
+ msgstr "Sla veranderingen op"
207
+
208
+ #: ../functions/settings.php:49
209
+ msgid "Support the plugin-author"
210
+ msgstr "Ondersteun de pluginontwikkelaar"
211
+
212
+ #: ../functions/settings.php:50
213
+ msgid ""
214
+ "You can support the plugin-author <br />(and let him know you love this "
215
+ "plugin) <br />by donating via Paypal. Thanks a lot!"
216
+ msgstr ""
217
+ "Je kunt de pluginontwikkelaar ondersteunen <br /> (en hem laten weten dat je "
218
+ "deze plugin gaaf vindt) <br /> door te doneren via Paypal. Alvast bedankt!"
219
+
220
+ #: ../functions/settings.php:72
221
+ msgid "Sizes and Posttypes"
222
+ msgstr "Afbeeldingsgroottes en berichttypes"
223
+
224
+ #: ../functions/settings.php:73
225
+ msgid ""
226
+ "Choose the image-sizes you want to hide. Choose a post-type to prevent any "
227
+ "use of the plugin for these entries."
228
+ msgstr ""
229
+ "Kies de afbeeldingsgroottes die je wilt verbergen. Kies een berichttype om "
230
+ "elk gebruik van de plugin daarbij te voorkomen."
231
+
232
+ #: ../functions/settings.php:81
233
+ msgid "Developer Settings"
234
+ msgstr "Opties voor ontwikkelaars"
235
+
236
+ #: ../functions/settings.php:83
237
+ msgid "Enable JS-Debug."
238
+ msgstr "Zet JS-Debug aan."
239
+
240
+ #: ../functions/settings.php:85
241
+ msgid "Enable Data-Debug."
242
+ msgstr "Zet Data-Debug aan."
243
+
244
+ #: ../functions/settings.php:90
245
+ msgid ""
246
+ "Crop-Thumbnails is created to make cropping easy for the user. Often times "
247
+ "the user only need to crop one, in dependence of the post-type. But the "
248
+ "system will create also all other sizes. So, here you can select for what "
249
+ "post-type what sizes should be visible in the plugin interface."
250
+ msgstr ""
251
+ "Crop-Thumbnails is gemaakt om het bijsnijden van afbeeldingen makkelijker te "
252
+ "maken voor de gebruiker. Het komt vaak voor dat de gebruiker slechts naar "
253
+ "één enkele grootte moet bijsnijden, afhankelijk van het berichttype. Ondanks "
254
+ "dat maakt WordPress ook andere groottes aan. Daarom kun je hier selecteren "
255
+ "welke afbeeldingsgrootte bij welk berichttype zichtbaar moet zijn in het "
256
+ "menu van de plugin."
257
+
258
+ #: ../functions/settings.php:91
259
+ msgid ""
260
+ "Crop-Thumbnails will only show croped images - sizes with no crop will "
261
+ "always be hidden."
262
+ msgstr ""
263
+ "Crop-Thumbnails laat alleen bijgesneden afbeeldingen zien. Afbeeldingen die "
264
+ "niet bijgesneden zijn zullen altijd verborgen blijven."
265
+
266
+ #: ../functions/settings.php:146
267
+ msgid ""
268
+ "ATTENTION: be aware that you can break things, when you activate this. When "
269
+ "activated your are able to cut those images to a spezific dimension that are "
270
+ "not cropped. The name of the image will not change. You should be extra "
271
+ "carefull when:"
272
+ msgstr ""
273
+ "LET OP: Het is mogelijk dat er dingen misgaan als je deze optie activeert. "
274
+ "Op het moment dat je dit activeert kun je afbeeldingen bijsnijden tot een "
275
+ "specifieke grootte die niet oorspronkelijk bijgesneden zijn. De naam van de "
276
+ "afbeelding zal niet veranderen. Je moet extra voorzichtig zijn als:"
277
+
278
+ #: ../functions/settings.php:148
279
+ msgid ""
280
+ "you had inserted the image before on any page or post. (There may be height "
281
+ "and width stored directly in the page-content.)"
282
+ msgstr ""
283
+ "Je hebt de afbeelding al eerder toegevoegd in een pagina of bericht. (Er kan "
284
+ "een hoogte en breedte direct aangegeven zijn in de inhoud.)"
285
+
286
+ #: ../functions/settings.php:149
287
+ msgid ""
288
+ "you use a plugin that expect the original image size. (The original image-"
289
+ "size is also \"stored\" in the filename.)"
290
+ msgstr ""
291
+ "Je gebruikt een plugin die de originele afbeeldingsgroottes verwacht. (De "
292
+ "oorspronkelijke afbeeldingsgrootte is ook \"opgeslagen\" in de bestandsnaam.)"
293
+
294
+ #: ../functions/settings.php:151
295
+ msgid ""
296
+ "The \"full\" image-size will never be cropped, otherwise you are not able to "
297
+ "restore any image-size."
298
+ msgstr ""
299
+ "De \"ful'\" afbeeldingsgrootte zal nooit bijgesneden worden, anders kunnen "
300
+ "afbeeldingsgroottes niet hersteld worden."
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: volkmar-kantor
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=volkmar%2ekantor%40gmx%2ede&lc=DE&item_name=Volkmar%20Kantor%20%2d%20totalmedial%2ede&item_number=crop%2dthumbnails&no_note=0&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
4
  Tags: post-thumbnails, images, media library
5
  Requires at least: 3.1
6
- Tested up to: 3.5
7
  Stable tag: trunk
8
  License: GPL v3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -68,6 +68,10 @@ function myCustomStyle($content) {
68
  5. Choose what image-sizes should be hidden (for what post-types), for better usability.
69
 
70
  == Changelog ==
 
 
 
 
71
  = 0.8.3 =
72
  * fix a bug for systems with comma as dezimal seperator (http://wordpress.org/support/topic/doesnt-save-the-cropped-image-anywhere?replies=12#post-4563377)
73
  * reduce capabilities from "edit_pages" AND "upload_files" to only "upload_files"
@@ -76,7 +80,7 @@ function myCustomStyle($content) {
76
  = 0.8.2 =
77
  * add filter for customize the style of the crop-thumbnail content ('crop_post_thumbnail_window_css')
78
  * add a fix for dynamic height/width images (http://wordpress.org/support/topic/dynamic-widthheight)
79
- * add ukrainian lang (thanks to Jurko Chervony from www.skinik.name)
80
 
81
  = 0.8.1 =
82
  * fix warning: when settings are saved
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=volkmar%2ekantor%40gmx%2ede&lc=DE&item_name=Volkmar%20Kantor%20%2d%20totalmedial%2ede&item_number=crop%2dthumbnails&no_note=0&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
4
  Tags: post-thumbnails, images, media library
5
  Requires at least: 3.1
6
+ Tested up to: 3.7.1
7
  Stable tag: trunk
8
  License: GPL v3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
68
  5. Choose what image-sizes should be hidden (for what post-types), for better usability.
69
 
70
  == Changelog ==
71
+ = 0.8.4 =
72
+ * fix a bug that may occure on some systems with xdebug enabled and low xdebug.max_nesting_level (see: http://wordpress.org/support/topic/error-when-trying-to-crop-a-certain-image)
73
+ * add dutch language (thanks to Max Gruson)
74
+
75
  = 0.8.3 =
76
  * fix a bug for systems with comma as dezimal seperator (http://wordpress.org/support/topic/doesnt-save-the-cropped-image-anywhere?replies=12#post-4563377)
77
  * reduce capabilities from "edit_pages" AND "upload_files" to only "upload_files"
80
  = 0.8.2 =
81
  * add filter for customize the style of the crop-thumbnail content ('crop_post_thumbnail_window_css')
82
  * add a fix for dynamic height/width images (http://wordpress.org/support/topic/dynamic-widthheight)
83
+ * add ukrainian language (thanks to Jurko Chervony from www.skinik.name)
84
 
85
  = 0.8.1 =
86
  * fix warning: when settings are saved