Version Description
- i18n of the button in the image-media-view changed
- add 'medium_large' size to (intern) default-sizes (fix notice)
- add action-hook 'crop_thumbnails_after_save_new_thumb' after save the new thumbnail
- add filter-hook 'crop_thumbnails_before_update_metadata' before update metadata
- add filter-hook 'crop_thumbnails_editor_jsonDataValues' in the editor, to adjust dataValues
- add filter-hook 'crop_thumbnails_editor_printratio' in the editor (see F.A.Q. for details of usage)
Download this release
Release Info
Developer | Volkmar Kantor |
Plugin | Crop-Thumbnails |
Version | 0.10.4 |
Comparing to | |
See all releases |
Code changes from version 0.10.3 to 0.10.4
- LICENSE +674 -674
- crop-thumbnails.php +52 -52
- css/cpt-window.css +40 -40
- css/options.css +19 -19
- functions/backendpreparer.php +265 -265
- functions/editor.php +476 -466
- functions/save.php +259 -257
- functions/settings.php +282 -282
- html/template.php +16 -16
- js/cpt-crop.js +236 -237
- js/jcrop/css/jquery.Jcrop.min.css +28 -28
- js/jcrop/js/jquery.Jcrop.min.js +21 -21
- lang/cpt_lang-de_DE.po +327 -327
- lang/cpt_lang-default.po +266 -266
- lang/cpt_lang-hu_HU.po +285 -285
- lang/cpt_lang-nl_NL.po +303 -303
- lang/cpt_lang-pt_BR.po +332 -332
- lang/cpt_lang-uk.po +275 -275
- license.txt +673 -673
- readme.txt +19 -0
LICENSE
CHANGED
@@ -1,674 +1,674 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 3, 29 June 2007
|
3 |
-
|
4 |
-
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5 |
-
Everyone is permitted to copy and distribute verbatim copies
|
6 |
-
of this license document, but changing it is not allowed.
|
7 |
-
|
8 |
-
Preamble
|
9 |
-
|
10 |
-
The GNU General Public License is a free, copyleft license for
|
11 |
-
software and other kinds of works.
|
12 |
-
|
13 |
-
The licenses for most software and other practical works are designed
|
14 |
-
to take away your freedom to share and change the works. By contrast,
|
15 |
-
the GNU General Public License is intended to guarantee your freedom to
|
16 |
-
share and change all versions of a program--to make sure it remains free
|
17 |
-
software for all its users. We, the Free Software Foundation, use the
|
18 |
-
GNU General Public License for most of our software; it applies also to
|
19 |
-
any other work released this way by its authors. You can apply it to
|
20 |
-
your programs, too.
|
21 |
-
|
22 |
-
When we speak of free software, we are referring to freedom, not
|
23 |
-
price. Our General Public Licenses are designed to make sure that you
|
24 |
-
have the freedom to distribute copies of free software (and charge for
|
25 |
-
them if you wish), that you receive source code or can get it if you
|
26 |
-
want it, that you can change the software or use pieces of it in new
|
27 |
-
free programs, and that you know you can do these things.
|
28 |
-
|
29 |
-
To protect your rights, we need to prevent others from denying you
|
30 |
-
these rights or asking you to surrender the rights. Therefore, you have
|
31 |
-
certain responsibilities if you distribute copies of the software, or if
|
32 |
-
you modify it: responsibilities to respect the freedom of others.
|
33 |
-
|
34 |
-
For example, if you distribute copies of such a program, whether
|
35 |
-
gratis or for a fee, you must pass on to the recipients the same
|
36 |
-
freedoms that you received. You must make sure that they, too, receive
|
37 |
-
or can get the source code. And you must show them these terms so they
|
38 |
-
know their rights.
|
39 |
-
|
40 |
-
Developers that use the GNU GPL protect your rights with two steps:
|
41 |
-
(1) assert copyright on the software, and (2) offer you this License
|
42 |
-
giving you legal permission to copy, distribute and/or modify it.
|
43 |
-
|
44 |
-
For the developers' and authors' protection, the GPL clearly explains
|
45 |
-
that there is no warranty for this free software. For both users' and
|
46 |
-
authors' sake, the GPL requires that modified versions be marked as
|
47 |
-
changed, so that their problems will not be attributed erroneously to
|
48 |
-
authors of previous versions.
|
49 |
-
|
50 |
-
Some devices are designed to deny users access to install or run
|
51 |
-
modified versions of the software inside them, although the manufacturer
|
52 |
-
can do so. This is fundamentally incompatible with the aim of
|
53 |
-
protecting users' freedom to change the software. The systematic
|
54 |
-
pattern of such abuse occurs in the area of products for individuals to
|
55 |
-
use, which is precisely where it is most unacceptable. Therefore, we
|
56 |
-
have designed this version of the GPL to prohibit the practice for those
|
57 |
-
products. If such problems arise substantially in other domains, we
|
58 |
-
stand ready to extend this provision to those domains in future versions
|
59 |
-
of the GPL, as needed to protect the freedom of users.
|
60 |
-
|
61 |
-
Finally, every program is threatened constantly by software patents.
|
62 |
-
States should not allow patents to restrict development and use of
|
63 |
-
software on general-purpose computers, but in those that do, we wish to
|
64 |
-
avoid the special danger that patents applied to a free program could
|
65 |
-
make it effectively proprietary. To prevent this, the GPL assures that
|
66 |
-
patents cannot be used to render the program non-free.
|
67 |
-
|
68 |
-
The precise terms and conditions for copying, distribution and
|
69 |
-
modification follow.
|
70 |
-
|
71 |
-
TERMS AND CONDITIONS
|
72 |
-
|
73 |
-
0. Definitions.
|
74 |
-
|
75 |
-
"This License" refers to version 3 of the GNU General Public License.
|
76 |
-
|
77 |
-
"Copyright" also means copyright-like laws that apply to other kinds of
|
78 |
-
works, such as semiconductor masks.
|
79 |
-
|
80 |
-
"The Program" refers to any copyrightable work licensed under this
|
81 |
-
License. Each licensee is addressed as "you". "Licensees" and
|
82 |
-
"recipients" may be individuals or organizations.
|
83 |
-
|
84 |
-
To "modify" a work means to copy from or adapt all or part of the work
|
85 |
-
in a fashion requiring copyright permission, other than the making of an
|
86 |
-
exact copy. The resulting work is called a "modified version" of the
|
87 |
-
earlier work or a work "based on" the earlier work.
|
88 |
-
|
89 |
-
A "covered work" means either the unmodified Program or a work based
|
90 |
-
on the Program.
|
91 |
-
|
92 |
-
To "propagate" a work means to do anything with it that, without
|
93 |
-
permission, would make you directly or secondarily liable for
|
94 |
-
infringement under applicable copyright law, except executing it on a
|
95 |
-
computer or modifying a private copy. Propagation includes copying,
|
96 |
-
distribution (with or without modification), making available to the
|
97 |
-
public, and in some countries other activities as well.
|
98 |
-
|
99 |
-
To "convey" a work means any kind of propagation that enables other
|
100 |
-
parties to make or receive copies. Mere interaction with a user through
|
101 |
-
a computer network, with no transfer of a copy, is not conveying.
|
102 |
-
|
103 |
-
An interactive user interface displays "Appropriate Legal Notices"
|
104 |
-
to the extent that it includes a convenient and prominently visible
|
105 |
-
feature that (1) displays an appropriate copyright notice, and (2)
|
106 |
-
tells the user that there is no warranty for the work (except to the
|
107 |
-
extent that warranties are provided), that licensees may convey the
|
108 |
-
work under this License, and how to view a copy of this License. If
|
109 |
-
the interface presents a list of user commands or options, such as a
|
110 |
-
menu, a prominent item in the list meets this criterion.
|
111 |
-
|
112 |
-
1. Source Code.
|
113 |
-
|
114 |
-
The "source code" for a work means the preferred form of the work
|
115 |
-
for making modifications to it. "Object code" means any non-source
|
116 |
-
form of a work.
|
117 |
-
|
118 |
-
A "Standard Interface" means an interface that either is an official
|
119 |
-
standard defined by a recognized standards body, or, in the case of
|
120 |
-
interfaces specified for a particular programming language, one that
|
121 |
-
is widely used among developers working in that language.
|
122 |
-
|
123 |
-
The "System Libraries" of an executable work include anything, other
|
124 |
-
than the work as a whole, that (a) is included in the normal form of
|
125 |
-
packaging a Major Component, but which is not part of that Major
|
126 |
-
Component, and (b) serves only to enable use of the work with that
|
127 |
-
Major Component, or to implement a Standard Interface for which an
|
128 |
-
implementation is available to the public in source code form. A
|
129 |
-
"Major Component", in this context, means a major essential component
|
130 |
-
(kernel, window system, and so on) of the specific operating system
|
131 |
-
(if any) on which the executable work runs, or a compiler used to
|
132 |
-
produce the work, or an object code interpreter used to run it.
|
133 |
-
|
134 |
-
The "Corresponding Source" for a work in object code form means all
|
135 |
-
the source code needed to generate, install, and (for an executable
|
136 |
-
work) run the object code and to modify the work, including scripts to
|
137 |
-
control those activities. However, it does not include the work's
|
138 |
-
System Libraries, or general-purpose tools or generally available free
|
139 |
-
programs which are used unmodified in performing those activities but
|
140 |
-
which are not part of the work. For example, Corresponding Source
|
141 |
-
includes interface definition files associated with source files for
|
142 |
-
the work, and the source code for shared libraries and dynamically
|
143 |
-
linked subprograms that the work is specifically designed to require,
|
144 |
-
such as by intimate data communication or control flow between those
|
145 |
-
subprograms and other parts of the work.
|
146 |
-
|
147 |
-
The Corresponding Source need not include anything that users
|
148 |
-
can regenerate automatically from other parts of the Corresponding
|
149 |
-
Source.
|
150 |
-
|
151 |
-
The Corresponding Source for a work in source code form is that
|
152 |
-
same work.
|
153 |
-
|
154 |
-
2. Basic Permissions.
|
155 |
-
|
156 |
-
All rights granted under this License are granted for the term of
|
157 |
-
copyright on the Program, and are irrevocable provided the stated
|
158 |
-
conditions are met. This License explicitly affirms your unlimited
|
159 |
-
permission to run the unmodified Program. The output from running a
|
160 |
-
covered work is covered by this License only if the output, given its
|
161 |
-
content, constitutes a covered work. This License acknowledges your
|
162 |
-
rights of fair use or other equivalent, as provided by copyright law.
|
163 |
-
|
164 |
-
You may make, run and propagate covered works that you do not
|
165 |
-
convey, without conditions so long as your license otherwise remains
|
166 |
-
in force. You may convey covered works to others for the sole purpose
|
167 |
-
of having them make modifications exclusively for you, or provide you
|
168 |
-
with facilities for running those works, provided that you comply with
|
169 |
-
the terms of this License in conveying all material for which you do
|
170 |
-
not control copyright. Those thus making or running the covered works
|
171 |
-
for you must do so exclusively on your behalf, under your direction
|
172 |
-
and control, on terms that prohibit them from making any copies of
|
173 |
-
your copyrighted material outside their relationship with you.
|
174 |
-
|
175 |
-
Conveying under any other circumstances is permitted solely under
|
176 |
-
the conditions stated below. Sublicensing is not allowed; section 10
|
177 |
-
makes it unnecessary.
|
178 |
-
|
179 |
-
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
180 |
-
|
181 |
-
No covered work shall be deemed part of an effective technological
|
182 |
-
measure under any applicable law fulfilling obligations under article
|
183 |
-
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
184 |
-
similar laws prohibiting or restricting circumvention of such
|
185 |
-
measures.
|
186 |
-
|
187 |
-
When you convey a covered work, you waive any legal power to forbid
|
188 |
-
circumvention of technological measures to the extent such circumvention
|
189 |
-
is effected by exercising rights under this License with respect to
|
190 |
-
the covered work, and you disclaim any intention to limit operation or
|
191 |
-
modification of the work as a means of enforcing, against the work's
|
192 |
-
users, your or third parties' legal rights to forbid circumvention of
|
193 |
-
technological measures.
|
194 |
-
|
195 |
-
4. Conveying Verbatim Copies.
|
196 |
-
|
197 |
-
You may convey verbatim copies of the Program's source code as you
|
198 |
-
receive it, in any medium, provided that you conspicuously and
|
199 |
-
appropriately publish on each copy an appropriate copyright notice;
|
200 |
-
keep intact all notices stating that this License and any
|
201 |
-
non-permissive terms added in accord with section 7 apply to the code;
|
202 |
-
keep intact all notices of the absence of any warranty; and give all
|
203 |
-
recipients a copy of this License along with the Program.
|
204 |
-
|
205 |
-
You may charge any price or no price for each copy that you convey,
|
206 |
-
and you may offer support or warranty protection for a fee.
|
207 |
-
|
208 |
-
5. Conveying Modified Source Versions.
|
209 |
-
|
210 |
-
You may convey a work based on the Program, or the modifications to
|
211 |
-
produce it from the Program, in the form of source code under the
|
212 |
-
terms of section 4, provided that you also meet all of these conditions:
|
213 |
-
|
214 |
-
a) The work must carry prominent notices stating that you modified
|
215 |
-
it, and giving a relevant date.
|
216 |
-
|
217 |
-
b) The work must carry prominent notices stating that it is
|
218 |
-
released under this License and any conditions added under section
|
219 |
-
7. This requirement modifies the requirement in section 4 to
|
220 |
-
"keep intact all notices".
|
221 |
-
|
222 |
-
c) You must license the entire work, as a whole, under this
|
223 |
-
License to anyone who comes into possession of a copy. This
|
224 |
-
License will therefore apply, along with any applicable section 7
|
225 |
-
additional terms, to the whole of the work, and all its parts,
|
226 |
-
regardless of how they are packaged. This License gives no
|
227 |
-
permission to license the work in any other way, but it does not
|
228 |
-
invalidate such permission if you have separately received it.
|
229 |
-
|
230 |
-
d) If the work has interactive user interfaces, each must display
|
231 |
-
Appropriate Legal Notices; however, if the Program has interactive
|
232 |
-
interfaces that do not display Appropriate Legal Notices, your
|
233 |
-
work need not make them do so.
|
234 |
-
|
235 |
-
A compilation of a covered work with other separate and independent
|
236 |
-
works, which are not by their nature extensions of the covered work,
|
237 |
-
and which are not combined with it such as to form a larger program,
|
238 |
-
in or on a volume of a storage or distribution medium, is called an
|
239 |
-
"aggregate" if the compilation and its resulting copyright are not
|
240 |
-
used to limit the access or legal rights of the compilation's users
|
241 |
-
beyond what the individual works permit. Inclusion of a covered work
|
242 |
-
in an aggregate does not cause this License to apply to the other
|
243 |
-
parts of the aggregate.
|
244 |
-
|
245 |
-
6. Conveying Non-Source Forms.
|
246 |
-
|
247 |
-
You may convey a covered work in object code form under the terms
|
248 |
-
of sections 4 and 5, provided that you also convey the
|
249 |
-
machine-readable Corresponding Source under the terms of this License,
|
250 |
-
in one of these ways:
|
251 |
-
|
252 |
-
a) Convey the object code in, or embodied in, a physical product
|
253 |
-
(including a physical distribution medium), accompanied by the
|
254 |
-
Corresponding Source fixed on a durable physical medium
|
255 |
-
customarily used for software interchange.
|
256 |
-
|
257 |
-
b) Convey the object code in, or embodied in, a physical product
|
258 |
-
(including a physical distribution medium), accompanied by a
|
259 |
-
written offer, valid for at least three years and valid for as
|
260 |
-
long as you offer spare parts or customer support for that product
|
261 |
-
model, to give anyone who possesses the object code either (1) a
|
262 |
-
copy of the Corresponding Source for all the software in the
|
263 |
-
product that is covered by this License, on a durable physical
|
264 |
-
medium customarily used for software interchange, for a price no
|
265 |
-
more than your reasonable cost of physically performing this
|
266 |
-
conveying of source, or (2) access to copy the
|
267 |
-
Corresponding Source from a network server at no charge.
|
268 |
-
|
269 |
-
c) Convey individual copies of the object code with a copy of the
|
270 |
-
written offer to provide the Corresponding Source. This
|
271 |
-
alternative is allowed only occasionally and noncommercially, and
|
272 |
-
only if you received the object code with such an offer, in accord
|
273 |
-
with subsection 6b.
|
274 |
-
|
275 |
-
d) Convey the object code by offering access from a designated
|
276 |
-
place (gratis or for a charge), and offer equivalent access to the
|
277 |
-
Corresponding Source in the same way through the same place at no
|
278 |
-
further charge. You need not require recipients to copy the
|
279 |
-
Corresponding Source along with the object code. If the place to
|
280 |
-
copy the object code is a network server, the Corresponding Source
|
281 |
-
may be on a different server (operated by you or a third party)
|
282 |
-
that supports equivalent copying facilities, provided you maintain
|
283 |
-
clear directions next to the object code saying where to find the
|
284 |
-
Corresponding Source. Regardless of what server hosts the
|
285 |
-
Corresponding Source, you remain obligated to ensure that it is
|
286 |
-
available for as long as needed to satisfy these requirements.
|
287 |
-
|
288 |
-
e) Convey the object code using peer-to-peer transmission, provided
|
289 |
-
you inform other peers where the object code and Corresponding
|
290 |
-
Source of the work are being offered to the general public at no
|
291 |
-
charge under subsection 6d.
|
292 |
-
|
293 |
-
A separable portion of the object code, whose source code is excluded
|
294 |
-
from the Corresponding Source as a System Library, need not be
|
295 |
-
included in conveying the object code work.
|
296 |
-
|
297 |
-
A "User Product" is either (1) a "consumer product", which means any
|
298 |
-
tangible personal property which is normally used for personal, family,
|
299 |
-
or household purposes, or (2) anything designed or sold for incorporation
|
300 |
-
into a dwelling. In determining whether a product is a consumer product,
|
301 |
-
doubtful cases shall be resolved in favor of coverage. For a particular
|
302 |
-
product received by a particular user, "normally used" refers to a
|
303 |
-
typical or common use of that class of product, regardless of the status
|
304 |
-
of the particular user or of the way in which the particular user
|
305 |
-
actually uses, or expects or is expected to use, the product. A product
|
306 |
-
is a consumer product regardless of whether the product has substantial
|
307 |
-
commercial, industrial or non-consumer uses, unless such uses represent
|
308 |
-
the only significant mode of use of the product.
|
309 |
-
|
310 |
-
"Installation Information" for a User Product means any methods,
|
311 |
-
procedures, authorization keys, or other information required to install
|
312 |
-
and execute modified versions of a covered work in that User Product from
|
313 |
-
a modified version of its Corresponding Source. The information must
|
314 |
-
suffice to ensure that the continued functioning of the modified object
|
315 |
-
code is in no case prevented or interfered with solely because
|
316 |
-
modification has been made.
|
317 |
-
|
318 |
-
If you convey an object code work under this section in, or with, or
|
319 |
-
specifically for use in, a User Product, and the conveying occurs as
|
320 |
-
part of a transaction in which the right of possession and use of the
|
321 |
-
User Product is transferred to the recipient in perpetuity or for a
|
322 |
-
fixed term (regardless of how the transaction is characterized), the
|
323 |
-
Corresponding Source conveyed under this section must be accompanied
|
324 |
-
by the Installation Information. But this requirement does not apply
|
325 |
-
if neither you nor any third party retains the ability to install
|
326 |
-
modified object code on the User Product (for example, the work has
|
327 |
-
been installed in ROM).
|
328 |
-
|
329 |
-
The requirement to provide Installation Information does not include a
|
330 |
-
requirement to continue to provide support service, warranty, or updates
|
331 |
-
for a work that has been modified or installed by the recipient, or for
|
332 |
-
the User Product in which it has been modified or installed. Access to a
|
333 |
-
network may be denied when the modification itself materially and
|
334 |
-
adversely affects the operation of the network or violates the rules and
|
335 |
-
protocols for communication across the network.
|
336 |
-
|
337 |
-
Corresponding Source conveyed, and Installation Information provided,
|
338 |
-
in accord with this section must be in a format that is publicly
|
339 |
-
documented (and with an implementation available to the public in
|
340 |
-
source code form), and must require no special password or key for
|
341 |
-
unpacking, reading or copying.
|
342 |
-
|
343 |
-
7. Additional Terms.
|
344 |
-
|
345 |
-
"Additional permissions" are terms that supplement the terms of this
|
346 |
-
License by making exceptions from one or more of its conditions.
|
347 |
-
Additional permissions that are applicable to the entire Program shall
|
348 |
-
be treated as though they were included in this License, to the extent
|
349 |
-
that they are valid under applicable law. If additional permissions
|
350 |
-
apply only to part of the Program, that part may be used separately
|
351 |
-
under those permissions, but the entire Program remains governed by
|
352 |
-
this License without regard to the additional permissions.
|
353 |
-
|
354 |
-
When you convey a copy of a covered work, you may at your option
|
355 |
-
remove any additional permissions from that copy, or from any part of
|
356 |
-
it. (Additional permissions may be written to require their own
|
357 |
-
removal in certain cases when you modify the work.) You may place
|
358 |
-
additional permissions on material, added by you to a covered work,
|
359 |
-
for which you have or can give appropriate copyright permission.
|
360 |
-
|
361 |
-
Notwithstanding any other provision of this License, for material you
|
362 |
-
add to a covered work, you may (if authorized by the copyright holders of
|
363 |
-
that material) supplement the terms of this License with terms:
|
364 |
-
|
365 |
-
a) Disclaiming warranty or limiting liability differently from the
|
366 |
-
terms of sections 15 and 16 of this License; or
|
367 |
-
|
368 |
-
b) Requiring preservation of specified reasonable legal notices or
|
369 |
-
author attributions in that material or in the Appropriate Legal
|
370 |
-
Notices displayed by works containing it; or
|
371 |
-
|
372 |
-
c) Prohibiting misrepresentation of the origin of that material, or
|
373 |
-
requiring that modified versions of such material be marked in
|
374 |
-
reasonable ways as different from the original version; or
|
375 |
-
|
376 |
-
d) Limiting the use for publicity purposes of names of licensors or
|
377 |
-
authors of the material; or
|
378 |
-
|
379 |
-
e) Declining to grant rights under trademark law for use of some
|
380 |
-
trade names, trademarks, or service marks; or
|
381 |
-
|
382 |
-
f) Requiring indemnification of licensors and authors of that
|
383 |
-
material by anyone who conveys the material (or modified versions of
|
384 |
-
it) with contractual assumptions of liability to the recipient, for
|
385 |
-
any liability that these contractual assumptions directly impose on
|
386 |
-
those licensors and authors.
|
387 |
-
|
388 |
-
All other non-permissive additional terms are considered "further
|
389 |
-
restrictions" within the meaning of section 10. If the Program as you
|
390 |
-
received it, or any part of it, contains a notice stating that it is
|
391 |
-
governed by this License along with a term that is a further
|
392 |
-
restriction, you may remove that term. If a license document contains
|
393 |
-
a further restriction but permits relicensing or conveying under this
|
394 |
-
License, you may add to a covered work material governed by the terms
|
395 |
-
of that license document, provided that the further restriction does
|
396 |
-
not survive such relicensing or conveying.
|
397 |
-
|
398 |
-
If you add terms to a covered work in accord with this section, you
|
399 |
-
must place, in the relevant source files, a statement of the
|
400 |
-
additional terms that apply to those files, or a notice indicating
|
401 |
-
where to find the applicable terms.
|
402 |
-
|
403 |
-
Additional terms, permissive or non-permissive, may be stated in the
|
404 |
-
form of a separately written license, or stated as exceptions;
|
405 |
-
the above requirements apply either way.
|
406 |
-
|
407 |
-
8. Termination.
|
408 |
-
|
409 |
-
You may not propagate or modify a covered work except as expressly
|
410 |
-
provided under this License. Any attempt otherwise to propagate or
|
411 |
-
modify it is void, and will automatically terminate your rights under
|
412 |
-
this License (including any patent licenses granted under the third
|
413 |
-
paragraph of section 11).
|
414 |
-
|
415 |
-
However, if you cease all violation of this License, then your
|
416 |
-
license from a particular copyright holder is reinstated (a)
|
417 |
-
provisionally, unless and until the copyright holder explicitly and
|
418 |
-
finally terminates your license, and (b) permanently, if the copyright
|
419 |
-
holder fails to notify you of the violation by some reasonable means
|
420 |
-
prior to 60 days after the cessation.
|
421 |
-
|
422 |
-
Moreover, your license from a particular copyright holder is
|
423 |
-
reinstated permanently if the copyright holder notifies you of the
|
424 |
-
violation by some reasonable means, this is the first time you have
|
425 |
-
received notice of violation of this License (for any work) from that
|
426 |
-
copyright holder, and you cure the violation prior to 30 days after
|
427 |
-
your receipt of the notice.
|
428 |
-
|
429 |
-
Termination of your rights under this section does not terminate the
|
430 |
-
licenses of parties who have received copies or rights from you under
|
431 |
-
this License. If your rights have been terminated and not permanently
|
432 |
-
reinstated, you do not qualify to receive new licenses for the same
|
433 |
-
material under section 10.
|
434 |
-
|
435 |
-
9. Acceptance Not Required for Having Copies.
|
436 |
-
|
437 |
-
You are not required to accept this License in order to receive or
|
438 |
-
run a copy of the Program. Ancillary propagation of a covered work
|
439 |
-
occurring solely as a consequence of using peer-to-peer transmission
|
440 |
-
to receive a copy likewise does not require acceptance. However,
|
441 |
-
nothing other than this License grants you permission to propagate or
|
442 |
-
modify any covered work. These actions infringe copyright if you do
|
443 |
-
not accept this License. Therefore, by modifying or propagating a
|
444 |
-
covered work, you indicate your acceptance of this License to do so.
|
445 |
-
|
446 |
-
10. Automatic Licensing of Downstream Recipients.
|
447 |
-
|
448 |
-
Each time you convey a covered work, the recipient automatically
|
449 |
-
receives a license from the original licensors, to run, modify and
|
450 |
-
propagate that work, subject to this License. You are not responsible
|
451 |
-
for enforcing compliance by third parties with this License.
|
452 |
-
|
453 |
-
An "entity transaction" is a transaction transferring control of an
|
454 |
-
organization, or substantially all assets of one, or subdividing an
|
455 |
-
organization, or merging organizations. If propagation of a covered
|
456 |
-
work results from an entity transaction, each party to that
|
457 |
-
transaction who receives a copy of the work also receives whatever
|
458 |
-
licenses to the work the party's predecessor in interest had or could
|
459 |
-
give under the previous paragraph, plus a right to possession of the
|
460 |
-
Corresponding Source of the work from the predecessor in interest, if
|
461 |
-
the predecessor has it or can get it with reasonable efforts.
|
462 |
-
|
463 |
-
You may not impose any further restrictions on the exercise of the
|
464 |
-
rights granted or affirmed under this License. For example, you may
|
465 |
-
not impose a license fee, royalty, or other charge for exercise of
|
466 |
-
rights granted under this License, and you may not initiate litigation
|
467 |
-
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
468 |
-
any patent claim is infringed by making, using, selling, offering for
|
469 |
-
sale, or importing the Program or any portion of it.
|
470 |
-
|
471 |
-
11. Patents.
|
472 |
-
|
473 |
-
A "contributor" is a copyright holder who authorizes use under this
|
474 |
-
License of the Program or a work on which the Program is based. The
|
475 |
-
work thus licensed is called the contributor's "contributor version".
|
476 |
-
|
477 |
-
A contributor's "essential patent claims" are all patent claims
|
478 |
-
owned or controlled by the contributor, whether already acquired or
|
479 |
-
hereafter acquired, that would be infringed by some manner, permitted
|
480 |
-
by this License, of making, using, or selling its contributor version,
|
481 |
-
but do not include claims that would be infringed only as a
|
482 |
-
consequence of further modification of the contributor version. For
|
483 |
-
purposes of this definition, "control" includes the right to grant
|
484 |
-
patent sublicenses in a manner consistent with the requirements of
|
485 |
-
this License.
|
486 |
-
|
487 |
-
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
488 |
-
patent license under the contributor's essential patent claims, to
|
489 |
-
make, use, sell, offer for sale, import and otherwise run, modify and
|
490 |
-
propagate the contents of its contributor version.
|
491 |
-
|
492 |
-
In the following three paragraphs, a "patent license" is any express
|
493 |
-
agreement or commitment, however denominated, not to enforce a patent
|
494 |
-
(such as an express permission to practice a patent or covenant not to
|
495 |
-
sue for patent infringement). To "grant" such a patent license to a
|
496 |
-
party means to make such an agreement or commitment not to enforce a
|
497 |
-
patent against the party.
|
498 |
-
|
499 |
-
If you convey a covered work, knowingly relying on a patent license,
|
500 |
-
and the Corresponding Source of the work is not available for anyone
|
501 |
-
to copy, free of charge and under the terms of this License, through a
|
502 |
-
publicly available network server or other readily accessible means,
|
503 |
-
then you must either (1) cause the Corresponding Source to be so
|
504 |
-
available, or (2) arrange to deprive yourself of the benefit of the
|
505 |
-
patent license for this particular work, or (3) arrange, in a manner
|
506 |
-
consistent with the requirements of this License, to extend the patent
|
507 |
-
license to downstream recipients. "Knowingly relying" means you have
|
508 |
-
actual knowledge that, but for the patent license, your conveying the
|
509 |
-
covered work in a country, or your recipient's use of the covered work
|
510 |
-
in a country, would infringe one or more identifiable patents in that
|
511 |
-
country that you have reason to believe are valid.
|
512 |
-
|
513 |
-
If, pursuant to or in connection with a single transaction or
|
514 |
-
arrangement, you convey, or propagate by procuring conveyance of, a
|
515 |
-
covered work, and grant a patent license to some of the parties
|
516 |
-
receiving the covered work authorizing them to use, propagate, modify
|
517 |
-
or convey a specific copy of the covered work, then the patent license
|
518 |
-
you grant is automatically extended to all recipients of the covered
|
519 |
-
work and works based on it.
|
520 |
-
|
521 |
-
A patent license is "discriminatory" if it does not include within
|
522 |
-
the scope of its coverage, prohibits the exercise of, or is
|
523 |
-
conditioned on the non-exercise of one or more of the rights that are
|
524 |
-
specifically granted under this License. You may not convey a covered
|
525 |
-
work if you are a party to an arrangement with a third party that is
|
526 |
-
in the business of distributing software, under which you make payment
|
527 |
-
to the third party based on the extent of your activity of conveying
|
528 |
-
the work, and under which the third party grants, to any of the
|
529 |
-
parties who would receive the covered work from you, a discriminatory
|
530 |
-
patent license (a) in connection with copies of the covered work
|
531 |
-
conveyed by you (or copies made from those copies), or (b) primarily
|
532 |
-
for and in connection with specific products or compilations that
|
533 |
-
contain the covered work, unless you entered into that arrangement,
|
534 |
-
or that patent license was granted, prior to 28 March 2007.
|
535 |
-
|
536 |
-
Nothing in this License shall be construed as excluding or limiting
|
537 |
-
any implied license or other defenses to infringement that may
|
538 |
-
otherwise be available to you under applicable patent law.
|
539 |
-
|
540 |
-
12. No Surrender of Others' Freedom.
|
541 |
-
|
542 |
-
If conditions are imposed on you (whether by court order, agreement or
|
543 |
-
otherwise) that contradict the conditions of this License, they do not
|
544 |
-
excuse you from the conditions of this License. If you cannot convey a
|
545 |
-
covered work so as to satisfy simultaneously your obligations under this
|
546 |
-
License and any other pertinent obligations, then as a consequence you may
|
547 |
-
not convey it at all. For example, if you agree to terms that obligate you
|
548 |
-
to collect a royalty for further conveying from those to whom you convey
|
549 |
-
the Program, the only way you could satisfy both those terms and this
|
550 |
-
License would be to refrain entirely from conveying the Program.
|
551 |
-
|
552 |
-
13. Use with the GNU Affero General Public License.
|
553 |
-
|
554 |
-
Notwithstanding any other provision of this License, you have
|
555 |
-
permission to link or combine any covered work with a work licensed
|
556 |
-
under version 3 of the GNU Affero General Public License into a single
|
557 |
-
combined work, and to convey the resulting work. The terms of this
|
558 |
-
License will continue to apply to the part which is the covered work,
|
559 |
-
but the special requirements of the GNU Affero General Public License,
|
560 |
-
section 13, concerning interaction through a network will apply to the
|
561 |
-
combination as such.
|
562 |
-
|
563 |
-
14. Revised Versions of this License.
|
564 |
-
|
565 |
-
The Free Software Foundation may publish revised and/or new versions of
|
566 |
-
the GNU General Public License from time to time. Such new versions will
|
567 |
-
be similar in spirit to the present version, but may differ in detail to
|
568 |
-
address new problems or concerns.
|
569 |
-
|
570 |
-
Each version is given a distinguishing version number. If the
|
571 |
-
Program specifies that a certain numbered version of the GNU General
|
572 |
-
Public License "or any later version" applies to it, you have the
|
573 |
-
option of following the terms and conditions either of that numbered
|
574 |
-
version or of any later version published by the Free Software
|
575 |
-
Foundation. If the Program does not specify a version number of the
|
576 |
-
GNU General Public License, you may choose any version ever published
|
577 |
-
by the Free Software Foundation.
|
578 |
-
|
579 |
-
If the Program specifies that a proxy can decide which future
|
580 |
-
versions of the GNU General Public License can be used, that proxy's
|
581 |
-
public statement of acceptance of a version permanently authorizes you
|
582 |
-
to choose that version for the Program.
|
583 |
-
|
584 |
-
Later license versions may give you additional or different
|
585 |
-
permissions. However, no additional obligations are imposed on any
|
586 |
-
author or copyright holder as a result of your choosing to follow a
|
587 |
-
later version.
|
588 |
-
|
589 |
-
15. Disclaimer of Warranty.
|
590 |
-
|
591 |
-
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
592 |
-
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
593 |
-
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
594 |
-
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
595 |
-
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
596 |
-
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
597 |
-
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
598 |
-
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
599 |
-
|
600 |
-
16. Limitation of Liability.
|
601 |
-
|
602 |
-
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
603 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
604 |
-
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
605 |
-
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
606 |
-
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
607 |
-
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
608 |
-
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
609 |
-
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
610 |
-
SUCH DAMAGES.
|
611 |
-
|
612 |
-
17. Interpretation of Sections 15 and 16.
|
613 |
-
|
614 |
-
If the disclaimer of warranty and limitation of liability provided
|
615 |
-
above cannot be given local legal effect according to their terms,
|
616 |
-
reviewing courts shall apply local law that most closely approximates
|
617 |
-
an absolute waiver of all civil liability in connection with the
|
618 |
-
Program, unless a warranty or assumption of liability accompanies a
|
619 |
-
copy of the Program in return for a fee.
|
620 |
-
|
621 |
-
END OF TERMS AND CONDITIONS
|
622 |
-
|
623 |
-
How to Apply These Terms to Your New Programs
|
624 |
-
|
625 |
-
If you develop a new program, and you want it to be of the greatest
|
626 |
-
possible use to the public, the best way to achieve this is to make it
|
627 |
-
free software which everyone can redistribute and change under these terms.
|
628 |
-
|
629 |
-
To do so, attach the following notices to the program. It is safest
|
630 |
-
to attach them to the start of each source file to most effectively
|
631 |
-
state the exclusion of warranty; and each file should have at least
|
632 |
-
the "copyright" line and a pointer to where the full notice is found.
|
633 |
-
|
634 |
-
{one line to give the program's name and a brief idea of what it does.}
|
635 |
-
Copyright (C) {year} {name of author}
|
636 |
-
|
637 |
-
This program is free software: you can redistribute it and/or modify
|
638 |
-
it under the terms of the GNU General Public License as published by
|
639 |
-
the Free Software Foundation, either version 3 of the License, or
|
640 |
-
(at your option) any later version.
|
641 |
-
|
642 |
-
This program is distributed in the hope that it will be useful,
|
643 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
644 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
645 |
-
GNU General Public License for more details.
|
646 |
-
|
647 |
-
You should have received a copy of the GNU General Public License
|
648 |
-
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
649 |
-
|
650 |
-
Also add information on how to contact you by electronic and paper mail.
|
651 |
-
|
652 |
-
If the program does terminal interaction, make it output a short
|
653 |
-
notice like this when it starts in an interactive mode:
|
654 |
-
|
655 |
-
{project} Copyright (C) {year} {fullname}
|
656 |
-
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
657 |
-
This is free software, and you are welcome to redistribute it
|
658 |
-
under certain conditions; type `show c' for details.
|
659 |
-
|
660 |
-
The hypothetical commands `show w' and `show c' should show the appropriate
|
661 |
-
parts of the General Public License. Of course, your program's commands
|
662 |
-
might be different; for a GUI interface, you would use an "about box".
|
663 |
-
|
664 |
-
You should also get your employer (if you work as a programmer) or school,
|
665 |
-
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
666 |
-
For more information on this, and how to apply and follow the GNU GPL, see
|
667 |
-
<http://www.gnu.org/licenses/>.
|
668 |
-
|
669 |
-
The GNU General Public License does not permit incorporating your program
|
670 |
-
into proprietary programs. If your program is a subroutine library, you
|
671 |
-
may consider it more useful to permit linking proprietary applications with
|
672 |
-
the library. If this is what you want to do, use the GNU Lesser General
|
673 |
-
Public License instead of this License. But first, please read
|
674 |
-
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
1 |
+
GNU GENERAL PUBLIC LICENSE
|
2 |
+
Version 3, 29 June 2007
|
3 |
+
|
4 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5 |
+
Everyone is permitted to copy and distribute verbatim copies
|
6 |
+
of this license document, but changing it is not allowed.
|
7 |
+
|
8 |
+
Preamble
|
9 |
+
|
10 |
+
The GNU General Public License is a free, copyleft license for
|
11 |
+
software and other kinds of works.
|
12 |
+
|
13 |
+
The licenses for most software and other practical works are designed
|
14 |
+
to take away your freedom to share and change the works. By contrast,
|
15 |
+
the GNU General Public License is intended to guarantee your freedom to
|
16 |
+
share and change all versions of a program--to make sure it remains free
|
17 |
+
software for all its users. We, the Free Software Foundation, use the
|
18 |
+
GNU General Public License for most of our software; it applies also to
|
19 |
+
any other work released this way by its authors. You can apply it to
|
20 |
+
your programs, too.
|
21 |
+
|
22 |
+
When we speak of free software, we are referring to freedom, not
|
23 |
+
price. Our General Public Licenses are designed to make sure that you
|
24 |
+
have the freedom to distribute copies of free software (and charge for
|
25 |
+
them if you wish), that you receive source code or can get it if you
|
26 |
+
want it, that you can change the software or use pieces of it in new
|
27 |
+
free programs, and that you know you can do these things.
|
28 |
+
|
29 |
+
To protect your rights, we need to prevent others from denying you
|
30 |
+
these rights or asking you to surrender the rights. Therefore, you have
|
31 |
+
certain responsibilities if you distribute copies of the software, or if
|
32 |
+
you modify it: responsibilities to respect the freedom of others.
|
33 |
+
|
34 |
+
For example, if you distribute copies of such a program, whether
|
35 |
+
gratis or for a fee, you must pass on to the recipients the same
|
36 |
+
freedoms that you received. You must make sure that they, too, receive
|
37 |
+
or can get the source code. And you must show them these terms so they
|
38 |
+
know their rights.
|
39 |
+
|
40 |
+
Developers that use the GNU GPL protect your rights with two steps:
|
41 |
+
(1) assert copyright on the software, and (2) offer you this License
|
42 |
+
giving you legal permission to copy, distribute and/or modify it.
|
43 |
+
|
44 |
+
For the developers' and authors' protection, the GPL clearly explains
|
45 |
+
that there is no warranty for this free software. For both users' and
|
46 |
+
authors' sake, the GPL requires that modified versions be marked as
|
47 |
+
changed, so that their problems will not be attributed erroneously to
|
48 |
+
authors of previous versions.
|
49 |
+
|
50 |
+
Some devices are designed to deny users access to install or run
|
51 |
+
modified versions of the software inside them, although the manufacturer
|
52 |
+
can do so. This is fundamentally incompatible with the aim of
|
53 |
+
protecting users' freedom to change the software. The systematic
|
54 |
+
pattern of such abuse occurs in the area of products for individuals to
|
55 |
+
use, which is precisely where it is most unacceptable. Therefore, we
|
56 |
+
have designed this version of the GPL to prohibit the practice for those
|
57 |
+
products. If such problems arise substantially in other domains, we
|
58 |
+
stand ready to extend this provision to those domains in future versions
|
59 |
+
of the GPL, as needed to protect the freedom of users.
|
60 |
+
|
61 |
+
Finally, every program is threatened constantly by software patents.
|
62 |
+
States should not allow patents to restrict development and use of
|
63 |
+
software on general-purpose computers, but in those that do, we wish to
|
64 |
+
avoid the special danger that patents applied to a free program could
|
65 |
+
make it effectively proprietary. To prevent this, the GPL assures that
|
66 |
+
patents cannot be used to render the program non-free.
|
67 |
+
|
68 |
+
The precise terms and conditions for copying, distribution and
|
69 |
+
modification follow.
|
70 |
+
|
71 |
+
TERMS AND CONDITIONS
|
72 |
+
|
73 |
+
0. Definitions.
|
74 |
+
|
75 |
+
"This License" refers to version 3 of the GNU General Public License.
|
76 |
+
|
77 |
+
"Copyright" also means copyright-like laws that apply to other kinds of
|
78 |
+
works, such as semiconductor masks.
|
79 |
+
|
80 |
+
"The Program" refers to any copyrightable work licensed under this
|
81 |
+
License. Each licensee is addressed as "you". "Licensees" and
|
82 |
+
"recipients" may be individuals or organizations.
|
83 |
+
|
84 |
+
To "modify" a work means to copy from or adapt all or part of the work
|
85 |
+
in a fashion requiring copyright permission, other than the making of an
|
86 |
+
exact copy. The resulting work is called a "modified version" of the
|
87 |
+
earlier work or a work "based on" the earlier work.
|
88 |
+
|
89 |
+
A "covered work" means either the unmodified Program or a work based
|
90 |
+
on the Program.
|
91 |
+
|
92 |
+
To "propagate" a work means to do anything with it that, without
|
93 |
+
permission, would make you directly or secondarily liable for
|
94 |
+
infringement under applicable copyright law, except executing it on a
|
95 |
+
computer or modifying a private copy. Propagation includes copying,
|
96 |
+
distribution (with or without modification), making available to the
|
97 |
+
public, and in some countries other activities as well.
|
98 |
+
|
99 |
+
To "convey" a work means any kind of propagation that enables other
|
100 |
+
parties to make or receive copies. Mere interaction with a user through
|
101 |
+
a computer network, with no transfer of a copy, is not conveying.
|
102 |
+
|
103 |
+
An interactive user interface displays "Appropriate Legal Notices"
|
104 |
+
to the extent that it includes a convenient and prominently visible
|
105 |
+
feature that (1) displays an appropriate copyright notice, and (2)
|
106 |
+
tells the user that there is no warranty for the work (except to the
|
107 |
+
extent that warranties are provided), that licensees may convey the
|
108 |
+
work under this License, and how to view a copy of this License. If
|
109 |
+
the interface presents a list of user commands or options, such as a
|
110 |
+
menu, a prominent item in the list meets this criterion.
|
111 |
+
|
112 |
+
1. Source Code.
|
113 |
+
|
114 |
+
The "source code" for a work means the preferred form of the work
|
115 |
+
for making modifications to it. "Object code" means any non-source
|
116 |
+
form of a work.
|
117 |
+
|
118 |
+
A "Standard Interface" means an interface that either is an official
|
119 |
+
standard defined by a recognized standards body, or, in the case of
|
120 |
+
interfaces specified for a particular programming language, one that
|
121 |
+
is widely used among developers working in that language.
|
122 |
+
|
123 |
+
The "System Libraries" of an executable work include anything, other
|
124 |
+
than the work as a whole, that (a) is included in the normal form of
|
125 |
+
packaging a Major Component, but which is not part of that Major
|
126 |
+
Component, and (b) serves only to enable use of the work with that
|
127 |
+
Major Component, or to implement a Standard Interface for which an
|
128 |
+
implementation is available to the public in source code form. A
|
129 |
+
"Major Component", in this context, means a major essential component
|
130 |
+
(kernel, window system, and so on) of the specific operating system
|
131 |
+
(if any) on which the executable work runs, or a compiler used to
|
132 |
+
produce the work, or an object code interpreter used to run it.
|
133 |
+
|
134 |
+
The "Corresponding Source" for a work in object code form means all
|
135 |
+
the source code needed to generate, install, and (for an executable
|
136 |
+
work) run the object code and to modify the work, including scripts to
|
137 |
+
control those activities. However, it does not include the work's
|
138 |
+
System Libraries, or general-purpose tools or generally available free
|
139 |
+
programs which are used unmodified in performing those activities but
|
140 |
+
which are not part of the work. For example, Corresponding Source
|
141 |
+
includes interface definition files associated with source files for
|
142 |
+
the work, and the source code for shared libraries and dynamically
|
143 |
+
linked subprograms that the work is specifically designed to require,
|
144 |
+
such as by intimate data communication or control flow between those
|
145 |
+
subprograms and other parts of the work.
|
146 |
+
|
147 |
+
The Corresponding Source need not include anything that users
|
148 |
+
can regenerate automatically from other parts of the Corresponding
|
149 |
+
Source.
|
150 |
+
|
151 |
+
The Corresponding Source for a work in source code form is that
|
152 |
+
same work.
|
153 |
+
|
154 |
+
2. Basic Permissions.
|
155 |
+
|
156 |
+
All rights granted under this License are granted for the term of
|
157 |
+
copyright on the Program, and are irrevocable provided the stated
|
158 |
+
conditions are met. This License explicitly affirms your unlimited
|
159 |
+
permission to run the unmodified Program. The output from running a
|
160 |
+
covered work is covered by this License only if the output, given its
|
161 |
+
content, constitutes a covered work. This License acknowledges your
|
162 |
+
rights of fair use or other equivalent, as provided by copyright law.
|
163 |
+
|
164 |
+
You may make, run and propagate covered works that you do not
|
165 |
+
convey, without conditions so long as your license otherwise remains
|
166 |
+
in force. You may convey covered works to others for the sole purpose
|
167 |
+
of having them make modifications exclusively for you, or provide you
|
168 |
+
with facilities for running those works, provided that you comply with
|
169 |
+
the terms of this License in conveying all material for which you do
|
170 |
+
not control copyright. Those thus making or running the covered works
|
171 |
+
for you must do so exclusively on your behalf, under your direction
|
172 |
+
and control, on terms that prohibit them from making any copies of
|
173 |
+
your copyrighted material outside their relationship with you.
|
174 |
+
|
175 |
+
Conveying under any other circumstances is permitted solely under
|
176 |
+
the conditions stated below. Sublicensing is not allowed; section 10
|
177 |
+
makes it unnecessary.
|
178 |
+
|
179 |
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
180 |
+
|
181 |
+
No covered work shall be deemed part of an effective technological
|
182 |
+
measure under any applicable law fulfilling obligations under article
|
183 |
+
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
184 |
+
similar laws prohibiting or restricting circumvention of such
|
185 |
+
measures.
|
186 |
+
|
187 |
+
When you convey a covered work, you waive any legal power to forbid
|
188 |
+
circumvention of technological measures to the extent such circumvention
|
189 |
+
is effected by exercising rights under this License with respect to
|
190 |
+
the covered work, and you disclaim any intention to limit operation or
|
191 |
+
modification of the work as a means of enforcing, against the work's
|
192 |
+
users, your or third parties' legal rights to forbid circumvention of
|
193 |
+
technological measures.
|
194 |
+
|
195 |
+
4. Conveying Verbatim Copies.
|
196 |
+
|
197 |
+
You may convey verbatim copies of the Program's source code as you
|
198 |
+
receive it, in any medium, provided that you conspicuously and
|
199 |
+
appropriately publish on each copy an appropriate copyright notice;
|
200 |
+
keep intact all notices stating that this License and any
|
201 |
+
non-permissive terms added in accord with section 7 apply to the code;
|
202 |
+
keep intact all notices of the absence of any warranty; and give all
|
203 |
+
recipients a copy of this License along with the Program.
|
204 |
+
|
205 |
+
You may charge any price or no price for each copy that you convey,
|
206 |
+
and you may offer support or warranty protection for a fee.
|
207 |
+
|
208 |
+
5. Conveying Modified Source Versions.
|
209 |
+
|
210 |
+
You may convey a work based on the Program, or the modifications to
|
211 |
+
produce it from the Program, in the form of source code under the
|
212 |
+
terms of section 4, provided that you also meet all of these conditions:
|
213 |
+
|
214 |
+
a) The work must carry prominent notices stating that you modified
|
215 |
+
it, and giving a relevant date.
|
216 |
+
|
217 |
+
b) The work must carry prominent notices stating that it is
|
218 |
+
released under this License and any conditions added under section
|
219 |
+
7. This requirement modifies the requirement in section 4 to
|
220 |
+
"keep intact all notices".
|
221 |
+
|
222 |
+
c) You must license the entire work, as a whole, under this
|
223 |
+
License to anyone who comes into possession of a copy. This
|
224 |
+
License will therefore apply, along with any applicable section 7
|
225 |
+
additional terms, to the whole of the work, and all its parts,
|
226 |
+
regardless of how they are packaged. This License gives no
|
227 |
+
permission to license the work in any other way, but it does not
|
228 |
+
invalidate such permission if you have separately received it.
|
229 |
+
|
230 |
+
d) If the work has interactive user interfaces, each must display
|
231 |
+
Appropriate Legal Notices; however, if the Program has interactive
|
232 |
+
interfaces that do not display Appropriate Legal Notices, your
|
233 |
+
work need not make them do so.
|
234 |
+
|
235 |
+
A compilation of a covered work with other separate and independent
|
236 |
+
works, which are not by their nature extensions of the covered work,
|
237 |
+
and which are not combined with it such as to form a larger program,
|
238 |
+
in or on a volume of a storage or distribution medium, is called an
|
239 |
+
"aggregate" if the compilation and its resulting copyright are not
|
240 |
+
used to limit the access or legal rights of the compilation's users
|
241 |
+
beyond what the individual works permit. Inclusion of a covered work
|
242 |
+
in an aggregate does not cause this License to apply to the other
|
243 |
+
parts of the aggregate.
|
244 |
+
|
245 |
+
6. Conveying Non-Source Forms.
|
246 |
+
|
247 |
+
You may convey a covered work in object code form under the terms
|
248 |
+
of sections 4 and 5, provided that you also convey the
|
249 |
+
machine-readable Corresponding Source under the terms of this License,
|
250 |
+
in one of these ways:
|
251 |
+
|
252 |
+
a) Convey the object code in, or embodied in, a physical product
|
253 |
+
(including a physical distribution medium), accompanied by the
|
254 |
+
Corresponding Source fixed on a durable physical medium
|
255 |
+
customarily used for software interchange.
|
256 |
+
|
257 |
+
b) Convey the object code in, or embodied in, a physical product
|
258 |
+
(including a physical distribution medium), accompanied by a
|
259 |
+
written offer, valid for at least three years and valid for as
|
260 |
+
long as you offer spare parts or customer support for that product
|
261 |
+
model, to give anyone who possesses the object code either (1) a
|
262 |
+
copy of the Corresponding Source for all the software in the
|
263 |
+
product that is covered by this License, on a durable physical
|
264 |
+
medium customarily used for software interchange, for a price no
|
265 |
+
more than your reasonable cost of physically performing this
|
266 |
+
conveying of source, or (2) access to copy the
|
267 |
+
Corresponding Source from a network server at no charge.
|
268 |
+
|
269 |
+
c) Convey individual copies of the object code with a copy of the
|
270 |
+
written offer to provide the Corresponding Source. This
|
271 |
+
alternative is allowed only occasionally and noncommercially, and
|
272 |
+
only if you received the object code with such an offer, in accord
|
273 |
+
with subsection 6b.
|
274 |
+
|
275 |
+
d) Convey the object code by offering access from a designated
|
276 |
+
place (gratis or for a charge), and offer equivalent access to the
|
277 |
+
Corresponding Source in the same way through the same place at no
|
278 |
+
further charge. You need not require recipients to copy the
|
279 |
+
Corresponding Source along with the object code. If the place to
|
280 |
+
copy the object code is a network server, the Corresponding Source
|
281 |
+
may be on a different server (operated by you or a third party)
|
282 |
+
that supports equivalent copying facilities, provided you maintain
|
283 |
+
clear directions next to the object code saying where to find the
|
284 |
+
Corresponding Source. Regardless of what server hosts the
|
285 |
+
Corresponding Source, you remain obligated to ensure that it is
|
286 |
+
available for as long as needed to satisfy these requirements.
|
287 |
+
|
288 |
+
e) Convey the object code using peer-to-peer transmission, provided
|
289 |
+
you inform other peers where the object code and Corresponding
|
290 |
+
Source of the work are being offered to the general public at no
|
291 |
+
charge under subsection 6d.
|
292 |
+
|
293 |
+
A separable portion of the object code, whose source code is excluded
|
294 |
+
from the Corresponding Source as a System Library, need not be
|
295 |
+
included in conveying the object code work.
|
296 |
+
|
297 |
+
A "User Product" is either (1) a "consumer product", which means any
|
298 |
+
tangible personal property which is normally used for personal, family,
|
299 |
+
or household purposes, or (2) anything designed or sold for incorporation
|
300 |
+
into a dwelling. In determining whether a product is a consumer product,
|
301 |
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
302 |
+
product received by a particular user, "normally used" refers to a
|
303 |
+
typical or common use of that class of product, regardless of the status
|
304 |
+
of the particular user or of the way in which the particular user
|
305 |
+
actually uses, or expects or is expected to use, the product. A product
|
306 |
+
is a consumer product regardless of whether the product has substantial
|
307 |
+
commercial, industrial or non-consumer uses, unless such uses represent
|
308 |
+
the only significant mode of use of the product.
|
309 |
+
|
310 |
+
"Installation Information" for a User Product means any methods,
|
311 |
+
procedures, authorization keys, or other information required to install
|
312 |
+
and execute modified versions of a covered work in that User Product from
|
313 |
+
a modified version of its Corresponding Source. The information must
|
314 |
+
suffice to ensure that the continued functioning of the modified object
|
315 |
+
code is in no case prevented or interfered with solely because
|
316 |
+
modification has been made.
|
317 |
+
|
318 |
+
If you convey an object code work under this section in, or with, or
|
319 |
+
specifically for use in, a User Product, and the conveying occurs as
|
320 |
+
part of a transaction in which the right of possession and use of the
|
321 |
+
User Product is transferred to the recipient in perpetuity or for a
|
322 |
+
fixed term (regardless of how the transaction is characterized), the
|
323 |
+
Corresponding Source conveyed under this section must be accompanied
|
324 |
+
by the Installation Information. But this requirement does not apply
|
325 |
+
if neither you nor any third party retains the ability to install
|
326 |
+
modified object code on the User Product (for example, the work has
|
327 |
+
been installed in ROM).
|
328 |
+
|
329 |
+
The requirement to provide Installation Information does not include a
|
330 |
+
requirement to continue to provide support service, warranty, or updates
|
331 |
+
for a work that has been modified or installed by the recipient, or for
|
332 |
+
the User Product in which it has been modified or installed. Access to a
|
333 |
+
network may be denied when the modification itself materially and
|
334 |
+
adversely affects the operation of the network or violates the rules and
|
335 |
+
protocols for communication across the network.
|
336 |
+
|
337 |
+
Corresponding Source conveyed, and Installation Information provided,
|
338 |
+
in accord with this section must be in a format that is publicly
|
339 |
+
documented (and with an implementation available to the public in
|
340 |
+
source code form), and must require no special password or key for
|
341 |
+
unpacking, reading or copying.
|
342 |
+
|
343 |
+
7. Additional Terms.
|
344 |
+
|
345 |
+
"Additional permissions" are terms that supplement the terms of this
|
346 |
+
License by making exceptions from one or more of its conditions.
|
347 |
+
Additional permissions that are applicable to the entire Program shall
|
348 |
+
be treated as though they were included in this License, to the extent
|
349 |
+
that they are valid under applicable law. If additional permissions
|
350 |
+
apply only to part of the Program, that part may be used separately
|
351 |
+
under those permissions, but the entire Program remains governed by
|
352 |
+
this License without regard to the additional permissions.
|
353 |
+
|
354 |
+
When you convey a copy of a covered work, you may at your option
|
355 |
+
remove any additional permissions from that copy, or from any part of
|
356 |
+
it. (Additional permissions may be written to require their own
|
357 |
+
removal in certain cases when you modify the work.) You may place
|
358 |
+
additional permissions on material, added by you to a covered work,
|
359 |
+
for which you have or can give appropriate copyright permission.
|
360 |
+
|
361 |
+
Notwithstanding any other provision of this License, for material you
|
362 |
+
add to a covered work, you may (if authorized by the copyright holders of
|
363 |
+
that material) supplement the terms of this License with terms:
|
364 |
+
|
365 |
+
a) Disclaiming warranty or limiting liability differently from the
|
366 |
+
terms of sections 15 and 16 of this License; or
|
367 |
+
|
368 |
+
b) Requiring preservation of specified reasonable legal notices or
|
369 |
+
author attributions in that material or in the Appropriate Legal
|
370 |
+
Notices displayed by works containing it; or
|
371 |
+
|
372 |
+
c) Prohibiting misrepresentation of the origin of that material, or
|
373 |
+
requiring that modified versions of such material be marked in
|
374 |
+
reasonable ways as different from the original version; or
|
375 |
+
|
376 |
+
d) Limiting the use for publicity purposes of names of licensors or
|
377 |
+
authors of the material; or
|
378 |
+
|
379 |
+
e) Declining to grant rights under trademark law for use of some
|
380 |
+
trade names, trademarks, or service marks; or
|
381 |
+
|
382 |
+
f) Requiring indemnification of licensors and authors of that
|
383 |
+
material by anyone who conveys the material (or modified versions of
|
384 |
+
it) with contractual assumptions of liability to the recipient, for
|
385 |
+
any liability that these contractual assumptions directly impose on
|
386 |
+
those licensors and authors.
|
387 |
+
|
388 |
+
All other non-permissive additional terms are considered "further
|
389 |
+
restrictions" within the meaning of section 10. If the Program as you
|
390 |
+
received it, or any part of it, contains a notice stating that it is
|
391 |
+
governed by this License along with a term that is a further
|
392 |
+
restriction, you may remove that term. If a license document contains
|
393 |
+
a further restriction but permits relicensing or conveying under this
|
394 |
+
License, you may add to a covered work material governed by the terms
|
395 |
+
of that license document, provided that the further restriction does
|
396 |
+
not survive such relicensing or conveying.
|
397 |
+
|
398 |
+
If you add terms to a covered work in accord with this section, you
|
399 |
+
must place, in the relevant source files, a statement of the
|
400 |
+
additional terms that apply to those files, or a notice indicating
|
401 |
+
where to find the applicable terms.
|
402 |
+
|
403 |
+
Additional terms, permissive or non-permissive, may be stated in the
|
404 |
+
form of a separately written license, or stated as exceptions;
|
405 |
+
the above requirements apply either way.
|
406 |
+
|
407 |
+
8. Termination.
|
408 |
+
|
409 |
+
You may not propagate or modify a covered work except as expressly
|
410 |
+
provided under this License. Any attempt otherwise to propagate or
|
411 |
+
modify it is void, and will automatically terminate your rights under
|
412 |
+
this License (including any patent licenses granted under the third
|
413 |
+
paragraph of section 11).
|
414 |
+
|
415 |
+
However, if you cease all violation of this License, then your
|
416 |
+
license from a particular copyright holder is reinstated (a)
|
417 |
+
provisionally, unless and until the copyright holder explicitly and
|
418 |
+
finally terminates your license, and (b) permanently, if the copyright
|
419 |
+
holder fails to notify you of the violation by some reasonable means
|
420 |
+
prior to 60 days after the cessation.
|
421 |
+
|
422 |
+
Moreover, your license from a particular copyright holder is
|
423 |
+
reinstated permanently if the copyright holder notifies you of the
|
424 |
+
violation by some reasonable means, this is the first time you have
|
425 |
+
received notice of violation of this License (for any work) from that
|
426 |
+
copyright holder, and you cure the violation prior to 30 days after
|
427 |
+
your receipt of the notice.
|
428 |
+
|
429 |
+
Termination of your rights under this section does not terminate the
|
430 |
+
licenses of parties who have received copies or rights from you under
|
431 |
+
this License. If your rights have been terminated and not permanently
|
432 |
+
reinstated, you do not qualify to receive new licenses for the same
|
433 |
+
material under section 10.
|
434 |
+
|
435 |
+
9. Acceptance Not Required for Having Copies.
|
436 |
+
|
437 |
+
You are not required to accept this License in order to receive or
|
438 |
+
run a copy of the Program. Ancillary propagation of a covered work
|
439 |
+
occurring solely as a consequence of using peer-to-peer transmission
|
440 |
+
to receive a copy likewise does not require acceptance. However,
|
441 |
+
nothing other than this License grants you permission to propagate or
|
442 |
+
modify any covered work. These actions infringe copyright if you do
|
443 |
+
not accept this License. Therefore, by modifying or propagating a
|
444 |
+
covered work, you indicate your acceptance of this License to do so.
|
445 |
+
|
446 |
+
10. Automatic Licensing of Downstream Recipients.
|
447 |
+
|
448 |
+
Each time you convey a covered work, the recipient automatically
|
449 |
+
receives a license from the original licensors, to run, modify and
|
450 |
+
propagate that work, subject to this License. You are not responsible
|
451 |
+
for enforcing compliance by third parties with this License.
|
452 |
+
|
453 |
+
An "entity transaction" is a transaction transferring control of an
|
454 |
+
organization, or substantially all assets of one, or subdividing an
|
455 |
+
organization, or merging organizations. If propagation of a covered
|
456 |
+
work results from an entity transaction, each party to that
|
457 |
+
transaction who receives a copy of the work also receives whatever
|
458 |
+
licenses to the work the party's predecessor in interest had or could
|
459 |
+
give under the previous paragraph, plus a right to possession of the
|
460 |
+
Corresponding Source of the work from the predecessor in interest, if
|
461 |
+
the predecessor has it or can get it with reasonable efforts.
|
462 |
+
|
463 |
+
You may not impose any further restrictions on the exercise of the
|
464 |
+
rights granted or affirmed under this License. For example, you may
|
465 |
+
not impose a license fee, royalty, or other charge for exercise of
|
466 |
+
rights granted under this License, and you may not initiate litigation
|
467 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
468 |
+
any patent claim is infringed by making, using, selling, offering for
|
469 |
+
sale, or importing the Program or any portion of it.
|
470 |
+
|
471 |
+
11. Patents.
|
472 |
+
|
473 |
+
A "contributor" is a copyright holder who authorizes use under this
|
474 |
+
License of the Program or a work on which the Program is based. The
|
475 |
+
work thus licensed is called the contributor's "contributor version".
|
476 |
+
|
477 |
+
A contributor's "essential patent claims" are all patent claims
|
478 |
+
owned or controlled by the contributor, whether already acquired or
|
479 |
+
hereafter acquired, that would be infringed by some manner, permitted
|
480 |
+
by this License, of making, using, or selling its contributor version,
|
481 |
+
but do not include claims that would be infringed only as a
|
482 |
+
consequence of further modification of the contributor version. For
|
483 |
+
purposes of this definition, "control" includes the right to grant
|
484 |
+
patent sublicenses in a manner consistent with the requirements of
|
485 |
+
this License.
|
486 |
+
|
487 |
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
488 |
+
patent license under the contributor's essential patent claims, to
|
489 |
+
make, use, sell, offer for sale, import and otherwise run, modify and
|
490 |
+
propagate the contents of its contributor version.
|
491 |
+
|
492 |
+
In the following three paragraphs, a "patent license" is any express
|
493 |
+
agreement or commitment, however denominated, not to enforce a patent
|
494 |
+
(such as an express permission to practice a patent or covenant not to
|
495 |
+
sue for patent infringement). To "grant" such a patent license to a
|
496 |
+
party means to make such an agreement or commitment not to enforce a
|
497 |
+
patent against the party.
|
498 |
+
|
499 |
+
If you convey a covered work, knowingly relying on a patent license,
|
500 |
+
and the Corresponding Source of the work is not available for anyone
|
501 |
+
to copy, free of charge and under the terms of this License, through a
|
502 |
+
publicly available network server or other readily accessible means,
|
503 |
+
then you must either (1) cause the Corresponding Source to be so
|
504 |
+
available, or (2) arrange to deprive yourself of the benefit of the
|
505 |
+
patent license for this particular work, or (3) arrange, in a manner
|
506 |
+
consistent with the requirements of this License, to extend the patent
|
507 |
+
license to downstream recipients. "Knowingly relying" means you have
|
508 |
+
actual knowledge that, but for the patent license, your conveying the
|
509 |
+
covered work in a country, or your recipient's use of the covered work
|
510 |
+
in a country, would infringe one or more identifiable patents in that
|
511 |
+
country that you have reason to believe are valid.
|
512 |
+
|
513 |
+
If, pursuant to or in connection with a single transaction or
|
514 |
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
515 |
+
covered work, and grant a patent license to some of the parties
|
516 |
+
receiving the covered work authorizing them to use, propagate, modify
|
517 |
+
or convey a specific copy of the covered work, then the patent license
|
518 |
+
you grant is automatically extended to all recipients of the covered
|
519 |
+
work and works based on it.
|
520 |
+
|
521 |
+
A patent license is "discriminatory" if it does not include within
|
522 |
+
the scope of its coverage, prohibits the exercise of, or is
|
523 |
+
conditioned on the non-exercise of one or more of the rights that are
|
524 |
+
specifically granted under this License. You may not convey a covered
|
525 |
+
work if you are a party to an arrangement with a third party that is
|
526 |
+
in the business of distributing software, under which you make payment
|
527 |
+
to the third party based on the extent of your activity of conveying
|
528 |
+
the work, and under which the third party grants, to any of the
|
529 |
+
parties who would receive the covered work from you, a discriminatory
|
530 |
+
patent license (a) in connection with copies of the covered work
|
531 |
+
conveyed by you (or copies made from those copies), or (b) primarily
|
532 |
+
for and in connection with specific products or compilations that
|
533 |
+
contain the covered work, unless you entered into that arrangement,
|
534 |
+
or that patent license was granted, prior to 28 March 2007.
|
535 |
+
|
536 |
+
Nothing in this License shall be construed as excluding or limiting
|
537 |
+
any implied license or other defenses to infringement that may
|
538 |
+
otherwise be available to you under applicable patent law.
|
539 |
+
|
540 |
+
12. No Surrender of Others' Freedom.
|
541 |
+
|
542 |
+
If conditions are imposed on you (whether by court order, agreement or
|
543 |
+
otherwise) that contradict the conditions of this License, they do not
|
544 |
+
excuse you from the conditions of this License. If you cannot convey a
|
545 |
+
covered work so as to satisfy simultaneously your obligations under this
|
546 |
+
License and any other pertinent obligations, then as a consequence you may
|
547 |
+
not convey it at all. For example, if you agree to terms that obligate you
|
548 |
+
to collect a royalty for further conveying from those to whom you convey
|
549 |
+
the Program, the only way you could satisfy both those terms and this
|
550 |
+
License would be to refrain entirely from conveying the Program.
|
551 |
+
|
552 |
+
13. Use with the GNU Affero General Public License.
|
553 |
+
|
554 |
+
Notwithstanding any other provision of this License, you have
|
555 |
+
permission to link or combine any covered work with a work licensed
|
556 |
+
under version 3 of the GNU Affero General Public License into a single
|
557 |
+
combined work, and to convey the resulting work. The terms of this
|
558 |
+
License will continue to apply to the part which is the covered work,
|
559 |
+
but the special requirements of the GNU Affero General Public License,
|
560 |
+
section 13, concerning interaction through a network will apply to the
|
561 |
+
combination as such.
|
562 |
+
|
563 |
+
14. Revised Versions of this License.
|
564 |
+
|
565 |
+
The Free Software Foundation may publish revised and/or new versions of
|
566 |
+
the GNU General Public License from time to time. Such new versions will
|
567 |
+
be similar in spirit to the present version, but may differ in detail to
|
568 |
+
address new problems or concerns.
|
569 |
+
|
570 |
+
Each version is given a distinguishing version number. If the
|
571 |
+
Program specifies that a certain numbered version of the GNU General
|
572 |
+
Public License "or any later version" applies to it, you have the
|
573 |
+
option of following the terms and conditions either of that numbered
|
574 |
+
version or of any later version published by the Free Software
|
575 |
+
Foundation. If the Program does not specify a version number of the
|
576 |
+
GNU General Public License, you may choose any version ever published
|
577 |
+
by the Free Software Foundation.
|
578 |
+
|
579 |
+
If the Program specifies that a proxy can decide which future
|
580 |
+
versions of the GNU General Public License can be used, that proxy's
|
581 |
+
public statement of acceptance of a version permanently authorizes you
|
582 |
+
to choose that version for the Program.
|
583 |
+
|
584 |
+
Later license versions may give you additional or different
|
585 |
+
permissions. However, no additional obligations are imposed on any
|
586 |
+
author or copyright holder as a result of your choosing to follow a
|
587 |
+
later version.
|
588 |
+
|
589 |
+
15. Disclaimer of Warranty.
|
590 |
+
|
591 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
592 |
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
593 |
+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
594 |
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
595 |
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
596 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
597 |
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
598 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
599 |
+
|
600 |
+
16. Limitation of Liability.
|
601 |
+
|
602 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
603 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
604 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
605 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
606 |
+
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
607 |
+
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
608 |
+
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
609 |
+
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
610 |
+
SUCH DAMAGES.
|
611 |
+
|
612 |
+
17. Interpretation of Sections 15 and 16.
|
613 |
+
|
614 |
+
If the disclaimer of warranty and limitation of liability provided
|
615 |
+
above cannot be given local legal effect according to their terms,
|
616 |
+
reviewing courts shall apply local law that most closely approximates
|
617 |
+
an absolute waiver of all civil liability in connection with the
|
618 |
+
Program, unless a warranty or assumption of liability accompanies a
|
619 |
+
copy of the Program in return for a fee.
|
620 |
+
|
621 |
+
END OF TERMS AND CONDITIONS
|
622 |
+
|
623 |
+
How to Apply These Terms to Your New Programs
|
624 |
+
|
625 |
+
If you develop a new program, and you want it to be of the greatest
|
626 |
+
possible use to the public, the best way to achieve this is to make it
|
627 |
+
free software which everyone can redistribute and change under these terms.
|
628 |
+
|
629 |
+
To do so, attach the following notices to the program. It is safest
|
630 |
+
to attach them to the start of each source file to most effectively
|
631 |
+
state the exclusion of warranty; and each file should have at least
|
632 |
+
the "copyright" line and a pointer to where the full notice is found.
|
633 |
+
|
634 |
+
{one line to give the program's name and a brief idea of what it does.}
|
635 |
+
Copyright (C) {year} {name of author}
|
636 |
+
|
637 |
+
This program is free software: you can redistribute it and/or modify
|
638 |
+
it under the terms of the GNU General Public License as published by
|
639 |
+
the Free Software Foundation, either version 3 of the License, or
|
640 |
+
(at your option) any later version.
|
641 |
+
|
642 |
+
This program is distributed in the hope that it will be useful,
|
643 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
644 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
645 |
+
GNU General Public License for more details.
|
646 |
+
|
647 |
+
You should have received a copy of the GNU General Public License
|
648 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
649 |
+
|
650 |
+
Also add information on how to contact you by electronic and paper mail.
|
651 |
+
|
652 |
+
If the program does terminal interaction, make it output a short
|
653 |
+
notice like this when it starts in an interactive mode:
|
654 |
+
|
655 |
+
{project} Copyright (C) {year} {fullname}
|
656 |
+
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
657 |
+
This is free software, and you are welcome to redistribute it
|
658 |
+
under certain conditions; type `show c' for details.
|
659 |
+
|
660 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
661 |
+
parts of the General Public License. Of course, your program's commands
|
662 |
+
might be different; for a GUI interface, you would use an "about box".
|
663 |
+
|
664 |
+
You should also get your employer (if you work as a programmer) or school,
|
665 |
+
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
666 |
+
For more information on this, and how to apply and follow the GNU GPL, see
|
667 |
+
<http://www.gnu.org/licenses/>.
|
668 |
+
|
669 |
+
The GNU General Public License does not permit incorporating your program
|
670 |
+
into proprietary programs. If your program is a subroutine library, you
|
671 |
+
may consider it more useful to permit linking proprietary applications with
|
672 |
+
the library. If this is what you want to do, use the GNU Lesser General
|
673 |
+
Public License instead of this License. But first, please read
|
674 |
+
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
crop-thumbnails.php
CHANGED
@@ -1,52 +1,52 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Plugin name: Crop Thumbnails
|
4 |
-
* Plugin URI: http://wordpress.org/extend/plugins/crop-thumbnails/
|
5 |
-
* Author: Volkmar Kantor
|
6 |
-
* Author URI: http://www.totalmedial.de
|
7 |
-
* Version: 0.10.
|
8 |
-
* Description: Crop your thumbnails, the easy way.
|
9 |
-
* Text Domain: crop-thumbnails
|
10 |
-
*
|
11 |
-
* License: GPL v3
|
12 |
-
* Copyright 2012 Volkmar Kantor (email : info@totalmedial.de)
|
13 |
-
|
14 |
-
* This program is free software: you can redistribute it and/or modify
|
15 |
-
* it under the terms of the GNU General Public License as published by
|
16 |
-
* the Free Software Foundation, either version 3 of the License, or
|
17 |
-
* (at your option) any later version.
|
18 |
-
|
19 |
-
* This program is distributed in the hope that it will be useful,
|
20 |
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
21 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
22 |
-
* GNU General Public License for more details.
|
23 |
-
*
|
24 |
-
* You should have received a copy of the GNU General Public License
|
25 |
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
26 |
-
*/
|
27 |
-
|
28 |
-
//cpt - stands for crop-post-thumbnail
|
29 |
-
define('CROP_THUMBS_LANG','cpt_lang');
|
30 |
-
define('CROP_THUMBS_VERSION','0.10.
|
31 |
-
|
32 |
-
function cpt_plugin_init() {
|
33 |
-
load_plugin_textdomain( CROP_THUMBS_LANG, false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
|
34 |
-
|
35 |
-
__('Crop your thumbnails, the easy way.');//have to be the same as the plugins-description - for automatic integration into poedit
|
36 |
-
}
|
37 |
-
add_action('plugins_loaded', 'cpt_plugin_init');
|
38 |
-
|
39 |
-
/**
|
40 |
-
* returns the WpVersion in as a float
|
41 |
-
*/
|
42 |
-
function cptGetWpVersion() {
|
43 |
-
$version = get_bloginfo('version');
|
44 |
-
$version = floatval(substr($version,0,3));
|
45 |
-
return $version;
|
46 |
-
}
|
47 |
-
|
48 |
-
include_once(dirname(__FILE__).'/functions/settings.php');
|
49 |
-
include_once(dirname(__FILE__).'/functions/editor.php');
|
50 |
-
include_once(dirname(__FILE__).'/functions/backendpreparer.php');
|
51 |
-
include_once(dirname(__FILE__).'/functions/save.php');
|
52 |
-
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Plugin name: Crop Thumbnails
|
4 |
+
* Plugin URI: http://wordpress.org/extend/plugins/crop-thumbnails/
|
5 |
+
* Author: Volkmar Kantor
|
6 |
+
* Author URI: http://www.totalmedial.de
|
7 |
+
* Version: 0.10.4
|
8 |
+
* Description: Crop your thumbnails, the easy way.
|
9 |
+
* Text Domain: crop-thumbnails
|
10 |
+
*
|
11 |
+
* License: GPL v3
|
12 |
+
* Copyright 2012 Volkmar Kantor (email : info@totalmedial.de)
|
13 |
+
|
14 |
+
* This program is free software: you can redistribute it and/or modify
|
15 |
+
* it under the terms of the GNU General Public License as published by
|
16 |
+
* the Free Software Foundation, either version 3 of the License, or
|
17 |
+
* (at your option) any later version.
|
18 |
+
|
19 |
+
* This program is distributed in the hope that it will be useful,
|
20 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
21 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
22 |
+
* GNU General Public License for more details.
|
23 |
+
*
|
24 |
+
* You should have received a copy of the GNU General Public License
|
25 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
26 |
+
*/
|
27 |
+
|
28 |
+
//cpt - stands for crop-post-thumbnail
|
29 |
+
define('CROP_THUMBS_LANG','cpt_lang');
|
30 |
+
define('CROP_THUMBS_VERSION','0.10.4');
|
31 |
+
|
32 |
+
function cpt_plugin_init() {
|
33 |
+
load_plugin_textdomain( CROP_THUMBS_LANG, false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
|
34 |
+
|
35 |
+
__('Crop your thumbnails, the easy way.');//have to be the same as the plugins-description - for automatic integration into poedit
|
36 |
+
}
|
37 |
+
add_action('plugins_loaded', 'cpt_plugin_init');
|
38 |
+
|
39 |
+
/**
|
40 |
+
* returns the WpVersion in as a float
|
41 |
+
*/
|
42 |
+
function cptGetWpVersion() {
|
43 |
+
$version = get_bloginfo('version');
|
44 |
+
$version = floatval(substr($version,0,3));
|
45 |
+
return $version;
|
46 |
+
}
|
47 |
+
|
48 |
+
include_once(dirname(__FILE__).'/functions/settings.php');
|
49 |
+
include_once(dirname(__FILE__).'/functions/editor.php');
|
50 |
+
include_once(dirname(__FILE__).'/functions/backendpreparer.php');
|
51 |
+
include_once(dirname(__FILE__).'/functions/save.php');
|
52 |
+
?>
|
css/cpt-window.css
CHANGED
@@ -1,40 +1,40 @@
|
|
1 |
-
.cpt-crop-view { position: relative; }
|
2 |
-
|
3 |
-
.listEmptyMsg { font-size:1.5em; text-align:center; padding:2em;}
|
4 |
-
.image-list .entry.post-thumbnail { border-color:#aad6f4; background-color:#efefef; }
|
5 |
-
.image-list { margin:0;padding:0;}
|
6 |
-
.image-list .entry { width:140px; float:left; border:1px solid #efefef; margin:5px;}
|
7 |
-
.image-list .entry h3 { font-weight: normal; font-size:1em; margin:0 5px; }
|
8 |
-
.image-list .entry img { width:130px; height:130px; margin:5px; }
|
9 |
-
.image-list .cursor, .image-list .cursor * { cursor:pointer;}
|
10 |
-
|
11 |
-
.header {background-color:#efefef; padding:5px; position: relative; z-index: 1000;}
|
12 |
-
.cpt-crop-view .cptRightPane {width:300px; float:right; border-left:3px solid #efefef; padding:5px 5px 0 10px; }
|
13 |
-
.thumbnail-list { border-top: 3px solid #efefef; padding-top:5px; margin-top:5px; }
|
14 |
-
.thumbnail-list li { padding:5px; border:1px solid white; cursor:pointer; }
|
15 |
-
.thumbnail-list li:hover { border:1px solid #aad6f4; }
|
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; max-height:250px;}
|
19 |
-
.thumbnail-list li h3 { font-size:1em; }
|
20 |
-
.thumbnail-list li .lowResWarning,
|
21 |
-
.thumbnail-list li .badParameterWarning { font-style: italic; color:#990000;}
|
22 |
-
|
23 |
-
.lbl-cpt-same-ratio {font-size:0.9em;}
|
24 |
-
|
25 |
-
.selectionArea { width:300px; padding:5px; float:left; }
|
26 |
-
.selectionArea img { max-width:300px; height:auto; }
|
27 |
-
.selectionArea h3 { margin:0;}
|
28 |
-
#cpt-generate { width: 300px; height:2em; padding:0.5em 0; display:block; line-height: 0;}
|
29 |
-
|
30 |
-
h4 { margin-bottom:0em;}
|
31 |
-
.step-info { font-size:0.9em; }
|
32 |
-
|
33 |
-
|
34 |
-
.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; }
|
35 |
-
.postTypeDisabledMsg { background: none; }
|
36 |
-
|
37 |
-
.cpt-debug {clear: left; padding-left:5px;}
|
38 |
-
.cpt-debug .cpt-debug-handle { border:1px solid #aaa; background-color:#f1f1f1; padding:0.3em 1em;}
|
39 |
-
.cpt-debug.closed .content { display:none; }
|
40 |
-
.cpt-debug .content { font-family: monospace;margin-top:0.5em; }
|
1 |
+
.cpt-crop-view { position: relative; }
|
2 |
+
|
3 |
+
.listEmptyMsg { font-size:1.5em; text-align:center; padding:2em;}
|
4 |
+
.image-list .entry.post-thumbnail { border-color:#aad6f4; background-color:#efefef; }
|
5 |
+
.image-list { margin:0;padding:0;}
|
6 |
+
.image-list .entry { width:140px; float:left; border:1px solid #efefef; margin:5px;}
|
7 |
+
.image-list .entry h3 { font-weight: normal; font-size:1em; margin:0 5px; }
|
8 |
+
.image-list .entry img { width:130px; height:130px; margin:5px; }
|
9 |
+
.image-list .cursor, .image-list .cursor * { cursor:pointer;}
|
10 |
+
|
11 |
+
.header {background-color:#efefef; padding:5px; position: relative; z-index: 1000;}
|
12 |
+
.cpt-crop-view .cptRightPane {width:300px; float:right; border-left:3px solid #efefef; padding:5px 5px 0 10px; }
|
13 |
+
.thumbnail-list { border-top: 3px solid #efefef; padding-top:5px; margin-top:5px; }
|
14 |
+
.thumbnail-list li { padding:5px; border:1px solid white; cursor:pointer; }
|
15 |
+
.thumbnail-list li:hover { border:1px solid #aad6f4; }
|
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; max-height:250px;}
|
19 |
+
.thumbnail-list li h3 { font-size:1em; }
|
20 |
+
.thumbnail-list li .lowResWarning,
|
21 |
+
.thumbnail-list li .badParameterWarning { font-style: italic; color:#990000;}
|
22 |
+
|
23 |
+
.lbl-cpt-same-ratio {font-size:0.9em;}
|
24 |
+
|
25 |
+
.selectionArea { width:300px; padding:5px; float:left; }
|
26 |
+
.selectionArea img { max-width:300px; height:auto; }
|
27 |
+
.selectionArea h3 { margin:0;}
|
28 |
+
#cpt-generate { width: 300px; height:2em; padding:0.5em 0; display:block; line-height: 0;}
|
29 |
+
|
30 |
+
h4 { margin-bottom:0em;}
|
31 |
+
.step-info { font-size:0.9em; }
|
32 |
+
|
33 |
+
|
34 |
+
.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; }
|
35 |
+
.postTypeDisabledMsg { background: none; }
|
36 |
+
|
37 |
+
.cpt-debug {clear: left; padding-left:5px;}
|
38 |
+
.cpt-debug .cpt-debug-handle { border:1px solid #aaa; background-color:#f1f1f1; padding:0.3em 1em;}
|
39 |
+
.cpt-debug.closed .content { display:none; }
|
40 |
+
.cpt-debug .content { font-family: monospace;margin-top:0.5em; }
|
css/options.css
CHANGED
@@ -1,19 +1,19 @@
|
|
1 |
-
.cpt_settings_paypal { border:1px solid #298CBA; border-radius:3px; background-color:#f6f6f6; max-width:30em; padding:0 0.5em; margin:2em 0; text-align:center; }
|
2 |
-
.cpt_settings_submit { margin-top:2em; }
|
3 |
-
|
4 |
-
|
5 |
-
/**** MODAL - DIALOG ****/
|
6 |
-
.cropThumbnailModal { z-index:999999999 !important; }
|
7 |
-
.cropThumbnailModalOverlay { z-index:999999998 !important; }
|
8 |
-
.cropThumbnailModal.ui-dialog { padding:0 !important; border-radius: 0 !important; border:0 !important; }
|
9 |
-
|
10 |
-
/*dialog headline*/
|
11 |
-
.cropThumbnailModal.ui-dialog .ui-dialog-title { font-size:13px !important; font-family:'Open Sans', sans-serif !important; margin: 0 !important; padding:0 29px 0 10px !important; line-height: 29px !important; width: 100% !important; box-sizing: border-box !important; }
|
12 |
-
.cropThumbnailModal.ui-dialog .ui-dialog-titlebar { padding:0 !important; border:0 !important; height: 29px !important; border-bottom:1px solid #DFDFDF !important; border-radius: 0 !important; }
|
13 |
-
.cropThumbnailModal.ui-dialog .ui-button.ui-dialog-titlebar-close { width: 29px !important; height: 29px !important; margin: 0 !important; top:0 !important; right:0 !important; }
|
14 |
-
.cropThumbnailModal.ui-dialog .ui-button.ui-dialog-titlebar-close:before { line-height: 29px !important; }
|
15 |
-
.cropThumbnailModal.ui-dialog .ui-dialog-titlebar-close span { display: none !important; }
|
16 |
-
|
17 |
-
/*dialog content*/
|
18 |
-
.cropThumbnailModal.ui-dialog .ui-dialog-content { padding:0 !important; overflow: hidden !important; }
|
19 |
-
.cropThumbnailModal.ui-dialog .ui-dialog-content iframe { width:100% !important; height: 100% !important; }
|
1 |
+
.cpt_settings_paypal { border:1px solid #298CBA; border-radius:3px; background-color:#f6f6f6; max-width:30em; padding:0 0.5em; margin:2em 0; text-align:center; }
|
2 |
+
.cpt_settings_submit { margin-top:2em; }
|
3 |
+
|
4 |
+
|
5 |
+
/**** MODAL - DIALOG ****/
|
6 |
+
.cropThumbnailModal { z-index:999999999 !important; }
|
7 |
+
.cropThumbnailModalOverlay { z-index:999999998 !important; }
|
8 |
+
.cropThumbnailModal.ui-dialog { padding:0 !important; border-radius: 0 !important; border:0 !important; }
|
9 |
+
|
10 |
+
/*dialog headline*/
|
11 |
+
.cropThumbnailModal.ui-dialog .ui-dialog-title { font-size:13px !important; font-family:'Open Sans', sans-serif !important; margin: 0 !important; padding:0 29px 0 10px !important; line-height: 29px !important; width: 100% !important; box-sizing: border-box !important; }
|
12 |
+
.cropThumbnailModal.ui-dialog .ui-dialog-titlebar { padding:0 !important; border:0 !important; height: 29px !important; border-bottom:1px solid #DFDFDF !important; border-radius: 0 !important; }
|
13 |
+
.cropThumbnailModal.ui-dialog .ui-button.ui-dialog-titlebar-close { width: 29px !important; height: 29px !important; margin: 0 !important; top:0 !important; right:0 !important; }
|
14 |
+
.cropThumbnailModal.ui-dialog .ui-button.ui-dialog-titlebar-close:before { line-height: 29px !important; }
|
15 |
+
.cropThumbnailModal.ui-dialog .ui-dialog-titlebar-close span { display: none !important; }
|
16 |
+
|
17 |
+
/*dialog content*/
|
18 |
+
.cropThumbnailModal.ui-dialog .ui-dialog-content { padding:0 !important; overflow: hidden !important; }
|
19 |
+
.cropThumbnailModal.ui-dialog .ui-dialog-content iframe { width:100% !important; height: 100% !important; }
|
functions/backendpreparer.php
CHANGED
@@ -1,265 +1,265 @@
|
|
1 |
-
<?php
|
2 |
-
class CropPostThumbnailsBackendPreparer {
|
3 |
-
|
4 |
-
private $allowedMime = array('image/jpeg','image/png');
|
5 |
-
|
6 |
-
function __construct() {
|
7 |
-
if ( is_admin() ) {
|
8 |
-
//add style and javascript
|
9 |
-
add_action( 'admin_print_styles', array(&$this, 'adminHeaderCSS') );
|
10 |
-
add_action( 'admin_print_scripts', array(&$this, 'adminHeaderJS') );
|
11 |
-
|
12 |
-
add_filter( 'attachment_fields_to_edit', array($this,'add_button_to_attachment_edit_view'), 10, 2 );
|
13 |
-
}
|
14 |
-
}
|
15 |
-
/**
|
16 |
-
* For adding the "thickbox"-style in the mediathek
|
17 |
-
*/
|
18 |
-
function adminHeaderCSS() {
|
19 |
-
global $pagenow;
|
20 |
-
if ( $pagenow == 'post.php'
|
21 |
-
|| $pagenow == 'post-new.php'
|
22 |
-
|| $pagenow == 'page.php'
|
23 |
-
|| $pagenow == 'page-new.php'
|
24 |
-
|| $pagenow == 'upload.php') {
|
25 |
-
wp_enqueue_style("wp-jquery-ui-dialog");
|
26 |
-
wp_enqueue_style('crop-thumbnails-options-style',plugins_url('css/options.css',dirname(__FILE__)));
|
27 |
-
}
|
28 |
-
}
|
29 |
-
|
30 |
-
/**
|
31 |
-
* For adding the "crop-thumbnail"-link on posts, pages and the mediathek
|
32 |
-
*/
|
33 |
-
function adminHeaderJS() {
|
34 |
-
global $pagenow;
|
35 |
-
if ( $pagenow == 'post.php'
|
36 |
-
|| $pagenow == 'post-new.php'
|
37 |
-
|| $pagenow == 'page.php'
|
38 |
-
|| $pagenow == 'page-new.php'
|
39 |
-
|| $pagenow == 'upload.php') {
|
40 |
-
|
41 |
-
wp_enqueue_script('jquery-ui-dialog');
|
42 |
-
add_action('admin_footer',array($this,'addLinksToAdmin'));
|
43 |
-
}
|
44 |
-
}
|
45 |
-
|
46 |
-
/**
|
47 |
-
* adds the links into post-types and the media-library
|
48 |
-
*/
|
49 |
-
function addLinksToAdmin() {
|
50 |
-
|
51 |
-
?>
|
52 |
-
<script type="text/javascript">
|
53 |
-
jQuery(document).ready(function($) {
|
54 |
-
/**
|
55 |
-
* Provide a global accessable cache-break-function (only available on backend-pages where crop-thumbnail is active --> post-editor, mediathek)
|
56 |
-
* Calling this function will add a timestamp on the provided Image-Element.
|
57 |
-
* ATTENTION: using this will also delete all other parameters on the images src-attribute.
|
58 |
-
* @param {dom-element / jquery-selection} elem
|
59 |
-
*/
|
60 |
-
CROP_THUMBNAILS_DO_CACHE_BREAK = function(elem) {
|
61 |
-
var images = $(elem);
|
62 |
-
for(var i = 0; i<images.length; i++) {
|
63 |
-
var img = $(images[i]);//select image
|
64 |
-
var imageUrl = img.attr('src');
|
65 |
-
var imageUrlArray = imageUrl.split("?");
|
66 |
-
|
67 |
-
img.attr('src',imageUrlArray[0]+'?&cacheBreak='+(new Date()).getTime());
|
68 |
-
}
|
69 |
-
};
|
70 |
-
|
71 |
-
/** add link on posts and pages **/
|
72 |
-
if ($('body.post-php, body.page-php, body.page-new.php, body.post-new-php').length > 0) {
|
73 |
-
var post_id_hidden = $('form#post #post_ID');
|
74 |
-
if (post_id_hidden) {
|
75 |
-
|
76 |
-
post_id_hidden = parseInt(post_id_hidden.val());
|
77 |
-
|
78 |
-
/**
|
79 |
-
* add link on top of editor *
|
80 |
-
*/
|
81 |
-
var buttonContent = '';
|
82 |
-
buttonContent+= '<a ';
|
83 |
-
buttonContent+= 'class="button cropThumbnailBox" href="#" data-cropthumbnail=\'{"post_id":'+ post_id_hidden +'}\' ';
|
84 |
-
buttonContent+= 'title="<?php esc_attr_e('Crop Thumbnails',CROP_THUMBS_LANG) ?>"';
|
85 |
-
buttonContent+= '>';
|
86 |
-
buttonContent+= '<span class="dashicons dashicons-image-crop" style="color:#82878C;font-size: 14px;vertical-align: middle;"></span>';
|
87 |
-
buttonContent+= '<?php esc_html_e('Crop Thumbnails',CROP_THUMBS_LANG); ?>';
|
88 |
-
buttonContent+= '</a>';
|
89 |
-
$('#wp-content-media-buttons').append(buttonContent);
|
90 |
-
|
91 |
-
|
92 |
-
/**
|
93 |
-
* add link to featured image box *
|
94 |
-
*/
|
95 |
-
buttonContent = '';
|
96 |
-
buttonContent+= '<a ';
|
97 |
-
buttonContent+= 'class="button cropThumbnailBox" href="#" data-cropthumbnail=\'{"image_by_post_id":'+ post_id_hidden +',"viewmode":"single"}\' ';
|
98 |
-
buttonContent+= 'title="<?php esc_attr_e('Crop Featured Image',CROP_THUMBS_LANG) ?>"';
|
99 |
-
buttonContent+= '>';
|
100 |
-
buttonContent+= '<span class="dashicons dashicons-image-crop" style="color:#82878C;font-size: 14px;vertical-align: middle;"></span>';
|
101 |
-
buttonContent+= '<?php esc_html_e('Crop Featured Image',CROP_THUMBS_LANG); ?>';
|
102 |
-
buttonContent+= '</a>';
|
103 |
-
|
104 |
-
|
105 |
-
var featuredImageLink = $(buttonContent).css({'margin':'5px', 'padding':'5px','display':'inline-block','line-height':'1.2'});
|
106 |
-
$('#postimagediv .inside').after(featuredImageLink);
|
107 |
-
|
108 |
-
|
109 |
-
$('body').on('cropThumbnailModalClosed',function() {
|
110 |
-
//lets cache-break the crop-thumbnail-preview-box
|
111 |
-
CROP_THUMBNAILS_DO_CACHE_BREAK($('#postimagediv img'));
|
112 |
-
});
|
113 |
-
}
|
114 |
-
}
|
115 |
-
|
116 |
-
/** add link on mediathek **/
|
117 |
-
if ($('body.upload-php').length > 0) {
|
118 |
-
$('#the-list tr').each(function() {
|
119 |
-
if ($(this).find('td span.media-icon').hasClass('image-icon')) {
|
120 |
-
var post_id = parseInt($(this).attr('id').substr(5));
|
121 |
-
var last_span = $(this).find('.column-title .row-actions span:last-child');
|
122 |
-
last_span.append(' | ');
|
123 |
-
|
124 |
-
var buttonContent = '';
|
125 |
-
buttonContent+= '<a ';
|
126 |
-
buttonContent+= 'class="cropThumbnailBox" href="#" data-cropthumbnail=\'{"image_id":'+ post_id +',"viewmode":"single"}\' ';
|
127 |
-
buttonContent+= 'title="<?php esc_attr_e('Crop
|
128 |
-
buttonContent+= '>';
|
129 |
-
buttonContent+= '<span class="dashicons dashicons-image-crop" style="color:#82878C;font-size: 14px;vertical-align: middle;"></span>';
|
130 |
-
buttonContent+= '<?php esc_html_e('Crop
|
131 |
-
buttonContent+= '</a>';
|
132 |
-
|
133 |
-
|
134 |
-
last_span.parent().append( buttonContent);
|
135 |
-
}
|
136 |
-
});
|
137 |
-
$('body').on('cropThumbnailModalClosed',function() {
|
138 |
-
//lets cache-break the crop-thumbnail-preview-box
|
139 |
-
CROP_THUMBNAILS_DO_CACHE_BREAK($('#the-list tr .media-icon img'));
|
140 |
-
});
|
141 |
-
}
|
142 |
-
|
143 |
-
/**
|
144 |
-
* Create Listener for click-events with element-class ".cropThumbnailBox".
|
145 |
-
* Open the modal box.
|
146 |
-
*/
|
147 |
-
$(document).on('click', '.cropThumbnailBox', function(e) {
|
148 |
-
e.preventDefault();
|
149 |
-
|
150 |
-
<?php
|
151 |
-
/*****************************************************************************/
|
152 |
-
/**
|
153 |
-
* Theme-Developers can adjust the size of the modal-dialog via filter.
|
154 |
-
*/
|
155 |
-
$modal_window_settings = array(
|
156 |
-
'limitToWidth' => 800, //thats the maximum width the modal can be. On small screens it will be smaller (see offsets), set to FALSE if you want no limit
|
157 |
-
'maxWidthOffset' => 50, //window-width minus "width_offset" equals modal-width
|
158 |
-
'maxHeightOffset' => 100, //window-width minus "height_offset" equals modal-height
|
159 |
-
);
|
160 |
-
$modal_window_settings = apply_filters('crop_thumbnails_modal_window_settings',$modal_window_settings);
|
161 |
-
|
162 |
-
$jsLimitOutput = '';
|
163 |
-
if($modal_window_settings['limitToWidth']!==false) {
|
164 |
-
$value = abs(intval($modal_window_settings['limitToWidth']));
|
165 |
-
|
166 |
-
$jsLimitOutput.= 'if(boxViewportWidth>'.$value.') { boxViewportWidth = '.$value.'; }';
|
167 |
-
}
|
168 |
-
/*****************************************************************************/
|
169 |
-
?>
|
170 |
-
|
171 |
-
//modal-box dimensions (will not adjust on viewport change)
|
172 |
-
var boxViewportHeight = $(window).height() - <?php echo abs(intval($modal_window_settings['maxHeightOffset'])); ?>;
|
173 |
-
var boxViewportWidth = window.outerWidth - <?php echo abs(intval($modal_window_settings['maxWidthOffset'])); ?>;
|
174 |
-
|
175 |
-
<?php echo $jsLimitOutput; ?>
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
//get the data from the link
|
180 |
-
var data = $(this).data('cropthumbnail');
|
181 |
-
|
182 |
-
//construct the thickbox-parameter
|
183 |
-
var url = ajaxurl+'?action=croppostthumb_ajax';
|
184 |
-
for(var v in data) {
|
185 |
-
url+='&'+v+'='+data[v];
|
186 |
-
}
|
187 |
-
|
188 |
-
var content = $('<div><iframe src="'+url+'"></iframe></div>');
|
189 |
-
var overlay;
|
190 |
-
var isModalClassInitialSet = $('body').hasClass('modal-open');
|
191 |
-
content.dialog({
|
192 |
-
dialogClass : 'cropThumbnailModal',
|
193 |
-
modal : true,
|
194 |
-
title : $(this).attr('title'),
|
195 |
-
resizable : false,
|
196 |
-
draggable : false,
|
197 |
-
autoOpen : false,
|
198 |
-
closeOnEscape : true,
|
199 |
-
height : boxViewportHeight,
|
200 |
-
width : boxViewportWidth,
|
201 |
-
close : function(event, ui ) {
|
202 |
-
if(overlay!==undefined) {
|
203 |
-
overlay.unbind('click');
|
204 |
-
}
|
205 |
-
|
206 |
-
//remove modal-open class (disable the scrollbars)
|
207 |
-
if(!isModalClassInitialSet) {
|
208 |
-
$('body').removeClass('modal-open');
|
209 |
-
}
|
210 |
-
$(this).dialog('destroy');
|
211 |
-
|
212 |
-
/**
|
213 |
-
* We will trigger that the modal of the crop thumbnail is closed.
|
214 |
-
* So everyone that is up to, could build a cache-breaker on their images.
|
215 |
-
* HOW-TO cache-break:
|
216 |
-
* $('body').on('cropThumbnailModalClosed',function() {
|
217 |
-
* CROP_THUMBNAILS_DO_CACHE_BREAK( $('.your-image-selector') );
|
218 |
-
* });
|
219 |
-
*/
|
220 |
-
$('body').trigger('cropThumbnailModalClosed');
|
221 |
-
},
|
222 |
-
open : function(event, ui) {
|
223 |
-
overlay = $('.ui-widget-overlay.ui-front');
|
224 |
-
overlay.addClass('cropThumbnailModalOverlay');
|
225 |
-
overlay.click(function() {
|
226 |
-
content.dialog('close');
|
227 |
-
});
|
228 |
-
|
229 |
-
//add body class (disable the scrollbars)
|
230 |
-
$('body').addClass('modal-open');
|
231 |
-
}
|
232 |
-
})
|
233 |
-
.dialog('open');
|
234 |
-
});
|
235 |
-
});
|
236 |
-
</script>
|
237 |
-
<?php
|
238 |
-
}
|
239 |
-
|
240 |
-
/**
|
241 |
-
* Add an field to the attachment edit dialog
|
242 |
-
* @see http://code.tutsplus.com/tutorials/creating-custom-fields-for-attachments-in-wordpress--net-13076
|
243 |
-
* @see https://make.wordpress.org/core/2012/12/12/attachment-editing-now-with-full-post-edit-ui/
|
244 |
-
* @param array $form_fields
|
245 |
-
* @param object $post
|
246 |
-
*/
|
247 |
-
public function add_button_to_attachment_edit_view( $form_fields, $post ) {
|
248 |
-
|
249 |
-
if(in_array($post->post_mime_type,$this->allowedMime)) {
|
250 |
-
$html = '';
|
251 |
-
$html.= '<a class="button cropThumbnailBox" href="#" data-cropthumbnail=\'{"image_id":'.$post->ID.',"viewmode":"single"}\' ';
|
252 |
-
$html.= 'title="'.esc_attr__('Crop
|
253 |
-
$html.= '<span class="dashicons dashicons-image-crop" style="color:#82878C;font-size: 14px;vertical-align: middle;"></span>'.esc_html__('Crop
|
254 |
-
$html.= '</a>';
|
255 |
-
|
256 |
-
$form_fields['cropthumbnails'] = array(
|
257 |
-
'label' => '
|
258 |
-
'input' => 'html',
|
259 |
-
'html' => $html
|
260 |
-
);
|
261 |
-
}
|
262 |
-
return $form_fields;
|
263 |
-
}
|
264 |
-
}
|
265 |
-
$cpt_postView = new CropPostThumbnailsBackendPreparer();
|
1 |
+
<?php
|
2 |
+
class CropPostThumbnailsBackendPreparer {
|
3 |
+
|
4 |
+
private $allowedMime = array('image/jpeg','image/png');
|
5 |
+
|
6 |
+
function __construct() {
|
7 |
+
if ( is_admin() ) {
|
8 |
+
//add style and javascript
|
9 |
+
add_action( 'admin_print_styles', array(&$this, 'adminHeaderCSS') );
|
10 |
+
add_action( 'admin_print_scripts', array(&$this, 'adminHeaderJS') );
|
11 |
+
|
12 |
+
add_filter( 'attachment_fields_to_edit', array($this,'add_button_to_attachment_edit_view'), 10, 2 );
|
13 |
+
}
|
14 |
+
}
|
15 |
+
/**
|
16 |
+
* For adding the "thickbox"-style in the mediathek
|
17 |
+
*/
|
18 |
+
function adminHeaderCSS() {
|
19 |
+
global $pagenow;
|
20 |
+
if ( $pagenow == 'post.php'
|
21 |
+
|| $pagenow == 'post-new.php'
|
22 |
+
|| $pagenow == 'page.php'
|
23 |
+
|| $pagenow == 'page-new.php'
|
24 |
+
|| $pagenow == 'upload.php') {
|
25 |
+
wp_enqueue_style("wp-jquery-ui-dialog");
|
26 |
+
wp_enqueue_style('crop-thumbnails-options-style',plugins_url('css/options.css',dirname(__FILE__)));
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* For adding the "crop-thumbnail"-link on posts, pages and the mediathek
|
32 |
+
*/
|
33 |
+
function adminHeaderJS() {
|
34 |
+
global $pagenow;
|
35 |
+
if ( $pagenow == 'post.php'
|
36 |
+
|| $pagenow == 'post-new.php'
|
37 |
+
|| $pagenow == 'page.php'
|
38 |
+
|| $pagenow == 'page-new.php'
|
39 |
+
|| $pagenow == 'upload.php') {
|
40 |
+
|
41 |
+
wp_enqueue_script('jquery-ui-dialog');
|
42 |
+
add_action('admin_footer',array($this,'addLinksToAdmin'));
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* adds the links into post-types and the media-library
|
48 |
+
*/
|
49 |
+
function addLinksToAdmin() {
|
50 |
+
|
51 |
+
?>
|
52 |
+
<script type="text/javascript">
|
53 |
+
jQuery(document).ready(function($) {
|
54 |
+
/**
|
55 |
+
* Provide a global accessable cache-break-function (only available on backend-pages where crop-thumbnail is active --> post-editor, mediathek)
|
56 |
+
* Calling this function will add a timestamp on the provided Image-Element.
|
57 |
+
* ATTENTION: using this will also delete all other parameters on the images src-attribute.
|
58 |
+
* @param {dom-element / jquery-selection} elem
|
59 |
+
*/
|
60 |
+
CROP_THUMBNAILS_DO_CACHE_BREAK = function(elem) {
|
61 |
+
var images = $(elem);
|
62 |
+
for(var i = 0; i<images.length; i++) {
|
63 |
+
var img = $(images[i]);//select image
|
64 |
+
var imageUrl = img.attr('src');
|
65 |
+
var imageUrlArray = imageUrl.split("?");
|
66 |
+
|
67 |
+
img.attr('src',imageUrlArray[0]+'?&cacheBreak='+(new Date()).getTime());
|
68 |
+
}
|
69 |
+
};
|
70 |
+
|
71 |
+
/** add link on posts and pages **/
|
72 |
+
if ($('body.post-php, body.page-php, body.page-new.php, body.post-new-php').length > 0) {
|
73 |
+
var post_id_hidden = $('form#post #post_ID');
|
74 |
+
if (post_id_hidden) {
|
75 |
+
|
76 |
+
post_id_hidden = parseInt(post_id_hidden.val());
|
77 |
+
|
78 |
+
/**
|
79 |
+
* add link on top of editor *
|
80 |
+
*/
|
81 |
+
var buttonContent = '';
|
82 |
+
buttonContent+= '<a ';
|
83 |
+
buttonContent+= 'class="button cropThumbnailBox" href="#" data-cropthumbnail=\'{"post_id":'+ post_id_hidden +'}\' ';
|
84 |
+
buttonContent+= 'title="<?php esc_attr_e('Crop Thumbnails',CROP_THUMBS_LANG) ?>"';
|
85 |
+
buttonContent+= '>';
|
86 |
+
buttonContent+= '<span class="dashicons dashicons-image-crop" style="color:#82878C;font-size: 14px;vertical-align: middle;"></span>';
|
87 |
+
buttonContent+= '<?php esc_html_e('Crop Thumbnails',CROP_THUMBS_LANG); ?>';
|
88 |
+
buttonContent+= '</a>';
|
89 |
+
$('#wp-content-media-buttons').append(buttonContent);
|
90 |
+
|
91 |
+
|
92 |
+
/**
|
93 |
+
* add link to featured image box *
|
94 |
+
*/
|
95 |
+
buttonContent = '';
|
96 |
+
buttonContent+= '<a ';
|
97 |
+
buttonContent+= 'class="button cropThumbnailBox" href="#" data-cropthumbnail=\'{"image_by_post_id":'+ post_id_hidden +',"viewmode":"single"}\' ';
|
98 |
+
buttonContent+= 'title="<?php esc_attr_e('Crop Featured Image',CROP_THUMBS_LANG) ?>"';
|
99 |
+
buttonContent+= '>';
|
100 |
+
buttonContent+= '<span class="dashicons dashicons-image-crop" style="color:#82878C;font-size: 14px;vertical-align: middle;"></span>';
|
101 |
+
buttonContent+= '<?php esc_html_e('Crop Featured Image',CROP_THUMBS_LANG); ?>';
|
102 |
+
buttonContent+= '</a>';
|
103 |
+
|
104 |
+
|
105 |
+
var featuredImageLink = $(buttonContent).css({'margin':'5px', 'padding':'5px','display':'inline-block','line-height':'1.2'});
|
106 |
+
$('#postimagediv .inside').after(featuredImageLink);
|
107 |
+
|
108 |
+
|
109 |
+
$('body').on('cropThumbnailModalClosed',function() {
|
110 |
+
//lets cache-break the crop-thumbnail-preview-box
|
111 |
+
CROP_THUMBNAILS_DO_CACHE_BREAK($('#postimagediv img'));
|
112 |
+
});
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
+
/** add link on mediathek **/
|
117 |
+
if ($('body.upload-php').length > 0) {
|
118 |
+
$('#the-list tr').each(function() {
|
119 |
+
if ($(this).find('td span.media-icon').hasClass('image-icon')) {
|
120 |
+
var post_id = parseInt($(this).attr('id').substr(5));
|
121 |
+
var last_span = $(this).find('.column-title .row-actions span:last-child');
|
122 |
+
last_span.append(' | ');
|
123 |
+
|
124 |
+
var buttonContent = '';
|
125 |
+
buttonContent+= '<a ';
|
126 |
+
buttonContent+= 'class="cropThumbnailBox" href="#" data-cropthumbnail=\'{"image_id":'+ post_id +',"viewmode":"single"}\' ';
|
127 |
+
buttonContent+= 'title="<?php esc_attr_e('Crop Featured Image',CROP_THUMBS_LANG) ?>"';
|
128 |
+
buttonContent+= '>';
|
129 |
+
buttonContent+= '<span class="dashicons dashicons-image-crop" style="color:#82878C;font-size: 14px;vertical-align: middle;"></span>';
|
130 |
+
buttonContent+= '<?php esc_html_e('Crop Featured Image',CROP_THUMBS_LANG); ?>';
|
131 |
+
buttonContent+= '</a>';
|
132 |
+
|
133 |
+
|
134 |
+
last_span.parent().append( buttonContent);
|
135 |
+
}
|
136 |
+
});
|
137 |
+
$('body').on('cropThumbnailModalClosed',function() {
|
138 |
+
//lets cache-break the crop-thumbnail-preview-box
|
139 |
+
CROP_THUMBNAILS_DO_CACHE_BREAK($('#the-list tr .media-icon img'));
|
140 |
+
});
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* Create Listener for click-events with element-class ".cropThumbnailBox".
|
145 |
+
* Open the modal box.
|
146 |
+
*/
|
147 |
+
$(document).on('click', '.cropThumbnailBox', function(e) {
|
148 |
+
e.preventDefault();
|
149 |
+
|
150 |
+
<?php
|
151 |
+
/*****************************************************************************/
|
152 |
+
/**
|
153 |
+
* Theme-Developers can adjust the size of the modal-dialog via filter.
|
154 |
+
*/
|
155 |
+
$modal_window_settings = array(
|
156 |
+
'limitToWidth' => 800, //thats the maximum width the modal can be. On small screens it will be smaller (see offsets), set to FALSE if you want no limit
|
157 |
+
'maxWidthOffset' => 50, //window-width minus "width_offset" equals modal-width
|
158 |
+
'maxHeightOffset' => 100, //window-width minus "height_offset" equals modal-height
|
159 |
+
);
|
160 |
+
$modal_window_settings = apply_filters('crop_thumbnails_modal_window_settings',$modal_window_settings);
|
161 |
+
|
162 |
+
$jsLimitOutput = '';
|
163 |
+
if($modal_window_settings['limitToWidth']!==false) {
|
164 |
+
$value = abs(intval($modal_window_settings['limitToWidth']));
|
165 |
+
|
166 |
+
$jsLimitOutput.= 'if(boxViewportWidth>'.$value.') { boxViewportWidth = '.$value.'; }';
|
167 |
+
}
|
168 |
+
/*****************************************************************************/
|
169 |
+
?>
|
170 |
+
|
171 |
+
//modal-box dimensions (will not adjust on viewport change)
|
172 |
+
var boxViewportHeight = $(window).height() - <?php echo abs(intval($modal_window_settings['maxHeightOffset'])); ?>;
|
173 |
+
var boxViewportWidth = window.outerWidth - <?php echo abs(intval($modal_window_settings['maxWidthOffset'])); ?>;
|
174 |
+
|
175 |
+
<?php echo $jsLimitOutput; ?>
|
176 |
+
|
177 |
+
|
178 |
+
|
179 |
+
//get the data from the link
|
180 |
+
var data = $(this).data('cropthumbnail');
|
181 |
+
|
182 |
+
//construct the thickbox-parameter
|
183 |
+
var url = ajaxurl+'?action=croppostthumb_ajax';
|
184 |
+
for(var v in data) {
|
185 |
+
url+='&'+v+'='+data[v];
|
186 |
+
}
|
187 |
+
|
188 |
+
var content = $('<div><iframe src="'+url+'"></iframe></div>');
|
189 |
+
var overlay;
|
190 |
+
var isModalClassInitialSet = $('body').hasClass('modal-open');
|
191 |
+
content.dialog({
|
192 |
+
dialogClass : 'cropThumbnailModal',
|
193 |
+
modal : true,
|
194 |
+
title : $(this).attr('title'),
|
195 |
+
resizable : false,
|
196 |
+
draggable : false,
|
197 |
+
autoOpen : false,
|
198 |
+
closeOnEscape : true,
|
199 |
+
height : boxViewportHeight,
|
200 |
+
width : boxViewportWidth,
|
201 |
+
close : function(event, ui ) {
|
202 |
+
if(overlay!==undefined) {
|
203 |
+
overlay.unbind('click');
|
204 |
+
}
|
205 |
+
|
206 |
+
//remove modal-open class (disable the scrollbars)
|
207 |
+
if(!isModalClassInitialSet) {
|
208 |
+
$('body').removeClass('modal-open');
|
209 |
+
}
|
210 |
+
$(this).dialog('destroy');
|
211 |
+
|
212 |
+
/**
|
213 |
+
* We will trigger that the modal of the crop thumbnail is closed.
|
214 |
+
* So everyone that is up to, could build a cache-breaker on their images.
|
215 |
+
* HOW-TO cache-break:
|
216 |
+
* $('body').on('cropThumbnailModalClosed',function() {
|
217 |
+
* CROP_THUMBNAILS_DO_CACHE_BREAK( $('.your-image-selector') );
|
218 |
+
* });
|
219 |
+
*/
|
220 |
+
$('body').trigger('cropThumbnailModalClosed');
|
221 |
+
},
|
222 |
+
open : function(event, ui) {
|
223 |
+
overlay = $('.ui-widget-overlay.ui-front');
|
224 |
+
overlay.addClass('cropThumbnailModalOverlay');
|
225 |
+
overlay.click(function() {
|
226 |
+
content.dialog('close');
|
227 |
+
});
|
228 |
+
|
229 |
+
//add body class (disable the scrollbars)
|
230 |
+
$('body').addClass('modal-open');
|
231 |
+
}
|
232 |
+
})
|
233 |
+
.dialog('open');
|
234 |
+
});
|
235 |
+
});
|
236 |
+
</script>
|
237 |
+
<?php
|
238 |
+
}
|
239 |
+
|
240 |
+
/**
|
241 |
+
* Add an field to the attachment edit dialog
|
242 |
+
* @see http://code.tutsplus.com/tutorials/creating-custom-fields-for-attachments-in-wordpress--net-13076
|
243 |
+
* @see https://make.wordpress.org/core/2012/12/12/attachment-editing-now-with-full-post-edit-ui/
|
244 |
+
* @param array $form_fields
|
245 |
+
* @param object $post
|
246 |
+
*/
|
247 |
+
public function add_button_to_attachment_edit_view( $form_fields, $post ) {
|
248 |
+
|
249 |
+
if(in_array($post->post_mime_type,$this->allowedMime)) {
|
250 |
+
$html = '';
|
251 |
+
$html.= '<a class="button cropThumbnailBox" href="#" data-cropthumbnail=\'{"image_id":'.$post->ID.',"viewmode":"single"}\' ';
|
252 |
+
$html.= 'title="'.esc_attr__('Crop Featured Image',CROP_THUMBS_LANG).'">';
|
253 |
+
$html.= '<span class="dashicons dashicons-image-crop" style="color:#82878C;font-size: 14px;vertical-align: middle;"></span>'.esc_html__('Crop Featured Image',CROP_THUMBS_LANG);
|
254 |
+
$html.= '</a>';
|
255 |
+
|
256 |
+
$form_fields['cropthumbnails'] = array(
|
257 |
+
'label' => ' ',
|
258 |
+
'input' => 'html',
|
259 |
+
'html' => $html
|
260 |
+
);
|
261 |
+
}
|
262 |
+
return $form_fields;
|
263 |
+
}
|
264 |
+
}
|
265 |
+
$cpt_postView = new CropPostThumbnailsBackendPreparer();
|
functions/editor.php
CHANGED
@@ -1,466 +1,476 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Contains all code inside the croping-window
|
5 |
-
*/
|
6 |
-
class CropPostThumbnailsEditor {
|
7 |
-
|
8 |
-
private $debugOutput = '';
|
9 |
-
|
10 |
-
private $allowedMime = array('image/jpeg','image/png');
|
11 |
-
|
12 |
-
function __construct() {
|
13 |
-
/* for the html inside the thickbox */
|
14 |
-
add_action('wp_ajax_croppostthumb_ajax', array($this,'ajaxWindow'));
|
15 |
-
}
|
16 |
-
|
17 |
-
|
18 |
-
/**
|
19 |
-
* this function is called for/from the thickbox - returns ordanary html
|
20 |
-
*/
|
21 |
-
function ajaxWindow() {
|
22 |
-
$this->cleanWPHead();
|
23 |
-
$failure_msg = '';
|
24 |
-
if(!$this->isUserPermitted()) {
|
25 |
-
$failure_msg = __('You are not allowed to do this.',CROP_THUMBS_LANG);
|
26 |
-
} else {
|
27 |
-
switch(true) {
|
28 |
-
case isset($_REQUEST['post_id'])://full programm
|
29 |
-
$this->listImages();
|
30 |
-
break;
|
31 |
-
case isset($_REQUEST['image_id'])://only one image
|
32 |
-
$this->byImageId();
|
33 |
-
break;
|
34 |
-
case isset($_REQUEST['image_by_post_id'])://only one image
|
35 |
-
$id = get_post_thumbnail_id(intval($_REQUEST['image_by_post_id']));
|
36 |
-
if(!empty($id)) {
|
37 |
-
$_REQUEST['image_id'] = $id;
|
38 |
-
$_REQUEST['parent_post_id'] = intval($_REQUEST['image_by_post_id']);
|
39 |
-
$this->byImageId();
|
40 |
-
} else {
|
41 |
-
$failure_msg = '<div class="listEmptyMsg">'.__('No featured image set for this post until now.',CROP_THUMBS_LANG).'</div>';
|
42 |
-
}
|
43 |
-
break;
|
44 |
-
default:
|
45 |
-
$failure_msg = __('An error occurred!',CROP_THUMBS_LANG);
|
46 |
-
break;
|
47 |
-
}
|
48 |
-
}
|
49 |
-
|
50 |
-
if(!empty($failure_msg)) {
|
51 |
-
$windowCssPath = apply_filters('crop_post_thumbnail_window_css', plugins_url('css/cpt-window.css',dirname(__FILE__)));
|
52 |
-
wp_enqueue_style( 'cpt-window',$windowCssPath,array('wp-admin'),CROP_THUMBS_VERSION);
|
53 |
-
$cptContent = $failure_msg;
|
54 |
-
include_once( dirname(__FILE__).'/../html/template.php' );
|
55 |
-
}
|
56 |
-
die();//to prevent to send back a "0"
|
57 |
-
}
|
58 |
-
|
59 |
-
/**
|
60 |
-
* Display a list of images that are attached to this post_id.
|
61 |
-
* Hightlight the post-thumbnail (if it is attached to this post_id)
|
62 |
-
*/
|
63 |
-
function listImages() {
|
64 |
-
global $cptSettings;
|
65 |
-
$options = $cptSettings->getOptions();
|
66 |
-
|
67 |
-
$data = $this->loadPostIdData(intval($_REQUEST['post_id']));
|
68 |
-
|
69 |
-
$parent_post_type = '';
|
70 |
-
$_tmp_post = get_post(intval($_REQUEST['post_id']));
|
71 |
-
if(!empty($_tmp_post)) {
|
72 |
-
$parent_post_type = $_tmp_post->post_type;
|
73 |
-
}
|
74 |
-
|
75 |
-
$cptContent = '';
|
76 |
-
|
77 |
-
if($this->shouldBeHiddenOnPostType($options,$parent_post_type)) {
|
78 |
-
$cptContent = '<div class="postTypeDisabledMsg">'.__('Cropping is disabled for this post-type.',CROP_THUMBS_LANG).'</div>';
|
79 |
-
} elseif($data==false) {
|
80 |
-
$cptContent = '<div class="listEmptyMsg">'.__('No images attached to this post yet. Please upload some via the upload dialog.',CROP_THUMBS_LANG).'</div>';
|
81 |
-
} else {
|
82 |
-
//the dynamic javascript
|
83 |
-
ob_start(); ?>
|
84 |
-
<script>
|
85 |
-
jQuery(document).ready(function($) {
|
86 |
-
$('.image-list .entry').click(function() {
|
87 |
-
var image_id = $(this).attr('rel');
|
88 |
-
var parent_post_id = <?php echo intval($_REQUEST['post_id']); ?>;
|
89 |
-
document.location.href = ajaxurl+"?action=croppostthumb_ajax&image_id="+image_id+"&parent_post_id="+parent_post_id;
|
90 |
-
return;
|
91 |
-
});
|
92 |
-
});
|
93 |
-
</script>
|
94 |
-
<?php
|
95 |
-
$cptScript = ob_get_clean();
|
96 |
-
//END the javascript
|
97 |
-
|
98 |
-
|
99 |
-
//the content
|
100 |
-
ob_start();?>
|
101 |
-
<div class="header"><strong><?php _e('Choose the image you want to crop.',CROP_THUMBS_LANG); ?></strong></div>
|
102 |
-
<ul class="image-list">
|
103 |
-
<?php
|
104 |
-
$counter = 1;
|
105 |
-
foreach($data as $key=>$image) : ?>
|
106 |
-
<li class="entry cursor<?php echo (isset($image->is_post_thumbnail) ? ' post-thumbnail' : ''); ?>" rel="<?php echo $image->ID;?>">
|
107 |
-
<h3><?php echo (isset($image->is_post_thumbnail) ? __('Post Thumbnail',CROP_THUMBS_LANG) : sprintf(__('Image %d',CROP_THUMBS_LANG),$counter));?></h3>
|
108 |
-
<?php $img_data = wp_get_attachment_image_src($image->ID, 'thumbnail');?>
|
109 |
-
<img src="<?php echo $img_data[0].'?'.time(); ?>" />
|
110 |
-
</li>
|
111 |
-
<?php
|
112 |
-
$counter++;
|
113 |
-
endforeach; ?>
|
114 |
-
</ul>
|
115 |
-
<?php
|
116 |
-
$cptContent = ob_get_clean();
|
117 |
-
//END the content
|
118 |
-
}
|
119 |
-
wp_enqueue_script( 'jquery' );
|
120 |
-
|
121 |
-
$windowCssPath = apply_filters('crop_post_thumbnail_window_css', plugins_url('css/cpt-window.css',dirname(__FILE__)));
|
122 |
-
wp_enqueue_style( 'cpt-window',$windowCssPath,array('wp-admin'),CROP_THUMBS_VERSION);
|
123 |
-
include_once( dirname(__FILE__).'/../html/template.php' );
|
124 |
-
return true;
|
125 |
-
}
|
126 |
-
|
127 |
-
|
128 |
-
/**
|
129 |
-
* Display the crop editor.
|
130 |
-
* @param $_REQUEST['image_id'] - ID of the image to show
|
131 |
-
* @param $_REQUEST['viewmode']=='single' - without the back-link
|
132 |
-
*/
|
133 |
-
function byImageId() {
|
134 |
-
global $cptSettings,$content_width;
|
135 |
-
|
136 |
-
//make sure $content_width is out of the way
|
137 |
-
$_remember_content_width = $content_width;
|
138 |
-
$content_width = null;
|
139 |
-
|
140 |
-
|
141 |
-
$options = $cptSettings->getOptions();
|
142 |
-
$this->addDebug('options', print_r($options,true));
|
143 |
-
$image_obj = get_post(intval($_REQUEST['image_id']));
|
144 |
-
|
145 |
-
//$post_id_attached holds the id of the post the image is attached to - can be null/empty
|
146 |
-
$post_id_attached = -1;
|
147 |
-
if(!empty($image_obj->post_parent)) {
|
148 |
-
$post_id_attached=$image_obj->post_parent;
|
149 |
-
}
|
150 |
-
|
151 |
-
//$current_parent_post_type
|
152 |
-
$current_parent_post_type = '';
|
153 |
-
$current_parent_post_id = -1;
|
154 |
-
|
155 |
-
if(!empty($_REQUEST['parent_post_id'])) {
|
156 |
-
$_tmp = get_post(intval($_REQUEST['parent_post_id']));
|
157 |
-
if(!empty($_tmp)) {
|
158 |
-
$current_parent_post_type = $_tmp->post_type;
|
159 |
-
$current_parent_post_id = $_tmp->ID;
|
160 |
-
}
|
161 |
-
}
|
162 |
-
|
163 |
-
$all_image_sizes = $cptSettings->getImageSizes();
|
164 |
-
$this->addDebug('all_image_sizes', print_r($all_image_sizes,true));
|
165 |
-
|
166 |
-
$orig_img = wp_get_attachment_image_src($image_obj->ID, 'full');
|
167 |
-
$orig_img['gcd'] = $this->gcd($orig_img[1],$orig_img[2]);
|
168 |
-
$orig_img['ratio'] = ($orig_img[1]/$orig_img['gcd']) / ($orig_img[2]/$orig_img['gcd']);
|
169 |
-
$orig_img['print_ratio'] = ($orig_img[1]/$orig_img['gcd']).':'.($orig_img[2]/$orig_img['gcd']);
|
170 |
-
|
171 |
-
$cache_breaker = time();//a additional parameter that will be added to the image-urls to prevent the browser to show a cached image
|
172 |
-
|
173 |
-
$this->addDebug('img-postmeta',print_r(wp_get_attachment_metadata($image_obj->ID, true),true));
|
174 |
-
|
175 |
-
//the javascript
|
176 |
-
ob_start(); ?>
|
177 |
-
<script>
|
178 |
-
jQuery(document).ready(function($) {
|
179 |
-
cpt_lang = new Object();
|
180 |
-
cpt_lang['bug'] = "<?php _e('Bug--this should not have occurred.',CROP_THUMBS_LANG);?>";
|
181 |
-
cpt_lang['warningOriginalToSmall'] = "<?php _e('Warning: the original image is too small to be cropped in good quality with this thumbnail size.',CROP_THUMBS_LANG);?>";
|
182 |
-
cpt_lang['selectOne'] = "<?php _e('First, select an image. Then, click once again.',CROP_THUMBS_LANG);?>";
|
183 |
-
cpt_ajax_nonce = "<?php echo wp_create_nonce($cptSettings->getNonceBase()); ?>";
|
184 |
-
cpt_debug_js = <?php echo (!empty($options['debug_js'])) ? 'true;' : 'false;'; ?>
|
185 |
-
});
|
186 |
-
</script>
|
187 |
-
<?php
|
188 |
-
$cptScript = ob_get_clean();
|
189 |
-
//END the javascript
|
190 |
-
|
191 |
-
/**
|
192 |
-
* wether or not to show the "back button"
|
193 |
-
*/
|
194 |
-
$headline = true;
|
195 |
-
if(!empty($_REQUEST['viewmode']) && $_REQUEST['viewmode']=='single') {
|
196 |
-
$headline = false;
|
197 |
-
}
|
198 |
-
|
199 |
-
//the content
|
200 |
-
ob_start();
|
201 |
-
|
202 |
-
if($this->shouldBeHiddenOnPostType($options,$current_parent_post_type)) : ?>
|
203 |
-
<div class="cpt-crop-view">
|
204 |
-
<div class="postTypeDisabledMsg"><?php _e('Cropping is disabled for this post-type.',CROP_THUMBS_LANG); ?></div>
|
205 |
-
</div>
|
206 |
-
<?php else : ?>
|
207 |
-
|
208 |
-
<div class="cpt-crop-view">
|
209 |
-
<?php if($headline) :?><div class="header"><a class="back" href="<?php echo admin_url( 'admin-ajax.php'); ?>?action=croppostthumb_ajax&post_id=<?php echo $current_parent_post_id; ?>"><?php _e('back to image list',CROP_THUMBS_LANG); ?></a></div><?php endif; ?>
|
210 |
-
<div class="waitingWindow hidden"><?php _e('Please wait until the images are cropped.',CROP_THUMBS_LANG); ?></div>
|
211 |
-
<div class="mainWindow">
|
212 |
-
<div class="selectionArea cptLeftPane">
|
213 |
-
<h3><?php _e('Raw',CROP_THUMBS_LANG); ?>: <?php echo $orig_img[1].' '.__('pixel',CROP_THUMBS_LANG)?> x <?php echo $orig_img[2].' '.__('pixel',CROP_THUMBS_LANG) ?> (<?php echo $orig_img['print_ratio']; ?>)</h3>
|
214 |
-
<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] ?>}' />
|
215 |
-
<button id="cpt-generate" class="button"><?php _e('Save Crop',CROP_THUMBS_LANG);?></button>
|
216 |
-
<h4><?php _e('Quick Instructions',CROP_THUMBS_LANG);?></h4>
|
217 |
-
<ul class="step-info">
|
218 |
-
<li><?php _e('Step 1: Choose an image from the right.',CROP_THUMBS_LANG); ?></li>
|
219 |
-
<li><?php _e('Step 2: Use your mouse to change the size of the rectangle on the image above.',CROP_THUMBS_LANG); ?></li>
|
220 |
-
<li><?php _e('Step 3: Click on "Save Crop".',CROP_THUMBS_LANG); ?></li>
|
221 |
-
</ul>
|
222 |
-
</div>
|
223 |
-
<div class="cptRightPane">
|
224 |
-
<input type="checkbox" name="cpt-same-ratio" value="1" id="cpt-same-ratio" checked="checked" />
|
225 |
-
<label for="cpt-same-ratio" class="lbl-cpt-same-ratio"><?php _e('Crop all images with same ratio at once',CROP_THUMBS_LANG); ?></label>
|
226 |
-
<button id="cpt-deselect" class="button"><?php _e('deselect all',CROP_THUMBS_LANG); ?></button>
|
227 |
-
<ul class="thumbnail-list">
|
228 |
-
<?php
|
229 |
-
foreach($all_image_sizes as $img_size_name=>$value) :
|
230 |
-
|
231 |
-
if ($value['height'] == 9999) {
|
232 |
-
$value['height'] = 0;
|
233 |
-
}
|
234 |
-
if ($value['width'] == 9999) {
|
235 |
-
$value['width'] = 0;
|
236 |
-
}
|
237 |
-
|
238 |
-
if(!$this->shouldSizeBeHidden($options,$img_size_name,$value,$current_parent_post_type)) :
|
239 |
-
$ratio = null; //reset
|
240 |
-
$gcd = null; //reset
|
241 |
-
$print_ratio = null; //reset
|
242 |
-
$print_cropped = ''; //reset
|
243 |
-
$crop = 0; //reset
|
244 |
-
$special_warning = ''; //reset
|
245 |
-
|
246 |
-
|
247 |
-
/** define ratio **/
|
248 |
-
if($value['width'] != 0 && $value['height']!=0) {
|
249 |
-
$gcd = $this->gcd($value['width'],$value['height']);//get greatest common divisor
|
250 |
-
$ratio = ($value['width']/$gcd) / ($value['height']/$gcd);//get ratio
|
251 |
-
$print_ratio = $value['width']/$gcd.':'.$value['height']/$gcd;
|
252 |
-
} else {
|
253 |
-
//keep ratio same as original image
|
254 |
-
$gcd = $orig_img['gcd'];
|
255 |
-
$ratio = $orig_img['ratio'];
|
256 |
-
$print_ratio = $orig_img['print_ratio'];
|
257 |
-
}
|
258 |
-
|
259 |
-
|
260 |
-
if(!empty($value['crop'])) {
|
261 |
-
//cropped
|
262 |
-
$print_cropped = ' ('.__('cropped',CROP_THUMBS_LANG).')';
|
263 |
-
$crop = 1;
|
264 |
-
} else {
|
265 |
-
//not cropped
|
266 |
-
/* -- maybe use this behaviour in a later version --
|
267 |
-
$print_cropped = ' ('.__('maximum',CROP_THUMBS_LANG).')';
|
268 |
-
$print_ratio = __('free choice',CROP_THUMBS_LANG);
|
269 |
-
*/
|
270 |
-
|
271 |
-
$print_cropped = ' ('.__('maximum',CROP_THUMBS_LANG).')';
|
272 |
-
$crop = 1;
|
273 |
-
//keep ratio same as original image
|
274 |
-
$gcd = $orig_img['gcd'];
|
275 |
-
$ratio = $orig_img['ratio'];
|
276 |
-
$print_ratio = $orig_img['print_ratio'];
|
277 |
-
}
|
278 |
-
|
279 |
-
$print_dimensions = $value['width'].' '.__('pixel',CROP_THUMBS_LANG).' x '.$value['height'].' '.__('pixel',CROP_THUMBS_LANG).$print_cropped;
|
280 |
-
|
281 |
-
$img_data = wp_get_attachment_image_src($image_obj->ID, $img_size_name);
|
282 |
-
|
283 |
-
|
284 |
-
$_lowResWarning = '';
|
285 |
-
if($this->isLowRes($value,$orig_img)) {
|
286 |
-
$_lowResWarning = ' <span class="lowResWarning">'.__('Original image size too small for good crop quality!',CROP_THUMBS_LANG).'</span>';
|
287 |
-
}
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
$
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
return true;
|
332 |
-
}
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
$
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
}
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Contains all code inside the croping-window
|
5 |
+
*/
|
6 |
+
class CropPostThumbnailsEditor {
|
7 |
+
|
8 |
+
private $debugOutput = '';
|
9 |
+
|
10 |
+
private $allowedMime = array('image/jpeg','image/png');
|
11 |
+
|
12 |
+
function __construct() {
|
13 |
+
/* for the html inside the thickbox */
|
14 |
+
add_action('wp_ajax_croppostthumb_ajax', array($this,'ajaxWindow'));
|
15 |
+
}
|
16 |
+
|
17 |
+
|
18 |
+
/**
|
19 |
+
* this function is called for/from the thickbox - returns ordanary html
|
20 |
+
*/
|
21 |
+
function ajaxWindow() {
|
22 |
+
$this->cleanWPHead();
|
23 |
+
$failure_msg = '';
|
24 |
+
if(!$this->isUserPermitted()) {
|
25 |
+
$failure_msg = __('You are not allowed to do this.',CROP_THUMBS_LANG);
|
26 |
+
} else {
|
27 |
+
switch(true) {
|
28 |
+
case isset($_REQUEST['post_id'])://full programm
|
29 |
+
$this->listImages();
|
30 |
+
break;
|
31 |
+
case isset($_REQUEST['image_id'])://only one image
|
32 |
+
$this->byImageId();
|
33 |
+
break;
|
34 |
+
case isset($_REQUEST['image_by_post_id'])://only one image
|
35 |
+
$id = get_post_thumbnail_id(intval($_REQUEST['image_by_post_id']));
|
36 |
+
if(!empty($id)) {
|
37 |
+
$_REQUEST['image_id'] = $id;
|
38 |
+
$_REQUEST['parent_post_id'] = intval($_REQUEST['image_by_post_id']);
|
39 |
+
$this->byImageId();
|
40 |
+
} else {
|
41 |
+
$failure_msg = '<div class="listEmptyMsg">'.__('No featured image set for this post until now.',CROP_THUMBS_LANG).'</div>';
|
42 |
+
}
|
43 |
+
break;
|
44 |
+
default:
|
45 |
+
$failure_msg = __('An error occurred!',CROP_THUMBS_LANG);
|
46 |
+
break;
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
if(!empty($failure_msg)) {
|
51 |
+
$windowCssPath = apply_filters('crop_post_thumbnail_window_css', plugins_url('css/cpt-window.css',dirname(__FILE__)));
|
52 |
+
wp_enqueue_style( 'cpt-window',$windowCssPath,array('wp-admin'),CROP_THUMBS_VERSION);
|
53 |
+
$cptContent = $failure_msg;
|
54 |
+
include_once( dirname(__FILE__).'/../html/template.php' );
|
55 |
+
}
|
56 |
+
die();//to prevent to send back a "0"
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Display a list of images that are attached to this post_id.
|
61 |
+
* Hightlight the post-thumbnail (if it is attached to this post_id)
|
62 |
+
*/
|
63 |
+
function listImages() {
|
64 |
+
global $cptSettings;
|
65 |
+
$options = $cptSettings->getOptions();
|
66 |
+
|
67 |
+
$data = $this->loadPostIdData(intval($_REQUEST['post_id']));
|
68 |
+
|
69 |
+
$parent_post_type = '';
|
70 |
+
$_tmp_post = get_post(intval($_REQUEST['post_id']));
|
71 |
+
if(!empty($_tmp_post)) {
|
72 |
+
$parent_post_type = $_tmp_post->post_type;
|
73 |
+
}
|
74 |
+
|
75 |
+
$cptContent = '';
|
76 |
+
|
77 |
+
if($this->shouldBeHiddenOnPostType($options,$parent_post_type)) {
|
78 |
+
$cptContent = '<div class="postTypeDisabledMsg">'.__('Cropping is disabled for this post-type.',CROP_THUMBS_LANG).'</div>';
|
79 |
+
} elseif($data==false) {
|
80 |
+
$cptContent = '<div class="listEmptyMsg">'.__('No images attached to this post yet. Please upload some via the upload dialog.',CROP_THUMBS_LANG).'</div>';
|
81 |
+
} else {
|
82 |
+
//the dynamic javascript
|
83 |
+
ob_start(); ?>
|
84 |
+
<script>
|
85 |
+
jQuery(document).ready(function($) {
|
86 |
+
$('.image-list .entry').click(function() {
|
87 |
+
var image_id = $(this).attr('rel');
|
88 |
+
var parent_post_id = <?php echo intval($_REQUEST['post_id']); ?>;
|
89 |
+
document.location.href = ajaxurl+"?action=croppostthumb_ajax&image_id="+image_id+"&parent_post_id="+parent_post_id;
|
90 |
+
return;
|
91 |
+
});
|
92 |
+
});
|
93 |
+
</script>
|
94 |
+
<?php
|
95 |
+
$cptScript = ob_get_clean();
|
96 |
+
//END the javascript
|
97 |
+
|
98 |
+
|
99 |
+
//the content
|
100 |
+
ob_start();?>
|
101 |
+
<div class="header"><strong><?php _e('Choose the image you want to crop.',CROP_THUMBS_LANG); ?></strong></div>
|
102 |
+
<ul class="image-list">
|
103 |
+
<?php
|
104 |
+
$counter = 1;
|
105 |
+
foreach($data as $key=>$image) : ?>
|
106 |
+
<li class="entry cursor<?php echo (isset($image->is_post_thumbnail) ? ' post-thumbnail' : ''); ?>" rel="<?php echo $image->ID;?>">
|
107 |
+
<h3><?php echo (isset($image->is_post_thumbnail) ? __('Post Thumbnail',CROP_THUMBS_LANG) : sprintf(__('Image %d',CROP_THUMBS_LANG),$counter));?></h3>
|
108 |
+
<?php $img_data = wp_get_attachment_image_src($image->ID, 'thumbnail');?>
|
109 |
+
<img src="<?php echo $img_data[0].'?'.time(); ?>" />
|
110 |
+
</li>
|
111 |
+
<?php
|
112 |
+
$counter++;
|
113 |
+
endforeach; ?>
|
114 |
+
</ul>
|
115 |
+
<?php
|
116 |
+
$cptContent = ob_get_clean();
|
117 |
+
//END the content
|
118 |
+
}
|
119 |
+
wp_enqueue_script( 'jquery' );
|
120 |
+
|
121 |
+
$windowCssPath = apply_filters('crop_post_thumbnail_window_css', plugins_url('css/cpt-window.css',dirname(__FILE__)));
|
122 |
+
wp_enqueue_style( 'cpt-window',$windowCssPath,array('wp-admin'),CROP_THUMBS_VERSION);
|
123 |
+
include_once( dirname(__FILE__).'/../html/template.php' );
|
124 |
+
return true;
|
125 |
+
}
|
126 |
+
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Display the crop editor.
|
130 |
+
* @param $_REQUEST['image_id'] - ID of the image to show
|
131 |
+
* @param $_REQUEST['viewmode']=='single' - without the back-link
|
132 |
+
*/
|
133 |
+
function byImageId() {
|
134 |
+
global $cptSettings,$content_width;
|
135 |
+
|
136 |
+
//make sure $content_width is out of the way
|
137 |
+
$_remember_content_width = $content_width;
|
138 |
+
$content_width = null;
|
139 |
+
|
140 |
+
|
141 |
+
$options = $cptSettings->getOptions();
|
142 |
+
$this->addDebug('options', print_r($options,true));
|
143 |
+
$image_obj = get_post(intval($_REQUEST['image_id']));
|
144 |
+
|
145 |
+
//$post_id_attached holds the id of the post the image is attached to - can be null/empty
|
146 |
+
$post_id_attached = -1;
|
147 |
+
if(!empty($image_obj->post_parent)) {
|
148 |
+
$post_id_attached=$image_obj->post_parent;
|
149 |
+
}
|
150 |
+
|
151 |
+
//$current_parent_post_type
|
152 |
+
$current_parent_post_type = '';
|
153 |
+
$current_parent_post_id = -1;
|
154 |
+
|
155 |
+
if(!empty($_REQUEST['parent_post_id'])) {
|
156 |
+
$_tmp = get_post(intval($_REQUEST['parent_post_id']));
|
157 |
+
if(!empty($_tmp)) {
|
158 |
+
$current_parent_post_type = $_tmp->post_type;
|
159 |
+
$current_parent_post_id = $_tmp->ID;
|
160 |
+
}
|
161 |
+
}
|
162 |
+
|
163 |
+
$all_image_sizes = $cptSettings->getImageSizes();
|
164 |
+
$this->addDebug('all_image_sizes', print_r($all_image_sizes,true));
|
165 |
+
|
166 |
+
$orig_img = wp_get_attachment_image_src($image_obj->ID, 'full');
|
167 |
+
$orig_img['gcd'] = $this->gcd($orig_img[1],$orig_img[2]);
|
168 |
+
$orig_img['ratio'] = ($orig_img[1]/$orig_img['gcd']) / ($orig_img[2]/$orig_img['gcd']);
|
169 |
+
$orig_img['print_ratio'] = ($orig_img[1]/$orig_img['gcd']).':'.($orig_img[2]/$orig_img['gcd']);
|
170 |
+
|
171 |
+
$cache_breaker = time();//a additional parameter that will be added to the image-urls to prevent the browser to show a cached image
|
172 |
+
|
173 |
+
$this->addDebug('img-postmeta',print_r(wp_get_attachment_metadata($image_obj->ID, true),true));
|
174 |
+
|
175 |
+
//the javascript
|
176 |
+
ob_start(); ?>
|
177 |
+
<script>
|
178 |
+
jQuery(document).ready(function($) {
|
179 |
+
cpt_lang = new Object();
|
180 |
+
cpt_lang['bug'] = "<?php _e('Bug--this should not have occurred.',CROP_THUMBS_LANG);?>";
|
181 |
+
cpt_lang['warningOriginalToSmall'] = "<?php _e('Warning: the original image is too small to be cropped in good quality with this thumbnail size.',CROP_THUMBS_LANG);?>";
|
182 |
+
cpt_lang['selectOne'] = "<?php _e('First, select an image. Then, click once again.',CROP_THUMBS_LANG);?>";
|
183 |
+
cpt_ajax_nonce = "<?php echo wp_create_nonce($cptSettings->getNonceBase()); ?>";
|
184 |
+
cpt_debug_js = <?php echo (!empty($options['debug_js'])) ? 'true;' : 'false;'; ?>
|
185 |
+
});
|
186 |
+
</script>
|
187 |
+
<?php
|
188 |
+
$cptScript = ob_get_clean();
|
189 |
+
//END the javascript
|
190 |
+
|
191 |
+
/**
|
192 |
+
* wether or not to show the "back button"
|
193 |
+
*/
|
194 |
+
$headline = true;
|
195 |
+
if(!empty($_REQUEST['viewmode']) && $_REQUEST['viewmode']=='single') {
|
196 |
+
$headline = false;
|
197 |
+
}
|
198 |
+
|
199 |
+
//the content
|
200 |
+
ob_start();
|
201 |
+
|
202 |
+
if($this->shouldBeHiddenOnPostType($options,$current_parent_post_type)) : ?>
|
203 |
+
<div class="cpt-crop-view">
|
204 |
+
<div class="postTypeDisabledMsg"><?php _e('Cropping is disabled for this post-type.',CROP_THUMBS_LANG); ?></div>
|
205 |
+
</div>
|
206 |
+
<?php else : ?>
|
207 |
+
|
208 |
+
<div class="cpt-crop-view">
|
209 |
+
<?php if($headline) :?><div class="header"><a class="back" href="<?php echo admin_url( 'admin-ajax.php'); ?>?action=croppostthumb_ajax&post_id=<?php echo $current_parent_post_id; ?>"><?php _e('back to image list',CROP_THUMBS_LANG); ?></a></div><?php endif; ?>
|
210 |
+
<div class="waitingWindow hidden"><?php _e('Please wait until the images are cropped.',CROP_THUMBS_LANG); ?></div>
|
211 |
+
<div class="mainWindow">
|
212 |
+
<div class="selectionArea cptLeftPane">
|
213 |
+
<h3><?php _e('Raw',CROP_THUMBS_LANG); ?>: <?php echo $orig_img[1].' '.__('pixel',CROP_THUMBS_LANG)?> x <?php echo $orig_img[2].' '.__('pixel',CROP_THUMBS_LANG) ?> (<?php echo $orig_img['print_ratio']; ?>)</h3>
|
214 |
+
<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] ?>}' />
|
215 |
+
<button id="cpt-generate" class="button"><?php _e('Save Crop',CROP_THUMBS_LANG);?></button>
|
216 |
+
<h4><?php _e('Quick Instructions',CROP_THUMBS_LANG);?></h4>
|
217 |
+
<ul class="step-info">
|
218 |
+
<li><?php _e('Step 1: Choose an image from the right.',CROP_THUMBS_LANG); ?></li>
|
219 |
+
<li><?php _e('Step 2: Use your mouse to change the size of the rectangle on the image above.',CROP_THUMBS_LANG); ?></li>
|
220 |
+
<li><?php _e('Step 3: Click on "Save Crop".',CROP_THUMBS_LANG); ?></li>
|
221 |
+
</ul>
|
222 |
+
</div>
|
223 |
+
<div class="cptRightPane">
|
224 |
+
<input type="checkbox" name="cpt-same-ratio" value="1" id="cpt-same-ratio" checked="checked" />
|
225 |
+
<label for="cpt-same-ratio" class="lbl-cpt-same-ratio"><?php _e('Crop all images with same ratio at once',CROP_THUMBS_LANG); ?></label>
|
226 |
+
<button id="cpt-deselect" class="button"><?php _e('deselect all',CROP_THUMBS_LANG); ?></button>
|
227 |
+
<ul class="thumbnail-list">
|
228 |
+
<?php
|
229 |
+
foreach($all_image_sizes as $img_size_name=>$value) :
|
230 |
+
|
231 |
+
if ($value['height'] == 9999) {
|
232 |
+
$value['height'] = 0;
|
233 |
+
}
|
234 |
+
if ($value['width'] == 9999) {
|
235 |
+
$value['width'] = 0;
|
236 |
+
}
|
237 |
+
|
238 |
+
if(!$this->shouldSizeBeHidden($options,$img_size_name,$value,$current_parent_post_type)) :
|
239 |
+
$ratio = null; //reset
|
240 |
+
$gcd = null; //reset
|
241 |
+
$print_ratio = null; //reset
|
242 |
+
$print_cropped = ''; //reset
|
243 |
+
$crop = 0; //reset
|
244 |
+
$special_warning = ''; //reset
|
245 |
+
|
246 |
+
|
247 |
+
/** define ratio **/
|
248 |
+
if($value['width'] != 0 && $value['height']!=0) {
|
249 |
+
$gcd = $this->gcd($value['width'],$value['height']);//get greatest common divisor
|
250 |
+
$ratio = ($value['width']/$gcd) / ($value['height']/$gcd);//get ratio
|
251 |
+
$print_ratio = $value['width']/$gcd.':'.$value['height']/$gcd;
|
252 |
+
} else {
|
253 |
+
//keep ratio same as original image
|
254 |
+
$gcd = $orig_img['gcd'];
|
255 |
+
$ratio = $orig_img['ratio'];
|
256 |
+
$print_ratio = $orig_img['print_ratio'];
|
257 |
+
}
|
258 |
+
|
259 |
+
|
260 |
+
if(!empty($value['crop'])) {
|
261 |
+
//cropped
|
262 |
+
$print_cropped = ' ('.__('cropped',CROP_THUMBS_LANG).')';
|
263 |
+
$crop = 1;
|
264 |
+
} else {
|
265 |
+
//not cropped
|
266 |
+
/* -- maybe use this behaviour in a later version --
|
267 |
+
$print_cropped = ' ('.__('maximum',CROP_THUMBS_LANG).')';
|
268 |
+
$print_ratio = __('free choice',CROP_THUMBS_LANG);
|
269 |
+
*/
|
270 |
+
|
271 |
+
$print_cropped = ' ('.__('maximum',CROP_THUMBS_LANG).')';
|
272 |
+
$crop = 1;
|
273 |
+
//keep ratio same as original image
|
274 |
+
$gcd = $orig_img['gcd'];
|
275 |
+
$ratio = $orig_img['ratio'];
|
276 |
+
$print_ratio = $orig_img['print_ratio'];
|
277 |
+
}
|
278 |
+
|
279 |
+
$print_dimensions = $value['width'].' '.__('pixel',CROP_THUMBS_LANG).' x '.$value['height'].' '.__('pixel',CROP_THUMBS_LANG).$print_cropped;
|
280 |
+
|
281 |
+
$img_data = wp_get_attachment_image_src($image_obj->ID, $img_size_name);
|
282 |
+
|
283 |
+
|
284 |
+
$_lowResWarning = '';
|
285 |
+
if($this->isLowRes($value,$orig_img)) {
|
286 |
+
$_lowResWarning = ' <span class="lowResWarning">'.__('Original image size too small for good crop quality!',CROP_THUMBS_LANG).'</span>';
|
287 |
+
}
|
288 |
+
|
289 |
+
$jsonDataValues = array(
|
290 |
+
'name' => $img_size_name,
|
291 |
+
'width' => $value['width'],
|
292 |
+
'height' => $value['height'],
|
293 |
+
'ratio' => $ratio,
|
294 |
+
'crop' => $crop
|
295 |
+
);
|
296 |
+
$jsonDataValues = apply_filters('crop_thumbnails_editor_jsonDataValues', $jsonDataValues);
|
297 |
+
$print_ratio = apply_filters('crop_thumbnails_editor_printratio', $print_ratio, $img_size_name);
|
298 |
+
|
299 |
+
?>
|
300 |
+
<li rel="<?php echo $print_ratio; ?>">
|
301 |
+
<strong title="<?php esc_attr_e($img_size_name) ?>"><?php echo $value['name'] ?><?php echo $_lowResWarning; ?></strong><?php echo $special_warning; ?>
|
302 |
+
<span class="dimensions"><?php _e('Dimensions:',CROP_THUMBS_LANG) ?> <?php echo $print_dimensions; ?></span>
|
303 |
+
<span class="ratio"><?php _e('Ratio:',CROP_THUMBS_LANG) ?> <?php echo $print_ratio; ?></span>
|
304 |
+
<img src="<?php echo $img_data[0]?>?<?php echo $cache_breaker ?>" data-values="<?php esc_attr_e(json_encode($jsonDataValues)); ?>" />
|
305 |
+
</li>
|
306 |
+
<?php endif; ?>
|
307 |
+
<?php endforeach; ?>
|
308 |
+
</ul>
|
309 |
+
</div>
|
310 |
+
</div>
|
311 |
+
</div>
|
312 |
+
<?php
|
313 |
+
endif;
|
314 |
+
$cptContent = ob_get_clean();
|
315 |
+
$cptContent.= $this->getDebugOutput($options);
|
316 |
+
//END the content
|
317 |
+
|
318 |
+
|
319 |
+
wp_enqueue_script( 'jquery' );
|
320 |
+
wp_enqueue_script( 'my_jcrop', plugins_url('js/jcrop/js/jquery.Jcrop.min.js',dirname(__FILE__)), array(), CROP_THUMBS_VERSION);
|
321 |
+
wp_enqueue_script( 'json2' );
|
322 |
+
wp_enqueue_script( 'cpt-crop', plugins_url('js/cpt-crop.js',dirname(__FILE__)), array('jquery','my_jcrop','json2'), CROP_THUMBS_VERSION);
|
323 |
+
|
324 |
+
$windowCssPath = apply_filters('crop_post_thumbnail_window_css', plugins_url('css/cpt-window.css',dirname(__FILE__)));
|
325 |
+
wp_enqueue_style( 'cpt-window',$windowCssPath,array('wp-admin'),CROP_THUMBS_VERSION);
|
326 |
+
wp_enqueue_style( 'my_jcrop', plugins_url('js/jcrop/css/jquery.Jcrop.min.css',dirname(__FILE__)), array(), CROP_THUMBS_VERSION);
|
327 |
+
|
328 |
+
include_once( dirname(__FILE__).'/../html/template.php' );
|
329 |
+
|
330 |
+
$content_width = $_remember_content_width;//reset the content-width
|
331 |
+
return true;
|
332 |
+
}
|
333 |
+
|
334 |
+
function shouldBeHiddenOnPostType($options,$post_type) {
|
335 |
+
if(empty($post_type)) {
|
336 |
+
return false;
|
337 |
+
}
|
338 |
+
if(empty($options['hide_post_type'][$post_type])) {
|
339 |
+
return false;
|
340 |
+
}
|
341 |
+
return true;
|
342 |
+
}
|
343 |
+
|
344 |
+
/**
|
345 |
+
* Check wether or not the image_size should be hidden for this post_type
|
346 |
+
* @param array options array
|
347 |
+
* @param string name of the image-size (i.e. post-thumbnail, ...)
|
348 |
+
* @param string name post-type (i.e. post, page, ...)
|
349 |
+
* @return boolean true if Image-size should be hidden
|
350 |
+
*/
|
351 |
+
function shouldSizeBeHidden($options, $img_size_name, $img_size, $post_type='') {
|
352 |
+
$_return = false;
|
353 |
+
if(!empty($post_type)) {
|
354 |
+
//we are NOT in the mediathek
|
355 |
+
|
356 |
+
//-if hide_size
|
357 |
+
if(!empty($options['hide_size'][$post_type][$img_size_name])) {
|
358 |
+
$_return = true;
|
359 |
+
}
|
360 |
+
|
361 |
+
//if not a crop-size and allow_non_cropped
|
362 |
+
if(empty($img_size['crop']) && empty($options['allow_non_cropped'])) {
|
363 |
+
$_return = true;
|
364 |
+
}
|
365 |
+
} else {
|
366 |
+
//we are in the mediathek
|
367 |
+
|
368 |
+
//-if not a crop-size and allow_non_cropped
|
369 |
+
if(empty($img_size['crop']) && empty($options['allow_non_cropped'])) {
|
370 |
+
$_return = true;
|
371 |
+
}
|
372 |
+
}
|
373 |
+
return $_return;
|
374 |
+
}
|
375 |
+
|
376 |
+
|
377 |
+
/**
|
378 |
+
* load all image data of that $post_id
|
379 |
+
* - adds "is_post_thumbnail" with value true into the entry, if it is the post_thumbnail
|
380 |
+
*/
|
381 |
+
function loadPostIdData($post_id) {
|
382 |
+
$args = array(
|
383 |
+
'post_type' => 'attachment',
|
384 |
+
'numberposts' => -1,
|
385 |
+
'post_parent' => intval($post_id)
|
386 |
+
);
|
387 |
+
$images = get_posts($args);
|
388 |
+
|
389 |
+
$post_thumbnail_id = get_post_thumbnail_id( $post_id );
|
390 |
+
if(!isset($post_thumbnail_id)) {
|
391 |
+
$post_thumbnail_id = -1;
|
392 |
+
}
|
393 |
+
|
394 |
+
foreach($images as $key=>$value) {
|
395 |
+
$mime = $value->post_mime_type;
|
396 |
+
if( !in_array($mime,$this->allowedMime) ) {
|
397 |
+
unset($images[$key]);
|
398 |
+
} elseif($value->ID==$post_thumbnail_id) {
|
399 |
+
$images[$key]->is_post_thumbnail = true;
|
400 |
+
}
|
401 |
+
}
|
402 |
+
return $images;
|
403 |
+
}
|
404 |
+
|
405 |
+
/**
|
406 |
+
* Checks if the thumb-image-dimensions are bigger than the actuall image.
|
407 |
+
* @param array thumbnail-data from the add_image_size-funtion (width, height)
|
408 |
+
* @param array original image-data-array (url, width, height)
|
409 |
+
* @return true if the original is smaller than the thumbnail-size
|
410 |
+
*/
|
411 |
+
function isLowRes($thumb,$orig) {
|
412 |
+
if($thumb['width']>$orig[1] || $thumb['height']>$orig[2]) {
|
413 |
+
return true;
|
414 |
+
}
|
415 |
+
return false;
|
416 |
+
}
|
417 |
+
|
418 |
+
function isUserPermitted() {
|
419 |
+
$return = false;
|
420 |
+
if(current_user_can('upload_files')) {
|
421 |
+
$return = true;
|
422 |
+
}
|
423 |
+
//TODO maybe add noence (is it needed? there are no file- or db-operations)
|
424 |
+
return $return;
|
425 |
+
}
|
426 |
+
|
427 |
+
|
428 |
+
/**
|
429 |
+
* This is for use inside the plugin only.
|
430 |
+
* Removes all other styles and scripts, to make sure the crop-thumbnail is not compromited by other plugins
|
431 |
+
*/
|
432 |
+
function cleanWPHead() {
|
433 |
+
global $wp_scripts, $wp_styles;
|
434 |
+
$wp_scripts = new WP_Scripts();
|
435 |
+
$wp_styles = new WP_Styles();
|
436 |
+
remove_all_actions('wp_print_styles');
|
437 |
+
remove_all_actions('wp_print_scripts');
|
438 |
+
}
|
439 |
+
|
440 |
+
/**
|
441 |
+
* Greatest cummon divisor
|
442 |
+
*/
|
443 |
+
function gcd($a, $b) {
|
444 |
+
if(function_exists('gmp_gcd')) {
|
445 |
+
$gcd = gmp_strval(gmp_gcd($a,$b));
|
446 |
+
$this->addDebug("gcd-version", "gmp_gcd:".$gcd);
|
447 |
+
return ($gcd);
|
448 |
+
} else {
|
449 |
+
$gcd = $this->my_gcd($a,$b);
|
450 |
+
$this->addDebug("gcd-version", "my_gcd:".$gcd);
|
451 |
+
return $gcd;
|
452 |
+
}
|
453 |
+
}
|
454 |
+
|
455 |
+
function my_gcd($a, $b) {
|
456 |
+
$b = ( $a == 0 )? 0 : $b;
|
457 |
+
return ( $a % $b )? $this->my_gcd($b, abs($a - $b)) : $b;
|
458 |
+
}
|
459 |
+
|
460 |
+
|
461 |
+
function addDebug($title, $output) {
|
462 |
+
$this->debugOutput.= '---'.$title.'---<br />'.$output.'<br />';
|
463 |
+
}
|
464 |
+
|
465 |
+
|
466 |
+
function getDebugOutput($options) {
|
467 |
+
if(!empty($options['debug_data'])) {
|
468 |
+
return '<div class="cpt-debug closed"><a class="cpt-debug-handle" href="#">show debug</a><div class="content">'.nl2br(str_replace(" "," ",$this->debugOutput)).'</div></div>';
|
469 |
+
}
|
470 |
+
return '';
|
471 |
+
}
|
472 |
+
}
|
473 |
+
|
474 |
+
|
475 |
+
|
476 |
+
$cpte = new CropPostThumbnailsEditor();
|
functions/save.php
CHANGED
@@ -1,257 +1,259 @@
|
|
1 |
-
<?php
|
2 |
-
$cptSave = new CptSaveThumbnail();
|
3 |
-
add_action( 'wp_ajax_cptSaveThumbnail', array($cptSave, 'saveThumbnail') );
|
4 |
-
|
5 |
-
class CptSaveThumbnail {
|
6 |
-
|
7 |
-
private $debug = array();
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Handle-function called via ajax request.
|
11 |
-
* Check and crop multiple images. Update with wp_update_attachment_metadata if needed.
|
12 |
-
* Input parameters:
|
13 |
-
* * $_REQUEST['selection'] - json-object - data of the selection/crop
|
14 |
-
* * $_REQUEST['raw_values'] - json-object - data of the original image
|
15 |
-
* * $_REQUEST['active_values'] - json-array - array with data of the images to crop
|
16 |
-
* * $_REQUEST['same_ratio_active'] - boolean - was the same_ratio_checkbox checked or not
|
17 |
-
* The main code is wraped via try-catch - the errorMessage will send back to JavaScript for displaying in an alert-box.
|
18 |
-
* Called die() at the end.
|
19 |
-
*/
|
20 |
-
function saveThumbnail() {
|
21 |
-
global $cptSettings;
|
22 |
-
$json_return = array();
|
23 |
-
|
24 |
-
try {
|
25 |
-
/** get data **/
|
26 |
-
$upload_dir = wp_upload_dir();
|
27 |
-
$tmp_dir = $upload_dir['basedir']."/tmp/";
|
28 |
-
$options = $cptSettings->getOptions();
|
29 |
-
//from $_REQUEST
|
30 |
-
$selection = json_decode(stripcslashes($_REQUEST['selection']));
|
31 |
-
$sourceImgData = json_decode(stripcslashes($_REQUEST['raw_values']));
|
32 |
-
$targetImgData = json_decode(stripcslashes($_REQUEST['active_values']));
|
33 |
-
|
34 |
-
//from DB
|
35 |
-
$dbImageSizes = $cptSettings->getImageSizes();
|
36 |
-
|
37 |
-
$obj = get_post($sourceImgData->id);
|
38 |
-
$sourceImgPath = get_attached_file( $obj->ID );
|
39 |
-
$post_metadata = wp_get_attachment_metadata($obj->ID, true);//get the attachement metadata of the post
|
40 |
-
|
41 |
-
$this->validation($selection,$obj,$sourceImgPath,$post_metadata);
|
42 |
-
|
43 |
-
|
44 |
-
#$debug.= "\nselection\n".print_r($selection,true);
|
45 |
-
#$debug.= "\ntargetImgData\n".print_r($sourceImgData,true);
|
46 |
-
#$debug.= "\ntargetImgData\n".print_r($targetImgData,true);
|
47 |
-
#$debug.= "\nimageObject\n".print_r($obj,true);
|
48 |
-
#$debug.= "\nsource:".$sourceImgPath."\n";
|
49 |
-
|
50 |
-
/**
|
51 |
-
* will be true if the image format isn't in the attachements metadata,
|
52 |
-
* and Wordpress doesn't know about the image file
|
53 |
-
*/
|
54 |
-
$_changed_image_format = false;
|
55 |
-
$_processing_error = array();
|
56 |
-
foreach($targetImgData as $_imageSize) {
|
57 |
-
$this->addDebug('submitted image-data');
|
58 |
-
$this->addDebug(print_r($_imageSize,true));
|
59 |
-
$_delete_old_file = '';
|
60 |
-
if(!$this->isImageSizeValid($_imageSize,$dbImageSizes)) {
|
61 |
-
$this->addDebug("Image size not valid.");
|
62 |
-
continue;
|
63 |
-
}
|
64 |
-
if(empty($post_metadata['sizes'][$_imageSize->name])) {
|
65 |
-
$_changed_image_format = true;
|
66 |
-
} else {
|
67 |
-
//the old size hasent got the right image-size/image-ratio --> delete it or nobody will ever delete it correct
|
68 |
-
if($post_metadata['sizes'][$_imageSize->name]['width'] != intval($_imageSize->width)
|
69 |
-
|| $post_metadata['sizes'][$_imageSize->name]['height'] != intval($_imageSize->height) ) {
|
70 |
-
|
71 |
-
$_delete_old_file = $post_metadata['sizes'][$_imageSize->name]['file'];
|
72 |
-
$_changed_image_format = true;
|
73 |
-
}
|
74 |
-
}
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
$
|
79 |
-
$
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
$
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
$selection->x,
|
95 |
-
$selection->y,
|
96 |
-
$
|
97 |
-
$
|
98 |
-
|
99 |
-
$
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
$
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
'
|
126 |
-
|
127 |
-
'
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
$
|
132 |
-
|
133 |
-
|
134 |
-
$this->addDebug(
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
//
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
* @
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
$submitted->
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
*
|
198 |
-
* @param
|
199 |
-
* @param object
|
200 |
-
* @
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
$selection->
|
214 |
-
$selection->
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
$
|
224 |
-
$
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
*
|
242 |
-
* @
|
243 |
-
* @param
|
244 |
-
* @
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
$
|
250 |
-
$
|
251 |
-
$
|
252 |
-
$
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
|
|
|
1 |
+
<?php
|
2 |
+
$cptSave = new CptSaveThumbnail();
|
3 |
+
add_action( 'wp_ajax_cptSaveThumbnail', array($cptSave, 'saveThumbnail') );
|
4 |
+
|
5 |
+
class CptSaveThumbnail {
|
6 |
+
|
7 |
+
private $debug = array();
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Handle-function called via ajax request.
|
11 |
+
* Check and crop multiple images. Update with wp_update_attachment_metadata if needed.
|
12 |
+
* Input parameters:
|
13 |
+
* * $_REQUEST['selection'] - json-object - data of the selection/crop
|
14 |
+
* * $_REQUEST['raw_values'] - json-object - data of the original image
|
15 |
+
* * $_REQUEST['active_values'] - json-array - array with data of the images to crop
|
16 |
+
* * $_REQUEST['same_ratio_active'] - boolean - was the same_ratio_checkbox checked or not
|
17 |
+
* The main code is wraped via try-catch - the errorMessage will send back to JavaScript for displaying in an alert-box.
|
18 |
+
* Called die() at the end.
|
19 |
+
*/
|
20 |
+
function saveThumbnail() {
|
21 |
+
global $cptSettings;
|
22 |
+
$json_return = array();
|
23 |
+
|
24 |
+
try {
|
25 |
+
/** get data **/
|
26 |
+
$upload_dir = wp_upload_dir();
|
27 |
+
$tmp_dir = $upload_dir['basedir']."/tmp/";
|
28 |
+
$options = $cptSettings->getOptions();
|
29 |
+
//from $_REQUEST
|
30 |
+
$selection = json_decode(stripcslashes($_REQUEST['selection']));
|
31 |
+
$sourceImgData = json_decode(stripcslashes($_REQUEST['raw_values']));
|
32 |
+
$targetImgData = json_decode(stripcslashes($_REQUEST['active_values']));
|
33 |
+
|
34 |
+
//from DB
|
35 |
+
$dbImageSizes = $cptSettings->getImageSizes();
|
36 |
+
|
37 |
+
$obj = get_post($sourceImgData->id);
|
38 |
+
$sourceImgPath = get_attached_file( $obj->ID );
|
39 |
+
$post_metadata = wp_get_attachment_metadata($obj->ID, true);//get the attachement metadata of the post
|
40 |
+
|
41 |
+
$this->validation($selection,$obj,$sourceImgPath,$post_metadata);
|
42 |
+
|
43 |
+
|
44 |
+
#$debug.= "\nselection\n".print_r($selection,true);
|
45 |
+
#$debug.= "\ntargetImgData\n".print_r($sourceImgData,true);
|
46 |
+
#$debug.= "\ntargetImgData\n".print_r($targetImgData,true);
|
47 |
+
#$debug.= "\nimageObject\n".print_r($obj,true);
|
48 |
+
#$debug.= "\nsource:".$sourceImgPath."\n";
|
49 |
+
|
50 |
+
/**
|
51 |
+
* will be true if the image format isn't in the attachements metadata,
|
52 |
+
* and Wordpress doesn't know about the image file
|
53 |
+
*/
|
54 |
+
$_changed_image_format = false;
|
55 |
+
$_processing_error = array();
|
56 |
+
foreach($targetImgData as $_imageSize) {
|
57 |
+
$this->addDebug('submitted image-data');
|
58 |
+
$this->addDebug(print_r($_imageSize,true));
|
59 |
+
$_delete_old_file = '';
|
60 |
+
if(!$this->isImageSizeValid($_imageSize,$dbImageSizes)) {
|
61 |
+
$this->addDebug("Image size not valid.");
|
62 |
+
continue;
|
63 |
+
}
|
64 |
+
if(empty($post_metadata['sizes'][$_imageSize->name])) {
|
65 |
+
$_changed_image_format = true;
|
66 |
+
} else {
|
67 |
+
//the old size hasent got the right image-size/image-ratio --> delete it or nobody will ever delete it correct
|
68 |
+
if($post_metadata['sizes'][$_imageSize->name]['width'] != intval($_imageSize->width)
|
69 |
+
|| $post_metadata['sizes'][$_imageSize->name]['height'] != intval($_imageSize->height) ) {
|
70 |
+
|
71 |
+
$_delete_old_file = $post_metadata['sizes'][$_imageSize->name]['file'];
|
72 |
+
$_changed_image_format = true;
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
$_filepath = $this->generateFilename($sourceImgPath, $_imageSize->width, $_imageSize->height);
|
77 |
+
$_filepath_info = pathinfo($_filepath);
|
78 |
+
$_tmp_filepath = $tmp_dir.$_filepath_info['basename'];
|
79 |
+
$this->addDebug("filename:".$_filepath);
|
80 |
+
|
81 |
+
|
82 |
+
$crop_width = $_imageSize->width;
|
83 |
+
$crop_height = $_imageSize->height;
|
84 |
+
if(!$_imageSize->crop || $_imageSize->width==0 || $_imageSize->height==0 || $_imageSize->width==9999 || $_imageSize->height==9999) {
|
85 |
+
//handle images with soft-crop width/height value and crop set to "true"
|
86 |
+
$crop_width = $selection->x2 - $selection->x;
|
87 |
+
$crop_height = $selection->y2 - $selection->y;
|
88 |
+
}
|
89 |
+
|
90 |
+
$result = wp_crop_image( // * @return string|WP_Error|false New filepath on success, WP_Error or false on failure.
|
91 |
+
intval($sourceImgData->id), // * @param string|int $src The source file or Attachment ID.
|
92 |
+
$selection->x, // * @param int $src_x The start x position to crop from.
|
93 |
+
$selection->y, // * @param int $src_y The start y position to crop from.
|
94 |
+
$selection->x2 - $selection->x, // * @param int $src_w The width to crop.
|
95 |
+
$selection->y2 - $selection->y, // * @param int $src_h The height to crop.
|
96 |
+
$crop_width, // * @param int $dst_w The destination width.
|
97 |
+
$crop_height, // * @param int $dst_h The destination height.
|
98 |
+
false, // * @param int $src_abs Optional. If the source crop points are absolute.
|
99 |
+
$_tmp_filepath // * @param string $dst_file Optional. The destination file to write to.
|
100 |
+
);
|
101 |
+
|
102 |
+
$_error = false;
|
103 |
+
if(empty($result)) {
|
104 |
+
$_processing_error[] = sprintf(__("Can't generate filesize '%s'.",CROP_THUMBS_LANG),$_imageSize->name);
|
105 |
+
$_error = true;
|
106 |
+
} else {
|
107 |
+
if(!empty($_delete_old_file)) {
|
108 |
+
@unlink($_filepath_info['dirname'].'/'.$_delete_old_file);
|
109 |
+
}
|
110 |
+
if(!@copy($result,$_filepath)) {
|
111 |
+
$_processing_error[] = sprintf(__("Can't copy temporary file to media library.",CROP_THUMBS_LANG));
|
112 |
+
$_error = true;
|
113 |
+
}
|
114 |
+
if(!@unlink($result)) {
|
115 |
+
$_processing_error[] = sprintf(__("Can't delete temporary file.",CROP_THUMBS_LANG));
|
116 |
+
$_error = true;
|
117 |
+
}
|
118 |
+
}
|
119 |
+
|
120 |
+
if(!$_error) {
|
121 |
+
//update metadata --> otherwise new sizes will not be updated
|
122 |
+
$_new_meta = array(
|
123 |
+
'file'=>$_filepath_info['basename'],
|
124 |
+
'width'=>intval($crop_width),
|
125 |
+
'height'=>intval($crop_height));
|
126 |
+
if(!empty($dbImageSizes[$_imageSize->name]['crop'])) {
|
127 |
+
$_new_meta['crop'] = $dbImageSizes[$_imageSize->name]['crop'];
|
128 |
+
}
|
129 |
+
$post_metadata['sizes'][$_imageSize->name] = $_new_meta;
|
130 |
+
|
131 |
+
$_full_filepath = trailingslashit($_filepath_info['dirname']) . $_filepath_info['basename'];
|
132 |
+
do_action('crop_thumbnails_after_save_new_thumb', $_full_filepath, $_imageSize->name, $_new_meta );
|
133 |
+
} else {
|
134 |
+
$this->addDebug('error on '.$_filepath_info['basename']);
|
135 |
+
$this->addDebug(implode(' | ',$_processing_error));
|
136 |
+
}
|
137 |
+
}//END foreach
|
138 |
+
|
139 |
+
//we have to update the posts metadate
|
140 |
+
//otherwise new sizes will not be updated
|
141 |
+
$post_metadata = apply_filters('crop_thumbnails_before_update_metadata', $post_metadata, $obj->ID);
|
142 |
+
wp_update_attachment_metadata( $obj->ID, $post_metadata);
|
143 |
+
|
144 |
+
//generate result;
|
145 |
+
$json_return['debug'] = $this->getDebugOutput($options);
|
146 |
+
if(!empty($_processing_error)) {
|
147 |
+
//one or more errors happend when generating thumbnails
|
148 |
+
$json_return['processingErrors'] = implode("\n",$_processing_error);
|
149 |
+
}
|
150 |
+
if($_changed_image_format) {
|
151 |
+
//there was a change in the image-formats
|
152 |
+
$json_return['changed_image_format'] = true;
|
153 |
+
}
|
154 |
+
$json_return['success'] = time();//time for cache-breaker
|
155 |
+
echo json_encode($json_return);
|
156 |
+
} catch (Exception $e) {
|
157 |
+
$json_return['debug'] = $this->getDebugOutput($options);
|
158 |
+
$json_return['error'] = $e->getMessage();
|
159 |
+
echo json_encode($json_return);
|
160 |
+
}
|
161 |
+
die();
|
162 |
+
}
|
163 |
+
|
164 |
+
private function addDebug($text) {
|
165 |
+
$this->debug[] = $text;
|
166 |
+
}
|
167 |
+
|
168 |
+
private function getDebugOutput($options) {
|
169 |
+
if(!empty($this->debug)) {
|
170 |
+
return join("\n",$this->debug);
|
171 |
+
}
|
172 |
+
return '';
|
173 |
+
}
|
174 |
+
|
175 |
+
/**
|
176 |
+
* @param object data of the new ImageSize the user want to crop
|
177 |
+
* @param array all available ImageSizes
|
178 |
+
* @return boolean true if the newImageSize is in the list of ImageSizes and dimensions are correct
|
179 |
+
*/
|
180 |
+
function isImageSizeValid(&$submitted,$dbData) {
|
181 |
+
if(empty($submitted->name)) {
|
182 |
+
return false;
|
183 |
+
}
|
184 |
+
if(empty($dbData[$submitted->name])) {
|
185 |
+
return false;
|
186 |
+
}
|
187 |
+
|
188 |
+
//restore the default data just to make sure nothing is compromited
|
189 |
+
$submitted->crop = empty($dbData[$submitted->name]['crop']) ? 0 : 1;
|
190 |
+
$submitted->width = $dbData[$submitted->name]['width'];
|
191 |
+
$submitted->height = $dbData[$submitted->name]['height'];
|
192 |
+
//eventually we want to test some more later
|
193 |
+
return true;
|
194 |
+
}
|
195 |
+
|
196 |
+
/**
|
197 |
+
* some basic validations and value transformations
|
198 |
+
* @param array the user submitted selection
|
199 |
+
* @param object the loaded image-object loaded by $sourceImgData->id
|
200 |
+
* @param string the server-path to the source-image
|
201 |
+
* @param object metadata of the image-attachement
|
202 |
+
* @throw Exception if the security validation fails
|
203 |
+
*/
|
204 |
+
function validation($selection,$obj,$sourceImgPath,$post_metadata) {
|
205 |
+
global $cptSettings;
|
206 |
+
if(!check_ajax_referer($cptSettings->getNonceBase(),'_ajax_nonce',false)) {
|
207 |
+
throw new Exception(__("ERROR: Security Check failed (maybe a timeout - please try again).",CROP_THUMBS_LANG), 1);
|
208 |
+
}
|
209 |
+
|
210 |
+
if(!isset($selection->x) || !isset($selection->y) || !isset($selection->x2) || !isset($selection->y2)) {
|
211 |
+
throw new Exception(__('ERROR: Submitted data is incomplete.',CROP_THUMBS_LANG), 1);
|
212 |
+
}
|
213 |
+
$selection->x = intval($selection->x);
|
214 |
+
$selection->y = intval($selection->y);
|
215 |
+
$selection->x2 = intval($selection->x2);
|
216 |
+
$selection->y2 = intval($selection->y2);
|
217 |
+
|
218 |
+
if($selection->x < 0 || $selection->y < 0) {
|
219 |
+
throw new Exception(__('Cropping to these dimensions on this image is not possible.',CROP_THUMBS_LANG), 1);
|
220 |
+
}
|
221 |
+
|
222 |
+
/**
|
223 |
+
$_test = 20948;
|
224 |
+
$obj = get_post($_test);
|
225 |
+
$sourceImgPath = get_attached_file($_test);
|
226 |
+
$post_metadata = wp_get_attachment_metadata($_test, true);//get the attachement metadata of the post
|
227 |
+
*/
|
228 |
+
|
229 |
+
if(empty($obj)) {
|
230 |
+
throw new Exception(__("ERROR: Can't find original image in database!",CROP_THUMBS_LANG), 1);
|
231 |
+
}
|
232 |
+
if(empty($sourceImgPath)) {
|
233 |
+
throw new Exception(__("ERROR: Can't find original image file!",CROP_THUMBS_LANG), 1);
|
234 |
+
}
|
235 |
+
if(empty($post_metadata)) {
|
236 |
+
throw new Exception(__("ERROR: Can't find original image metadata!",CROP_THUMBS_LANG), 1);
|
237 |
+
}
|
238 |
+
}
|
239 |
+
|
240 |
+
/**
|
241 |
+
* Generate the Filename (and path) of the thumbnail based on width and height the same way as wordpress do.
|
242 |
+
* @see generate_filename in wp-includes/class-wp-image-editor.php
|
243 |
+
* @param string Path to the original (full-size) file.
|
244 |
+
* @param int width of the new image
|
245 |
+
* @param int height of the new image
|
246 |
+
* @return string path to the new image
|
247 |
+
*/
|
248 |
+
function generateFilename( $file, $w, $h ){
|
249 |
+
$info = pathinfo($file);
|
250 |
+
$dir = $info['dirname'];
|
251 |
+
$ext = $info['extension'];
|
252 |
+
$name = wp_basename($file, ".$ext");
|
253 |
+
$suffix = "{$w}x{$h}";
|
254 |
+
$destfilename = "{$dir}/{$name}-{$suffix}.{$ext}";
|
255 |
+
|
256 |
+
return $destfilename;
|
257 |
+
}
|
258 |
+
}
|
259 |
+
?>
|
functions/settings.php
CHANGED
@@ -1,282 +1,282 @@
|
|
1 |
-
<?php
|
2 |
-
class CropThumbnailsSettings {
|
3 |
-
private $uniqeSettingsId = 'cpt-settings';
|
4 |
-
private $optionsKey = 'crop-post-thumbs';
|
5 |
-
private $cssPrefix = 'cpt_settings_';
|
6 |
-
private $
|
7 |
-
|
8 |
-
function __construct() {
|
9 |
-
add_action('admin_menu', array($this,'addOptionsPage'));
|
10 |
-
if(is_admin()) {
|
11 |
-
add_filter('plugin_action_links', array($this,'addSettingsLinkToPluginPage'), 10, 2);
|
12 |
-
add_action('admin_head', array($this,'optionsPageStyle'));
|
13 |
-
}
|
14 |
-
}
|
15 |
-
|
16 |
-
function optionsPageStyle() {
|
17 |
-
if(!empty($_REQUEST['page']) && $_REQUEST['page']=='page-cpt') {
|
18 |
-
wp_enqueue_style('crop-thumbnails-options-style',plugins_url('css/options.css',dirname(__FILE__)));
|
19 |
-
}
|
20 |
-
}
|
21 |
-
|
22 |
-
function addSettingsLinkToPluginPage($links, $file) {
|
23 |
-
if ($file === 'crop-thumbnails/crop-thumbnails.php'){
|
24 |
-
$settings_link = '<a href="options-general.php?page=page-cpt" title="">'.__('Settings',CROP_THUMBS_LANG).'</a>';
|
25 |
-
array_unshift( $links, $settings_link );
|
26 |
-
}
|
27 |
-
return $links;
|
28 |
-
}
|
29 |
-
|
30 |
-
function addOptionsPage() {
|
31 |
-
add_options_page(__('Crop Post Thumbnail Page',CROP_THUMBS_LANG), 'Crop-Thumbnails', 'manage_options', 'page-cpt', array($this,'optionsPage'));
|
32 |
-
add_action('admin_init', array($this,'settingsInitialisation'));
|
33 |
-
}
|
34 |
-
|
35 |
-
function optionsPage() { ?>
|
36 |
-
<div class="wrap">
|
37 |
-
<div id="icon-options-general" class="icon32"><br /></div>
|
38 |
-
<h2>Crop-Thumbnails <?php esc_attr_e('Settings',CROP_THUMBS_LANG); ?></h2>
|
39 |
-
<form action="options.php" method="post">
|
40 |
-
<?php settings_fields($this->uniqeSettingsId); ?>
|
41 |
-
<?php do_settings_sections('page1'); ?>
|
42 |
-
|
43 |
-
<div class="<?php echo $this->cssPrefix ?>submit">
|
44 |
-
<input name="Submit" type="submit" value="<?php esc_attr_e('Save Changes',CROP_THUMBS_LANG); ?>" class="button-primary" />
|
45 |
-
</div>
|
46 |
-
</form>
|
47 |
-
|
48 |
-
<div class="<?php echo $this->cssPrefix; ?>paypal">
|
49 |
-
<h3><?php _e('Support the plugin author',CROP_THUMBS_LANG) ?></h3>
|
50 |
-
<p><?php _e('You can support the plugin author <br />(and let him know you love this plugin) <br />by donating via Paypal. Thanks a lot!',CROP_THUMBS_LANG); ?></p>
|
51 |
-
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
52 |
-
<input type="hidden" name="cmd" value="_donations">
|
53 |
-
<input type="hidden" name="business" value="volkmar.kantor@gmx.de">
|
54 |
-
<input type="hidden" name="lc" value="DE">
|
55 |
-
<input type="hidden" name="item_name" value="Volkmar Kantor - totalmedial.de">
|
56 |
-
<input type="hidden" name="item_number" value="crop-thumbnails">
|
57 |
-
<input type="hidden" name="no_note" value="0">
|
58 |
-
<input type="hidden" name="currency_code" value="EUR">
|
59 |
-
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
|
60 |
-
<input type="image" src="https://www.paypalobjects.com/de_DE/DE/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="Jetzt einfach, schnell und sicher online bezahlen – mit PayPal.">
|
61 |
-
<img alt="" border="0" src="https://www.paypalobjects.com/de_DE/i/scr/pixel.gif" width="1" height="1">
|
62 |
-
</form>
|
63 |
-
</div>
|
64 |
-
</div>
|
65 |
-
<?php
|
66 |
-
}
|
67 |
-
|
68 |
-
function settingsInitialisation(){
|
69 |
-
register_setting( $this->uniqeSettingsId, $this->optionsKey, array($this,'validateSettings') );
|
70 |
-
|
71 |
-
$_sectionID = 'choose_sizes_section';
|
72 |
-
add_settings_section($_sectionID, __('Sizes and Post Types',CROP_THUMBS_LANG), array($this,'sectionDescriptionChooseSizes'), 'page1');
|
73 |
-
add_settings_field('sizes', __('Choose the image size options you want to hide for each post type.',CROP_THUMBS_LANG), array($this,'callback_choose_size'), 'page1', $_sectionID);
|
74 |
-
/*
|
75 |
-
$_sectionID = 'experimental';
|
76 |
-
add_settings_section($_sectionID, __('Experimental Settings',CROP_THUMBS_LANG), array($this,'emptySectionDescription'), 'page1');
|
77 |
-
$_tmpID = 'allow_non_cropped';
|
78 |
-
add_settings_field($_tmpID, __('Allow non cropped image-sizes.',CROP_THUMBS_LANG), array($this,'callback_'.$_tmpID), 'page1', $_sectionID, array( 'label_for' => $this->cssPrefix.$_tmpID ));
|
79 |
-
*/
|
80 |
-
$_sectionID = 'developer';
|
81 |
-
add_settings_section($_sectionID, __('Developer Settings',CROP_THUMBS_LANG), array($this,'emptySectionDescription'), 'page1');
|
82 |
-
$_tmpID = 'debug_js';
|
83 |
-
add_settings_field($_tmpID, __('Enable JS-Debug.',CROP_THUMBS_LANG), array($this,'callback_'.$_tmpID), 'page1', $_sectionID, array( 'label_for' => $this->cssPrefix.$_tmpID ));
|
84 |
-
$_tmpID = 'debug_data';
|
85 |
-
add_settings_field($_tmpID, __('Enable Data-Debug.',CROP_THUMBS_LANG), array($this,'callback_'.$_tmpID), 'page1', $_sectionID, array( 'label_for' => $this->cssPrefix.$_tmpID ));
|
86 |
-
}
|
87 |
-
|
88 |
-
function sectionDescriptionChooseSizes() {?>
|
89 |
-
<p>
|
90 |
-
<?php _e('Crop-Thumbnails is designed to make cropping images easy. For some post types, not all crop sizes are needed, but the plugin will automatically create all the crop sizes. Here you can select which crop sizes are available in the cropping interface for each post type..',CROP_THUMBS_LANG) ?>
|
91 |
-
<br /><strong><?php _e('Crop-Thumbnails will only show cropped images. Sizes with no crop will always be hidden.',CROP_THUMBS_LANG); ?></strong>
|
92 |
-
</p>
|
93 |
-
<?php
|
94 |
-
}
|
95 |
-
|
96 |
-
function emptySectionDescription() {/*empty*/ }
|
97 |
-
|
98 |
-
function callback_choose_size() {
|
99 |
-
//get all the data
|
100 |
-
$options = get_option($this->optionsKey);
|
101 |
-
#echo '<pre>'.print_r($options,true).'</pre>';
|
102 |
-
$post_types = $this->getPostTypes();
|
103 |
-
$image_sizes = $this->getImageSizes();
|
104 |
-
|
105 |
-
//output
|
106 |
-
echo '<ul>';
|
107 |
-
foreach($post_types as $post_type=>$value) { ?>
|
108 |
-
<li>
|
109 |
-
<label for="<?php echo $this->cssPrefix.$post_type; ?>">
|
110 |
-
<input id="<?php echo $this->cssPrefix.$post_type;?>" type="checkbox" name="<?php echo $this->optionsKey; ?>[hide_post_type][<?php echo $post_type;?>]" value="1" <?php checked(isset($options['hide_post_type'][$post_type]),true); ?> />
|
111 |
-
<strong><?php echo $value->labels->name; ?></strong>
|
112 |
-
</label>
|
113 |
-
<ul style="margin:1em;">
|
114 |
-
<?php
|
115 |
-
|
116 |
-
foreach($image_sizes as $thumb_name => $data) :
|
117 |
-
$_checked = false;
|
118 |
-
if(!empty($options['hide_size']) && is_array($options['hide_size']) && !empty($options['hide_size'][$post_type][$thumb_name])) {
|
119 |
-
$_checked = true;
|
120 |
-
}
|
121 |
-
if($data['crop']=='1') :
|
122 |
-
?>
|
123 |
-
<li>
|
124 |
-
<label for="<?php echo $this->cssPrefix.$post_type;?>-<?php echo $thumb_name;?>">
|
125 |
-
<input id="<?php echo $this->cssPrefix.$post_type;?>-<?php echo $thumb_name;?>" type="checkbox" name="<?php echo $this->optionsKey; ?>[hide_size][<?php echo $post_type; ?>][<?php echo $thumb_name; ?>]" value="1" <?php echo checked($_checked); ?> />
|
126 |
-
<?php echo $thumb_name;?> - <?php echo $data['width'];?>x<?php echo $data['height'];?> <?php /* echo ($data['crop'] == '1' ? '(cropped)' : '') */?>
|
127 |
-
</label>
|
128 |
-
</li>
|
129 |
-
<?php endif; ?>
|
130 |
-
<?php endforeach ?>
|
131 |
-
</ul>
|
132 |
-
<hr />
|
133 |
-
</li>
|
134 |
-
<?php
|
135 |
-
}
|
136 |
-
echo '</ul>';
|
137 |
-
}
|
138 |
-
|
139 |
-
/**
|
140 |
-
* currently not used
|
141 |
-
*/
|
142 |
-
function callback_allow_non_cropped() {
|
143 |
-
$options = get_option($this->optionsKey);
|
144 |
-
$_id = 'allow_non_cropped';
|
145 |
-
if(empty($options[$_id])) { $options[$_id] = ''; }
|
146 |
-
echo '<input name="'.$this->optionsKey.'['.$_id.']" id="'.$this->cssPrefix.$_id.'" type="checkbox" value="1" ' . checked( 1, $options[$_id], false) . ' />';
|
147 |
-
?>
|
148 |
-
<div class="info">
|
149 |
-
<?php _e('ATTENTION: be aware that you can break things, when you activate this. When activated your are able to cut those images to a spezific dimension that are not cropped. The name of the image will not change. You should be extra carefull when:',CROP_THUMBS_LANG) ?>
|
150 |
-
<ul>
|
151 |
-
<li><?php _e('you had inserted the image before on any page or post. (There may be height and width stored directly in the page-content.)',CROP_THUMBS_LANG); ?></li>
|
152 |
-
<li><?php _e('you use a plugin that expect the original image size. (The original image-size is also "stored" in the filename.)',CROP_THUMBS_LANG); ?></li>
|
153 |
-
</ul>
|
154 |
-
<p><?php _e('The "full" image-size will never be cropped, otherwise you are not able to restore any image-size.',CROP_THUMBS_LANG); ?></p>
|
155 |
-
</div>
|
156 |
-
<?php
|
157 |
-
}
|
158 |
-
|
159 |
-
function callback_debug_js() {
|
160 |
-
$options = get_option($this->optionsKey);
|
161 |
-
$_id = 'debug_js';
|
162 |
-
if(empty($options[$_id])) { $options[$_id] = ''; }
|
163 |
-
echo '<input name="'.$this->optionsKey.'['.$_id.']" id="'.$this->cssPrefix.$_id.'" type="checkbox" value="1" ' . checked( 1, $options[$_id], false) . ' />';
|
164 |
-
}
|
165 |
-
|
166 |
-
function callback_debug_data() {
|
167 |
-
$options = get_option($this->optionsKey);
|
168 |
-
$_id = 'debug_data';
|
169 |
-
if(empty($options[$_id])) { $options[$_id] = ''; }
|
170 |
-
echo '<input name="'.$this->optionsKey.'['.$_id.']" id="'.$this->cssPrefix.$_id.'" type="checkbox" value="1" ' . checked( 1, $options[$_id], false ) . ' />';
|
171 |
-
}
|
172 |
-
|
173 |
-
function validateSettings($input) {
|
174 |
-
$sizes = $this->getImageSizes();
|
175 |
-
|
176 |
-
$post_types = $this->getPostTypes();
|
177 |
-
|
178 |
-
$storeInDb = array();
|
179 |
-
//check input[hide_post_type] --> are the post_types real there
|
180 |
-
if(!empty($input['hide_post_type'])) {
|
181 |
-
foreach($input['hide_post_type'] as $_post_type_name=>$value) {
|
182 |
-
if(isset($post_types[$_post_type_name])) {
|
183 |
-
$storeInDb['hide_post_type'][$_post_type_name] = '1';
|
184 |
-
}
|
185 |
-
}
|
186 |
-
}
|
187 |
-
|
188 |
-
|
189 |
-
//check $input[sizes] --> are post_types correct, are sizes real there
|
190 |
-
if(!empty($input['hide_size'])) {
|
191 |
-
foreach($input['hide_size'] as $_post_type_name=>$size_type) {
|
192 |
-
if(isset($post_types[$_post_type_name])) {
|
193 |
-
foreach($size_type as $_size_name=>$value) {
|
194 |
-
if(isset($sizes[$_size_name])) {
|
195 |
-
$storeInDb['hide_size'][$_post_type_name][$_size_name] = '1';
|
196 |
-
}
|
197 |
-
}
|
198 |
-
}
|
199 |
-
}
|
200 |
-
}
|
201 |
-
|
202 |
-
/* Experimental Section */
|
203 |
-
$_tmpID = 'allow_non_cropped';
|
204 |
-
if(!empty($input[$_tmpID])) {
|
205 |
-
$storeInDb[$_tmpID] = 1;
|
206 |
-
}
|
207 |
-
|
208 |
-
/* Advanced Section */
|
209 |
-
$_tmpID = 'debug_js';
|
210 |
-
if(!empty($input[$_tmpID])) {
|
211 |
-
$storeInDb[$_tmpID] = 1;
|
212 |
-
}
|
213 |
-
|
214 |
-
$_tmpID = 'debug_data';
|
215 |
-
if(!empty($input[$_tmpID])) {
|
216 |
-
$storeInDb[$_tmpID] = 1;
|
217 |
-
}
|
218 |
-
|
219 |
-
return $storeInDb;
|
220 |
-
}
|
221 |
-
|
222 |
-
/* helper functions **********************************************************************************************/
|
223 |
-
|
224 |
-
|
225 |
-
/**
|
226 |
-
* get the post types and delete some prebuild post types that we dont need
|
227 |
-
*/
|
228 |
-
function getPostTypes() {
|
229 |
-
$post_types = get_post_types(array(),'objects');
|
230 |
-
unset($post_types['nav_menu_item']);
|
231 |
-
unset($post_types['revision']);
|
232 |
-
unset($post_types['attachment']);
|
233 |
-
return $post_types;
|
234 |
-
}
|
235 |
-
|
236 |
-
|
237 |
-
/**
|
238 |
-
* <pre>
|
239 |
-
* Creates an array of all image sizes.
|
240 |
-
* @return {array} array of all image sizes
|
241 |
-
* array[<sizename>]['height'] = int
|
242 |
-
* array[<sizename>]['width'] = int
|
243 |
-
* array[<sizename>]['crop'] = boolean
|
244 |
-
* array[<sizename>]['name'] = string --> readable name if provided in "image_size_names_choose", else sizename
|
245 |
-
* </pre>
|
246 |
-
*/
|
247 |
-
function getImageSizes() {
|
248 |
-
global $_wp_additional_image_sizes;//array with the available image sizes
|
249 |
-
$tmp_sizes = array_flip(get_intermediate_image_sizes());
|
250 |
-
foreach($tmp_sizes as $key=>$value) {
|
251 |
-
$tmp_sizes[$key] = $key;
|
252 |
-
}
|
253 |
-
$tmp_sizes = apply_filters( 'image_size_names_choose', $tmp_sizes );
|
254 |
-
|
255 |
-
$sizes = array();
|
256 |
-
foreach( $tmp_sizes as $_size=>$theName ) {
|
257 |
-
|
258 |
-
if ( in_array( $_size,
|
259 |
-
$sizes[ $_size ]['width'] = intval(get_option( $_size . '_size_w' ));
|
260 |
-
$sizes[ $_size ]['height'] = intval(get_option( $_size . '_size_h' ));
|
261 |
-
$sizes[ $_size ]['crop'] = (bool) get_option( $_size . '_crop' );
|
262 |
-
} else {
|
263 |
-
$sizes[ $_size ] = array(
|
264 |
-
'width' => intval($_wp_additional_image_sizes[ $_size ]['width']),
|
265 |
-
'height' => intval($_wp_additional_image_sizes[ $_size ]['height']),
|
266 |
-
'crop' => (bool) $_wp_additional_image_sizes[ $_size ]['crop']
|
267 |
-
);
|
268 |
-
}
|
269 |
-
$sizes[ $_size ]['name'] = $theName;
|
270 |
-
}
|
271 |
-
return $sizes;
|
272 |
-
}
|
273 |
-
|
274 |
-
function getOptions() {
|
275 |
-
return get_option($this->optionsKey);
|
276 |
-
}
|
277 |
-
|
278 |
-
function getNonceBase() {
|
279 |
-
return 'crop-post-thumbnails-nonce-base';
|
280 |
-
}
|
281 |
-
}
|
282 |
-
$cptSettings = new CropThumbnailsSettings();
|
1 |
+
<?php
|
2 |
+
class CropThumbnailsSettings {
|
3 |
+
private $uniqeSettingsId = 'cpt-settings';
|
4 |
+
private $optionsKey = 'crop-post-thumbs';
|
5 |
+
private $cssPrefix = 'cpt_settings_';
|
6 |
+
private $defaultSizes = array('thumbnail','medium','medium_large','large');
|
7 |
+
|
8 |
+
function __construct() {
|
9 |
+
add_action('admin_menu', array($this,'addOptionsPage'));
|
10 |
+
if(is_admin()) {
|
11 |
+
add_filter('plugin_action_links', array($this,'addSettingsLinkToPluginPage'), 10, 2);
|
12 |
+
add_action('admin_head', array($this,'optionsPageStyle'));
|
13 |
+
}
|
14 |
+
}
|
15 |
+
|
16 |
+
function optionsPageStyle() {
|
17 |
+
if(!empty($_REQUEST['page']) && $_REQUEST['page']=='page-cpt') {
|
18 |
+
wp_enqueue_style('crop-thumbnails-options-style',plugins_url('css/options.css',dirname(__FILE__)));
|
19 |
+
}
|
20 |
+
}
|
21 |
+
|
22 |
+
function addSettingsLinkToPluginPage($links, $file) {
|
23 |
+
if ($file === 'crop-thumbnails/crop-thumbnails.php'){
|
24 |
+
$settings_link = '<a href="options-general.php?page=page-cpt" title="">'.__('Settings',CROP_THUMBS_LANG).'</a>';
|
25 |
+
array_unshift( $links, $settings_link );
|
26 |
+
}
|
27 |
+
return $links;
|
28 |
+
}
|
29 |
+
|
30 |
+
function addOptionsPage() {
|
31 |
+
add_options_page(__('Crop Post Thumbnail Page',CROP_THUMBS_LANG), 'Crop-Thumbnails', 'manage_options', 'page-cpt', array($this,'optionsPage'));
|
32 |
+
add_action('admin_init', array($this,'settingsInitialisation'));
|
33 |
+
}
|
34 |
+
|
35 |
+
function optionsPage() { ?>
|
36 |
+
<div class="wrap">
|
37 |
+
<div id="icon-options-general" class="icon32"><br /></div>
|
38 |
+
<h2>Crop-Thumbnails <?php esc_attr_e('Settings',CROP_THUMBS_LANG); ?></h2>
|
39 |
+
<form action="options.php" method="post">
|
40 |
+
<?php settings_fields($this->uniqeSettingsId); ?>
|
41 |
+
<?php do_settings_sections('page1'); ?>
|
42 |
+
|
43 |
+
<div class="<?php echo $this->cssPrefix ?>submit">
|
44 |
+
<input name="Submit" type="submit" value="<?php esc_attr_e('Save Changes',CROP_THUMBS_LANG); ?>" class="button-primary" />
|
45 |
+
</div>
|
46 |
+
</form>
|
47 |
+
|
48 |
+
<div class="<?php echo $this->cssPrefix; ?>paypal">
|
49 |
+
<h3><?php _e('Support the plugin author',CROP_THUMBS_LANG) ?></h3>
|
50 |
+
<p><?php _e('You can support the plugin author <br />(and let him know you love this plugin) <br />by donating via Paypal. Thanks a lot!',CROP_THUMBS_LANG); ?></p>
|
51 |
+
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
52 |
+
<input type="hidden" name="cmd" value="_donations">
|
53 |
+
<input type="hidden" name="business" value="volkmar.kantor@gmx.de">
|
54 |
+
<input type="hidden" name="lc" value="DE">
|
55 |
+
<input type="hidden" name="item_name" value="Volkmar Kantor - totalmedial.de">
|
56 |
+
<input type="hidden" name="item_number" value="crop-thumbnails">
|
57 |
+
<input type="hidden" name="no_note" value="0">
|
58 |
+
<input type="hidden" name="currency_code" value="EUR">
|
59 |
+
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
|
60 |
+
<input type="image" src="https://www.paypalobjects.com/de_DE/DE/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="Jetzt einfach, schnell und sicher online bezahlen – mit PayPal.">
|
61 |
+
<img alt="" border="0" src="https://www.paypalobjects.com/de_DE/i/scr/pixel.gif" width="1" height="1">
|
62 |
+
</form>
|
63 |
+
</div>
|
64 |
+
</div>
|
65 |
+
<?php
|
66 |
+
}
|
67 |
+
|
68 |
+
function settingsInitialisation(){
|
69 |
+
register_setting( $this->uniqeSettingsId, $this->optionsKey, array($this,'validateSettings') );
|
70 |
+
|
71 |
+
$_sectionID = 'choose_sizes_section';
|
72 |
+
add_settings_section($_sectionID, __('Sizes and Post Types',CROP_THUMBS_LANG), array($this,'sectionDescriptionChooseSizes'), 'page1');
|
73 |
+
add_settings_field('sizes', __('Choose the image size options you want to hide for each post type.',CROP_THUMBS_LANG), array($this,'callback_choose_size'), 'page1', $_sectionID);
|
74 |
+
/*
|
75 |
+
$_sectionID = 'experimental';
|
76 |
+
add_settings_section($_sectionID, __('Experimental Settings',CROP_THUMBS_LANG), array($this,'emptySectionDescription'), 'page1');
|
77 |
+
$_tmpID = 'allow_non_cropped';
|
78 |
+
add_settings_field($_tmpID, __('Allow non cropped image-sizes.',CROP_THUMBS_LANG), array($this,'callback_'.$_tmpID), 'page1', $_sectionID, array( 'label_for' => $this->cssPrefix.$_tmpID ));
|
79 |
+
*/
|
80 |
+
$_sectionID = 'developer';
|
81 |
+
add_settings_section($_sectionID, __('Developer Settings',CROP_THUMBS_LANG), array($this,'emptySectionDescription'), 'page1');
|
82 |
+
$_tmpID = 'debug_js';
|
83 |
+
add_settings_field($_tmpID, __('Enable JS-Debug.',CROP_THUMBS_LANG), array($this,'callback_'.$_tmpID), 'page1', $_sectionID, array( 'label_for' => $this->cssPrefix.$_tmpID ));
|
84 |
+
$_tmpID = 'debug_data';
|
85 |
+
add_settings_field($_tmpID, __('Enable Data-Debug.',CROP_THUMBS_LANG), array($this,'callback_'.$_tmpID), 'page1', $_sectionID, array( 'label_for' => $this->cssPrefix.$_tmpID ));
|
86 |
+
}
|
87 |
+
|
88 |
+
function sectionDescriptionChooseSizes() {?>
|
89 |
+
<p>
|
90 |
+
<?php _e('Crop-Thumbnails is designed to make cropping images easy. For some post types, not all crop sizes are needed, but the plugin will automatically create all the crop sizes. Here you can select which crop sizes are available in the cropping interface for each post type..',CROP_THUMBS_LANG) ?>
|
91 |
+
<br /><strong><?php _e('Crop-Thumbnails will only show cropped images. Sizes with no crop will always be hidden.',CROP_THUMBS_LANG); ?></strong>
|
92 |
+
</p>
|
93 |
+
<?php
|
94 |
+
}
|
95 |
+
|
96 |
+
function emptySectionDescription() {/*empty*/ }
|
97 |
+
|
98 |
+
function callback_choose_size() {
|
99 |
+
//get all the data
|
100 |
+
$options = get_option($this->optionsKey);
|
101 |
+
#echo '<pre>'.print_r($options,true).'</pre>';
|
102 |
+
$post_types = $this->getPostTypes();
|
103 |
+
$image_sizes = $this->getImageSizes();
|
104 |
+
|
105 |
+
//output
|
106 |
+
echo '<ul>';
|
107 |
+
foreach($post_types as $post_type=>$value) { ?>
|
108 |
+
<li>
|
109 |
+
<label for="<?php echo $this->cssPrefix.$post_type; ?>">
|
110 |
+
<input id="<?php echo $this->cssPrefix.$post_type;?>" type="checkbox" name="<?php echo $this->optionsKey; ?>[hide_post_type][<?php echo $post_type;?>]" value="1" <?php checked(isset($options['hide_post_type'][$post_type]),true); ?> />
|
111 |
+
<strong><?php echo $value->labels->name; ?></strong>
|
112 |
+
</label>
|
113 |
+
<ul style="margin:1em;">
|
114 |
+
<?php
|
115 |
+
|
116 |
+
foreach($image_sizes as $thumb_name => $data) :
|
117 |
+
$_checked = false;
|
118 |
+
if(!empty($options['hide_size']) && is_array($options['hide_size']) && !empty($options['hide_size'][$post_type][$thumb_name])) {
|
119 |
+
$_checked = true;
|
120 |
+
}
|
121 |
+
if($data['crop']=='1') :
|
122 |
+
?>
|
123 |
+
<li>
|
124 |
+
<label for="<?php echo $this->cssPrefix.$post_type;?>-<?php echo $thumb_name;?>">
|
125 |
+
<input id="<?php echo $this->cssPrefix.$post_type;?>-<?php echo $thumb_name;?>" type="checkbox" name="<?php echo $this->optionsKey; ?>[hide_size][<?php echo $post_type; ?>][<?php echo $thumb_name; ?>]" value="1" <?php echo checked($_checked); ?> />
|
126 |
+
<?php echo $thumb_name;?> - <?php echo $data['width'];?>x<?php echo $data['height'];?> <?php /* echo ($data['crop'] == '1' ? '(cropped)' : '') */?>
|
127 |
+
</label>
|
128 |
+
</li>
|
129 |
+
<?php endif; ?>
|
130 |
+
<?php endforeach ?>
|
131 |
+
</ul>
|
132 |
+
<hr />
|
133 |
+
</li>
|
134 |
+
<?php
|
135 |
+
}
|
136 |
+
echo '</ul>';
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* currently not used
|
141 |
+
*/
|
142 |
+
function callback_allow_non_cropped() {
|
143 |
+
$options = get_option($this->optionsKey);
|
144 |
+
$_id = 'allow_non_cropped';
|
145 |
+
if(empty($options[$_id])) { $options[$_id] = ''; }
|
146 |
+
echo '<input name="'.$this->optionsKey.'['.$_id.']" id="'.$this->cssPrefix.$_id.'" type="checkbox" value="1" ' . checked( 1, $options[$_id], false) . ' />';
|
147 |
+
?>
|
148 |
+
<div class="info">
|
149 |
+
<?php _e('ATTENTION: be aware that you can break things, when you activate this. When activated your are able to cut those images to a spezific dimension that are not cropped. The name of the image will not change. You should be extra carefull when:',CROP_THUMBS_LANG) ?>
|
150 |
+
<ul>
|
151 |
+
<li><?php _e('you had inserted the image before on any page or post. (There may be height and width stored directly in the page-content.)',CROP_THUMBS_LANG); ?></li>
|
152 |
+
<li><?php _e('you use a plugin that expect the original image size. (The original image-size is also "stored" in the filename.)',CROP_THUMBS_LANG); ?></li>
|
153 |
+
</ul>
|
154 |
+
<p><?php _e('The "full" image-size will never be cropped, otherwise you are not able to restore any image-size.',CROP_THUMBS_LANG); ?></p>
|
155 |
+
</div>
|
156 |
+
<?php
|
157 |
+
}
|
158 |
+
|
159 |
+
function callback_debug_js() {
|
160 |
+
$options = get_option($this->optionsKey);
|
161 |
+
$_id = 'debug_js';
|
162 |
+
if(empty($options[$_id])) { $options[$_id] = ''; }
|
163 |
+
echo '<input name="'.$this->optionsKey.'['.$_id.']" id="'.$this->cssPrefix.$_id.'" type="checkbox" value="1" ' . checked( 1, $options[$_id], false) . ' />';
|
164 |
+
}
|
165 |
+
|
166 |
+
function callback_debug_data() {
|
167 |
+
$options = get_option($this->optionsKey);
|
168 |
+
$_id = 'debug_data';
|
169 |
+
if(empty($options[$_id])) { $options[$_id] = ''; }
|
170 |
+
echo '<input name="'.$this->optionsKey.'['.$_id.']" id="'.$this->cssPrefix.$_id.'" type="checkbox" value="1" ' . checked( 1, $options[$_id], false ) . ' />';
|
171 |
+
}
|
172 |
+
|
173 |
+
function validateSettings($input) {
|
174 |
+
$sizes = $this->getImageSizes();
|
175 |
+
|
176 |
+
$post_types = $this->getPostTypes();
|
177 |
+
|
178 |
+
$storeInDb = array();
|
179 |
+
//check input[hide_post_type] --> are the post_types real there
|
180 |
+
if(!empty($input['hide_post_type'])) {
|
181 |
+
foreach($input['hide_post_type'] as $_post_type_name=>$value) {
|
182 |
+
if(isset($post_types[$_post_type_name])) {
|
183 |
+
$storeInDb['hide_post_type'][$_post_type_name] = '1';
|
184 |
+
}
|
185 |
+
}
|
186 |
+
}
|
187 |
+
|
188 |
+
|
189 |
+
//check $input[sizes] --> are post_types correct, are sizes real there
|
190 |
+
if(!empty($input['hide_size'])) {
|
191 |
+
foreach($input['hide_size'] as $_post_type_name=>$size_type) {
|
192 |
+
if(isset($post_types[$_post_type_name])) {
|
193 |
+
foreach($size_type as $_size_name=>$value) {
|
194 |
+
if(isset($sizes[$_size_name])) {
|
195 |
+
$storeInDb['hide_size'][$_post_type_name][$_size_name] = '1';
|
196 |
+
}
|
197 |
+
}
|
198 |
+
}
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
+
/* Experimental Section */
|
203 |
+
$_tmpID = 'allow_non_cropped';
|
204 |
+
if(!empty($input[$_tmpID])) {
|
205 |
+
$storeInDb[$_tmpID] = 1;
|
206 |
+
}
|
207 |
+
|
208 |
+
/* Advanced Section */
|
209 |
+
$_tmpID = 'debug_js';
|
210 |
+
if(!empty($input[$_tmpID])) {
|
211 |
+
$storeInDb[$_tmpID] = 1;
|
212 |
+
}
|
213 |
+
|
214 |
+
$_tmpID = 'debug_data';
|
215 |
+
if(!empty($input[$_tmpID])) {
|
216 |
+
$storeInDb[$_tmpID] = 1;
|
217 |
+
}
|
218 |
+
|
219 |
+
return $storeInDb;
|
220 |
+
}
|
221 |
+
|
222 |
+
/* helper functions **********************************************************************************************/
|
223 |
+
|
224 |
+
|
225 |
+
/**
|
226 |
+
* get the post types and delete some prebuild post types that we dont need
|
227 |
+
*/
|
228 |
+
function getPostTypes() {
|
229 |
+
$post_types = get_post_types(array(),'objects');
|
230 |
+
unset($post_types['nav_menu_item']);
|
231 |
+
unset($post_types['revision']);
|
232 |
+
unset($post_types['attachment']);
|
233 |
+
return $post_types;
|
234 |
+
}
|
235 |
+
|
236 |
+
|
237 |
+
/**
|
238 |
+
* <pre>
|
239 |
+
* Creates an array of all image sizes.
|
240 |
+
* @return {array} array of all image sizes
|
241 |
+
* array[<sizename>]['height'] = int
|
242 |
+
* array[<sizename>]['width'] = int
|
243 |
+
* array[<sizename>]['crop'] = boolean
|
244 |
+
* array[<sizename>]['name'] = string --> readable name if provided in "image_size_names_choose", else sizename
|
245 |
+
* </pre>
|
246 |
+
*/
|
247 |
+
function getImageSizes() {
|
248 |
+
global $_wp_additional_image_sizes;//array with the available image sizes
|
249 |
+
$tmp_sizes = array_flip(get_intermediate_image_sizes());
|
250 |
+
foreach($tmp_sizes as $key=>$value) {
|
251 |
+
$tmp_sizes[$key] = $key;
|
252 |
+
}
|
253 |
+
$tmp_sizes = apply_filters( 'image_size_names_choose', $tmp_sizes );
|
254 |
+
|
255 |
+
$sizes = array();
|
256 |
+
foreach( $tmp_sizes as $_size=>$theName ) {
|
257 |
+
|
258 |
+
if ( in_array( $_size, $this->defaultSizes ) ) {
|
259 |
+
$sizes[ $_size ]['width'] = intval(get_option( $_size . '_size_w' ));
|
260 |
+
$sizes[ $_size ]['height'] = intval(get_option( $_size . '_size_h' ));
|
261 |
+
$sizes[ $_size ]['crop'] = (bool) get_option( $_size . '_crop' );
|
262 |
+
} else {
|
263 |
+
$sizes[ $_size ] = array(
|
264 |
+
'width' => intval($_wp_additional_image_sizes[ $_size ]['width']),
|
265 |
+
'height' => intval($_wp_additional_image_sizes[ $_size ]['height']),
|
266 |
+
'crop' => (bool) $_wp_additional_image_sizes[ $_size ]['crop']
|
267 |
+
);
|
268 |
+
}
|
269 |
+
$sizes[ $_size ]['name'] = $theName;
|
270 |
+
}
|
271 |
+
return $sizes;
|
272 |
+
}
|
273 |
+
|
274 |
+
function getOptions() {
|
275 |
+
return get_option($this->optionsKey);
|
276 |
+
}
|
277 |
+
|
278 |
+
function getNonceBase() {
|
279 |
+
return 'crop-post-thumbnails-nonce-base';
|
280 |
+
}
|
281 |
+
}
|
282 |
+
$cptSettings = new CropThumbnailsSettings();
|
html/template.php
CHANGED
@@ -1,17 +1,17 @@
|
|
1 |
-
<!DOCTYPE HTML>
|
2 |
-
<html>
|
3 |
-
<head>
|
4 |
-
<title>test</title>
|
5 |
-
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
6 |
-
<?php wp_print_styles(); ?>
|
7 |
-
<?php wp_print_scripts(); ?>
|
8 |
-
<script type="text/javascript" charset="utf-8">
|
9 |
-
var ajaxurl = '<?php echo admin_url( 'admin-ajax.php' ); ?>';
|
10 |
-
</script>
|
11 |
-
<?php if(isset($cptScript)) {echo $cptScript;} ?>
|
12 |
-
</head>
|
13 |
-
<body>
|
14 |
-
<?php if(isset($cptContent)) {echo $cptContent;} ?>
|
15 |
-
</body>
|
16 |
-
</html>
|
17 |
|
1 |
+
<!DOCTYPE HTML>
|
2 |
+
<html>
|
3 |
+
<head>
|
4 |
+
<title>test</title>
|
5 |
+
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
6 |
+
<?php wp_print_styles(); ?>
|
7 |
+
<?php wp_print_scripts(); ?>
|
8 |
+
<script type="text/javascript" charset="utf-8">
|
9 |
+
var ajaxurl = '<?php echo admin_url( 'admin-ajax.php' ); ?>';
|
10 |
+
</script>
|
11 |
+
<?php if(isset($cptScript)) {echo $cptScript;} ?>
|
12 |
+
</head>
|
13 |
+
<body>
|
14 |
+
<?php if(isset($cptContent)) {echo $cptContent;} ?>
|
15 |
+
</body>
|
16 |
+
</html>
|
17 |
|
js/cpt-crop.js
CHANGED
@@ -1,237 +1,236 @@
|
|
1 |
-
jQuery(document).ready(function($) {
|
2 |
-
var pluginpath = '../wp-content/plugins/crop-thumbnails';
|
3 |
-
var adminAjaxPath = '../wp-admin/admin-ajax.php';
|
4 |
-
|
5 |
-
//setup for ajax connections
|
6 |
-
$.ajaxSetup({type:'POST', url:adminAjaxPath, cache:false, timeout: (30 * 1000)});
|
7 |
-
|
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);
|
55 |
-
}
|
56 |
-
});
|
57 |
-
|
58 |
-
|
59 |
-
$('.cpt-debug .cpt-debug-handle').click(function(e) {
|
60 |
-
e.preventDefault();
|
61 |
-
$('.cpt-debug').toggleClass('closed');
|
62 |
-
});
|
63 |
-
|
64 |
-
/********************************/
|
65 |
-
function doProcessing(active,cropping) {
|
66 |
-
/*console.log('doProcessing');*/
|
67 |
-
|
68 |
-
var active_array = [];
|
69 |
-
active.find('img').each(function() {
|
70 |
-
active_array.push($(this).data('values'));
|
71 |
-
});
|
72 |
-
|
73 |
-
$('.mainWindow').hide();
|
74 |
-
$('.waitingWindow').show();
|
75 |
-
|
76 |
-
$.ajax({
|
77 |
-
data:{
|
78 |
-
action: 'cptSaveThumbnail',
|
79 |
-
'_ajax_nonce': cpt_ajax_nonce,
|
80 |
-
cookie: encodeURIComponent(document.cookie),
|
81 |
-
selection: JSON.stringify(cropping.api.tellSelect()),
|
82 |
-
raw_values: JSON.stringify(cropping.img.data('values')),
|
83 |
-
active_values: JSON.stringify(active_array),
|
84 |
-
same_ratio_active: $('#cpt-same-ratio').is('checked')
|
85 |
-
},
|
86 |
-
complete : function() {
|
87 |
-
$('.mainWindow').show();
|
88 |
-
$('.waitingWindow').hide();
|
89 |
-
},
|
90 |
-
success : function( response ) {
|
91 |
-
try {
|
92 |
-
var result = JSON.parse(response);
|
93 |
-
|
94 |
-
if(cpt_debug_js) {
|
95 |
-
console.log('Save Function Debug',result.debug);
|
96 |
-
}
|
97 |
-
|
98 |
-
if(typeof result.success == "number") {
|
99 |
-
|
100 |
-
if(result.changed_image_format) {
|
101 |
-
window.location.reload();
|
102 |
-
} else {
|
103 |
-
doCacheBreaker(result.success);
|
104 |
-
}
|
105 |
-
} else {
|
106 |
-
//saving fail
|
107 |
-
alert(result.error);
|
108 |
-
}
|
109 |
-
} catch(e) {
|
110 |
-
alert(e.message+"\n"+response);
|
111 |
-
}
|
112 |
-
|
113 |
-
}
|
114 |
-
});
|
115 |
-
}
|
116 |
-
|
117 |
-
function doCacheBreaker(number) {
|
118 |
-
$('.thumbnail-list li img').each(function() {
|
119 |
-
var imgurl = $(this).attr('src');
|
120 |
-
var last = imgurl.lastIndexOf('?');
|
121 |
-
if(last<0) {
|
122 |
-
imgurl+='?'+number;
|
123 |
-
} else {
|
124 |
-
imgurl = imgurl.substring(0, last) + '?'+number;
|
125 |
-
}
|
126 |
-
$(this).attr('src',imgurl);
|
127 |
-
});
|
128 |
-
}
|
129 |
-
|
130 |
-
function selectAllWithSameRatio(elem) {
|
131 |
-
$('.thumbnail-list li').removeClass('active');
|
132 |
-
if($('#cpt-same-ratio').attr('checked')==='checked') {
|
133 |
-
var ratio = elem.attr('rel');
|
134 |
-
var elements = $('.thumbnail-list li[rel="'+ratio+'"]');
|
135 |
-
elements.addClass('active');
|
136 |
-
} else {
|
137 |
-
elem.addClass('active');
|
138 |
-
}
|
139 |
-
}
|
140 |
-
|
141 |
-
|
142 |
-
function deactivateArea(c) {
|
143 |
-
if(c.api!=-1) {
|
144 |
-
c.api.release();
|
145 |
-
c.api.disable();
|
146 |
-
}
|
147 |
-
}
|
148 |
-
|
149 |
-
function activateArea(c) {
|
150 |
-
deactivateArea(c);
|
151 |
-
var allActiveThumbs = $('.thumbnail-list li.active img');
|
152 |
-
var largestWidth = 0;
|
153 |
-
var largestHeight = 0;
|
154 |
-
var ratio = 0;
|
155 |
-
var crop = true;
|
156 |
-
|
157 |
-
|
158 |
-
//get the options
|
159 |
-
allActiveThumbs.each(function() {
|
160 |
-
var img_data = $(this).data('values');
|
161 |
-
if(ratio === 0) {
|
162 |
-
ratio = img_data.ratio;//initial
|
163 |
-
}
|
164 |
-
if(ratio != img_data.ratio) {
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
var
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
options.
|
197 |
-
options.
|
198 |
-
options.
|
199 |
-
options.
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
options.
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
console.log('
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
});
|
1 |
+
jQuery(document).ready(function($) {
|
2 |
+
var pluginpath = '../wp-content/plugins/crop-thumbnails';
|
3 |
+
var adminAjaxPath = '../wp-admin/admin-ajax.php';
|
4 |
+
|
5 |
+
//setup for ajax connections
|
6 |
+
$.ajaxSetup({type:'POST', url:adminAjaxPath, cache:false, timeout: (30 * 1000)});
|
7 |
+
|
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);
|
55 |
+
}
|
56 |
+
});
|
57 |
+
|
58 |
+
|
59 |
+
$('.cpt-debug .cpt-debug-handle').click(function(e) {
|
60 |
+
e.preventDefault();
|
61 |
+
$('.cpt-debug').toggleClass('closed');
|
62 |
+
});
|
63 |
+
|
64 |
+
/********************************/
|
65 |
+
function doProcessing(active,cropping) {
|
66 |
+
/*console.log('doProcessing');*/
|
67 |
+
|
68 |
+
var active_array = [];
|
69 |
+
active.find('img').each(function() {
|
70 |
+
active_array.push($(this).data('values'));
|
71 |
+
});
|
72 |
+
|
73 |
+
$('.mainWindow').hide();
|
74 |
+
$('.waitingWindow').show();
|
75 |
+
|
76 |
+
$.ajax({
|
77 |
+
data:{
|
78 |
+
action: 'cptSaveThumbnail',
|
79 |
+
'_ajax_nonce': cpt_ajax_nonce,
|
80 |
+
cookie: encodeURIComponent(document.cookie),
|
81 |
+
selection: JSON.stringify(cropping.api.tellSelect()),
|
82 |
+
raw_values: JSON.stringify(cropping.img.data('values')),
|
83 |
+
active_values: JSON.stringify(active_array),
|
84 |
+
same_ratio_active: $('#cpt-same-ratio').is('checked')
|
85 |
+
},
|
86 |
+
complete : function() {
|
87 |
+
$('.mainWindow').show();
|
88 |
+
$('.waitingWindow').hide();
|
89 |
+
},
|
90 |
+
success : function( response ) {
|
91 |
+
try {
|
92 |
+
var result = JSON.parse(response);
|
93 |
+
|
94 |
+
if(cpt_debug_js) {
|
95 |
+
console.log('Save Function Debug',result.debug);
|
96 |
+
}
|
97 |
+
|
98 |
+
if(typeof result.success == "number") {
|
99 |
+
|
100 |
+
if(result.changed_image_format) {
|
101 |
+
window.location.reload();
|
102 |
+
} else {
|
103 |
+
doCacheBreaker(result.success);
|
104 |
+
}
|
105 |
+
} else {
|
106 |
+
//saving fail
|
107 |
+
alert(result.error);
|
108 |
+
}
|
109 |
+
} catch(e) {
|
110 |
+
alert(e.message+"\n"+response);
|
111 |
+
}
|
112 |
+
|
113 |
+
}
|
114 |
+
});
|
115 |
+
}
|
116 |
+
|
117 |
+
function doCacheBreaker(number) {
|
118 |
+
$('.thumbnail-list li img').each(function() {
|
119 |
+
var imgurl = $(this).attr('src');
|
120 |
+
var last = imgurl.lastIndexOf('?');
|
121 |
+
if(last<0) {
|
122 |
+
imgurl+='?'+number;
|
123 |
+
} else {
|
124 |
+
imgurl = imgurl.substring(0, last) + '?'+number;
|
125 |
+
}
|
126 |
+
$(this).attr('src',imgurl);
|
127 |
+
});
|
128 |
+
}
|
129 |
+
|
130 |
+
function selectAllWithSameRatio(elem) {
|
131 |
+
$('.thumbnail-list li').removeClass('active');
|
132 |
+
if($('#cpt-same-ratio').attr('checked')==='checked') {
|
133 |
+
var ratio = elem.attr('rel');
|
134 |
+
var elements = $('.thumbnail-list li[rel="'+ratio+'"]');
|
135 |
+
elements.addClass('active');
|
136 |
+
} else {
|
137 |
+
elem.addClass('active');
|
138 |
+
}
|
139 |
+
}
|
140 |
+
|
141 |
+
|
142 |
+
function deactivateArea(c) {
|
143 |
+
if(c.api!=-1) {
|
144 |
+
c.api.release();
|
145 |
+
c.api.disable();
|
146 |
+
}
|
147 |
+
}
|
148 |
+
|
149 |
+
function activateArea(c) {
|
150 |
+
deactivateArea(c);
|
151 |
+
var allActiveThumbs = $('.thumbnail-list li.active img');
|
152 |
+
var largestWidth = 0;
|
153 |
+
var largestHeight = 0;
|
154 |
+
var ratio = 0;
|
155 |
+
var crop = true;
|
156 |
+
|
157 |
+
|
158 |
+
//get the options
|
159 |
+
allActiveThumbs.each(function() {
|
160 |
+
var img_data = $(this).data('values');
|
161 |
+
if(ratio === 0) {
|
162 |
+
ratio = img_data.ratio;//initial
|
163 |
+
}
|
164 |
+
if(ratio != img_data.ratio) {
|
165 |
+
console.info('Crop Thumbnails: print ratio is different from normal ratio on image size "'+img_data.name+'".');
|
166 |
+
}
|
167 |
+
|
168 |
+
//we only need to check in one dimension, cause per definition all selected images have to use the same ratio
|
169 |
+
if(img_data.width > largestWidth) {
|
170 |
+
largestWidth = img_data.width;
|
171 |
+
largestHeight = img_data.height;
|
172 |
+
}
|
173 |
+
|
174 |
+
//crop also has to be the same on all selected images
|
175 |
+
if(img_data.crop==1) {
|
176 |
+
crop = true;
|
177 |
+
} else {
|
178 |
+
crop = false;
|
179 |
+
}
|
180 |
+
});
|
181 |
+
|
182 |
+
var scale = 0;
|
183 |
+
if(ratio>=0) {
|
184 |
+
scale = c.img.data('values').height / largestHeight;
|
185 |
+
} else {
|
186 |
+
scale = c.img.data('values').width / largestWidth;
|
187 |
+
}
|
188 |
+
|
189 |
+
var preSelect = [ 0, 0, Math.round(scale*c.img.width()), Math.round(scale*c.img.height()) ];
|
190 |
+
var minSize = [ largestWidth, largestHeight ];
|
191 |
+
// END get the options
|
192 |
+
|
193 |
+
//set the options
|
194 |
+
var options = {};
|
195 |
+
options.boxWidth = c.img.width();
|
196 |
+
options.boxHeight = c.img.height();
|
197 |
+
options.trueSize = [cropping.img.data('values').width,c.img.data('values').height];
|
198 |
+
options.aspectRatio = ratio;
|
199 |
+
options.setSelect = preSelect;
|
200 |
+
|
201 |
+
if(largestWidth>cropping.img.data('values').width || largestHeight>cropping.img.data('values').height) {
|
202 |
+
alert(cpt_lang.warningOriginalToSmall);
|
203 |
+
} else {
|
204 |
+
options.minSize = minSize;
|
205 |
+
}
|
206 |
+
|
207 |
+
//correct some options
|
208 |
+
if(ratio>=0) {
|
209 |
+
//add a offset to move the selection in the middle
|
210 |
+
var crop_offset = (cropping.img.data('values').width - scale * largestWidth ) / 2;
|
211 |
+
options.setSelect = [ crop_offset, 0, cropping.img.data('values').width, Math.round(scale*c.img.height()) ];
|
212 |
+
} else {
|
213 |
+
//no offset cause in most cases the the selection is needed in the upper corner (human portrait)
|
214 |
+
options.setSelect = [ 0, 0, Math.round(scale*c.img.width()) , cropping.img.data('values').height];
|
215 |
+
}
|
216 |
+
|
217 |
+
if(scale===Infinity) {
|
218 |
+
options.setSelect = [ 0, 0, Math.round(scale*c.img.width()) , cropping.img.data('values').height];
|
219 |
+
}
|
220 |
+
|
221 |
+
//free scaling
|
222 |
+
if(!crop) {
|
223 |
+
options.aspectRatio = false;
|
224 |
+
options.setSelect = [0,0,cropping.img.data('values').width,cropping.img.data('values').height];
|
225 |
+
console.log('free scaling');
|
226 |
+
}
|
227 |
+
|
228 |
+
//debug
|
229 |
+
if(cpt_debug_js) {
|
230 |
+
console.log('choosed image - data',c.img.data('values'));
|
231 |
+
console.log('JCrop - options',options);
|
232 |
+
}
|
233 |
+
|
234 |
+
c.api = $.Jcrop(c.img, options);
|
235 |
+
}
|
236 |
+
});
|
|
js/jcrop/css/jquery.Jcrop.min.css
CHANGED
@@ -1,29 +1,29 @@
|
|
1 |
-
/* jquery.Jcrop.min.css v0.9.12 (build:20130126) */
|
2 |
-
.jcrop-holder{direction:ltr;text-align:left;}
|
3 |
-
.jcrop-vline,.jcrop-hline{background:#FFF url(Jcrop.gif);font-size:0;position:absolute;}
|
4 |
-
.jcrop-vline{height:100%;width:1px!important;}
|
5 |
-
.jcrop-vline.right{right:0;}
|
6 |
-
.jcrop-hline{height:1px!important;width:100%;}
|
7 |
-
.jcrop-hline.bottom{bottom:0;}
|
8 |
-
.jcrop-tracker{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;height:100%;width:100%;}
|
9 |
-
.jcrop-handle{background-color:#333;border:1px #EEE solid;font-size:1px;height:7px;width:7px;}
|
10 |
-
.jcrop-handle.ord-n{left:50%;margin-left:-4px;margin-top:-4px;top:0;}
|
11 |
-
.jcrop-handle.ord-s{bottom:0;left:50%;margin-bottom:-4px;margin-left:-4px;}
|
12 |
-
.jcrop-handle.ord-e{margin-right:-4px;margin-top:-4px;right:0;top:50%;}
|
13 |
-
.jcrop-handle.ord-w{left:0;margin-left:-4px;margin-top:-4px;top:50%;}
|
14 |
-
.jcrop-handle.ord-nw{left:0;margin-left:-4px;margin-top:-4px;top:0;}
|
15 |
-
.jcrop-handle.ord-ne{margin-right:-4px;margin-top:-4px;right:0;top:0;}
|
16 |
-
.jcrop-handle.ord-se{bottom:0;margin-bottom:-4px;margin-right:-4px;right:0;}
|
17 |
-
.jcrop-handle.ord-sw{bottom:0;left:0;margin-bottom:-4px;margin-left:-4px;}
|
18 |
-
.jcrop-dragbar.ord-n,.jcrop-dragbar.ord-s{height:7px;width:100%;}
|
19 |
-
.jcrop-dragbar.ord-e,.jcrop-dragbar.ord-w{height:100%;width:7px;}
|
20 |
-
.jcrop-dragbar.ord-n{margin-top:-4px;}
|
21 |
-
.jcrop-dragbar.ord-s{bottom:0;margin-bottom:-4px;}
|
22 |
-
.jcrop-dragbar.ord-e{margin-right:-4px;right:0;}
|
23 |
-
.jcrop-dragbar.ord-w{margin-left:-4px;}
|
24 |
-
.jcrop-light .jcrop-vline,.jcrop-light .jcrop-hline{background:#FFF;filter:alpha(opacity=70)!important;opacity:.70!important;}
|
25 |
-
.jcrop-light .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#000;border-color:#FFF;border-radius:3px;}
|
26 |
-
.jcrop-dark .jcrop-vline,.jcrop-dark .jcrop-hline{background:#000;filter:alpha(opacity=70)!important;opacity:.7!important;}
|
27 |
-
.jcrop-dark .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#FFF;border-color:#000;border-radius:3px;}
|
28 |
-
.solid-line .jcrop-vline,.solid-line .jcrop-hline{background:#FFF;}
|
29 |
.jcrop-holder img,img.jcrop-preview{max-width:none;}
|
1 |
+
/* jquery.Jcrop.min.css v0.9.12 (build:20130126) */
|
2 |
+
.jcrop-holder{direction:ltr;text-align:left;}
|
3 |
+
.jcrop-vline,.jcrop-hline{background:#FFF url(Jcrop.gif);font-size:0;position:absolute;}
|
4 |
+
.jcrop-vline{height:100%;width:1px!important;}
|
5 |
+
.jcrop-vline.right{right:0;}
|
6 |
+
.jcrop-hline{height:1px!important;width:100%;}
|
7 |
+
.jcrop-hline.bottom{bottom:0;}
|
8 |
+
.jcrop-tracker{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;height:100%;width:100%;}
|
9 |
+
.jcrop-handle{background-color:#333;border:1px #EEE solid;font-size:1px;height:7px;width:7px;}
|
10 |
+
.jcrop-handle.ord-n{left:50%;margin-left:-4px;margin-top:-4px;top:0;}
|
11 |
+
.jcrop-handle.ord-s{bottom:0;left:50%;margin-bottom:-4px;margin-left:-4px;}
|
12 |
+
.jcrop-handle.ord-e{margin-right:-4px;margin-top:-4px;right:0;top:50%;}
|
13 |
+
.jcrop-handle.ord-w{left:0;margin-left:-4px;margin-top:-4px;top:50%;}
|
14 |
+
.jcrop-handle.ord-nw{left:0;margin-left:-4px;margin-top:-4px;top:0;}
|
15 |
+
.jcrop-handle.ord-ne{margin-right:-4px;margin-top:-4px;right:0;top:0;}
|
16 |
+
.jcrop-handle.ord-se{bottom:0;margin-bottom:-4px;margin-right:-4px;right:0;}
|
17 |
+
.jcrop-handle.ord-sw{bottom:0;left:0;margin-bottom:-4px;margin-left:-4px;}
|
18 |
+
.jcrop-dragbar.ord-n,.jcrop-dragbar.ord-s{height:7px;width:100%;}
|
19 |
+
.jcrop-dragbar.ord-e,.jcrop-dragbar.ord-w{height:100%;width:7px;}
|
20 |
+
.jcrop-dragbar.ord-n{margin-top:-4px;}
|
21 |
+
.jcrop-dragbar.ord-s{bottom:0;margin-bottom:-4px;}
|
22 |
+
.jcrop-dragbar.ord-e{margin-right:-4px;right:0;}
|
23 |
+
.jcrop-dragbar.ord-w{margin-left:-4px;}
|
24 |
+
.jcrop-light .jcrop-vline,.jcrop-light .jcrop-hline{background:#FFF;filter:alpha(opacity=70)!important;opacity:.70!important;}
|
25 |
+
.jcrop-light .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#000;border-color:#FFF;border-radius:3px;}
|
26 |
+
.jcrop-dark .jcrop-vline,.jcrop-dark .jcrop-hline{background:#000;filter:alpha(opacity=70)!important;opacity:.7!important;}
|
27 |
+
.jcrop-dark .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#FFF;border-color:#000;border-radius:3px;}
|
28 |
+
.solid-line .jcrop-vline,.solid-line .jcrop-hline{background:#FFF;}
|
29 |
.jcrop-holder img,img.jcrop-preview{max-width:none;}
|
js/jcrop/js/jquery.Jcrop.min.js
CHANGED
@@ -1,22 +1,22 @@
|
|
1 |
-
/**
|
2 |
-
* jquery.Jcrop.min.js v0.9.12 (build:20130202)
|
3 |
-
* jQuery Image Cropping Plugin - released under MIT License
|
4 |
-
* Copyright (c) 2008-2013 Tapmodo Interactive LLC
|
5 |
-
* https://github.com/tapmodo/Jcrop
|
6 |
-
*/
|
7 |
-
(function(a){a.Jcrop=function(b,c){function i(a){return Math.round(a)+"px"}function j(a){return d.baseClass+"-"+a}function k(){return a.fx.step.hasOwnProperty("backgroundColor")}function l(b){var c=a(b).offset();return[c.left,c.top]}function m(a){return[a.pageX-e[0],a.pageY-e[1]]}function n(b){typeof b!="object"&&(b={}),d=a.extend(d,b),a.each(["onChange","onSelect","onRelease","onDblClick"],function(a,b){typeof d[b]!="function"&&(d[b]=function(){})})}function o(a,b,c){e=l(D),bc.setCursor(a==="move"?a:a+"-resize");if(a==="move")return bc.activateHandlers(q(b),v,c);var d=_.getFixed(),f=r(a),g=_.getCorner(r(f));_.setPressed(_.getCorner(f)),_.setCurrent(g),bc.activateHandlers(p(a,d),v,c)}function p(a,b){return function(c){if(!d.aspectRatio)switch(a){case"e":c[1]=b.y2;break;case"w":c[1]=b.y2;break;case"n":c[0]=b.x2;break;case"s":c[0]=b.x2}else switch(a){case"e":c[1]=b.y+1;break;case"w":c[1]=b.y+1;break;case"n":c[0]=b.x+1;break;case"s":c[0]=b.x+1}_.setCurrent(c),bb.update()}}function q(a){var b=a;return bd.watchKeys
|
8 |
-
(),function(a){_.moveOffset([a[0]-b[0],a[1]-b[1]]),b=a,bb.update()}}function r(a){switch(a){case"n":return"sw";case"s":return"nw";case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function s(a){return function(b){return d.disabled?!1:a==="move"&&!d.allowMove?!1:(e=l(D),W=!0,o(a,m(b)),b.stopPropagation(),b.preventDefault(),!1)}}function t(a,b,c){var d=a.width(),e=a.height();d>b&&b>0&&(d=b,e=b/a.width()*a.height()),e>c&&c>0&&(e=c,d=c/a.height()*a.width()),T=a.width()/d,U=a.height()/e,a.width(d).height(e)}function u(a){return{x:a.x*T,y:a.y*U,x2:a.x2*T,y2:a.y2*U,w:a.w*T,h:a.h*U}}function v(a){var b=_.getFixed();b.w>d.minSelect[0]&&b.h>d.minSelect[1]?(bb.enableHandles(),bb.done()):bb.release(),bc.setCursor(d.allowSelect?"crosshair":"default")}function w(a){if(d.disabled)return!1;if(!d.allowSelect)return!1;W=!0,e=l(D),bb.disableHandles(),bc.setCursor("crosshair");var b=m(a);return _.setPressed(b),bb.update(),bc.activateHandlers(x,v,a.type.substring
|
9 |
-
(0,5)==="touch"),bd.watchKeys(),a.stopPropagation(),a.preventDefault(),!1}function x(a){_.setCurrent(a),bb.update()}function y(){var b=a("<div></div>").addClass(j("tracker"));return g&&b.css({opacity:0,backgroundColor:"white"}),b}function be(a){G.removeClass().addClass(j("holder")).addClass(a)}function bf(a,b){function t(){window.setTimeout(u,l)}var c=a[0]/T,e=a[1]/U,f=a[2]/T,g=a[3]/U;if(X)return;var h=_.flipCoords(c,e,f,g),i=_.getFixed(),j=[i.x,i.y,i.x2,i.y2],k=j,l=d.animationDelay,m=h[0]-j[0],n=h[1]-j[1],o=h[2]-j[2],p=h[3]-j[3],q=0,r=d.swingSpeed;c=k[0],e=k[1],f=k[2],g=k[3],bb.animMode(!0);var s,u=function(){return function(){q+=(100-q)/r,k[0]=Math.round(c+q/100*m),k[1]=Math.round(e+q/100*n),k[2]=Math.round(f+q/100*o),k[3]=Math.round(g+q/100*p),q>=99.8&&(q=100),q<100?(bh(k),t()):(bb.done(),bb.animMode(!1),typeof b=="function"&&b.call(bs))}}();t()}function bg(a){bh([a[0]/T,a[1]/U,a[2]/T,a[3]/U]),d.onSelect.call(bs,u(_.getFixed())),bb.enableHandles()}function bh(a){_.setPressed([a[0],a[1]]),_.setCurrent([a[2],
|
10 |
-
a[3]]),bb.update()}function bi(){return u(_.getFixed())}function bj(){return _.getFixed()}function bk(a){n(a),br()}function bl(){d.disabled=!0,bb.disableHandles(),bb.setCursor("default"),bc.setCursor("default")}function bm(){d.disabled=!1,br()}function bn(){bb.done(),bc.activateHandlers(null,null)}function bo(){G.remove(),A.show(),A.css("visibility","visible"),a(b).removeData("Jcrop")}function bp(a,b){bb.release(),bl();var c=new Image;c.onload=function(){var e=c.width,f=c.height,g=d.boxWidth,h=d.boxHeight;D.width(e).height(f),D.attr("src",a),H.attr("src",a),t(D,g,h),E=D.width(),F=D.height(),H.width(E).height(F),M.width(E+L*2).height(F+L*2),G.width(E).height(F),ba.resize(E,F),bm(),typeof b=="function"&&b.call(bs)},c.src=a}function bq(a,b,c){var e=b||d.bgColor;d.bgFade&&k()&&d.fadeTime&&!c?a.animate({backgroundColor:e},{queue:!1,duration:d.fadeTime}):a.css("backgroundColor",e)}function br(a){d.allowResize?a?bb.enableOnly():bb.enableHandles():bb.disableHandles(),bc.setCursor(d.allowSelect?"crosshair":"default"),bb
|
11 |
-
.setCursor(d.allowMove?"move":"default"),d.hasOwnProperty("trueSize")&&(T=d.trueSize[0]/E,U=d.trueSize[1]/F),d.hasOwnProperty("setSelect")&&(bg(d.setSelect),bb.done(),delete d.setSelect),ba.refresh(),d.bgColor!=N&&(bq(d.shade?ba.getShades():G,d.shade?d.shadeColor||d.bgColor:d.bgColor),N=d.bgColor),O!=d.bgOpacity&&(O=d.bgOpacity,d.shade?ba.refresh():bb.setBgOpacity(O)),P=d.maxSize[0]||0,Q=d.maxSize[1]||0,R=d.minSize[0]||0,S=d.minSize[1]||0,d.hasOwnProperty("outerImage")&&(D.attr("src",d.outerImage),delete d.outerImage),bb.refresh()}var d=a.extend({},a.Jcrop.defaults),e,f=navigator.userAgent.toLowerCase(),g=/msie/.test(f),h=/msie [1-6]\./.test(f);typeof b!="object"&&(b=a(b)[0]),typeof c!="object"&&(c={}),n(c);var z={border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0},A=a(b),B=!0;if(b.tagName=="IMG"){if(A[0].width!=0&&A[0].height!=0)A.width(A[0].width),A.height(A[0].height);else{var C=new Image;C.src=A[0].src,A.width(C.width),A.height(C.height)}var D=A.clone().removeAttr("id").
|
12 |
-
css(z).show();D.width(A.width()),D.height(A.height()),A.after(D).hide()}else D=A.css(z).show(),B=!1,d.shade===null&&(d.shade=!0);t(D,d.boxWidth,d.boxHeight);var E=D.width(),F=D.height(),G=a("<div />").width(E).height(F).addClass(j("holder")).css({position:"relative",backgroundColor:d.bgColor}).insertAfter(A).append(D);d.addClass&&G.addClass(d.addClass);var H=a("<div />"),I=a("<div />").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),J=a("<div />").width("100%").height("100%").css("zIndex",320),K=a("<div />").css({position:"absolute",zIndex:600}).dblclick(function(){var a=_.getFixed();d.onDblClick.call(bs,a)}).insertBefore(D).append(I,J);B&&(H=a("<img />").attr("src",D.attr("src")).css(z).width(E).height(F),I.append(H)),h&&K.css({overflowY:"hidden"});var L=d.boundary,M=y().width(E+L*2).height(F+L*2).css({position:"absolute",top:i(-L),left:i(-L),zIndex:290}).mousedown(w),N=d.bgColor,O=d.bgOpacity,P,Q,R,S,T,U,V=!0,W,X,Y;e=l(D);var Z=function(){function a(){var a={},b=["touchstart"
|
13 |
-
,"touchmove","touchend"],c=document.createElement("div"),d;try{for(d=0;d<b.length;d++){var e=b[d];e="on"+e;var f=e in c;f||(c.setAttribute(e,"return;"),f=typeof c[e]=="function"),a[b[d]]=f}return a.touchstart&&a.touchend&&a.touchmove}catch(g){return!1}}function b(){return d.touchSupport===!0||d.touchSupport===!1?d.touchSupport:a()}return{createDragger:function(a){return function(b){return d.disabled?!1:a==="move"&&!d.allowMove?!1:(e=l(D),W=!0,o(a,m(Z.cfilter(b)),!0),b.stopPropagation(),b.preventDefault(),!1)}},newSelection:function(a){return w(Z.cfilter(a))},cfilter:function(a){return a.pageX=a.originalEvent.changedTouches[0].pageX,a.pageY=a.originalEvent.changedTouches[0].pageY,a},isSupported:a,support:b()}}(),_=function(){function h(d){d=n(d),c=a=d[0],e=b=d[1]}function i(a){a=n(a),f=a[0]-c,g=a[1]-e,c=a[0],e=a[1]}function j(){return[f,g]}function k(d){var f=d[0],g=d[1];0>a+f&&(f-=f+a),0>b+g&&(g-=g+b),F<e+g&&(g+=F-(e+g)),E<c+f&&(f+=E-(c+f)),a+=f,c+=f,b+=g,e+=g}function l(a){var b=m();switch(a){case"ne":return[
|
14 |
-
b.x2,b.y];case"nw":return[b.x,b.y];case"se":return[b.x2,b.y2];case"sw":return[b.x,b.y2]}}function m(){if(!d.aspectRatio)return p();var f=d.aspectRatio,g=d.minSize[0]/T,h=d.maxSize[0]/T,i=d.maxSize[1]/U,j=c-a,k=e-b,l=Math.abs(j),m=Math.abs(k),n=l/m,r,s,t,u;return h===0&&(h=E*10),i===0&&(i=F*10),n<f?(s=e,t=m*f,r=j<0?a-t:t+a,r<0?(r=0,u=Math.abs((r-a)/f),s=k<0?b-u:u+b):r>E&&(r=E,u=Math.abs((r-a)/f),s=k<0?b-u:u+b)):(r=c,u=l/f,s=k<0?b-u:b+u,s<0?(s=0,t=Math.abs((s-b)*f),r=j<0?a-t:t+a):s>F&&(s=F,t=Math.abs(s-b)*f,r=j<0?a-t:t+a)),r>a?(r-a<g?r=a+g:r-a>h&&(r=a+h),s>b?s=b+(r-a)/f:s=b-(r-a)/f):r<a&&(a-r<g?r=a-g:a-r>h&&(r=a-h),s>b?s=b+(a-r)/f:s=b-(a-r)/f),r<0?(a-=r,r=0):r>E&&(a-=r-E,r=E),s<0?(b-=s,s=0):s>F&&(b-=s-F,s=F),q(o(a,b,r,s))}function n(a){return a[0]<0&&(a[0]=0),a[1]<0&&(a[1]=0),a[0]>E&&(a[0]=E),a[1]>F&&(a[1]=F),[Math.round(a[0]),Math.round(a[1])]}function o(a,b,c,d){var e=a,f=c,g=b,h=d;return c<a&&(e=c,f=a),d<b&&(g=d,h=b),[e,g,f,h]}function p(){var d=c-a,f=e-b,g;return P&&Math.abs(d)>P&&(c=d>0?a+P:a-P),Q&&Math.abs
|
15 |
-
(f)>Q&&(e=f>0?b+Q:b-Q),S/U&&Math.abs(f)<S/U&&(e=f>0?b+S/U:b-S/U),R/T&&Math.abs(d)<R/T&&(c=d>0?a+R/T:a-R/T),a<0&&(c-=a,a-=a),b<0&&(e-=b,b-=b),c<0&&(a-=c,c-=c),e<0&&(b-=e,e-=e),c>E&&(g=c-E,a-=g,c-=g),e>F&&(g=e-F,b-=g,e-=g),a>E&&(g=a-F,e-=g,b-=g),b>F&&(g=b-F,e-=g,b-=g),q(o(a,b,c,e))}function q(a){return{x:a[0],y:a[1],x2:a[2],y2:a[3],w:a[2]-a[0],h:a[3]-a[1]}}var a=0,b=0,c=0,e=0,f,g;return{flipCoords:o,setPressed:h,setCurrent:i,getOffset:j,moveOffset:k,getCorner:l,getFixed:m}}(),ba=function(){function f(a,b){e.left.css({height:i(b)}),e.right.css({height:i(b)})}function g(){return h(_.getFixed())}function h(a){e.top.css({left:i(a.x),width:i(a.w),height:i(a.y)}),e.bottom.css({top:i(a.y2),left:i(a.x),width:i(a.w),height:i(F-a.y2)}),e.right.css({left:i(a.x2),width:i(E-a.x2)}),e.left.css({width:i(a.x)})}function j(){return a("<div />").css({position:"absolute",backgroundColor:d.shadeColor||d.bgColor}).appendTo(c)}function k(){b||(b=!0,c.insertBefore(D),g(),bb.setBgOpacity(1,0,1),H.hide(),l(d.shadeColor||d.bgColor,1),bb.
|
16 |
-
isAwake()?n(d.bgOpacity,1):n(1,1))}function l(a,b){bq(p(),a,b)}function m(){b&&(c.remove(),H.show(),b=!1,bb.isAwake()?bb.setBgOpacity(d.bgOpacity,1,1):(bb.setBgOpacity(1,1,1),bb.disableHandles()),bq(G,0,1))}function n(a,e){b&&(d.bgFade&&!e?c.animate({opacity:1-a},{queue:!1,duration:d.fadeTime}):c.css({opacity:1-a}))}function o(){d.shade?k():m(),bb.isAwake()&&n(d.bgOpacity)}function p(){return c.children()}var b=!1,c=a("<div />").css({position:"absolute",zIndex:240,opacity:0}),e={top:j(),left:j().height(F),right:j().height(F),bottom:j()};return{update:g,updateRaw:h,getShades:p,setBgColor:l,enable:k,disable:m,resize:f,refresh:o,opacity:n}}(),bb=function(){function k(b){var c=a("<div />").css({position:"absolute",opacity:d.borderOpacity}).addClass(j(b));return I.append(c),c}function l(b,c){var d=a("<div />").mousedown(s(b)).css({cursor:b+"-resize",position:"absolute",zIndex:c}).addClass("ord-"+b);return Z.support&&d.bind("touchstart.jcrop",Z.createDragger(b)),J.append(d),d}function m(a){var b=d.handleSize,e=l(a,c++
|
17 |
-
).css({opacity:d.handleOpacity}).addClass(j("handle"));return b&&e.width(b).height(b),e}function n(a){return l(a,c++).addClass("jcrop-dragbar")}function o(a){var b;for(b=0;b<a.length;b++)g[a[b]]=n(a[b])}function p(a){var b,c;for(c=0;c<a.length;c++){switch(a[c]){case"n":b="hline";break;case"s":b="hline bottom";break;case"e":b="vline right";break;case"w":b="vline"}e[a[c]]=k(b)}}function q(a){var b;for(b=0;b<a.length;b++)f[a[b]]=m(a[b])}function r(a,b){d.shade||H.css({top:i(-b),left:i(-a)}),K.css({top:i(b),left:i(a)})}function t(a,b){K.width(Math.round(a)).height(Math.round(b))}function v(){var a=_.getFixed();_.setPressed([a.x,a.y]),_.setCurrent([a.x2,a.y2]),w()}function w(a){if(b)return x(a)}function x(a){var c=_.getFixed();t(c.w,c.h),r(c.x,c.y),d.shade&&ba.updateRaw(c),b||A(),a?d.onSelect.call(bs,u(c)):d.onChange.call(bs,u(c))}function z(a,c,e){if(!b&&!c)return;d.bgFade&&!e?D.animate({opacity:a},{queue:!1,duration:d.fadeTime}):D.css("opacity",a)}function A(){K.show(),d.shade?ba.opacity(O):z(O,!0),b=!0}function B
|
18 |
-
(){F(),K.hide(),d.shade?ba.opacity(1):z(1),b=!1,d.onRelease.call(bs)}function C(){h&&J.show()}function E(){h=!0;if(d.allowResize)return J.show(),!0}function F(){h=!1,J.hide()}function G(a){a?(X=!0,F()):(X=!1,E())}function L(){G(!1),v()}var b,c=370,e={},f={},g={},h=!1;d.dragEdges&&a.isArray(d.createDragbars)&&o(d.createDragbars),a.isArray(d.createHandles)&&q(d.createHandles),d.drawBorders&&a.isArray(d.createBorders)&&p(d.createBorders),a(document).bind("touchstart.jcrop-ios",function(b){a(b.currentTarget).hasClass("jcrop-tracker")&&b.stopPropagation()});var M=y().mousedown(s("move")).css({cursor:"move",position:"absolute",zIndex:360});return Z.support&&M.bind("touchstart.jcrop",Z.createDragger("move")),I.append(M),F(),{updateVisible:w,update:x,release:B,refresh:v,isAwake:function(){return b},setCursor:function(a){M.css("cursor",a)},enableHandles:E,enableOnly:function(){h=!0},showHandles:C,disableHandles:F,animMode:G,setBgOpacity:z,done:L}}(),bc=function(){function f(b){M.css({zIndex:450}),b?a(document).bind("touchmove.jcrop"
|
19 |
-
,k).bind("touchend.jcrop",l):e&&a(document).bind("mousemove.jcrop",h).bind("mouseup.jcrop",i)}function g(){M.css({zIndex:290}),a(document).unbind(".jcrop")}function h(a){return b(m(a)),!1}function i(a){return a.preventDefault(),a.stopPropagation(),W&&(W=!1,c(m(a)),bb.isAwake()&&d.onSelect.call(bs,u(_.getFixed())),g(),b=function(){},c=function(){}),!1}function j(a,d,e){return W=!0,b=a,c=d,f(e),!1}function k(a){return b(m(Z.cfilter(a))),!1}function l(a){return i(Z.cfilter(a))}function n(a){M.css("cursor",a)}var b=function(){},c=function(){},e=d.trackDocument;return e||M.mousemove(h).mouseup(i).mouseout(i),D.before(M),{activateHandlers:j,setCursor:n}}(),bd=function(){function e(){d.keySupport&&(b.show(),b.focus())}function f(a){b.hide()}function g(a,b,c){d.allowMove&&(_.moveOffset([b,c]),bb.updateVisible(!0)),a.preventDefault(),a.stopPropagation()}function i(a){if(a.ctrlKey||a.metaKey)return!0;Y=a.shiftKey?!0:!1;var b=Y?10:1;switch(a.keyCode){case 37:g(a,-b,0);break;case 39:g(a,b,0);break;case 38:g(a,0,-b);break;
|
20 |
-
case 40:g(a,0,b);break;case 27:d.allowSelect&&bb.release();break;case 9:return!0}return!1}var b=a('<input type="radio" />').css({position:"fixed",left:"-120px",width:"12px"}).addClass("jcrop-keymgr"),c=a("<div />").css({position:"absolute",overflow:"hidden"}).append(b);return d.keySupport&&(b.keydown(i).blur(f),h||!d.fixedSupport?(b.css({position:"absolute",left:"-20px"}),c.append(b).insertBefore(D)):b.insertBefore(D)),{watchKeys:e}}();Z.support&&M.bind("touchstart.jcrop",Z.newSelection),J.hide(),br(!0);var bs={setImage:bp,animateTo:bf,setSelect:bg,setOptions:bk,tellSelect:bi,tellScaled:bj,setClass:be,disable:bl,enable:bm,cancel:bn,release:bb.release,destroy:bo,focus:bd.watchKeys,getBounds:function(){return[E*T,F*U]},getWidgetSize:function(){return[E,F]},getScaleFactor:function(){return[T,U]},getOptions:function(){return d},ui:{holder:G,selection:K}};return g&&G.bind("selectstart",function(){return!1}),A.data("Jcrop",bs),bs},a.fn.Jcrop=function(b,c){var d;return this.each(function(){if(a(this).data("Jcrop")){if(
|
21 |
-
b==="api")return a(this).data("Jcrop");a(this).data("Jcrop").setOptions(b)}else this.tagName=="IMG"?a.Jcrop.Loader(this,function(){a(this).css({display:"block",visibility:"hidden"}),d=a.Jcrop(this,b),a.isFunction(c)&&c.call(d)}):(a(this).css({display:"block",visibility:"hidden"}),d=a.Jcrop(this,b),a.isFunction(c)&&c.call(d))}),this},a.Jcrop.Loader=function(b,c,d){function g(){f.complete?(e.unbind(".jcloader"),a.isFunction(c)&&c.call(f)):window.setTimeout(g,50)}var e=a(b),f=e[0];e.bind("load.jcloader",g).bind("error.jcloader",function(b){e.unbind(".jcloader"),a.isFunction(d)&&d.call(f)}),f.complete&&a.isFunction(c)&&(e.unbind(".jcloader"),c.call(f))},a.Jcrop.defaults={allowSelect:!0,allowMove:!0,allowResize:!0,trackDocument:!0,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:.6,bgFade:!1,borderOpacity:.4,handleOpacity:.5,handleSize:null,aspectRatio:0,keySupport:!0,createHandles:["n","s","e","w","nw","ne","se","sw"],createDragbars:["n","s","e","w"],createBorders:["n","s","e","w"],drawBorders:!0,dragEdges
|
22 |
:!0,fixedSupport:!0,touchSupport:null,shade:null,boxWidth:0,boxHeight:0,boundary:2,fadeTime:400,animationDelay:20,swingSpeed:3,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){},onDblClick:function(){},onRelease:function(){}}})(jQuery);
|
1 |
+
/**
|
2 |
+
* jquery.Jcrop.min.js v0.9.12 (build:20130202)
|
3 |
+
* jQuery Image Cropping Plugin - released under MIT License
|
4 |
+
* Copyright (c) 2008-2013 Tapmodo Interactive LLC
|
5 |
+
* https://github.com/tapmodo/Jcrop
|
6 |
+
*/
|
7 |
+
(function(a){a.Jcrop=function(b,c){function i(a){return Math.round(a)+"px"}function j(a){return d.baseClass+"-"+a}function k(){return a.fx.step.hasOwnProperty("backgroundColor")}function l(b){var c=a(b).offset();return[c.left,c.top]}function m(a){return[a.pageX-e[0],a.pageY-e[1]]}function n(b){typeof b!="object"&&(b={}),d=a.extend(d,b),a.each(["onChange","onSelect","onRelease","onDblClick"],function(a,b){typeof d[b]!="function"&&(d[b]=function(){})})}function o(a,b,c){e=l(D),bc.setCursor(a==="move"?a:a+"-resize");if(a==="move")return bc.activateHandlers(q(b),v,c);var d=_.getFixed(),f=r(a),g=_.getCorner(r(f));_.setPressed(_.getCorner(f)),_.setCurrent(g),bc.activateHandlers(p(a,d),v,c)}function p(a,b){return function(c){if(!d.aspectRatio)switch(a){case"e":c[1]=b.y2;break;case"w":c[1]=b.y2;break;case"n":c[0]=b.x2;break;case"s":c[0]=b.x2}else switch(a){case"e":c[1]=b.y+1;break;case"w":c[1]=b.y+1;break;case"n":c[0]=b.x+1;break;case"s":c[0]=b.x+1}_.setCurrent(c),bb.update()}}function q(a){var b=a;return bd.watchKeys
|
8 |
+
(),function(a){_.moveOffset([a[0]-b[0],a[1]-b[1]]),b=a,bb.update()}}function r(a){switch(a){case"n":return"sw";case"s":return"nw";case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function s(a){return function(b){return d.disabled?!1:a==="move"&&!d.allowMove?!1:(e=l(D),W=!0,o(a,m(b)),b.stopPropagation(),b.preventDefault(),!1)}}function t(a,b,c){var d=a.width(),e=a.height();d>b&&b>0&&(d=b,e=b/a.width()*a.height()),e>c&&c>0&&(e=c,d=c/a.height()*a.width()),T=a.width()/d,U=a.height()/e,a.width(d).height(e)}function u(a){return{x:a.x*T,y:a.y*U,x2:a.x2*T,y2:a.y2*U,w:a.w*T,h:a.h*U}}function v(a){var b=_.getFixed();b.w>d.minSelect[0]&&b.h>d.minSelect[1]?(bb.enableHandles(),bb.done()):bb.release(),bc.setCursor(d.allowSelect?"crosshair":"default")}function w(a){if(d.disabled)return!1;if(!d.allowSelect)return!1;W=!0,e=l(D),bb.disableHandles(),bc.setCursor("crosshair");var b=m(a);return _.setPressed(b),bb.update(),bc.activateHandlers(x,v,a.type.substring
|
9 |
+
(0,5)==="touch"),bd.watchKeys(),a.stopPropagation(),a.preventDefault(),!1}function x(a){_.setCurrent(a),bb.update()}function y(){var b=a("<div></div>").addClass(j("tracker"));return g&&b.css({opacity:0,backgroundColor:"white"}),b}function be(a){G.removeClass().addClass(j("holder")).addClass(a)}function bf(a,b){function t(){window.setTimeout(u,l)}var c=a[0]/T,e=a[1]/U,f=a[2]/T,g=a[3]/U;if(X)return;var h=_.flipCoords(c,e,f,g),i=_.getFixed(),j=[i.x,i.y,i.x2,i.y2],k=j,l=d.animationDelay,m=h[0]-j[0],n=h[1]-j[1],o=h[2]-j[2],p=h[3]-j[3],q=0,r=d.swingSpeed;c=k[0],e=k[1],f=k[2],g=k[3],bb.animMode(!0);var s,u=function(){return function(){q+=(100-q)/r,k[0]=Math.round(c+q/100*m),k[1]=Math.round(e+q/100*n),k[2]=Math.round(f+q/100*o),k[3]=Math.round(g+q/100*p),q>=99.8&&(q=100),q<100?(bh(k),t()):(bb.done(),bb.animMode(!1),typeof b=="function"&&b.call(bs))}}();t()}function bg(a){bh([a[0]/T,a[1]/U,a[2]/T,a[3]/U]),d.onSelect.call(bs,u(_.getFixed())),bb.enableHandles()}function bh(a){_.setPressed([a[0],a[1]]),_.setCurrent([a[2],
|
10 |
+
a[3]]),bb.update()}function bi(){return u(_.getFixed())}function bj(){return _.getFixed()}function bk(a){n(a),br()}function bl(){d.disabled=!0,bb.disableHandles(),bb.setCursor("default"),bc.setCursor("default")}function bm(){d.disabled=!1,br()}function bn(){bb.done(),bc.activateHandlers(null,null)}function bo(){G.remove(),A.show(),A.css("visibility","visible"),a(b).removeData("Jcrop")}function bp(a,b){bb.release(),bl();var c=new Image;c.onload=function(){var e=c.width,f=c.height,g=d.boxWidth,h=d.boxHeight;D.width(e).height(f),D.attr("src",a),H.attr("src",a),t(D,g,h),E=D.width(),F=D.height(),H.width(E).height(F),M.width(E+L*2).height(F+L*2),G.width(E).height(F),ba.resize(E,F),bm(),typeof b=="function"&&b.call(bs)},c.src=a}function bq(a,b,c){var e=b||d.bgColor;d.bgFade&&k()&&d.fadeTime&&!c?a.animate({backgroundColor:e},{queue:!1,duration:d.fadeTime}):a.css("backgroundColor",e)}function br(a){d.allowResize?a?bb.enableOnly():bb.enableHandles():bb.disableHandles(),bc.setCursor(d.allowSelect?"crosshair":"default"),bb
|
11 |
+
.setCursor(d.allowMove?"move":"default"),d.hasOwnProperty("trueSize")&&(T=d.trueSize[0]/E,U=d.trueSize[1]/F),d.hasOwnProperty("setSelect")&&(bg(d.setSelect),bb.done(),delete d.setSelect),ba.refresh(),d.bgColor!=N&&(bq(d.shade?ba.getShades():G,d.shade?d.shadeColor||d.bgColor:d.bgColor),N=d.bgColor),O!=d.bgOpacity&&(O=d.bgOpacity,d.shade?ba.refresh():bb.setBgOpacity(O)),P=d.maxSize[0]||0,Q=d.maxSize[1]||0,R=d.minSize[0]||0,S=d.minSize[1]||0,d.hasOwnProperty("outerImage")&&(D.attr("src",d.outerImage),delete d.outerImage),bb.refresh()}var d=a.extend({},a.Jcrop.defaults),e,f=navigator.userAgent.toLowerCase(),g=/msie/.test(f),h=/msie [1-6]\./.test(f);typeof b!="object"&&(b=a(b)[0]),typeof c!="object"&&(c={}),n(c);var z={border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0},A=a(b),B=!0;if(b.tagName=="IMG"){if(A[0].width!=0&&A[0].height!=0)A.width(A[0].width),A.height(A[0].height);else{var C=new Image;C.src=A[0].src,A.width(C.width),A.height(C.height)}var D=A.clone().removeAttr("id").
|
12 |
+
css(z).show();D.width(A.width()),D.height(A.height()),A.after(D).hide()}else D=A.css(z).show(),B=!1,d.shade===null&&(d.shade=!0);t(D,d.boxWidth,d.boxHeight);var E=D.width(),F=D.height(),G=a("<div />").width(E).height(F).addClass(j("holder")).css({position:"relative",backgroundColor:d.bgColor}).insertAfter(A).append(D);d.addClass&&G.addClass(d.addClass);var H=a("<div />"),I=a("<div />").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),J=a("<div />").width("100%").height("100%").css("zIndex",320),K=a("<div />").css({position:"absolute",zIndex:600}).dblclick(function(){var a=_.getFixed();d.onDblClick.call(bs,a)}).insertBefore(D).append(I,J);B&&(H=a("<img />").attr("src",D.attr("src")).css(z).width(E).height(F),I.append(H)),h&&K.css({overflowY:"hidden"});var L=d.boundary,M=y().width(E+L*2).height(F+L*2).css({position:"absolute",top:i(-L),left:i(-L),zIndex:290}).mousedown(w),N=d.bgColor,O=d.bgOpacity,P,Q,R,S,T,U,V=!0,W,X,Y;e=l(D);var Z=function(){function a(){var a={},b=["touchstart"
|
13 |
+
,"touchmove","touchend"],c=document.createElement("div"),d;try{for(d=0;d<b.length;d++){var e=b[d];e="on"+e;var f=e in c;f||(c.setAttribute(e,"return;"),f=typeof c[e]=="function"),a[b[d]]=f}return a.touchstart&&a.touchend&&a.touchmove}catch(g){return!1}}function b(){return d.touchSupport===!0||d.touchSupport===!1?d.touchSupport:a()}return{createDragger:function(a){return function(b){return d.disabled?!1:a==="move"&&!d.allowMove?!1:(e=l(D),W=!0,o(a,m(Z.cfilter(b)),!0),b.stopPropagation(),b.preventDefault(),!1)}},newSelection:function(a){return w(Z.cfilter(a))},cfilter:function(a){return a.pageX=a.originalEvent.changedTouches[0].pageX,a.pageY=a.originalEvent.changedTouches[0].pageY,a},isSupported:a,support:b()}}(),_=function(){function h(d){d=n(d),c=a=d[0],e=b=d[1]}function i(a){a=n(a),f=a[0]-c,g=a[1]-e,c=a[0],e=a[1]}function j(){return[f,g]}function k(d){var f=d[0],g=d[1];0>a+f&&(f-=f+a),0>b+g&&(g-=g+b),F<e+g&&(g+=F-(e+g)),E<c+f&&(f+=E-(c+f)),a+=f,c+=f,b+=g,e+=g}function l(a){var b=m();switch(a){case"ne":return[
|
14 |
+
b.x2,b.y];case"nw":return[b.x,b.y];case"se":return[b.x2,b.y2];case"sw":return[b.x,b.y2]}}function m(){if(!d.aspectRatio)return p();var f=d.aspectRatio,g=d.minSize[0]/T,h=d.maxSize[0]/T,i=d.maxSize[1]/U,j=c-a,k=e-b,l=Math.abs(j),m=Math.abs(k),n=l/m,r,s,t,u;return h===0&&(h=E*10),i===0&&(i=F*10),n<f?(s=e,t=m*f,r=j<0?a-t:t+a,r<0?(r=0,u=Math.abs((r-a)/f),s=k<0?b-u:u+b):r>E&&(r=E,u=Math.abs((r-a)/f),s=k<0?b-u:u+b)):(r=c,u=l/f,s=k<0?b-u:b+u,s<0?(s=0,t=Math.abs((s-b)*f),r=j<0?a-t:t+a):s>F&&(s=F,t=Math.abs(s-b)*f,r=j<0?a-t:t+a)),r>a?(r-a<g?r=a+g:r-a>h&&(r=a+h),s>b?s=b+(r-a)/f:s=b-(r-a)/f):r<a&&(a-r<g?r=a-g:a-r>h&&(r=a-h),s>b?s=b+(a-r)/f:s=b-(a-r)/f),r<0?(a-=r,r=0):r>E&&(a-=r-E,r=E),s<0?(b-=s,s=0):s>F&&(b-=s-F,s=F),q(o(a,b,r,s))}function n(a){return a[0]<0&&(a[0]=0),a[1]<0&&(a[1]=0),a[0]>E&&(a[0]=E),a[1]>F&&(a[1]=F),[Math.round(a[0]),Math.round(a[1])]}function o(a,b,c,d){var e=a,f=c,g=b,h=d;return c<a&&(e=c,f=a),d<b&&(g=d,h=b),[e,g,f,h]}function p(){var d=c-a,f=e-b,g;return P&&Math.abs(d)>P&&(c=d>0?a+P:a-P),Q&&Math.abs
|
15 |
+
(f)>Q&&(e=f>0?b+Q:b-Q),S/U&&Math.abs(f)<S/U&&(e=f>0?b+S/U:b-S/U),R/T&&Math.abs(d)<R/T&&(c=d>0?a+R/T:a-R/T),a<0&&(c-=a,a-=a),b<0&&(e-=b,b-=b),c<0&&(a-=c,c-=c),e<0&&(b-=e,e-=e),c>E&&(g=c-E,a-=g,c-=g),e>F&&(g=e-F,b-=g,e-=g),a>E&&(g=a-F,e-=g,b-=g),b>F&&(g=b-F,e-=g,b-=g),q(o(a,b,c,e))}function q(a){return{x:a[0],y:a[1],x2:a[2],y2:a[3],w:a[2]-a[0],h:a[3]-a[1]}}var a=0,b=0,c=0,e=0,f,g;return{flipCoords:o,setPressed:h,setCurrent:i,getOffset:j,moveOffset:k,getCorner:l,getFixed:m}}(),ba=function(){function f(a,b){e.left.css({height:i(b)}),e.right.css({height:i(b)})}function g(){return h(_.getFixed())}function h(a){e.top.css({left:i(a.x),width:i(a.w),height:i(a.y)}),e.bottom.css({top:i(a.y2),left:i(a.x),width:i(a.w),height:i(F-a.y2)}),e.right.css({left:i(a.x2),width:i(E-a.x2)}),e.left.css({width:i(a.x)})}function j(){return a("<div />").css({position:"absolute",backgroundColor:d.shadeColor||d.bgColor}).appendTo(c)}function k(){b||(b=!0,c.insertBefore(D),g(),bb.setBgOpacity(1,0,1),H.hide(),l(d.shadeColor||d.bgColor,1),bb.
|
16 |
+
isAwake()?n(d.bgOpacity,1):n(1,1))}function l(a,b){bq(p(),a,b)}function m(){b&&(c.remove(),H.show(),b=!1,bb.isAwake()?bb.setBgOpacity(d.bgOpacity,1,1):(bb.setBgOpacity(1,1,1),bb.disableHandles()),bq(G,0,1))}function n(a,e){b&&(d.bgFade&&!e?c.animate({opacity:1-a},{queue:!1,duration:d.fadeTime}):c.css({opacity:1-a}))}function o(){d.shade?k():m(),bb.isAwake()&&n(d.bgOpacity)}function p(){return c.children()}var b=!1,c=a("<div />").css({position:"absolute",zIndex:240,opacity:0}),e={top:j(),left:j().height(F),right:j().height(F),bottom:j()};return{update:g,updateRaw:h,getShades:p,setBgColor:l,enable:k,disable:m,resize:f,refresh:o,opacity:n}}(),bb=function(){function k(b){var c=a("<div />").css({position:"absolute",opacity:d.borderOpacity}).addClass(j(b));return I.append(c),c}function l(b,c){var d=a("<div />").mousedown(s(b)).css({cursor:b+"-resize",position:"absolute",zIndex:c}).addClass("ord-"+b);return Z.support&&d.bind("touchstart.jcrop",Z.createDragger(b)),J.append(d),d}function m(a){var b=d.handleSize,e=l(a,c++
|
17 |
+
).css({opacity:d.handleOpacity}).addClass(j("handle"));return b&&e.width(b).height(b),e}function n(a){return l(a,c++).addClass("jcrop-dragbar")}function o(a){var b;for(b=0;b<a.length;b++)g[a[b]]=n(a[b])}function p(a){var b,c;for(c=0;c<a.length;c++){switch(a[c]){case"n":b="hline";break;case"s":b="hline bottom";break;case"e":b="vline right";break;case"w":b="vline"}e[a[c]]=k(b)}}function q(a){var b;for(b=0;b<a.length;b++)f[a[b]]=m(a[b])}function r(a,b){d.shade||H.css({top:i(-b),left:i(-a)}),K.css({top:i(b),left:i(a)})}function t(a,b){K.width(Math.round(a)).height(Math.round(b))}function v(){var a=_.getFixed();_.setPressed([a.x,a.y]),_.setCurrent([a.x2,a.y2]),w()}function w(a){if(b)return x(a)}function x(a){var c=_.getFixed();t(c.w,c.h),r(c.x,c.y),d.shade&&ba.updateRaw(c),b||A(),a?d.onSelect.call(bs,u(c)):d.onChange.call(bs,u(c))}function z(a,c,e){if(!b&&!c)return;d.bgFade&&!e?D.animate({opacity:a},{queue:!1,duration:d.fadeTime}):D.css("opacity",a)}function A(){K.show(),d.shade?ba.opacity(O):z(O,!0),b=!0}function B
|
18 |
+
(){F(),K.hide(),d.shade?ba.opacity(1):z(1),b=!1,d.onRelease.call(bs)}function C(){h&&J.show()}function E(){h=!0;if(d.allowResize)return J.show(),!0}function F(){h=!1,J.hide()}function G(a){a?(X=!0,F()):(X=!1,E())}function L(){G(!1),v()}var b,c=370,e={},f={},g={},h=!1;d.dragEdges&&a.isArray(d.createDragbars)&&o(d.createDragbars),a.isArray(d.createHandles)&&q(d.createHandles),d.drawBorders&&a.isArray(d.createBorders)&&p(d.createBorders),a(document).bind("touchstart.jcrop-ios",function(b){a(b.currentTarget).hasClass("jcrop-tracker")&&b.stopPropagation()});var M=y().mousedown(s("move")).css({cursor:"move",position:"absolute",zIndex:360});return Z.support&&M.bind("touchstart.jcrop",Z.createDragger("move")),I.append(M),F(),{updateVisible:w,update:x,release:B,refresh:v,isAwake:function(){return b},setCursor:function(a){M.css("cursor",a)},enableHandles:E,enableOnly:function(){h=!0},showHandles:C,disableHandles:F,animMode:G,setBgOpacity:z,done:L}}(),bc=function(){function f(b){M.css({zIndex:450}),b?a(document).bind("touchmove.jcrop"
|
19 |
+
,k).bind("touchend.jcrop",l):e&&a(document).bind("mousemove.jcrop",h).bind("mouseup.jcrop",i)}function g(){M.css({zIndex:290}),a(document).unbind(".jcrop")}function h(a){return b(m(a)),!1}function i(a){return a.preventDefault(),a.stopPropagation(),W&&(W=!1,c(m(a)),bb.isAwake()&&d.onSelect.call(bs,u(_.getFixed())),g(),b=function(){},c=function(){}),!1}function j(a,d,e){return W=!0,b=a,c=d,f(e),!1}function k(a){return b(m(Z.cfilter(a))),!1}function l(a){return i(Z.cfilter(a))}function n(a){M.css("cursor",a)}var b=function(){},c=function(){},e=d.trackDocument;return e||M.mousemove(h).mouseup(i).mouseout(i),D.before(M),{activateHandlers:j,setCursor:n}}(),bd=function(){function e(){d.keySupport&&(b.show(),b.focus())}function f(a){b.hide()}function g(a,b,c){d.allowMove&&(_.moveOffset([b,c]),bb.updateVisible(!0)),a.preventDefault(),a.stopPropagation()}function i(a){if(a.ctrlKey||a.metaKey)return!0;Y=a.shiftKey?!0:!1;var b=Y?10:1;switch(a.keyCode){case 37:g(a,-b,0);break;case 39:g(a,b,0);break;case 38:g(a,0,-b);break;
|
20 |
+
case 40:g(a,0,b);break;case 27:d.allowSelect&&bb.release();break;case 9:return!0}return!1}var b=a('<input type="radio" />').css({position:"fixed",left:"-120px",width:"12px"}).addClass("jcrop-keymgr"),c=a("<div />").css({position:"absolute",overflow:"hidden"}).append(b);return d.keySupport&&(b.keydown(i).blur(f),h||!d.fixedSupport?(b.css({position:"absolute",left:"-20px"}),c.append(b).insertBefore(D)):b.insertBefore(D)),{watchKeys:e}}();Z.support&&M.bind("touchstart.jcrop",Z.newSelection),J.hide(),br(!0);var bs={setImage:bp,animateTo:bf,setSelect:bg,setOptions:bk,tellSelect:bi,tellScaled:bj,setClass:be,disable:bl,enable:bm,cancel:bn,release:bb.release,destroy:bo,focus:bd.watchKeys,getBounds:function(){return[E*T,F*U]},getWidgetSize:function(){return[E,F]},getScaleFactor:function(){return[T,U]},getOptions:function(){return d},ui:{holder:G,selection:K}};return g&&G.bind("selectstart",function(){return!1}),A.data("Jcrop",bs),bs},a.fn.Jcrop=function(b,c){var d;return this.each(function(){if(a(this).data("Jcrop")){if(
|
21 |
+
b==="api")return a(this).data("Jcrop");a(this).data("Jcrop").setOptions(b)}else this.tagName=="IMG"?a.Jcrop.Loader(this,function(){a(this).css({display:"block",visibility:"hidden"}),d=a.Jcrop(this,b),a.isFunction(c)&&c.call(d)}):(a(this).css({display:"block",visibility:"hidden"}),d=a.Jcrop(this,b),a.isFunction(c)&&c.call(d))}),this},a.Jcrop.Loader=function(b,c,d){function g(){f.complete?(e.unbind(".jcloader"),a.isFunction(c)&&c.call(f)):window.setTimeout(g,50)}var e=a(b),f=e[0];e.bind("load.jcloader",g).bind("error.jcloader",function(b){e.unbind(".jcloader"),a.isFunction(d)&&d.call(f)}),f.complete&&a.isFunction(c)&&(e.unbind(".jcloader"),c.call(f))},a.Jcrop.defaults={allowSelect:!0,allowMove:!0,allowResize:!0,trackDocument:!0,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:.6,bgFade:!1,borderOpacity:.4,handleOpacity:.5,handleSize:null,aspectRatio:0,keySupport:!0,createHandles:["n","s","e","w","nw","ne","se","sw"],createDragbars:["n","s","e","w"],createBorders:["n","s","e","w"],drawBorders:!0,dragEdges
|
22 |
:!0,fixedSupport:!0,touchSupport:null,shade:null,boxWidth:0,boxHeight:0,boundary:2,fadeTime:400,animationDelay:20,swingSpeed:3,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){},onDblClick:function(){},onRelease:function(){}}})(jQuery);
|
lang/cpt_lang-de_DE.po
CHANGED
@@ -1,327 +1,327 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Crop-Post-Thumbnails\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2015-11-18 22:25+0100\n"
|
6 |
-
"PO-Revision-Date: 2015-11-18 22:25+0100\n"
|
7 |
-
"Last-Translator: Volkmar Kantor <volkmar.kantor@gmx.de>\n"
|
8 |
-
"Language-Team: \n"
|
9 |
-
"Language: de_DE\n"
|
10 |
-
"MIME-Version: 1.0\n"
|
11 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
-
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"X-Poedit-KeywordsList: __;_e;esc_attr_e;esc_html_e;esc_html__\n"
|
14 |
-
"X-Poedit-Basepath: .\n"
|
15 |
-
"X-Generator: Poedit 1.7.6\n"
|
16 |
-
"X-Poedit-SearchPath-0: ..\n"
|
17 |
-
|
18 |
-
#: ../crop-thumbnails.php:35
|
19 |
-
msgid "Crop your thumbnails, the easy way."
|
20 |
-
msgstr "Zuschnitt ihrer Artikelbilder - einfach gemacht."
|
21 |
-
|
22 |
-
#: ../functions/backendpreparer.php:84 ../functions/backendpreparer.php:87
|
23 |
-
msgid "Crop Thumbnails"
|
24 |
-
msgstr "Bilder Zuschneiden"
|
25 |
-
|
26 |
-
#: ../functions/backendpreparer.php:98 ../functions/backendpreparer.php:101
|
27 |
-
msgid "Crop Featured Image"
|
28 |
-
msgstr "Artikelbild zuschneiden"
|
29 |
-
|
30 |
-
#: ../functions/backendpreparer.php:127 ../functions/backendpreparer.php:130
|
31 |
-
#: ../functions/backendpreparer.php:253
|
32 |
-
msgid "Crop Thumbnail"
|
33 |
-
msgstr "Bild zuschneiden"
|
34 |
-
|
35 |
-
#: ../functions/editor.php:25
|
36 |
-
msgid "You are not allowed to do this."
|
37 |
-
msgstr "Sie haben keine Rechte diese Aktion auszuführen."
|
38 |
-
|
39 |
-
#: ../functions/editor.php:41
|
40 |
-
msgid "No featured image set for this post until now."
|
41 |
-
msgstr "Bisher ist kein Artikelbild gesetzt worden."
|
42 |
-
|
43 |
-
#: ../functions/editor.php:45
|
44 |
-
msgid "An error occurred!"
|
45 |
-
msgstr "Es ist ein Fehler aufgetretten!"
|
46 |
-
|
47 |
-
#: ../functions/editor.php:78 ../functions/editor.php:204
|
48 |
-
msgid "Cropping is disabled for this post-type."
|
49 |
-
msgstr "Das Zuschneiden ist für diesen Eintragstyp deaktiviert."
|
50 |
-
|
51 |
-
#: ../functions/editor.php:80
|
52 |
-
msgid ""
|
53 |
-
"No images attached to this post yet. Please upload some via the upload "
|
54 |
-
"dialog."
|
55 |
-
msgstr "Zu diesem Eintrag wurden bisher keine Bilder hinzugefügt."
|
56 |
-
|
57 |
-
#: ../functions/editor.php:101
|
58 |
-
msgid "Choose the image you want to crop."
|
59 |
-
msgstr "Wählen Sie das Bild aus, das Sie zuschneiden wollen."
|
60 |
-
|
61 |
-
#: ../functions/editor.php:107
|
62 |
-
msgid "Post Thumbnail"
|
63 |
-
msgstr "Artikel-Vorschaubild"
|
64 |
-
|
65 |
-
#: ../functions/editor.php:107
|
66 |
-
#, php-format
|
67 |
-
msgid "Image %d"
|
68 |
-
msgstr "Bild %d"
|
69 |
-
|
70 |
-
#: ../functions/editor.php:180
|
71 |
-
msgid "Bug--this should not have occurred."
|
72 |
-
msgstr ""
|
73 |
-
"BUG - dieser Fall hätte nie eintretten drüfen - Plugin-Autor benachrichtigen."
|
74 |
-
|
75 |
-
#: ../functions/editor.php:181
|
76 |
-
msgid ""
|
77 |
-
"Warning: the original image is too small to be cropped in good quality with "
|
78 |
-
"this thumbnail size."
|
79 |
-
msgstr ""
|
80 |
-
"Warung: das Original-Bild ist zu klein um es für diese Thumbnail-Größe in "
|
81 |
-
"guter Qualität zuzuschneiden."
|
82 |
-
|
83 |
-
#: ../functions/editor.php:182
|
84 |
-
msgid "First, select an image. Then, click once again."
|
85 |
-
msgstr "Erst ein Bild auswählen, danach erneut probieren."
|
86 |
-
|
87 |
-
#: ../functions/editor.php:209
|
88 |
-
msgid "back to image list"
|
89 |
-
msgstr "Zurück zur Bild-Übersicht"
|
90 |
-
|
91 |
-
#: ../functions/editor.php:210
|
92 |
-
msgid "Please wait until the images are cropped."
|
93 |
-
msgstr "Bitte warten Sie bis die Bilder zugeschnitten wurden."
|
94 |
-
|
95 |
-
#: ../functions/editor.php:213
|
96 |
-
msgid "Raw"
|
97 |
-
msgstr "Original-Bild"
|
98 |
-
|
99 |
-
#: ../functions/editor.php:213 ../functions/editor.php:279
|
100 |
-
msgid "pixel"
|
101 |
-
msgstr "Pixel"
|
102 |
-
|
103 |
-
#: ../functions/editor.php:215
|
104 |
-
msgid "Save Crop"
|
105 |
-
msgstr "Zuschnitt übernehmen"
|
106 |
-
|
107 |
-
#: ../functions/editor.php:216
|
108 |
-
msgid "Quick Instructions"
|
109 |
-
msgstr "Schnell-Anleitung"
|
110 |
-
|
111 |
-
#: ../functions/editor.php:218
|
112 |
-
msgid "Step 1: Choose an image from the right."
|
113 |
-
msgstr "Schritt 1: Wählen Sie ein Bild von der rechten Seite."
|
114 |
-
|
115 |
-
#: ../functions/editor.php:219
|
116 |
-
msgid ""
|
117 |
-
"Step 2: Use your mouse to change the size of the rectangle on the image "
|
118 |
-
"above."
|
119 |
-
msgstr ""
|
120 |
-
"Schritt 2: Benutzen Sie die Maus um die Größe des Rechtecks im oberen Bild "
|
121 |
-
"zu ändern."
|
122 |
-
|
123 |
-
#: ../functions/editor.php:220
|
124 |
-
msgid "Step 3: Click on \"Save Crop\"."
|
125 |
-
msgstr "Schritt 3: Klicken Sie auf \"Zuschnitt übernehmen\"."
|
126 |
-
|
127 |
-
#: ../functions/editor.php:225
|
128 |
-
msgid "Crop all images with same ratio at once"
|
129 |
-
msgstr "bei gleichem Seitenverhältnis gemeinsam auswählen"
|
130 |
-
|
131 |
-
#: ../functions/editor.php:226
|
132 |
-
msgid "deselect all"
|
133 |
-
msgstr "nichts auswählen"
|
134 |
-
|
135 |
-
#: ../functions/editor.php:262
|
136 |
-
msgid "cropped"
|
137 |
-
msgstr "zugeschnitten"
|
138 |
-
|
139 |
-
#: ../functions/editor.php:271
|
140 |
-
msgid "maximum"
|
141 |
-
msgstr "Maximum"
|
142 |
-
|
143 |
-
#: ../functions/editor.php:286
|
144 |
-
msgid "Original image size too small for good crop quality!"
|
145 |
-
msgstr "Original-Bild ist zu klein für guten Bildzuschnitt!"
|
146 |
-
|
147 |
-
#: ../functions/editor.php:292
|
148 |
-
msgid "Dimensions:"
|
149 |
-
msgstr "Größe:"
|
150 |
-
|
151 |
-
#: ../functions/editor.php:293
|
152 |
-
msgid "Ratio:"
|
153 |
-
msgstr "Seitenverhältnis:"
|
154 |
-
|
155 |
-
#: ../functions/save.php:106
|
156 |
-
#, php-format
|
157 |
-
msgid "Can't generate filesize '%s'."
|
158 |
-
msgstr "Die Bildgröße '%s' konnte nicht generiert werden."
|
159 |
-
|
160 |
-
#: ../functions/save.php:113
|
161 |
-
msgid "Can't copy temporary file to media library."
|
162 |
-
msgstr "Kopieren vom temporären Verzeichnis in die Mediathek fehlgeschlagen."
|
163 |
-
|
164 |
-
#: ../functions/save.php:117
|
165 |
-
msgid "Can't delete temporary file."
|
166 |
-
msgstr "Löschen der temporären Datei fehlgeschlagen."
|
167 |
-
|
168 |
-
#: ../functions/save.php:205
|
169 |
-
msgid "ERROR: Security Check failed (maybe a timeout - please try again)."
|
170 |
-
msgstr ""
|
171 |
-
"Fehler: Sicherheitsüberprüfung fehlgeschlagen (vielleicht eine "
|
172 |
-
"Zeitüberschreitung - bitte versuchen Sie es noch einmal)."
|
173 |
-
|
174 |
-
#: ../functions/save.php:209
|
175 |
-
msgid "ERROR: Submitted data is incomplete."
|
176 |
-
msgstr "Fehler: Übermittelte Daten sind nicht vollständig."
|
177 |
-
|
178 |
-
#: ../functions/save.php:217
|
179 |
-
msgid "Cropping to these dimensions on this image is not possible."
|
180 |
-
msgstr ""
|
181 |
-
"Das Zuschneiden mit diesen Einstellungen ist bei diesem Bild nicht möglich."
|
182 |
-
|
183 |
-
#: ../functions/save.php:228
|
184 |
-
msgid "ERROR: Can't find original image in database!"
|
185 |
-
msgstr "Fehler: Konnte die Original Bild nicht in der Datenbank finden!"
|
186 |
-
|
187 |
-
#: ../functions/save.php:231
|
188 |
-
msgid "ERROR: Can't find original image file!"
|
189 |
-
msgstr "Fehler: Konnte die Original-Bilddatei nicht finden!"
|
190 |
-
|
191 |
-
#: ../functions/save.php:234
|
192 |
-
msgid "ERROR: Can't find original image metadata!"
|
193 |
-
msgstr "Fehler: Konnte Original-Bild-Metadaten nicht finden!"
|
194 |
-
|
195 |
-
#: ../functions/settings.php:24 ../functions/settings.php:38
|
196 |
-
msgid "Settings"
|
197 |
-
msgstr "Einstellungen"
|
198 |
-
|
199 |
-
#: ../functions/settings.php:31
|
200 |
-
msgid "Crop Post Thumbnail Page"
|
201 |
-
msgstr "Crop-Post-Thumbnail Seite"
|
202 |
-
|
203 |
-
#: ../functions/settings.php:44
|
204 |
-
msgid "Save Changes"
|
205 |
-
msgstr "Einstellungen speichern"
|
206 |
-
|
207 |
-
#: ../functions/settings.php:49
|
208 |
-
msgid "Support the plugin author"
|
209 |
-
msgstr "Unterstützen Sie den Plugin Entwickler"
|
210 |
-
|
211 |
-
#: ../functions/settings.php:50
|
212 |
-
msgid ""
|
213 |
-
"You can support the plugin author <br />(and let him know you love this "
|
214 |
-
"plugin) <br />by donating via Paypal. Thanks a lot!"
|
215 |
-
msgstr ""
|
216 |
-
"Sie können den Entwickler unterstützen <br />(und ihn so wissen lassen, dass "
|
217 |
-
"sie dieses Plugin lieben) <br />indem sie ihm eine Paypal-Spende zukommen "
|
218 |
-
"lassen. <br />Vielen Dank!"
|
219 |
-
|
220 |
-
#: ../functions/settings.php:72
|
221 |
-
msgid "Sizes and Post Types"
|
222 |
-
msgstr "Größen und Eintragstypen"
|
223 |
-
|
224 |
-
#: ../functions/settings.php:73
|
225 |
-
msgid "Choose the image size options you want to hide for each post type."
|
226 |
-
msgstr ""
|
227 |
-
"Wählen sie die Bildgrößen die ausgeblendet werden sollen. Wählen Sie einen "
|
228 |
-
"Eintragstyp um das Zuschneiden in diesen Einträge komplett zu verhindern."
|
229 |
-
|
230 |
-
#: ../functions/settings.php:81
|
231 |
-
#, fuzzy
|
232 |
-
msgid "Developer Settings"
|
233 |
-
msgstr "Einstellungen"
|
234 |
-
|
235 |
-
#: ../functions/settings.php:83
|
236 |
-
msgid "Enable JS-Debug."
|
237 |
-
msgstr "JS-Debug einschalten"
|
238 |
-
|
239 |
-
#: ../functions/settings.php:85
|
240 |
-
msgid "Enable Data-Debug."
|
241 |
-
msgstr "Daten-Debug einschalten"
|
242 |
-
|
243 |
-
#: ../functions/settings.php:90
|
244 |
-
msgid ""
|
245 |
-
"Crop-Thumbnails is designed to make cropping images easy. For some post "
|
246 |
-
"types, not all crop sizes are needed, but the plugin will automatically "
|
247 |
-
"create all the crop sizes. Here you can select which crop sizes are "
|
248 |
-
"available in the cropping interface for each post type.."
|
249 |
-
msgstr ""
|
250 |
-
"Crop Thumbnails wurde erstellt um das Zuschneiden von Bildern für den "
|
251 |
-
"Benutzer zu erleichtern. Oft muss der Nutzer nur eine Bildgröße zuschneiden, "
|
252 |
-
"abhängig vom Typ des Eintrags. Das System (Wordpress) wird aber immer alle "
|
253 |
-
"größen erstellen. Hier können Sie auswählen für welche Eintragstypen welche "
|
254 |
-
"Bildgrößen in der Plugin-Oberfläche angezeigt werden sollen."
|
255 |
-
|
256 |
-
#: ../functions/settings.php:91
|
257 |
-
msgid ""
|
258 |
-
"Crop-Thumbnails will only show cropped images. Sizes with no crop will "
|
259 |
-
"always be hidden."
|
260 |
-
msgstr ""
|
261 |
-
"Crop Thumbnails wird nur Bilder anzeigen die einen Zuschnitt besitzen. "
|
262 |
-
"Bildgrößen ohne Zuschnitt werden immer ausgeblendet."
|
263 |
-
|
264 |
-
#: ../functions/settings.php:149
|
265 |
-
msgid ""
|
266 |
-
"ATTENTION: be aware that you can break things, when you activate this. When "
|
267 |
-
"activated your are able to cut those images to a spezific dimension that are "
|
268 |
-
"not cropped. The name of the image will not change. You should be extra "
|
269 |
-
"carefull when:"
|
270 |
-
msgstr ""
|
271 |
-
|
272 |
-
#: ../functions/settings.php:151
|
273 |
-
msgid ""
|
274 |
-
"you had inserted the image before on any page or post. (There may be height "
|
275 |
-
"and width stored directly in the page-content.)"
|
276 |
-
msgstr ""
|
277 |
-
|
278 |
-
#: ../functions/settings.php:152
|
279 |
-
msgid ""
|
280 |
-
"you use a plugin that expect the original image size. (The original image-"
|
281 |
-
"size is also \"stored\" in the filename.)"
|
282 |
-
msgstr ""
|
283 |
-
|
284 |
-
#: ../functions/settings.php:154
|
285 |
-
msgid ""
|
286 |
-
"The \"full\" image-size will never be cropped, otherwise you are not able to "
|
287 |
-
"restore any image-size."
|
288 |
-
msgstr ""
|
289 |
-
|
290 |
-
#~ msgid "Cant generate filesize \"%s\"."
|
291 |
-
#~ msgstr "Cant generate filesize \"%s\"."
|
292 |
-
|
293 |
-
#~ msgid "Choose the image size options you want to hide for each post type. "
|
294 |
-
#~ msgstr ""
|
295 |
-
#~ "Wählen sie die Bildgrößen die ausgeblendet werden sollen. Wählen Sie "
|
296 |
-
#~ "einen Eintragstyp um das Zuschneiden in diesen Einträge komplett zu "
|
297 |
-
#~ "verhindern."
|
298 |
-
|
299 |
-
#~ msgid "Crop Thumbnails - Settings"
|
300 |
-
#~ msgstr "Crop Thumbnails - Einstellungen"
|
301 |
-
|
302 |
-
#~ msgid ""
|
303 |
-
#~ "Wrong ratio!<br \\>OK - release images selected so far.<br \\>Cancel - "
|
304 |
-
#~ "keep selected images so far."
|
305 |
-
#~ msgstr ""
|
306 |
-
#~ "Falsches Seitenverhältnis!<br \\>OK - bisher gewählte Bilder abwählen<br "
|
307 |
-
#~ "\\>Abbrechen - bisher gewählte Bilder belassen."
|
308 |
-
|
309 |
-
#~ msgid ""
|
310 |
-
#~ "Hint: If you have one image selected, you can click on \"select images "
|
311 |
-
#~ "with same ratio\", to select all with the ratio of these image."
|
312 |
-
#~ msgstr ""
|
313 |
-
#~ "Tipp: Wenn Sie ein Bild ausgewählt haben, und auf \"alle Bilder mit "
|
314 |
-
#~ "diesem Seitenverhältnis auswählen\" klicken, werden automatisch alle "
|
315 |
-
#~ "Einträgen mit diesem Seitenverhältnis ausgewählt."
|
316 |
-
|
317 |
-
#~ msgid ""
|
318 |
-
#~ "Choose the post-types you want to show the crop-editor and define what "
|
319 |
-
#~ "sizes the editor should be working on. <strong>Only cropped image sizes "
|
320 |
-
#~ "will be showing.</strong>"
|
321 |
-
#~ msgstr ""
|
322 |
-
#~ "Wählen Sie die Eintragstypen die sie im Zuschnitt-Editor verwenden "
|
323 |
-
#~ "wollen, und wählen sie die Größen mit denen der Editor arbeiten soll. "
|
324 |
-
#~ "<strong>Nur zugeschnittene Bildgrößen sind sichtbar.</strong>"
|
325 |
-
|
326 |
-
#~ msgid "Wrong ratio!"
|
327 |
-
#~ msgstr "Falsches Seitenverhältnis"
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Crop-Post-Thumbnails\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2015-11-18 22:25+0100\n"
|
6 |
+
"PO-Revision-Date: 2015-11-18 22:25+0100\n"
|
7 |
+
"Last-Translator: Volkmar Kantor <volkmar.kantor@gmx.de>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"Language: de_DE\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e;esc_attr_e;esc_html_e;esc_html__\n"
|
14 |
+
"X-Poedit-Basepath: .\n"
|
15 |
+
"X-Generator: Poedit 1.7.6\n"
|
16 |
+
"X-Poedit-SearchPath-0: ..\n"
|
17 |
+
|
18 |
+
#: ../crop-thumbnails.php:35
|
19 |
+
msgid "Crop your thumbnails, the easy way."
|
20 |
+
msgstr "Zuschnitt ihrer Artikelbilder - einfach gemacht."
|
21 |
+
|
22 |
+
#: ../functions/backendpreparer.php:84 ../functions/backendpreparer.php:87
|
23 |
+
msgid "Crop Thumbnails"
|
24 |
+
msgstr "Bilder Zuschneiden"
|
25 |
+
|
26 |
+
#: ../functions/backendpreparer.php:98 ../functions/backendpreparer.php:101
|
27 |
+
msgid "Crop Featured Image"
|
28 |
+
msgstr "Artikelbild zuschneiden"
|
29 |
+
|
30 |
+
#: ../functions/backendpreparer.php:127 ../functions/backendpreparer.php:130
|
31 |
+
#: ../functions/backendpreparer.php:253
|
32 |
+
msgid "Crop Thumbnail"
|
33 |
+
msgstr "Bild zuschneiden"
|
34 |
+
|
35 |
+
#: ../functions/editor.php:25
|
36 |
+
msgid "You are not allowed to do this."
|
37 |
+
msgstr "Sie haben keine Rechte diese Aktion auszuführen."
|
38 |
+
|
39 |
+
#: ../functions/editor.php:41
|
40 |
+
msgid "No featured image set for this post until now."
|
41 |
+
msgstr "Bisher ist kein Artikelbild gesetzt worden."
|
42 |
+
|
43 |
+
#: ../functions/editor.php:45
|
44 |
+
msgid "An error occurred!"
|
45 |
+
msgstr "Es ist ein Fehler aufgetretten!"
|
46 |
+
|
47 |
+
#: ../functions/editor.php:78 ../functions/editor.php:204
|
48 |
+
msgid "Cropping is disabled for this post-type."
|
49 |
+
msgstr "Das Zuschneiden ist für diesen Eintragstyp deaktiviert."
|
50 |
+
|
51 |
+
#: ../functions/editor.php:80
|
52 |
+
msgid ""
|
53 |
+
"No images attached to this post yet. Please upload some via the upload "
|
54 |
+
"dialog."
|
55 |
+
msgstr "Zu diesem Eintrag wurden bisher keine Bilder hinzugefügt."
|
56 |
+
|
57 |
+
#: ../functions/editor.php:101
|
58 |
+
msgid "Choose the image you want to crop."
|
59 |
+
msgstr "Wählen Sie das Bild aus, das Sie zuschneiden wollen."
|
60 |
+
|
61 |
+
#: ../functions/editor.php:107
|
62 |
+
msgid "Post Thumbnail"
|
63 |
+
msgstr "Artikel-Vorschaubild"
|
64 |
+
|
65 |
+
#: ../functions/editor.php:107
|
66 |
+
#, php-format
|
67 |
+
msgid "Image %d"
|
68 |
+
msgstr "Bild %d"
|
69 |
+
|
70 |
+
#: ../functions/editor.php:180
|
71 |
+
msgid "Bug--this should not have occurred."
|
72 |
+
msgstr ""
|
73 |
+
"BUG - dieser Fall hätte nie eintretten drüfen - Plugin-Autor benachrichtigen."
|
74 |
+
|
75 |
+
#: ../functions/editor.php:181
|
76 |
+
msgid ""
|
77 |
+
"Warning: the original image is too small to be cropped in good quality with "
|
78 |
+
"this thumbnail size."
|
79 |
+
msgstr ""
|
80 |
+
"Warung: das Original-Bild ist zu klein um es für diese Thumbnail-Größe in "
|
81 |
+
"guter Qualität zuzuschneiden."
|
82 |
+
|
83 |
+
#: ../functions/editor.php:182
|
84 |
+
msgid "First, select an image. Then, click once again."
|
85 |
+
msgstr "Erst ein Bild auswählen, danach erneut probieren."
|
86 |
+
|
87 |
+
#: ../functions/editor.php:209
|
88 |
+
msgid "back to image list"
|
89 |
+
msgstr "Zurück zur Bild-Übersicht"
|
90 |
+
|
91 |
+
#: ../functions/editor.php:210
|
92 |
+
msgid "Please wait until the images are cropped."
|
93 |
+
msgstr "Bitte warten Sie bis die Bilder zugeschnitten wurden."
|
94 |
+
|
95 |
+
#: ../functions/editor.php:213
|
96 |
+
msgid "Raw"
|
97 |
+
msgstr "Original-Bild"
|
98 |
+
|
99 |
+
#: ../functions/editor.php:213 ../functions/editor.php:279
|
100 |
+
msgid "pixel"
|
101 |
+
msgstr "Pixel"
|
102 |
+
|
103 |
+
#: ../functions/editor.php:215
|
104 |
+
msgid "Save Crop"
|
105 |
+
msgstr "Zuschnitt übernehmen"
|
106 |
+
|
107 |
+
#: ../functions/editor.php:216
|
108 |
+
msgid "Quick Instructions"
|
109 |
+
msgstr "Schnell-Anleitung"
|
110 |
+
|
111 |
+
#: ../functions/editor.php:218
|
112 |
+
msgid "Step 1: Choose an image from the right."
|
113 |
+
msgstr "Schritt 1: Wählen Sie ein Bild von der rechten Seite."
|
114 |
+
|
115 |
+
#: ../functions/editor.php:219
|
116 |
+
msgid ""
|
117 |
+
"Step 2: Use your mouse to change the size of the rectangle on the image "
|
118 |
+
"above."
|
119 |
+
msgstr ""
|
120 |
+
"Schritt 2: Benutzen Sie die Maus um die Größe des Rechtecks im oberen Bild "
|
121 |
+
"zu ändern."
|
122 |
+
|
123 |
+
#: ../functions/editor.php:220
|
124 |
+
msgid "Step 3: Click on \"Save Crop\"."
|
125 |
+
msgstr "Schritt 3: Klicken Sie auf \"Zuschnitt übernehmen\"."
|
126 |
+
|
127 |
+
#: ../functions/editor.php:225
|
128 |
+
msgid "Crop all images with same ratio at once"
|
129 |
+
msgstr "bei gleichem Seitenverhältnis gemeinsam auswählen"
|
130 |
+
|
131 |
+
#: ../functions/editor.php:226
|
132 |
+
msgid "deselect all"
|
133 |
+
msgstr "nichts auswählen"
|
134 |
+
|
135 |
+
#: ../functions/editor.php:262
|
136 |
+
msgid "cropped"
|
137 |
+
msgstr "zugeschnitten"
|
138 |
+
|
139 |
+
#: ../functions/editor.php:271
|
140 |
+
msgid "maximum"
|
141 |
+
msgstr "Maximum"
|
142 |
+
|
143 |
+
#: ../functions/editor.php:286
|
144 |
+
msgid "Original image size too small for good crop quality!"
|
145 |
+
msgstr "Original-Bild ist zu klein für guten Bildzuschnitt!"
|
146 |
+
|
147 |
+
#: ../functions/editor.php:292
|
148 |
+
msgid "Dimensions:"
|
149 |
+
msgstr "Größe:"
|
150 |
+
|
151 |
+
#: ../functions/editor.php:293
|
152 |
+
msgid "Ratio:"
|
153 |
+
msgstr "Seitenverhältnis:"
|
154 |
+
|
155 |
+
#: ../functions/save.php:106
|
156 |
+
#, php-format
|
157 |
+
msgid "Can't generate filesize '%s'."
|
158 |
+
msgstr "Die Bildgröße '%s' konnte nicht generiert werden."
|
159 |
+
|
160 |
+
#: ../functions/save.php:113
|
161 |
+
msgid "Can't copy temporary file to media library."
|
162 |
+
msgstr "Kopieren vom temporären Verzeichnis in die Mediathek fehlgeschlagen."
|
163 |
+
|
164 |
+
#: ../functions/save.php:117
|
165 |
+
msgid "Can't delete temporary file."
|
166 |
+
msgstr "Löschen der temporären Datei fehlgeschlagen."
|
167 |
+
|
168 |
+
#: ../functions/save.php:205
|
169 |
+
msgid "ERROR: Security Check failed (maybe a timeout - please try again)."
|
170 |
+
msgstr ""
|
171 |
+
"Fehler: Sicherheitsüberprüfung fehlgeschlagen (vielleicht eine "
|
172 |
+
"Zeitüberschreitung - bitte versuchen Sie es noch einmal)."
|
173 |
+
|
174 |
+
#: ../functions/save.php:209
|
175 |
+
msgid "ERROR: Submitted data is incomplete."
|
176 |
+
msgstr "Fehler: Übermittelte Daten sind nicht vollständig."
|
177 |
+
|
178 |
+
#: ../functions/save.php:217
|
179 |
+
msgid "Cropping to these dimensions on this image is not possible."
|
180 |
+
msgstr ""
|
181 |
+
"Das Zuschneiden mit diesen Einstellungen ist bei diesem Bild nicht möglich."
|
182 |
+
|
183 |
+
#: ../functions/save.php:228
|
184 |
+
msgid "ERROR: Can't find original image in database!"
|
185 |
+
msgstr "Fehler: Konnte die Original Bild nicht in der Datenbank finden!"
|
186 |
+
|
187 |
+
#: ../functions/save.php:231
|
188 |
+
msgid "ERROR: Can't find original image file!"
|
189 |
+
msgstr "Fehler: Konnte die Original-Bilddatei nicht finden!"
|
190 |
+
|
191 |
+
#: ../functions/save.php:234
|
192 |
+
msgid "ERROR: Can't find original image metadata!"
|
193 |
+
msgstr "Fehler: Konnte Original-Bild-Metadaten nicht finden!"
|
194 |
+
|
195 |
+
#: ../functions/settings.php:24 ../functions/settings.php:38
|
196 |
+
msgid "Settings"
|
197 |
+
msgstr "Einstellungen"
|
198 |
+
|
199 |
+
#: ../functions/settings.php:31
|
200 |
+
msgid "Crop Post Thumbnail Page"
|
201 |
+
msgstr "Crop-Post-Thumbnail Seite"
|
202 |
+
|
203 |
+
#: ../functions/settings.php:44
|
204 |
+
msgid "Save Changes"
|
205 |
+
msgstr "Einstellungen speichern"
|
206 |
+
|
207 |
+
#: ../functions/settings.php:49
|
208 |
+
msgid "Support the plugin author"
|
209 |
+
msgstr "Unterstützen Sie den Plugin Entwickler"
|
210 |
+
|
211 |
+
#: ../functions/settings.php:50
|
212 |
+
msgid ""
|
213 |
+
"You can support the plugin author <br />(and let him know you love this "
|
214 |
+
"plugin) <br />by donating via Paypal. Thanks a lot!"
|
215 |
+
msgstr ""
|
216 |
+
"Sie können den Entwickler unterstützen <br />(und ihn so wissen lassen, dass "
|
217 |
+
"sie dieses Plugin lieben) <br />indem sie ihm eine Paypal-Spende zukommen "
|
218 |
+
"lassen. <br />Vielen Dank!"
|
219 |
+
|
220 |
+
#: ../functions/settings.php:72
|
221 |
+
msgid "Sizes and Post Types"
|
222 |
+
msgstr "Größen und Eintragstypen"
|
223 |
+
|
224 |
+
#: ../functions/settings.php:73
|
225 |
+
msgid "Choose the image size options you want to hide for each post type."
|
226 |
+
msgstr ""
|
227 |
+
"Wählen sie die Bildgrößen die ausgeblendet werden sollen. Wählen Sie einen "
|
228 |
+
"Eintragstyp um das Zuschneiden in diesen Einträge komplett zu verhindern."
|
229 |
+
|
230 |
+
#: ../functions/settings.php:81
|
231 |
+
#, fuzzy
|
232 |
+
msgid "Developer Settings"
|
233 |
+
msgstr "Einstellungen"
|
234 |
+
|
235 |
+
#: ../functions/settings.php:83
|
236 |
+
msgid "Enable JS-Debug."
|
237 |
+
msgstr "JS-Debug einschalten"
|
238 |
+
|
239 |
+
#: ../functions/settings.php:85
|
240 |
+
msgid "Enable Data-Debug."
|
241 |
+
msgstr "Daten-Debug einschalten"
|
242 |
+
|
243 |
+
#: ../functions/settings.php:90
|
244 |
+
msgid ""
|
245 |
+
"Crop-Thumbnails is designed to make cropping images easy. For some post "
|
246 |
+
"types, not all crop sizes are needed, but the plugin will automatically "
|
247 |
+
"create all the crop sizes. Here you can select which crop sizes are "
|
248 |
+
"available in the cropping interface for each post type.."
|
249 |
+
msgstr ""
|
250 |
+
"Crop Thumbnails wurde erstellt um das Zuschneiden von Bildern für den "
|
251 |
+
"Benutzer zu erleichtern. Oft muss der Nutzer nur eine Bildgröße zuschneiden, "
|
252 |
+
"abhängig vom Typ des Eintrags. Das System (Wordpress) wird aber immer alle "
|
253 |
+
"größen erstellen. Hier können Sie auswählen für welche Eintragstypen welche "
|
254 |
+
"Bildgrößen in der Plugin-Oberfläche angezeigt werden sollen."
|
255 |
+
|
256 |
+
#: ../functions/settings.php:91
|
257 |
+
msgid ""
|
258 |
+
"Crop-Thumbnails will only show cropped images. Sizes with no crop will "
|
259 |
+
"always be hidden."
|
260 |
+
msgstr ""
|
261 |
+
"Crop Thumbnails wird nur Bilder anzeigen die einen Zuschnitt besitzen. "
|
262 |
+
"Bildgrößen ohne Zuschnitt werden immer ausgeblendet."
|
263 |
+
|
264 |
+
#: ../functions/settings.php:149
|
265 |
+
msgid ""
|
266 |
+
"ATTENTION: be aware that you can break things, when you activate this. When "
|
267 |
+
"activated your are able to cut those images to a spezific dimension that are "
|
268 |
+
"not cropped. The name of the image will not change. You should be extra "
|
269 |
+
"carefull when:"
|
270 |
+
msgstr ""
|
271 |
+
|
272 |
+
#: ../functions/settings.php:151
|
273 |
+
msgid ""
|
274 |
+
"you had inserted the image before on any page or post. (There may be height "
|
275 |
+
"and width stored directly in the page-content.)"
|
276 |
+
msgstr ""
|
277 |
+
|
278 |
+
#: ../functions/settings.php:152
|
279 |
+
msgid ""
|
280 |
+
"you use a plugin that expect the original image size. (The original image-"
|
281 |
+
"size is also \"stored\" in the filename.)"
|
282 |
+
msgstr ""
|
283 |
+
|
284 |
+
#: ../functions/settings.php:154
|
285 |
+
msgid ""
|
286 |
+
"The \"full\" image-size will never be cropped, otherwise you are not able to "
|
287 |
+
"restore any image-size."
|
288 |
+
msgstr ""
|
289 |
+
|
290 |
+
#~ msgid "Cant generate filesize \"%s\"."
|
291 |
+
#~ msgstr "Cant generate filesize \"%s\"."
|
292 |
+
|
293 |
+
#~ msgid "Choose the image size options you want to hide for each post type. "
|
294 |
+
#~ msgstr ""
|
295 |
+
#~ "Wählen sie die Bildgrößen die ausgeblendet werden sollen. Wählen Sie "
|
296 |
+
#~ "einen Eintragstyp um das Zuschneiden in diesen Einträge komplett zu "
|
297 |
+
#~ "verhindern."
|
298 |
+
|
299 |
+
#~ msgid "Crop Thumbnails - Settings"
|
300 |
+
#~ msgstr "Crop Thumbnails - Einstellungen"
|
301 |
+
|
302 |
+
#~ msgid ""
|
303 |
+
#~ "Wrong ratio!<br \\>OK - release images selected so far.<br \\>Cancel - "
|
304 |
+
#~ "keep selected images so far."
|
305 |
+
#~ msgstr ""
|
306 |
+
#~ "Falsches Seitenverhältnis!<br \\>OK - bisher gewählte Bilder abwählen<br "
|
307 |
+
#~ "\\>Abbrechen - bisher gewählte Bilder belassen."
|
308 |
+
|
309 |
+
#~ msgid ""
|
310 |
+
#~ "Hint: If you have one image selected, you can click on \"select images "
|
311 |
+
#~ "with same ratio\", to select all with the ratio of these image."
|
312 |
+
#~ msgstr ""
|
313 |
+
#~ "Tipp: Wenn Sie ein Bild ausgewählt haben, und auf \"alle Bilder mit "
|
314 |
+
#~ "diesem Seitenverhältnis auswählen\" klicken, werden automatisch alle "
|
315 |
+
#~ "Einträgen mit diesem Seitenverhältnis ausgewählt."
|
316 |
+
|
317 |
+
#~ msgid ""
|
318 |
+
#~ "Choose the post-types you want to show the crop-editor and define what "
|
319 |
+
#~ "sizes the editor should be working on. <strong>Only cropped image sizes "
|
320 |
+
#~ "will be showing.</strong>"
|
321 |
+
#~ msgstr ""
|
322 |
+
#~ "Wählen Sie die Eintragstypen die sie im Zuschnitt-Editor verwenden "
|
323 |
+
#~ "wollen, und wählen sie die Größen mit denen der Editor arbeiten soll. "
|
324 |
+
#~ "<strong>Nur zugeschnittene Bildgrößen sind sichtbar.</strong>"
|
325 |
+
|
326 |
+
#~ msgid "Wrong ratio!"
|
327 |
+
#~ msgstr "Falsches Seitenverhältnis"
|
lang/cpt_lang-default.po
CHANGED
@@ -1,266 +1,266 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Crop-Post-Thumbnails\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2015-11-18 21:58+0100\n"
|
6 |
-
"PO-Revision-Date: 2015-11-18 21:58+0100\n"
|
7 |
-
"Last-Translator: Volkmar Kantor <volkmar.kantor@gmx.de>\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.7.6\n"
|
15 |
-
"X-Poedit-SearchPath-0: ..\n"
|
16 |
-
|
17 |
-
#: ../crop-thumbnails.php:35
|
18 |
-
msgid "Crop your thumbnails, the easy way."
|
19 |
-
msgstr ""
|
20 |
-
|
21 |
-
#: ../functions/backendpreparer.php:84 ../functions/backendpreparer.php:87
|
22 |
-
msgid "Crop Thumbnails"
|
23 |
-
msgstr ""
|
24 |
-
|
25 |
-
#: ../functions/backendpreparer.php:98 ../functions/backendpreparer.php:101
|
26 |
-
msgid "Crop Featured Image"
|
27 |
-
msgstr ""
|
28 |
-
|
29 |
-
#: ../functions/backendpreparer.php:127 ../functions/backendpreparer.php:130
|
30 |
-
#: ../functions/backendpreparer.php:252
|
31 |
-
msgid "Crop Thumbnail"
|
32 |
-
msgstr ""
|
33 |
-
|
34 |
-
#: ../functions/editor.php:25
|
35 |
-
msgid "You are not allowed to do this."
|
36 |
-
msgstr ""
|
37 |
-
|
38 |
-
#: ../functions/editor.php:41
|
39 |
-
msgid "No featured image set for this post until now."
|
40 |
-
msgstr ""
|
41 |
-
|
42 |
-
#: ../functions/editor.php:45
|
43 |
-
msgid "An error occurred!"
|
44 |
-
msgstr ""
|
45 |
-
|
46 |
-
#: ../functions/editor.php:78 ../functions/editor.php:204
|
47 |
-
msgid "Cropping is disabled for this post-type."
|
48 |
-
msgstr ""
|
49 |
-
|
50 |
-
#: ../functions/editor.php:80
|
51 |
-
msgid ""
|
52 |
-
"No images attached to this post yet. Please upload some via the upload "
|
53 |
-
"dialog."
|
54 |
-
msgstr ""
|
55 |
-
|
56 |
-
#: ../functions/editor.php:101
|
57 |
-
msgid "Choose the image you want to crop."
|
58 |
-
msgstr ""
|
59 |
-
|
60 |
-
#: ../functions/editor.php:107
|
61 |
-
msgid "Post Thumbnail"
|
62 |
-
msgstr ""
|
63 |
-
|
64 |
-
#: ../functions/editor.php:107
|
65 |
-
#, php-format
|
66 |
-
msgid "Image %d"
|
67 |
-
msgstr ""
|
68 |
-
|
69 |
-
#: ../functions/editor.php:180
|
70 |
-
msgid "Bug--this should not have occurred."
|
71 |
-
msgstr ""
|
72 |
-
|
73 |
-
#: ../functions/editor.php:181
|
74 |
-
msgid ""
|
75 |
-
"Warning: the original image is too small to be cropped in good quality with "
|
76 |
-
"this thumbnail size."
|
77 |
-
msgstr ""
|
78 |
-
|
79 |
-
#: ../functions/editor.php:182
|
80 |
-
msgid "First, select an image. Then, click once again."
|
81 |
-
msgstr ""
|
82 |
-
|
83 |
-
#: ../functions/editor.php:209
|
84 |
-
msgid "back to image list"
|
85 |
-
msgstr ""
|
86 |
-
|
87 |
-
#: ../functions/editor.php:210
|
88 |
-
msgid "Please wait until the images are cropped."
|
89 |
-
msgstr ""
|
90 |
-
|
91 |
-
#: ../functions/editor.php:213
|
92 |
-
msgid "Raw"
|
93 |
-
msgstr ""
|
94 |
-
|
95 |
-
#: ../functions/editor.php:213 ../functions/editor.php:279
|
96 |
-
msgid "pixel"
|
97 |
-
msgstr ""
|
98 |
-
|
99 |
-
#: ../functions/editor.php:215
|
100 |
-
msgid "Save Crop"
|
101 |
-
msgstr ""
|
102 |
-
|
103 |
-
#: ../functions/editor.php:216
|
104 |
-
msgid "Quick Instructions"
|
105 |
-
msgstr ""
|
106 |
-
|
107 |
-
#: ../functions/editor.php:218
|
108 |
-
msgid "Step 1: Choose an image from the right."
|
109 |
-
msgstr ""
|
110 |
-
|
111 |
-
#: ../functions/editor.php:219
|
112 |
-
msgid ""
|
113 |
-
"Step 2: Use your mouse to change the size of the rectangle on the image "
|
114 |
-
"above."
|
115 |
-
msgstr ""
|
116 |
-
|
117 |
-
#: ../functions/editor.php:220
|
118 |
-
msgid "Step 3: Click on \"Save Crop\"."
|
119 |
-
msgstr ""
|
120 |
-
|
121 |
-
#: ../functions/editor.php:225
|
122 |
-
msgid "Crop all images with same ratio at once"
|
123 |
-
msgstr ""
|
124 |
-
|
125 |
-
#: ../functions/editor.php:226
|
126 |
-
msgid "deselect all"
|
127 |
-
msgstr ""
|
128 |
-
|
129 |
-
#: ../functions/editor.php:262
|
130 |
-
msgid "cropped"
|
131 |
-
msgstr ""
|
132 |
-
|
133 |
-
#: ../functions/editor.php:271
|
134 |
-
msgid "maximum"
|
135 |
-
msgstr ""
|
136 |
-
|
137 |
-
#: ../functions/editor.php:286
|
138 |
-
msgid "Original image size too small for good crop quality!"
|
139 |
-
msgstr ""
|
140 |
-
|
141 |
-
#: ../functions/editor.php:292
|
142 |
-
msgid "Dimensions:"
|
143 |
-
msgstr ""
|
144 |
-
|
145 |
-
#: ../functions/editor.php:293
|
146 |
-
msgid "Ratio:"
|
147 |
-
msgstr ""
|
148 |
-
|
149 |
-
#: ../functions/save.php:106
|
150 |
-
#, php-format
|
151 |
-
msgid "Can't generate filesize '%s'."
|
152 |
-
msgstr ""
|
153 |
-
|
154 |
-
#: ../functions/save.php:113
|
155 |
-
msgid "Can't copy temporary file to media library."
|
156 |
-
msgstr ""
|
157 |
-
|
158 |
-
#: ../functions/save.php:117
|
159 |
-
msgid "Can't delete temporary file."
|
160 |
-
msgstr ""
|
161 |
-
|
162 |
-
#: ../functions/save.php:205
|
163 |
-
msgid "ERROR: Security Check failed (maybe a timeout - please try again)."
|
164 |
-
msgstr ""
|
165 |
-
|
166 |
-
#: ../functions/save.php:209
|
167 |
-
msgid "ERROR: Submitted data is incomplete."
|
168 |
-
msgstr ""
|
169 |
-
|
170 |
-
#: ../functions/save.php:217
|
171 |
-
msgid "Cropping to these dimensions on this image is not possible."
|
172 |
-
msgstr ""
|
173 |
-
|
174 |
-
#: ../functions/save.php:228
|
175 |
-
msgid "ERROR: Can't find original image in database!"
|
176 |
-
msgstr ""
|
177 |
-
|
178 |
-
#: ../functions/save.php:231
|
179 |
-
msgid "ERROR: Can't find original image file!"
|
180 |
-
msgstr ""
|
181 |
-
|
182 |
-
#: ../functions/save.php:234
|
183 |
-
msgid "ERROR: Can't find original image metadata!"
|
184 |
-
msgstr ""
|
185 |
-
|
186 |
-
#: ../functions/settings.php:24 ../functions/settings.php:38
|
187 |
-
msgid "Settings"
|
188 |
-
msgstr ""
|
189 |
-
|
190 |
-
#: ../functions/settings.php:31
|
191 |
-
msgid "Crop Post Thumbnail Page"
|
192 |
-
msgstr ""
|
193 |
-
|
194 |
-
#: ../functions/settings.php:44
|
195 |
-
msgid "Save Changes"
|
196 |
-
msgstr ""
|
197 |
-
|
198 |
-
#: ../functions/settings.php:49
|
199 |
-
msgid "Support the plugin author"
|
200 |
-
msgstr ""
|
201 |
-
|
202 |
-
#: ../functions/settings.php:50
|
203 |
-
msgid ""
|
204 |
-
"You can support the plugin author <br />(and let him know you love this "
|
205 |
-
"plugin) <br />by donating via Paypal. Thanks a lot!"
|
206 |
-
msgstr ""
|
207 |
-
|
208 |
-
#: ../functions/settings.php:72
|
209 |
-
msgid "Sizes and Post Types"
|
210 |
-
msgstr ""
|
211 |
-
|
212 |
-
#: ../functions/settings.php:73
|
213 |
-
msgid "Choose the image size options you want to hide for each post type."
|
214 |
-
msgstr ""
|
215 |
-
|
216 |
-
#: ../functions/settings.php:81
|
217 |
-
msgid "Developer Settings"
|
218 |
-
msgstr ""
|
219 |
-
|
220 |
-
#: ../functions/settings.php:83
|
221 |
-
msgid "Enable JS-Debug."
|
222 |
-
msgstr ""
|
223 |
-
|
224 |
-
#: ../functions/settings.php:85
|
225 |
-
msgid "Enable Data-Debug."
|
226 |
-
msgstr ""
|
227 |
-
|
228 |
-
#: ../functions/settings.php:90
|
229 |
-
msgid ""
|
230 |
-
"Crop-Thumbnails is designed to make cropping images easy. For some post "
|
231 |
-
"types, not all crop sizes are needed, but the plugin will automatically "
|
232 |
-
"create all the crop sizes. Here you can select which crop sizes are "
|
233 |
-
"available in the cropping interface for each post type.."
|
234 |
-
msgstr ""
|
235 |
-
|
236 |
-
#: ../functions/settings.php:91
|
237 |
-
msgid ""
|
238 |
-
"Crop-Thumbnails will only show cropped images. Sizes with no crop will "
|
239 |
-
"always be hidden."
|
240 |
-
msgstr ""
|
241 |
-
|
242 |
-
#: ../functions/settings.php:149
|
243 |
-
msgid ""
|
244 |
-
"ATTENTION: be aware that you can break things, when you activate this. When "
|
245 |
-
"activated your are able to cut those images to a spezific dimension that are "
|
246 |
-
"not cropped. The name of the image will not change. You should be extra "
|
247 |
-
"carefull when:"
|
248 |
-
msgstr ""
|
249 |
-
|
250 |
-
#: ../functions/settings.php:151
|
251 |
-
msgid ""
|
252 |
-
"you had inserted the image before on any page or post. (There may be height "
|
253 |
-
"and width stored directly in the page-content.)"
|
254 |
-
msgstr ""
|
255 |
-
|
256 |
-
#: ../functions/settings.php:152
|
257 |
-
msgid ""
|
258 |
-
"you use a plugin that expect the original image size. (The original image-"
|
259 |
-
"size is also \"stored\" in the filename.)"
|
260 |
-
msgstr ""
|
261 |
-
|
262 |
-
#: ../functions/settings.php:154
|
263 |
-
msgid ""
|
264 |
-
"The \"full\" image-size will never be cropped, otherwise you are not able to "
|
265 |
-
"restore any image-size."
|
266 |
-
msgstr ""
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Crop-Post-Thumbnails\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2015-11-18 21:58+0100\n"
|
6 |
+
"PO-Revision-Date: 2015-11-18 21:58+0100\n"
|
7 |
+
"Last-Translator: Volkmar Kantor <volkmar.kantor@gmx.de>\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.7.6\n"
|
15 |
+
"X-Poedit-SearchPath-0: ..\n"
|
16 |
+
|
17 |
+
#: ../crop-thumbnails.php:35
|
18 |
+
msgid "Crop your thumbnails, the easy way."
|
19 |
+
msgstr ""
|
20 |
+
|
21 |
+
#: ../functions/backendpreparer.php:84 ../functions/backendpreparer.php:87
|
22 |
+
msgid "Crop Thumbnails"
|
23 |
+
msgstr ""
|
24 |
+
|
25 |
+
#: ../functions/backendpreparer.php:98 ../functions/backendpreparer.php:101
|
26 |
+
msgid "Crop Featured Image"
|
27 |
+
msgstr ""
|
28 |
+
|
29 |
+
#: ../functions/backendpreparer.php:127 ../functions/backendpreparer.php:130
|
30 |
+
#: ../functions/backendpreparer.php:252
|
31 |
+
msgid "Crop Thumbnail"
|
32 |
+
msgstr ""
|
33 |
+
|
34 |
+
#: ../functions/editor.php:25
|
35 |
+
msgid "You are not allowed to do this."
|
36 |
+
msgstr ""
|
37 |
+
|
38 |
+
#: ../functions/editor.php:41
|
39 |
+
msgid "No featured image set for this post until now."
|
40 |
+
msgstr ""
|
41 |
+
|
42 |
+
#: ../functions/editor.php:45
|
43 |
+
msgid "An error occurred!"
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: ../functions/editor.php:78 ../functions/editor.php:204
|
47 |
+
msgid "Cropping is disabled for this post-type."
|
48 |
+
msgstr ""
|
49 |
+
|
50 |
+
#: ../functions/editor.php:80
|
51 |
+
msgid ""
|
52 |
+
"No images attached to this post yet. Please upload some via the upload "
|
53 |
+
"dialog."
|
54 |
+
msgstr ""
|
55 |
+
|
56 |
+
#: ../functions/editor.php:101
|
57 |
+
msgid "Choose the image you want to crop."
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: ../functions/editor.php:107
|
61 |
+
msgid "Post Thumbnail"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: ../functions/editor.php:107
|
65 |
+
#, php-format
|
66 |
+
msgid "Image %d"
|
67 |
+
msgstr ""
|
68 |
+
|
69 |
+
#: ../functions/editor.php:180
|
70 |
+
msgid "Bug--this should not have occurred."
|
71 |
+
msgstr ""
|
72 |
+
|
73 |
+
#: ../functions/editor.php:181
|
74 |
+
msgid ""
|
75 |
+
"Warning: the original image is too small to be cropped in good quality with "
|
76 |
+
"this thumbnail size."
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
#: ../functions/editor.php:182
|
80 |
+
msgid "First, select an image. Then, click once again."
|
81 |
+
msgstr ""
|
82 |
+
|
83 |
+
#: ../functions/editor.php:209
|
84 |
+
msgid "back to image list"
|
85 |
+
msgstr ""
|
86 |
+
|
87 |
+
#: ../functions/editor.php:210
|
88 |
+
msgid "Please wait until the images are cropped."
|
89 |
+
msgstr ""
|
90 |
+
|
91 |
+
#: ../functions/editor.php:213
|
92 |
+
msgid "Raw"
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
+
#: ../functions/editor.php:213 ../functions/editor.php:279
|
96 |
+
msgid "pixel"
|
97 |
+
msgstr ""
|
98 |
+
|
99 |
+
#: ../functions/editor.php:215
|
100 |
+
msgid "Save Crop"
|
101 |
+
msgstr ""
|
102 |
+
|
103 |
+
#: ../functions/editor.php:216
|
104 |
+
msgid "Quick Instructions"
|
105 |
+
msgstr ""
|
106 |
+
|
107 |
+
#: ../functions/editor.php:218
|
108 |
+
msgid "Step 1: Choose an image from the right."
|
109 |
+
msgstr ""
|
110 |
+
|
111 |
+
#: ../functions/editor.php:219
|
112 |
+
msgid ""
|
113 |
+
"Step 2: Use your mouse to change the size of the rectangle on the image "
|
114 |
+
"above."
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: ../functions/editor.php:220
|
118 |
+
msgid "Step 3: Click on \"Save Crop\"."
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: ../functions/editor.php:225
|
122 |
+
msgid "Crop all images with same ratio at once"
|
123 |
+
msgstr ""
|
124 |
+
|
125 |
+
#: ../functions/editor.php:226
|
126 |
+
msgid "deselect all"
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#: ../functions/editor.php:262
|
130 |
+
msgid "cropped"
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: ../functions/editor.php:271
|
134 |
+
msgid "maximum"
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#: ../functions/editor.php:286
|
138 |
+
msgid "Original image size too small for good crop quality!"
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: ../functions/editor.php:292
|
142 |
+
msgid "Dimensions:"
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: ../functions/editor.php:293
|
146 |
+
msgid "Ratio:"
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: ../functions/save.php:106
|
150 |
+
#, php-format
|
151 |
+
msgid "Can't generate filesize '%s'."
|
152 |
+
msgstr ""
|
153 |
+
|
154 |
+
#: ../functions/save.php:113
|
155 |
+
msgid "Can't copy temporary file to media library."
|
156 |
+
msgstr ""
|
157 |
+
|
158 |
+
#: ../functions/save.php:117
|
159 |
+
msgid "Can't delete temporary file."
|
160 |
+
msgstr ""
|
161 |
+
|
162 |
+
#: ../functions/save.php:205
|
163 |
+
msgid "ERROR: Security Check failed (maybe a timeout - please try again)."
|
164 |
+
msgstr ""
|
165 |
+
|
166 |
+
#: ../functions/save.php:209
|
167 |
+
msgid "ERROR: Submitted data is incomplete."
|
168 |
+
msgstr ""
|
169 |
+
|
170 |
+
#: ../functions/save.php:217
|
171 |
+
msgid "Cropping to these dimensions on this image is not possible."
|
172 |
+
msgstr ""
|
173 |
+
|
174 |
+
#: ../functions/save.php:228
|
175 |
+
msgid "ERROR: Can't find original image in database!"
|
176 |
+
msgstr ""
|
177 |
+
|
178 |
+
#: ../functions/save.php:231
|
179 |
+
msgid "ERROR: Can't find original image file!"
|
180 |
+
msgstr ""
|
181 |
+
|
182 |
+
#: ../functions/save.php:234
|
183 |
+
msgid "ERROR: Can't find original image metadata!"
|
184 |
+
msgstr ""
|
185 |
+
|
186 |
+
#: ../functions/settings.php:24 ../functions/settings.php:38
|
187 |
+
msgid "Settings"
|
188 |
+
msgstr ""
|
189 |
+
|
190 |
+
#: ../functions/settings.php:31
|
191 |
+
msgid "Crop Post Thumbnail Page"
|
192 |
+
msgstr ""
|
193 |
+
|
194 |
+
#: ../functions/settings.php:44
|
195 |
+
msgid "Save Changes"
|
196 |
+
msgstr ""
|
197 |
+
|
198 |
+
#: ../functions/settings.php:49
|
199 |
+
msgid "Support the plugin author"
|
200 |
+
msgstr ""
|
201 |
+
|
202 |
+
#: ../functions/settings.php:50
|
203 |
+
msgid ""
|
204 |
+
"You can support the plugin author <br />(and let him know you love this "
|
205 |
+
"plugin) <br />by donating via Paypal. Thanks a lot!"
|
206 |
+
msgstr ""
|
207 |
+
|
208 |
+
#: ../functions/settings.php:72
|
209 |
+
msgid "Sizes and Post Types"
|
210 |
+
msgstr ""
|
211 |
+
|
212 |
+
#: ../functions/settings.php:73
|
213 |
+
msgid "Choose the image size options you want to hide for each post type."
|
214 |
+
msgstr ""
|
215 |
+
|
216 |
+
#: ../functions/settings.php:81
|
217 |
+
msgid "Developer Settings"
|
218 |
+
msgstr ""
|
219 |
+
|
220 |
+
#: ../functions/settings.php:83
|
221 |
+
msgid "Enable JS-Debug."
|
222 |
+
msgstr ""
|
223 |
+
|
224 |
+
#: ../functions/settings.php:85
|
225 |
+
msgid "Enable Data-Debug."
|
226 |
+
msgstr ""
|
227 |
+
|
228 |
+
#: ../functions/settings.php:90
|
229 |
+
msgid ""
|
230 |
+
"Crop-Thumbnails is designed to make cropping images easy. For some post "
|
231 |
+
"types, not all crop sizes are needed, but the plugin will automatically "
|
232 |
+
"create all the crop sizes. Here you can select which crop sizes are "
|
233 |
+
"available in the cropping interface for each post type.."
|
234 |
+
msgstr ""
|
235 |
+
|
236 |
+
#: ../functions/settings.php:91
|
237 |
+
msgid ""
|
238 |
+
"Crop-Thumbnails will only show cropped images. Sizes with no crop will "
|
239 |
+
"always be hidden."
|
240 |
+
msgstr ""
|
241 |
+
|
242 |
+
#: ../functions/settings.php:149
|
243 |
+
msgid ""
|
244 |
+
"ATTENTION: be aware that you can break things, when you activate this. When "
|
245 |
+
"activated your are able to cut those images to a spezific dimension that are "
|
246 |
+
"not cropped. The name of the image will not change. You should be extra "
|
247 |
+
"carefull when:"
|
248 |
+
msgstr ""
|
249 |
+
|
250 |
+
#: ../functions/settings.php:151
|
251 |
+
msgid ""
|
252 |
+
"you had inserted the image before on any page or post. (There may be height "
|
253 |
+
"and width stored directly in the page-content.)"
|
254 |
+
msgstr ""
|
255 |
+
|
256 |
+
#: ../functions/settings.php:152
|
257 |
+
msgid ""
|
258 |
+
"you use a plugin that expect the original image size. (The original image-"
|
259 |
+
"size is also \"stored\" in the filename.)"
|
260 |
+
msgstr ""
|
261 |
+
|
262 |
+
#: ../functions/settings.php:154
|
263 |
+
msgid ""
|
264 |
+
"The \"full\" image-size will never be cropped, otherwise you are not able to "
|
265 |
+
"restore any image-size."
|
266 |
+
msgstr ""
|
lang/cpt_lang-hu_HU.po
CHANGED
@@ -1,285 +1,285 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Crop-Post-Thumbnails\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2015-11-18 22:26+0100\n"
|
6 |
-
"PO-Revision-Date: 2015-11-18 22:26+0100\n"
|
7 |
-
"Last-Translator: Volkmar Kantor <volkmar.kantor@gmx.de>\n"
|
8 |
-
"Language-Team: \n"
|
9 |
-
"Language: hu_HU\n"
|
10 |
-
"MIME-Version: 1.0\n"
|
11 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
-
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"X-Poedit-KeywordsList: __;_e;esc_attr_e;esc_attr__;esc_html_e\n"
|
14 |
-
"X-Poedit-Basepath: .\n"
|
15 |
-
"X-Generator: Poedit 1.7.6\n"
|
16 |
-
"X-Poedit-SearchPath-0: ..\n"
|
17 |
-
|
18 |
-
#: ../crop-thumbnails.php:35
|
19 |
-
msgid "Crop your thumbnails, the easy way."
|
20 |
-
msgstr "Tökéletes kisképek, egyszerűen!"
|
21 |
-
|
22 |
-
#: ../functions/backendpreparer.php:84 ../functions/backendpreparer.php:87
|
23 |
-
msgid "Crop Thumbnails"
|
24 |
-
msgstr "Kiskép szerkesztő"
|
25 |
-
|
26 |
-
#: ../functions/backendpreparer.php:98 ../functions/backendpreparer.php:101
|
27 |
-
msgid "Crop Featured Image"
|
28 |
-
msgstr "Kiemeltkép vágása"
|
29 |
-
|
30 |
-
#: ../functions/backendpreparer.php:127 ../functions/backendpreparer.php:130
|
31 |
-
#: ../functions/backendpreparer.php:252
|
32 |
-
msgid "Crop Thumbnail"
|
33 |
-
msgstr "Kiskép vágása"
|
34 |
-
|
35 |
-
#: ../functions/editor.php:25
|
36 |
-
msgid "You are not allowed to do this."
|
37 |
-
msgstr ""
|
38 |
-
|
39 |
-
#: ../functions/editor.php:41
|
40 |
-
msgid "No featured image set for this post until now."
|
41 |
-
msgstr "Ehhez a bejegyzéshez még nincs kiemelt kép beállítva"
|
42 |
-
|
43 |
-
#: ../functions/editor.php:45
|
44 |
-
msgid "An error occurred!"
|
45 |
-
msgstr "Ajaj! Hiba történt."
|
46 |
-
|
47 |
-
#: ../functions/editor.php:78 ../functions/editor.php:204
|
48 |
-
msgid "Cropping is disabled for this post-type."
|
49 |
-
msgstr "Ajaj! Képvágáshoz nincs jogosultságod ebben a bejegyzéstípusban."
|
50 |
-
|
51 |
-
#: ../functions/editor.php:80
|
52 |
-
msgid ""
|
53 |
-
"No images attached to this post yet. Please upload some via the upload "
|
54 |
-
"dialog."
|
55 |
-
msgstr ""
|
56 |
-
"Ehhez a bejegyzéshez nincs még feltöltött kép. Fel kellene tölteni párat."
|
57 |
-
|
58 |
-
#: ../functions/editor.php:101
|
59 |
-
msgid "Choose the image you want to crop."
|
60 |
-
msgstr "Válasz egy képet a vágáshoz."
|
61 |
-
|
62 |
-
#: ../functions/editor.php:107
|
63 |
-
msgid "Post Thumbnail"
|
64 |
-
msgstr "Kiemelt kép"
|
65 |
-
|
66 |
-
#: ../functions/editor.php:107
|
67 |
-
#, php-format
|
68 |
-
msgid "Image %d"
|
69 |
-
msgstr "(?)Kép %d"
|
70 |
-
|
71 |
-
#: ../functions/editor.php:180
|
72 |
-
msgid "Bug--this should not have occurred."
|
73 |
-
msgstr "Program hiba! Ennek elvileg nem kellett volna megtörténnie."
|
74 |
-
|
75 |
-
#: ../functions/editor.php:181
|
76 |
-
msgid ""
|
77 |
-
"Warning: the original image is too small to be cropped in good quality with "
|
78 |
-
"this thumbnail size."
|
79 |
-
msgstr ""
|
80 |
-
"Hiba! Az eredeti kép túl kicsi a minőségvesztés nélküli átméretezéshez."
|
81 |
-
|
82 |
-
#: ../functions/editor.php:182
|
83 |
-
msgid "First, select an image. Then, click once again."
|
84 |
-
msgstr "Válaszd ki a vágandó képet és kattints rá kétszer."
|
85 |
-
|
86 |
-
#: ../functions/editor.php:209
|
87 |
-
msgid "back to image list"
|
88 |
-
msgstr "Vissza a képlistához"
|
89 |
-
|
90 |
-
#: ../functions/editor.php:210
|
91 |
-
msgid "Please wait until the images are cropped."
|
92 |
-
msgstr "Átméretezés... pár pillanat és kész."
|
93 |
-
|
94 |
-
#: ../functions/editor.php:213
|
95 |
-
msgid "Raw"
|
96 |
-
msgstr "(nemtudni)Nyers/Eredeti"
|
97 |
-
|
98 |
-
#: ../functions/editor.php:213 ../functions/editor.php:279
|
99 |
-
msgid "pixel"
|
100 |
-
msgstr "pixel"
|
101 |
-
|
102 |
-
#: ../functions/editor.php:215
|
103 |
-
msgid "Save Crop"
|
104 |
-
msgstr "Vágás kész!"
|
105 |
-
|
106 |
-
#: ../functions/editor.php:216
|
107 |
-
msgid "Quick Instructions"
|
108 |
-
msgstr "Gyorstalpaló"
|
109 |
-
|
110 |
-
#: ../functions/editor.php:218
|
111 |
-
msgid "Step 1: Choose an image from the right."
|
112 |
-
msgstr "1. Lépés: Válaszd ki a képet a jobboldalon."
|
113 |
-
|
114 |
-
#: ../functions/editor.php:219
|
115 |
-
msgid ""
|
116 |
-
"Step 2: Use your mouse to change the size of the rectangle on the image "
|
117 |
-
"above."
|
118 |
-
msgstr ""
|
119 |
-
"2. Lépés: Az egérrel állítsd be a kijelölés méretét és pozícióját a fennti "
|
120 |
-
"képen."
|
121 |
-
|
122 |
-
#: ../functions/editor.php:220
|
123 |
-
msgid "Step 3: Click on \"Save Crop\"."
|
124 |
-
msgstr "3. Lépés: Kattints a \"Vágás kész!\" gombra."
|
125 |
-
|
126 |
-
#: ../functions/editor.php:225
|
127 |
-
msgid "Crop all images with same ratio at once"
|
128 |
-
msgstr "Azonos méretarányú képek kiválasztása"
|
129 |
-
|
130 |
-
#: ../functions/editor.php:226
|
131 |
-
msgid "deselect all"
|
132 |
-
msgstr "Kijelölés törlése"
|
133 |
-
|
134 |
-
#: ../functions/editor.php:262
|
135 |
-
msgid "cropped"
|
136 |
-
msgstr "vágott"
|
137 |
-
|
138 |
-
#: ../functions/editor.php:271
|
139 |
-
msgid "maximum"
|
140 |
-
msgstr ""
|
141 |
-
|
142 |
-
#: ../functions/editor.php:286
|
143 |
-
msgid "Original image size too small for good crop quality!"
|
144 |
-
msgstr "Az eredeti kép túl kicsi a jó minőségű átméretezéshez!"
|
145 |
-
|
146 |
-
#: ../functions/editor.php:292
|
147 |
-
msgid "Dimensions:"
|
148 |
-
msgstr "Méretek:"
|
149 |
-
|
150 |
-
#: ../functions/editor.php:293
|
151 |
-
msgid "Ratio:"
|
152 |
-
msgstr "Méretarány:"
|
153 |
-
|
154 |
-
#: ../functions/save.php:106
|
155 |
-
#, php-format
|
156 |
-
msgid "Can't generate filesize '%s'."
|
157 |
-
msgstr "Nemtudom legenerálni a fájlméretet: '%s'."
|
158 |
-
|
159 |
-
#: ../functions/save.php:113
|
160 |
-
msgid "Can't copy temporary file to media library."
|
161 |
-
msgstr "Nem tudom átmásolni az ideiglenes fájlt a médiatárba."
|
162 |
-
|
163 |
-
#: ../functions/save.php:117
|
164 |
-
msgid "Can't delete temporary file."
|
165 |
-
msgstr "Nem tudom törölni az ideiglenes fájlt."
|
166 |
-
|
167 |
-
#: ../functions/save.php:205
|
168 |
-
msgid "ERROR: Security Check failed (maybe a timeout - please try again)."
|
169 |
-
msgstr ""
|
170 |
-
"Hiba! A biztonsági ellenőrzés meghiúsult (talán időtúllépés miatt - próbáld "
|
171 |
-
"újra)"
|
172 |
-
|
173 |
-
#: ../functions/save.php:209
|
174 |
-
msgid "ERROR: Submitted data is incomplete."
|
175 |
-
msgstr "Hiba! Az elküldött adatok hiányosak."
|
176 |
-
|
177 |
-
#: ../functions/save.php:217
|
178 |
-
msgid "Cropping to these dimensions on this image is not possible."
|
179 |
-
msgstr "Ajaj! Ezt a képet nem lehet a megadott méretre vágni."
|
180 |
-
|
181 |
-
#: ../functions/save.php:228
|
182 |
-
msgid "ERROR: Can't find original image in database!"
|
183 |
-
msgstr "Hiba! Nem találom az eredeti képet az adatbázisban!"
|
184 |
-
|
185 |
-
#: ../functions/save.php:231
|
186 |
-
msgid "ERROR: Can't find original image file!"
|
187 |
-
msgstr "Hiba! Nem találom az eredeti képet a tárhelyen!"
|
188 |
-
|
189 |
-
#: ../functions/save.php:234
|
190 |
-
msgid "ERROR: Can't find original image metadata!"
|
191 |
-
msgstr "Hiba! Nem találom az eredeti képinformációkat."
|
192 |
-
|
193 |
-
#: ../functions/settings.php:24 ../functions/settings.php:38
|
194 |
-
msgid "Settings"
|
195 |
-
msgstr "Beállítások"
|
196 |
-
|
197 |
-
#: ../functions/settings.php:31
|
198 |
-
msgid "Crop Post Thumbnail Page"
|
199 |
-
msgstr "Kisképvágó oldal"
|
200 |
-
|
201 |
-
#: ../functions/settings.php:44
|
202 |
-
msgid "Save Changes"
|
203 |
-
msgstr "Módosítások mentése"
|
204 |
-
|
205 |
-
#: ../functions/settings.php:49
|
206 |
-
msgid "Support the plugin author"
|
207 |
-
msgstr "Támogasd a bővitmény készítőjét"
|
208 |
-
|
209 |
-
#: ../functions/settings.php:50
|
210 |
-
msgid ""
|
211 |
-
"You can support the plugin author <br />(and let him know you love this "
|
212 |
-
"plugin) <br />by donating via Paypal. Thanks a lot!"
|
213 |
-
msgstr ""
|
214 |
-
"Támogathatod a bővitmény készítőjét <br /> (Így tudatva vele, hogy tetszik "
|
215 |
-
"ez a bővítmény) <br /> azzal, ha adományozol Paypalon. Köszönjük!"
|
216 |
-
|
217 |
-
#: ../functions/settings.php:72
|
218 |
-
msgid "Sizes and Post Types"
|
219 |
-
msgstr "Méretek és bejegyzés típusok"
|
220 |
-
|
221 |
-
#: ../functions/settings.php:73
|
222 |
-
msgid "Choose the image size options you want to hide for each post type."
|
223 |
-
msgstr ""
|
224 |
-
"Válaszd ki a képméreteket amiket nem szerkeszthetnek, vagy letilthatod az "
|
225 |
-
"egész bejegyzés típusra is a képvágást."
|
226 |
-
|
227 |
-
#: ../functions/settings.php:81
|
228 |
-
msgid "Developer Settings"
|
229 |
-
msgstr ""
|
230 |
-
|
231 |
-
#: ../functions/settings.php:83
|
232 |
-
msgid "Enable JS-Debug."
|
233 |
-
msgstr ""
|
234 |
-
|
235 |
-
#: ../functions/settings.php:85
|
236 |
-
msgid "Enable Data-Debug."
|
237 |
-
msgstr ""
|
238 |
-
|
239 |
-
#: ../functions/settings.php:90
|
240 |
-
msgid ""
|
241 |
-
"Crop-Thumbnails is designed to make cropping images easy. For some post "
|
242 |
-
"types, not all crop sizes are needed, but the plugin will automatically "
|
243 |
-
"create all the crop sizes. Here you can select which crop sizes are "
|
244 |
-
"available in the cropping interface for each post type.."
|
245 |
-
msgstr ""
|
246 |
-
"A Crop-Thumbnails Plugin azzal a céllal készült, hogy kicsit kibővítse a "
|
247 |
-
"WordPress amúgy remek képkezelőjét. Bár a rendszer a feltöltött képeket "
|
248 |
-
"átméretezi és méretre vágja amiket a magfunkciók és a sablonkészítők "
|
249 |
-
"biztosítottak ám időnként előfordul, hogy nem sikerült túl szerencsésre az "
|
250 |
-
"automatikus vágás. Ezzel a bővítménnyel beállíthatjuk, hogy a felhasználók "
|
251 |
-
"mely méreteken és/ vagy bejegyzési típusoknál használhatják."
|
252 |
-
|
253 |
-
#: ../functions/settings.php:91
|
254 |
-
msgid ""
|
255 |
-
"Crop-Thumbnails will only show cropped images. Sizes with no crop will "
|
256 |
-
"always be hidden."
|
257 |
-
msgstr ""
|
258 |
-
"A Képvágó mindíg a vágott méreteket mutatja. Az eredeti \"nyers\" nyers "
|
259 |
-
"képeket nem."
|
260 |
-
|
261 |
-
#: ../functions/settings.php:149
|
262 |
-
msgid ""
|
263 |
-
"ATTENTION: be aware that you can break things, when you activate this. When "
|
264 |
-
"activated your are able to cut those images to a spezific dimension that are "
|
265 |
-
"not cropped. The name of the image will not change. You should be extra "
|
266 |
-
"carefull when:"
|
267 |
-
msgstr ""
|
268 |
-
|
269 |
-
#: ../functions/settings.php:151
|
270 |
-
msgid ""
|
271 |
-
"you had inserted the image before on any page or post. (There may be height "
|
272 |
-
"and width stored directly in the page-content.)"
|
273 |
-
msgstr ""
|
274 |
-
|
275 |
-
#: ../functions/settings.php:152
|
276 |
-
msgid ""
|
277 |
-
"you use a plugin that expect the original image size. (The original image-"
|
278 |
-
"size is also \"stored\" in the filename.)"
|
279 |
-
msgstr ""
|
280 |
-
|
281 |
-
#: ../functions/settings.php:154
|
282 |
-
msgid ""
|
283 |
-
"The \"full\" image-size will never be cropped, otherwise you are not able to "
|
284 |
-
"restore any image-size."
|
285 |
-
msgstr ""
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Crop-Post-Thumbnails\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2015-11-18 22:26+0100\n"
|
6 |
+
"PO-Revision-Date: 2015-11-18 22:26+0100\n"
|
7 |
+
"Last-Translator: Volkmar Kantor <volkmar.kantor@gmx.de>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"Language: hu_HU\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e;esc_attr_e;esc_attr__;esc_html_e\n"
|
14 |
+
"X-Poedit-Basepath: .\n"
|
15 |
+
"X-Generator: Poedit 1.7.6\n"
|
16 |
+
"X-Poedit-SearchPath-0: ..\n"
|
17 |
+
|
18 |
+
#: ../crop-thumbnails.php:35
|
19 |
+
msgid "Crop your thumbnails, the easy way."
|
20 |
+
msgstr "Tökéletes kisképek, egyszerűen!"
|
21 |
+
|
22 |
+
#: ../functions/backendpreparer.php:84 ../functions/backendpreparer.php:87
|
23 |
+
msgid "Crop Thumbnails"
|
24 |
+
msgstr "Kiskép szerkesztő"
|
25 |
+
|
26 |
+
#: ../functions/backendpreparer.php:98 ../functions/backendpreparer.php:101
|
27 |
+
msgid "Crop Featured Image"
|
28 |
+
msgstr "Kiemeltkép vágása"
|
29 |
+
|
30 |
+
#: ../functions/backendpreparer.php:127 ../functions/backendpreparer.php:130
|
31 |
+
#: ../functions/backendpreparer.php:252
|
32 |
+
msgid "Crop Thumbnail"
|
33 |
+
msgstr "Kiskép vágása"
|
34 |
+
|
35 |
+
#: ../functions/editor.php:25
|
36 |
+
msgid "You are not allowed to do this."
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#: ../functions/editor.php:41
|
40 |
+
msgid "No featured image set for this post until now."
|
41 |
+
msgstr "Ehhez a bejegyzéshez még nincs kiemelt kép beállítva"
|
42 |
+
|
43 |
+
#: ../functions/editor.php:45
|
44 |
+
msgid "An error occurred!"
|
45 |
+
msgstr "Ajaj! Hiba történt."
|
46 |
+
|
47 |
+
#: ../functions/editor.php:78 ../functions/editor.php:204
|
48 |
+
msgid "Cropping is disabled for this post-type."
|
49 |
+
msgstr "Ajaj! Képvágáshoz nincs jogosultságod ebben a bejegyzéstípusban."
|
50 |
+
|
51 |
+
#: ../functions/editor.php:80
|
52 |
+
msgid ""
|
53 |
+
"No images attached to this post yet. Please upload some via the upload "
|
54 |
+
"dialog."
|
55 |
+
msgstr ""
|
56 |
+
"Ehhez a bejegyzéshez nincs még feltöltött kép. Fel kellene tölteni párat."
|
57 |
+
|
58 |
+
#: ../functions/editor.php:101
|
59 |
+
msgid "Choose the image you want to crop."
|
60 |
+
msgstr "Válasz egy képet a vágáshoz."
|
61 |
+
|
62 |
+
#: ../functions/editor.php:107
|
63 |
+
msgid "Post Thumbnail"
|
64 |
+
msgstr "Kiemelt kép"
|
65 |
+
|
66 |
+
#: ../functions/editor.php:107
|
67 |
+
#, php-format
|
68 |
+
msgid "Image %d"
|
69 |
+
msgstr "(?)Kép %d"
|
70 |
+
|
71 |
+
#: ../functions/editor.php:180
|
72 |
+
msgid "Bug--this should not have occurred."
|
73 |
+
msgstr "Program hiba! Ennek elvileg nem kellett volna megtörténnie."
|
74 |
+
|
75 |
+
#: ../functions/editor.php:181
|
76 |
+
msgid ""
|
77 |
+
"Warning: the original image is too small to be cropped in good quality with "
|
78 |
+
"this thumbnail size."
|
79 |
+
msgstr ""
|
80 |
+
"Hiba! Az eredeti kép túl kicsi a minőségvesztés nélküli átméretezéshez."
|
81 |
+
|
82 |
+
#: ../functions/editor.php:182
|
83 |
+
msgid "First, select an image. Then, click once again."
|
84 |
+
msgstr "Válaszd ki a vágandó képet és kattints rá kétszer."
|
85 |
+
|
86 |
+
#: ../functions/editor.php:209
|
87 |
+
msgid "back to image list"
|
88 |
+
msgstr "Vissza a képlistához"
|
89 |
+
|
90 |
+
#: ../functions/editor.php:210
|
91 |
+
msgid "Please wait until the images are cropped."
|
92 |
+
msgstr "Átméretezés... pár pillanat és kész."
|
93 |
+
|
94 |
+
#: ../functions/editor.php:213
|
95 |
+
msgid "Raw"
|
96 |
+
msgstr "(nemtudni)Nyers/Eredeti"
|
97 |
+
|
98 |
+
#: ../functions/editor.php:213 ../functions/editor.php:279
|
99 |
+
msgid "pixel"
|
100 |
+
msgstr "pixel"
|
101 |
+
|
102 |
+
#: ../functions/editor.php:215
|
103 |
+
msgid "Save Crop"
|
104 |
+
msgstr "Vágás kész!"
|
105 |
+
|
106 |
+
#: ../functions/editor.php:216
|
107 |
+
msgid "Quick Instructions"
|
108 |
+
msgstr "Gyorstalpaló"
|
109 |
+
|
110 |
+
#: ../functions/editor.php:218
|
111 |
+
msgid "Step 1: Choose an image from the right."
|
112 |
+
msgstr "1. Lépés: Válaszd ki a képet a jobboldalon."
|
113 |
+
|
114 |
+
#: ../functions/editor.php:219
|
115 |
+
msgid ""
|
116 |
+
"Step 2: Use your mouse to change the size of the rectangle on the image "
|
117 |
+
"above."
|
118 |
+
msgstr ""
|
119 |
+
"2. Lépés: Az egérrel állítsd be a kijelölés méretét és pozícióját a fennti "
|
120 |
+
"képen."
|
121 |
+
|
122 |
+
#: ../functions/editor.php:220
|
123 |
+
msgid "Step 3: Click on \"Save Crop\"."
|
124 |
+
msgstr "3. Lépés: Kattints a \"Vágás kész!\" gombra."
|
125 |
+
|
126 |
+
#: ../functions/editor.php:225
|
127 |
+
msgid "Crop all images with same ratio at once"
|
128 |
+
msgstr "Azonos méretarányú képek kiválasztása"
|
129 |
+
|
130 |
+
#: ../functions/editor.php:226
|
131 |
+
msgid "deselect all"
|
132 |
+
msgstr "Kijelölés törlése"
|
133 |
+
|
134 |
+
#: ../functions/editor.php:262
|
135 |
+
msgid "cropped"
|
136 |
+
msgstr "vágott"
|
137 |
+
|
138 |
+
#: ../functions/editor.php:271
|
139 |
+
msgid "maximum"
|
140 |
+
msgstr ""
|
141 |
+
|
142 |
+
#: ../functions/editor.php:286
|
143 |
+
msgid "Original image size too small for good crop quality!"
|
144 |
+
msgstr "Az eredeti kép túl kicsi a jó minőségű átméretezéshez!"
|
145 |
+
|
146 |
+
#: ../functions/editor.php:292
|
147 |
+
msgid "Dimensions:"
|
148 |
+
msgstr "Méretek:"
|
149 |
+
|
150 |
+
#: ../functions/editor.php:293
|
151 |
+
msgid "Ratio:"
|
152 |
+
msgstr "Méretarány:"
|
153 |
+
|
154 |
+
#: ../functions/save.php:106
|
155 |
+
#, php-format
|
156 |
+
msgid "Can't generate filesize '%s'."
|
157 |
+
msgstr "Nemtudom legenerálni a fájlméretet: '%s'."
|
158 |
+
|
159 |
+
#: ../functions/save.php:113
|
160 |
+
msgid "Can't copy temporary file to media library."
|
161 |
+
msgstr "Nem tudom átmásolni az ideiglenes fájlt a médiatárba."
|
162 |
+
|
163 |
+
#: ../functions/save.php:117
|
164 |
+
msgid "Can't delete temporary file."
|
165 |
+
msgstr "Nem tudom törölni az ideiglenes fájlt."
|
166 |
+
|
167 |
+
#: ../functions/save.php:205
|
168 |
+
msgid "ERROR: Security Check failed (maybe a timeout - please try again)."
|
169 |
+
msgstr ""
|
170 |
+
"Hiba! A biztonsági ellenőrzés meghiúsult (talán időtúllépés miatt - próbáld "
|
171 |
+
"újra)"
|
172 |
+
|
173 |
+
#: ../functions/save.php:209
|
174 |
+
msgid "ERROR: Submitted data is incomplete."
|
175 |
+
msgstr "Hiba! Az elküldött adatok hiányosak."
|
176 |
+
|
177 |
+
#: ../functions/save.php:217
|
178 |
+
msgid "Cropping to these dimensions on this image is not possible."
|
179 |
+
msgstr "Ajaj! Ezt a képet nem lehet a megadott méretre vágni."
|
180 |
+
|
181 |
+
#: ../functions/save.php:228
|
182 |
+
msgid "ERROR: Can't find original image in database!"
|
183 |
+
msgstr "Hiba! Nem találom az eredeti képet az adatbázisban!"
|
184 |
+
|
185 |
+
#: ../functions/save.php:231
|
186 |
+
msgid "ERROR: Can't find original image file!"
|
187 |
+
msgstr "Hiba! Nem találom az eredeti képet a tárhelyen!"
|
188 |
+
|
189 |
+
#: ../functions/save.php:234
|
190 |
+
msgid "ERROR: Can't find original image metadata!"
|
191 |
+
msgstr "Hiba! Nem találom az eredeti képinformációkat."
|
192 |
+
|
193 |
+
#: ../functions/settings.php:24 ../functions/settings.php:38
|
194 |
+
msgid "Settings"
|
195 |
+
msgstr "Beállítások"
|
196 |
+
|
197 |
+
#: ../functions/settings.php:31
|
198 |
+
msgid "Crop Post Thumbnail Page"
|
199 |
+
msgstr "Kisképvágó oldal"
|
200 |
+
|
201 |
+
#: ../functions/settings.php:44
|
202 |
+
msgid "Save Changes"
|
203 |
+
msgstr "Módosítások mentése"
|
204 |
+
|
205 |
+
#: ../functions/settings.php:49
|
206 |
+
msgid "Support the plugin author"
|
207 |
+
msgstr "Támogasd a bővitmény készítőjét"
|
208 |
+
|
209 |
+
#: ../functions/settings.php:50
|
210 |
+
msgid ""
|
211 |
+
"You can support the plugin author <br />(and let him know you love this "
|
212 |
+
"plugin) <br />by donating via Paypal. Thanks a lot!"
|
213 |
+
msgstr ""
|
214 |
+
"Támogathatod a bővitmény készítőjét <br /> (Így tudatva vele, hogy tetszik "
|
215 |
+
"ez a bővítmény) <br /> azzal, ha adományozol Paypalon. Köszönjük!"
|
216 |
+
|
217 |
+
#: ../functions/settings.php:72
|
218 |
+
msgid "Sizes and Post Types"
|
219 |
+
msgstr "Méretek és bejegyzés típusok"
|
220 |
+
|
221 |
+
#: ../functions/settings.php:73
|
222 |
+
msgid "Choose the image size options you want to hide for each post type."
|
223 |
+
msgstr ""
|
224 |
+
"Válaszd ki a képméreteket amiket nem szerkeszthetnek, vagy letilthatod az "
|
225 |
+
"egész bejegyzés típusra is a képvágást."
|
226 |
+
|
227 |
+
#: ../functions/settings.php:81
|
228 |
+
msgid "Developer Settings"
|
229 |
+
msgstr ""
|
230 |
+
|
231 |
+
#: ../functions/settings.php:83
|
232 |
+
msgid "Enable JS-Debug."
|
233 |
+
msgstr ""
|
234 |
+
|
235 |
+
#: ../functions/settings.php:85
|
236 |
+
msgid "Enable Data-Debug."
|
237 |
+
msgstr ""
|
238 |
+
|
239 |
+
#: ../functions/settings.php:90
|
240 |
+
msgid ""
|
241 |
+
"Crop-Thumbnails is designed to make cropping images easy. For some post "
|
242 |
+
"types, not all crop sizes are needed, but the plugin will automatically "
|
243 |
+
"create all the crop sizes. Here you can select which crop sizes are "
|
244 |
+
"available in the cropping interface for each post type.."
|
245 |
+
msgstr ""
|
246 |
+
"A Crop-Thumbnails Plugin azzal a céllal készült, hogy kicsit kibővítse a "
|
247 |
+
"WordPress amúgy remek képkezelőjét. Bár a rendszer a feltöltött képeket "
|
248 |
+
"átméretezi és méretre vágja amiket a magfunkciók és a sablonkészítők "
|
249 |
+
"biztosítottak ám időnként előfordul, hogy nem sikerült túl szerencsésre az "
|
250 |
+
"automatikus vágás. Ezzel a bővítménnyel beállíthatjuk, hogy a felhasználók "
|
251 |
+
"mely méreteken és/ vagy bejegyzési típusoknál használhatják."
|
252 |
+
|
253 |
+
#: ../functions/settings.php:91
|
254 |
+
msgid ""
|
255 |
+
"Crop-Thumbnails will only show cropped images. Sizes with no crop will "
|
256 |
+
"always be hidden."
|
257 |
+
msgstr ""
|
258 |
+
"A Képvágó mindíg a vágott méreteket mutatja. Az eredeti \"nyers\" nyers "
|
259 |
+
"képeket nem."
|
260 |
+
|
261 |
+
#: ../functions/settings.php:149
|
262 |
+
msgid ""
|
263 |
+
"ATTENTION: be aware that you can break things, when you activate this. When "
|
264 |
+
"activated your are able to cut those images to a spezific dimension that are "
|
265 |
+
"not cropped. The name of the image will not change. You should be extra "
|
266 |
+
"carefull when:"
|
267 |
+
msgstr ""
|
268 |
+
|
269 |
+
#: ../functions/settings.php:151
|
270 |
+
msgid ""
|
271 |
+
"you had inserted the image before on any page or post. (There may be height "
|
272 |
+
"and width stored directly in the page-content.)"
|
273 |
+
msgstr ""
|
274 |
+
|
275 |
+
#: ../functions/settings.php:152
|
276 |
+
msgid ""
|
277 |
+
"you use a plugin that expect the original image size. (The original image-"
|
278 |
+
"size is also \"stored\" in the filename.)"
|
279 |
+
msgstr ""
|
280 |
+
|
281 |
+
#: ../functions/settings.php:154
|
282 |
+
msgid ""
|
283 |
+
"The \"full\" image-size will never be cropped, otherwise you are not able to "
|
284 |
+
"restore any image-size."
|
285 |
+
msgstr ""
|
lang/cpt_lang-nl_NL.po
CHANGED
@@ -1,303 +1,303 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Crop-Post-Thumbnails\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2015-11-18 22:26+0100\n"
|
6 |
-
"PO-Revision-Date: 2015-11-18 22:26+0100\n"
|
7 |
-
"Last-Translator: Max Gruson <mgruson@live.nl>\n"
|
8 |
-
"Language-Team: \n"
|
9 |
-
"Language: nl_NL\n"
|
10 |
-
"MIME-Version: 1.0\n"
|
11 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
-
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"X-Poedit-KeywordsList: __;_e;esc_attr_e;esc_attr__;esc_html_e\n"
|
14 |
-
"X-Poedit-Basepath: .\n"
|
15 |
-
"X-Generator: Poedit 1.7.6\n"
|
16 |
-
"X-Poedit-SearchPath-0: ..\n"
|
17 |
-
|
18 |
-
#: ../crop-thumbnails.php:35
|
19 |
-
msgid "Crop your thumbnails, the easy way."
|
20 |
-
msgstr "Snijd de thumbnails bij op een makkelijke manier."
|
21 |
-
|
22 |
-
#: ../functions/backendpreparer.php:84 ../functions/backendpreparer.php:87
|
23 |
-
msgid "Crop Thumbnails"
|
24 |
-
msgstr "Snijd thumbnails bij"
|
25 |
-
|
26 |
-
#: ../functions/backendpreparer.php:98 ../functions/backendpreparer.php:101
|
27 |
-
msgid "Crop Featured Image"
|
28 |
-
msgstr "Snijd uitgelichte afbeelding bij"
|
29 |
-
|
30 |
-
#: ../functions/backendpreparer.php:127 ../functions/backendpreparer.php:130
|
31 |
-
#: ../functions/backendpreparer.php:252
|
32 |
-
msgid "Crop Thumbnail"
|
33 |
-
msgstr "Snijd thumbnail bij"
|
34 |
-
|
35 |
-
#: ../functions/editor.php:25
|
36 |
-
msgid "You are not allowed to do this."
|
37 |
-
msgstr "Je hebt geen toestemming dit te doen."
|
38 |
-
|
39 |
-
#: ../functions/editor.php:41
|
40 |
-
msgid "No featured image set for this post until now."
|
41 |
-
msgstr "Er is nog geen Uitgelichte afbeelding ingesteld tot nu toe."
|
42 |
-
|
43 |
-
#: ../functions/editor.php:45
|
44 |
-
msgid "An error occurred!"
|
45 |
-
msgstr "Er heeft een error plaatsgevonden!"
|
46 |
-
|
47 |
-
#: ../functions/editor.php:78 ../functions/editor.php:204
|
48 |
-
msgid "Cropping is disabled for this post-type."
|
49 |
-
msgstr "Bijsnijden is uitgeschakeld voor dit berichttype."
|
50 |
-
|
51 |
-
#: ../functions/editor.php:80
|
52 |
-
msgid ""
|
53 |
-
"No images attached to this post yet. Please upload some via the upload "
|
54 |
-
"dialog."
|
55 |
-
msgstr ""
|
56 |
-
"Er zijn nog geen afbeeldingen in dit bericht. Je kunt afbeeldingen uploaden "
|
57 |
-
"via het upload scherm."
|
58 |
-
|
59 |
-
#: ../functions/editor.php:101
|
60 |
-
msgid "Choose the image you want to crop."
|
61 |
-
msgstr "Kies de afbeelding die je bij wilt snijden."
|
62 |
-
|
63 |
-
#: ../functions/editor.php:107
|
64 |
-
msgid "Post Thumbnail"
|
65 |
-
msgstr "Bericht afbeelding."
|
66 |
-
|
67 |
-
#: ../functions/editor.php:107
|
68 |
-
#, php-format
|
69 |
-
msgid "Image %d"
|
70 |
-
msgstr "Afbeelding %d"
|
71 |
-
|
72 |
-
#: ../functions/editor.php:180
|
73 |
-
msgid "Bug--this should not have occurred."
|
74 |
-
msgstr "Bug - Dit zou niet plaatsgevonden moeten hebben."
|
75 |
-
|
76 |
-
#: ../functions/editor.php:181
|
77 |
-
msgid ""
|
78 |
-
"Warning: the original image is too small to be cropped in good quality with "
|
79 |
-
"this thumbnail size."
|
80 |
-
msgstr ""
|
81 |
-
"Waarschuwing: de originele afbeelding is te klein om met behoud van "
|
82 |
-
"kwaliteit bijgesneden te kunnen worden tot deze grootte."
|
83 |
-
|
84 |
-
#: ../functions/editor.php:182
|
85 |
-
msgid "First, select an image. Then, click once again."
|
86 |
-
msgstr "Selecteer eerst een afbeelding. Klik vervolgens opnieuw."
|
87 |
-
|
88 |
-
#: ../functions/editor.php:209
|
89 |
-
msgid "back to image list"
|
90 |
-
msgstr "Keer terug naar de lijst met afbeeldingen"
|
91 |
-
|
92 |
-
#: ../functions/editor.php:210
|
93 |
-
msgid "Please wait until the images are cropped."
|
94 |
-
msgstr "Wacht a.u.b. tot de afbeeldingen zijn bijgesneden."
|
95 |
-
|
96 |
-
#: ../functions/editor.php:213
|
97 |
-
msgid "Raw"
|
98 |
-
msgstr "Volledig"
|
99 |
-
|
100 |
-
#: ../functions/editor.php:213 ../functions/editor.php:279
|
101 |
-
msgid "pixel"
|
102 |
-
msgstr "pixels"
|
103 |
-
|
104 |
-
#: ../functions/editor.php:215
|
105 |
-
msgid "Save Crop"
|
106 |
-
msgstr "Bijgesneden afbeelding opslaan"
|
107 |
-
|
108 |
-
#: ../functions/editor.php:216
|
109 |
-
msgid "Quick Instructions"
|
110 |
-
msgstr "Korte instructie"
|
111 |
-
|
112 |
-
#: ../functions/editor.php:218
|
113 |
-
msgid "Step 1: Choose an image from the right."
|
114 |
-
msgstr "Stap 1: Kies een afbeelding aan de rechterkant van dit scherm."
|
115 |
-
|
116 |
-
#: ../functions/editor.php:219
|
117 |
-
msgid ""
|
118 |
-
"Step 2: Use your mouse to change the size of the rectangle on the image "
|
119 |
-
"above."
|
120 |
-
msgstr ""
|
121 |
-
"Stap 2: Gebruik de muis om de grootte van de rechthoek in de afbeelding "
|
122 |
-
"hierboven aan te passen."
|
123 |
-
|
124 |
-
#: ../functions/editor.php:220
|
125 |
-
msgid "Step 3: Click on \"Save Crop\"."
|
126 |
-
msgstr "Stap 3: Klik op \"bijgesneden afbeelding opslaan\"."
|
127 |
-
|
128 |
-
#: ../functions/editor.php:225
|
129 |
-
msgid "Crop all images with same ratio at once"
|
130 |
-
msgstr "Selecteer afbeeldingen met eenzelfde aspect-ratio tegelijkertijd"
|
131 |
-
|
132 |
-
#: ../functions/editor.php:226
|
133 |
-
msgid "deselect all"
|
134 |
-
msgstr "Deselecteer alles"
|
135 |
-
|
136 |
-
#: ../functions/editor.php:262
|
137 |
-
msgid "cropped"
|
138 |
-
msgstr "Bijgesneden"
|
139 |
-
|
140 |
-
#: ../functions/editor.php:271
|
141 |
-
msgid "maximum"
|
142 |
-
msgstr "Maximum"
|
143 |
-
|
144 |
-
#: ../functions/editor.php:286
|
145 |
-
msgid "Original image size too small for good crop quality!"
|
146 |
-
msgstr ""
|
147 |
-
"De originele afbeelding is te klein om met goede kwaliteit bij te snijden!"
|
148 |
-
|
149 |
-
#: ../functions/editor.php:292
|
150 |
-
msgid "Dimensions:"
|
151 |
-
msgstr "Grootte:"
|
152 |
-
|
153 |
-
#: ../functions/editor.php:293
|
154 |
-
msgid "Ratio:"
|
155 |
-
msgstr "Aspect-ratio:"
|
156 |
-
|
157 |
-
#: ../functions/save.php:106
|
158 |
-
#, php-format
|
159 |
-
msgid "Can't generate filesize '%s'."
|
160 |
-
msgstr "Kan de bestandsgrootte '%s' niet aanmaken."
|
161 |
-
|
162 |
-
#: ../functions/save.php:113
|
163 |
-
msgid "Can't copy temporary file to media library."
|
164 |
-
msgstr ""
|
165 |
-
"Het tijdelijke bestand kan niet gekopieerd worden naar de mediabibliotheek."
|
166 |
-
|
167 |
-
#: ../functions/save.php:117
|
168 |
-
msgid "Can't delete temporary file."
|
169 |
-
msgstr "Het tijdelijke bestand kan niet verwijderd worden."
|
170 |
-
|
171 |
-
#: ../functions/save.php:205
|
172 |
-
msgid "ERROR: Security Check failed (maybe a timeout - please try again)."
|
173 |
-
msgstr ""
|
174 |
-
"ERROR: Beveiligingscheck is mislukt (dit is mogelijk een timeout - probeer "
|
175 |
-
"het opnieuw)."
|
176 |
-
|
177 |
-
#: ../functions/save.php:209
|
178 |
-
msgid "ERROR: Submitted data is incomplete."
|
179 |
-
msgstr "ERROR: Toegevoegde data is niet volledig!"
|
180 |
-
|
181 |
-
#: ../functions/save.php:217
|
182 |
-
msgid "Cropping to these dimensions on this image is not possible."
|
183 |
-
msgstr ""
|
184 |
-
"Het bijsnijden met deze afmetingen is niet mogelijk bij deze afbeelding."
|
185 |
-
|
186 |
-
#: ../functions/save.php:228
|
187 |
-
msgid "ERROR: Can't find original image in database!"
|
188 |
-
msgstr ""
|
189 |
-
"ERROR: De originele afbeelding kan niet in de database gevonden worden!"
|
190 |
-
|
191 |
-
#: ../functions/save.php:231
|
192 |
-
msgid "ERROR: Can't find original image file!"
|
193 |
-
msgstr "ERROR: De originele afbeelding kan niet gevonden worden!"
|
194 |
-
|
195 |
-
#: ../functions/save.php:234
|
196 |
-
msgid "ERROR: Can't find original image metadata!"
|
197 |
-
msgstr ""
|
198 |
-
"ERROR: De originele metadata van de de afbeelding kunnen niet gevonden "
|
199 |
-
"worden!"
|
200 |
-
|
201 |
-
#: ../functions/settings.php:24 ../functions/settings.php:38
|
202 |
-
msgid "Settings"
|
203 |
-
msgstr "Instellingen"
|
204 |
-
|
205 |
-
#: ../functions/settings.php:31
|
206 |
-
msgid "Crop Post Thumbnail Page"
|
207 |
-
msgstr "Bericht thumbnail bijsnijd pagina"
|
208 |
-
|
209 |
-
#: ../functions/settings.php:44
|
210 |
-
msgid "Save Changes"
|
211 |
-
msgstr "Sla veranderingen op"
|
212 |
-
|
213 |
-
#: ../functions/settings.php:49
|
214 |
-
msgid "Support the plugin author"
|
215 |
-
msgstr "Ondersteun de pluginontwikkelaar"
|
216 |
-
|
217 |
-
#: ../functions/settings.php:50
|
218 |
-
msgid ""
|
219 |
-
"You can support the plugin author <br />(and let him know you love this "
|
220 |
-
"plugin) <br />by donating via Paypal. Thanks a lot!"
|
221 |
-
msgstr ""
|
222 |
-
"Je kunt de pluginontwikkelaar ondersteunen <br /> (en hem laten weten dat je "
|
223 |
-
"deze plugin gaaf vindt) <br /> door te doneren via Paypal. Alvast bedankt!"
|
224 |
-
|
225 |
-
#: ../functions/settings.php:72
|
226 |
-
msgid "Sizes and Post Types"
|
227 |
-
msgstr "Afbeeldingsgroottes en berichttypes"
|
228 |
-
|
229 |
-
#: ../functions/settings.php:73
|
230 |
-
msgid "Choose the image size options you want to hide for each post type."
|
231 |
-
msgstr ""
|
232 |
-
"Kies de afbeeldingsgroottes die je wilt verbergen. Kies een berichttype om "
|
233 |
-
"elk gebruik van de plugin daarbij te voorkomen."
|
234 |
-
|
235 |
-
#: ../functions/settings.php:81
|
236 |
-
msgid "Developer Settings"
|
237 |
-
msgstr "Opties voor ontwikkelaars"
|
238 |
-
|
239 |
-
#: ../functions/settings.php:83
|
240 |
-
msgid "Enable JS-Debug."
|
241 |
-
msgstr "Zet JS-Debug aan."
|
242 |
-
|
243 |
-
#: ../functions/settings.php:85
|
244 |
-
msgid "Enable Data-Debug."
|
245 |
-
msgstr "Zet Data-Debug aan."
|
246 |
-
|
247 |
-
#: ../functions/settings.php:90
|
248 |
-
msgid ""
|
249 |
-
"Crop-Thumbnails is designed to make cropping images easy. For some post "
|
250 |
-
"types, not all crop sizes are needed, but the plugin will automatically "
|
251 |
-
"create all the crop sizes. Here you can select which crop sizes are "
|
252 |
-
"available in the cropping interface for each post type.."
|
253 |
-
msgstr ""
|
254 |
-
"Crop-Thumbnails is gemaakt om het bijsnijden van afbeeldingen makkelijker te "
|
255 |
-
"maken voor de gebruiker. Het komt vaak voor dat de gebruiker slechts naar "
|
256 |
-
"één enkele grootte moet bijsnijden, afhankelijk van het berichttype. Ondanks "
|
257 |
-
"dat maakt WordPress ook andere groottes aan. Daarom kun je hier selecteren "
|
258 |
-
"welke afbeeldingsgrootte bij welk berichttype zichtbaar moet zijn in het "
|
259 |
-
"menu van de plugin."
|
260 |
-
|
261 |
-
#: ../functions/settings.php:91
|
262 |
-
msgid ""
|
263 |
-
"Crop-Thumbnails will only show cropped images. Sizes with no crop will "
|
264 |
-
"always be hidden."
|
265 |
-
msgstr ""
|
266 |
-
"Crop-Thumbnails laat alleen bijgesneden afbeeldingen zien. Afbeeldingen die "
|
267 |
-
"niet bijgesneden zijn zullen altijd verborgen blijven."
|
268 |
-
|
269 |
-
#: ../functions/settings.php:149
|
270 |
-
msgid ""
|
271 |
-
"ATTENTION: be aware that you can break things, when you activate this. When "
|
272 |
-
"activated your are able to cut those images to a spezific dimension that are "
|
273 |
-
"not cropped. The name of the image will not change. You should be extra "
|
274 |
-
"carefull when:"
|
275 |
-
msgstr ""
|
276 |
-
"LET OP: Het is mogelijk dat er dingen misgaan als je deze optie activeert. "
|
277 |
-
"Op het moment dat je dit activeert kun je afbeeldingen bijsnijden tot een "
|
278 |
-
"specifieke grootte die niet oorspronkelijk bijgesneden zijn. De naam van de "
|
279 |
-
"afbeelding zal niet veranderen. Je moet extra voorzichtig zijn als:"
|
280 |
-
|
281 |
-
#: ../functions/settings.php:151
|
282 |
-
msgid ""
|
283 |
-
"you had inserted the image before on any page or post. (There may be height "
|
284 |
-
"and width stored directly in the page-content.)"
|
285 |
-
msgstr ""
|
286 |
-
"Je hebt de afbeelding al eerder toegevoegd in een pagina of bericht. (Er kan "
|
287 |
-
"een hoogte en breedte direct aangegeven zijn in de inhoud.)"
|
288 |
-
|
289 |
-
#: ../functions/settings.php:152
|
290 |
-
msgid ""
|
291 |
-
"you use a plugin that expect the original image size. (The original image-"
|
292 |
-
"size is also \"stored\" in the filename.)"
|
293 |
-
msgstr ""
|
294 |
-
"Je gebruikt een plugin die de originele afbeeldingsgroottes verwacht. (De "
|
295 |
-
"oorspronkelijke afbeeldingsgrootte is ook \"opgeslagen\" in de bestandsnaam.)"
|
296 |
-
|
297 |
-
#: ../functions/settings.php:154
|
298 |
-
msgid ""
|
299 |
-
"The \"full\" image-size will never be cropped, otherwise you are not able to "
|
300 |
-
"restore any image-size."
|
301 |
-
msgstr ""
|
302 |
-
"De \"ful'\" afbeeldingsgrootte zal nooit bijgesneden worden, anders kunnen "
|
303 |
-
"afbeeldingsgroottes niet hersteld worden."
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Crop-Post-Thumbnails\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2015-11-18 22:26+0100\n"
|
6 |
+
"PO-Revision-Date: 2015-11-18 22:26+0100\n"
|
7 |
+
"Last-Translator: Max Gruson <mgruson@live.nl>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"Language: nl_NL\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e;esc_attr_e;esc_attr__;esc_html_e\n"
|
14 |
+
"X-Poedit-Basepath: .\n"
|
15 |
+
"X-Generator: Poedit 1.7.6\n"
|
16 |
+
"X-Poedit-SearchPath-0: ..\n"
|
17 |
+
|
18 |
+
#: ../crop-thumbnails.php:35
|
19 |
+
msgid "Crop your thumbnails, the easy way."
|
20 |
+
msgstr "Snijd de thumbnails bij op een makkelijke manier."
|
21 |
+
|
22 |
+
#: ../functions/backendpreparer.php:84 ../functions/backendpreparer.php:87
|
23 |
+
msgid "Crop Thumbnails"
|
24 |
+
msgstr "Snijd thumbnails bij"
|
25 |
+
|
26 |
+
#: ../functions/backendpreparer.php:98 ../functions/backendpreparer.php:101
|
27 |
+
msgid "Crop Featured Image"
|
28 |
+
msgstr "Snijd uitgelichte afbeelding bij"
|
29 |
+
|
30 |
+
#: ../functions/backendpreparer.php:127 ../functions/backendpreparer.php:130
|
31 |
+
#: ../functions/backendpreparer.php:252
|
32 |
+
msgid "Crop Thumbnail"
|
33 |
+
msgstr "Snijd thumbnail bij"
|
34 |
+
|
35 |
+
#: ../functions/editor.php:25
|
36 |
+
msgid "You are not allowed to do this."
|
37 |
+
msgstr "Je hebt geen toestemming dit te doen."
|
38 |
+
|
39 |
+
#: ../functions/editor.php:41
|
40 |
+
msgid "No featured image set for this post until now."
|
41 |
+
msgstr "Er is nog geen Uitgelichte afbeelding ingesteld tot nu toe."
|
42 |
+
|
43 |
+
#: ../functions/editor.php:45
|
44 |
+
msgid "An error occurred!"
|
45 |
+
msgstr "Er heeft een error plaatsgevonden!"
|
46 |
+
|
47 |
+
#: ../functions/editor.php:78 ../functions/editor.php:204
|
48 |
+
msgid "Cropping is disabled for this post-type."
|
49 |
+
msgstr "Bijsnijden is uitgeschakeld voor dit berichttype."
|
50 |
+
|
51 |
+
#: ../functions/editor.php:80
|
52 |
+
msgid ""
|
53 |
+
"No images attached to this post yet. Please upload some via the upload "
|
54 |
+
"dialog."
|
55 |
+
msgstr ""
|
56 |
+
"Er zijn nog geen afbeeldingen in dit bericht. Je kunt afbeeldingen uploaden "
|
57 |
+
"via het upload scherm."
|
58 |
+
|
59 |
+
#: ../functions/editor.php:101
|
60 |
+
msgid "Choose the image you want to crop."
|
61 |
+
msgstr "Kies de afbeelding die je bij wilt snijden."
|
62 |
+
|
63 |
+
#: ../functions/editor.php:107
|
64 |
+
msgid "Post Thumbnail"
|
65 |
+
msgstr "Bericht afbeelding."
|
66 |
+
|
67 |
+
#: ../functions/editor.php:107
|
68 |
+
#, php-format
|
69 |
+
msgid "Image %d"
|
70 |
+
msgstr "Afbeelding %d"
|
71 |
+
|
72 |
+
#: ../functions/editor.php:180
|
73 |
+
msgid "Bug--this should not have occurred."
|
74 |
+
msgstr "Bug - Dit zou niet plaatsgevonden moeten hebben."
|
75 |
+
|
76 |
+
#: ../functions/editor.php:181
|
77 |
+
msgid ""
|
78 |
+
"Warning: the original image is too small to be cropped in good quality with "
|
79 |
+
"this thumbnail size."
|
80 |
+
msgstr ""
|
81 |
+
"Waarschuwing: de originele afbeelding is te klein om met behoud van "
|
82 |
+
"kwaliteit bijgesneden te kunnen worden tot deze grootte."
|
83 |
+
|
84 |
+
#: ../functions/editor.php:182
|
85 |
+
msgid "First, select an image. Then, click once again."
|
86 |
+
msgstr "Selecteer eerst een afbeelding. Klik vervolgens opnieuw."
|
87 |
+
|
88 |
+
#: ../functions/editor.php:209
|
89 |
+
msgid "back to image list"
|
90 |
+
msgstr "Keer terug naar de lijst met afbeeldingen"
|
91 |
+
|
92 |
+
#: ../functions/editor.php:210
|
93 |
+
msgid "Please wait until the images are cropped."
|
94 |
+
msgstr "Wacht a.u.b. tot de afbeeldingen zijn bijgesneden."
|
95 |
+
|
96 |
+
#: ../functions/editor.php:213
|
97 |
+
msgid "Raw"
|
98 |
+
msgstr "Volledig"
|
99 |
+
|
100 |
+
#: ../functions/editor.php:213 ../functions/editor.php:279
|
101 |
+
msgid "pixel"
|
102 |
+
msgstr "pixels"
|
103 |
+
|
104 |
+
#: ../functions/editor.php:215
|
105 |
+
msgid "Save Crop"
|
106 |
+
msgstr "Bijgesneden afbeelding opslaan"
|
107 |
+
|
108 |
+
#: ../functions/editor.php:216
|
109 |
+
msgid "Quick Instructions"
|
110 |
+
msgstr "Korte instructie"
|
111 |
+
|
112 |
+
#: ../functions/editor.php:218
|
113 |
+
msgid "Step 1: Choose an image from the right."
|
114 |
+
msgstr "Stap 1: Kies een afbeelding aan de rechterkant van dit scherm."
|
115 |
+
|
116 |
+
#: ../functions/editor.php:219
|
117 |
+
msgid ""
|
118 |
+
"Step 2: Use your mouse to change the size of the rectangle on the image "
|
119 |
+
"above."
|
120 |
+
msgstr ""
|
121 |
+
"Stap 2: Gebruik de muis om de grootte van de rechthoek in de afbeelding "
|
122 |
+
"hierboven aan te passen."
|
123 |
+
|
124 |
+
#: ../functions/editor.php:220
|
125 |
+
msgid "Step 3: Click on \"Save Crop\"."
|
126 |
+
msgstr "Stap 3: Klik op \"bijgesneden afbeelding opslaan\"."
|
127 |
+
|
128 |
+
#: ../functions/editor.php:225
|
129 |
+
msgid "Crop all images with same ratio at once"
|
130 |
+
msgstr "Selecteer afbeeldingen met eenzelfde aspect-ratio tegelijkertijd"
|
131 |
+
|
132 |
+
#: ../functions/editor.php:226
|
133 |
+
msgid "deselect all"
|
134 |
+
msgstr "Deselecteer alles"
|
135 |
+
|
136 |
+
#: ../functions/editor.php:262
|
137 |
+
msgid "cropped"
|
138 |
+
msgstr "Bijgesneden"
|
139 |
+
|
140 |
+
#: ../functions/editor.php:271
|
141 |
+
msgid "maximum"
|
142 |
+
msgstr "Maximum"
|
143 |
+
|
144 |
+
#: ../functions/editor.php:286
|
145 |
+
msgid "Original image size too small for good crop quality!"
|
146 |
+
msgstr ""
|
147 |
+
"De originele afbeelding is te klein om met goede kwaliteit bij te snijden!"
|
148 |
+
|
149 |
+
#: ../functions/editor.php:292
|
150 |
+
msgid "Dimensions:"
|
151 |
+
msgstr "Grootte:"
|
152 |
+
|
153 |
+
#: ../functions/editor.php:293
|
154 |
+
msgid "Ratio:"
|
155 |
+
msgstr "Aspect-ratio:"
|
156 |
+
|
157 |
+
#: ../functions/save.php:106
|
158 |
+
#, php-format
|
159 |
+
msgid "Can't generate filesize '%s'."
|
160 |
+
msgstr "Kan de bestandsgrootte '%s' niet aanmaken."
|
161 |
+
|
162 |
+
#: ../functions/save.php:113
|
163 |
+
msgid "Can't copy temporary file to media library."
|
164 |
+
msgstr ""
|
165 |
+
"Het tijdelijke bestand kan niet gekopieerd worden naar de mediabibliotheek."
|
166 |
+
|
167 |
+
#: ../functions/save.php:117
|
168 |
+
msgid "Can't delete temporary file."
|
169 |
+
msgstr "Het tijdelijke bestand kan niet verwijderd worden."
|
170 |
+
|
171 |
+
#: ../functions/save.php:205
|
172 |
+
msgid "ERROR: Security Check failed (maybe a timeout - please try again)."
|
173 |
+
msgstr ""
|
174 |
+
"ERROR: Beveiligingscheck is mislukt (dit is mogelijk een timeout - probeer "
|
175 |
+
"het opnieuw)."
|
176 |
+
|
177 |
+
#: ../functions/save.php:209
|
178 |
+
msgid "ERROR: Submitted data is incomplete."
|
179 |
+
msgstr "ERROR: Toegevoegde data is niet volledig!"
|
180 |
+
|
181 |
+
#: ../functions/save.php:217
|
182 |
+
msgid "Cropping to these dimensions on this image is not possible."
|
183 |
+
msgstr ""
|
184 |
+
"Het bijsnijden met deze afmetingen is niet mogelijk bij deze afbeelding."
|
185 |
+
|
186 |
+
#: ../functions/save.php:228
|
187 |
+
msgid "ERROR: Can't find original image in database!"
|
188 |
+
msgstr ""
|
189 |
+
"ERROR: De originele afbeelding kan niet in de database gevonden worden!"
|
190 |
+
|
191 |
+
#: ../functions/save.php:231
|
192 |
+
msgid "ERROR: Can't find original image file!"
|
193 |
+
msgstr "ERROR: De originele afbeelding kan niet gevonden worden!"
|
194 |
+
|
195 |
+
#: ../functions/save.php:234
|
196 |
+
msgid "ERROR: Can't find original image metadata!"
|
197 |
+
msgstr ""
|
198 |
+
"ERROR: De originele metadata van de de afbeelding kunnen niet gevonden "
|
199 |
+
"worden!"
|
200 |
+
|
201 |
+
#: ../functions/settings.php:24 ../functions/settings.php:38
|
202 |
+
msgid "Settings"
|
203 |
+
msgstr "Instellingen"
|
204 |
+
|
205 |
+
#: ../functions/settings.php:31
|
206 |
+
msgid "Crop Post Thumbnail Page"
|
207 |
+
msgstr "Bericht thumbnail bijsnijd pagina"
|
208 |
+
|
209 |
+
#: ../functions/settings.php:44
|
210 |
+
msgid "Save Changes"
|
211 |
+
msgstr "Sla veranderingen op"
|
212 |
+
|
213 |
+
#: ../functions/settings.php:49
|
214 |
+
msgid "Support the plugin author"
|
215 |
+
msgstr "Ondersteun de pluginontwikkelaar"
|
216 |
+
|
217 |
+
#: ../functions/settings.php:50
|
218 |
+
msgid ""
|
219 |
+
"You can support the plugin author <br />(and let him know you love this "
|
220 |
+
"plugin) <br />by donating via Paypal. Thanks a lot!"
|
221 |
+
msgstr ""
|
222 |
+
"Je kunt de pluginontwikkelaar ondersteunen <br /> (en hem laten weten dat je "
|
223 |
+
"deze plugin gaaf vindt) <br /> door te doneren via Paypal. Alvast bedankt!"
|
224 |
+
|
225 |
+
#: ../functions/settings.php:72
|
226 |
+
msgid "Sizes and Post Types"
|
227 |
+
msgstr "Afbeeldingsgroottes en berichttypes"
|
228 |
+
|
229 |
+
#: ../functions/settings.php:73
|
230 |
+
msgid "Choose the image size options you want to hide for each post type."
|
231 |
+
msgstr ""
|
232 |
+
"Kies de afbeeldingsgroottes die je wilt verbergen. Kies een berichttype om "
|
233 |
+
"elk gebruik van de plugin daarbij te voorkomen."
|
234 |
+
|
235 |
+
#: ../functions/settings.php:81
|
236 |
+
msgid "Developer Settings"
|
237 |
+
msgstr "Opties voor ontwikkelaars"
|
238 |
+
|
239 |
+
#: ../functions/settings.php:83
|
240 |
+
msgid "Enable JS-Debug."
|
241 |
+
msgstr "Zet JS-Debug aan."
|
242 |
+
|
243 |
+
#: ../functions/settings.php:85
|
244 |
+
msgid "Enable Data-Debug."
|
245 |
+
msgstr "Zet Data-Debug aan."
|
246 |
+
|
247 |
+
#: ../functions/settings.php:90
|
248 |
+
msgid ""
|
249 |
+
"Crop-Thumbnails is designed to make cropping images easy. For some post "
|
250 |
+
"types, not all crop sizes are needed, but the plugin will automatically "
|
251 |
+
"create all the crop sizes. Here you can select which crop sizes are "
|
252 |
+
"available in the cropping interface for each post type.."
|
253 |
+
msgstr ""
|
254 |
+
"Crop-Thumbnails is gemaakt om het bijsnijden van afbeeldingen makkelijker te "
|
255 |
+
"maken voor de gebruiker. Het komt vaak voor dat de gebruiker slechts naar "
|
256 |
+
"één enkele grootte moet bijsnijden, afhankelijk van het berichttype. Ondanks "
|
257 |
+
"dat maakt WordPress ook andere groottes aan. Daarom kun je hier selecteren "
|
258 |
+
"welke afbeeldingsgrootte bij welk berichttype zichtbaar moet zijn in het "
|
259 |
+
"menu van de plugin."
|
260 |
+
|
261 |
+
#: ../functions/settings.php:91
|
262 |
+
msgid ""
|
263 |
+
"Crop-Thumbnails will only show cropped images. Sizes with no crop will "
|
264 |
+
"always be hidden."
|
265 |
+
msgstr ""
|
266 |
+
"Crop-Thumbnails laat alleen bijgesneden afbeeldingen zien. Afbeeldingen die "
|
267 |
+
"niet bijgesneden zijn zullen altijd verborgen blijven."
|
268 |
+
|
269 |
+
#: ../functions/settings.php:149
|
270 |
+
msgid ""
|
271 |
+
"ATTENTION: be aware that you can break things, when you activate this. When "
|
272 |
+
"activated your are able to cut those images to a spezific dimension that are "
|
273 |
+
"not cropped. The name of the image will not change. You should be extra "
|
274 |
+
"carefull when:"
|
275 |
+
msgstr ""
|
276 |
+
"LET OP: Het is mogelijk dat er dingen misgaan als je deze optie activeert. "
|
277 |
+
"Op het moment dat je dit activeert kun je afbeeldingen bijsnijden tot een "
|
278 |
+
"specifieke grootte die niet oorspronkelijk bijgesneden zijn. De naam van de "
|
279 |
+
"afbeelding zal niet veranderen. Je moet extra voorzichtig zijn als:"
|
280 |
+
|
281 |
+
#: ../functions/settings.php:151
|
282 |
+
msgid ""
|
283 |
+
"you had inserted the image before on any page or post. (There may be height "
|
284 |
+
"and width stored directly in the page-content.)"
|
285 |
+
msgstr ""
|
286 |
+
"Je hebt de afbeelding al eerder toegevoegd in een pagina of bericht. (Er kan "
|
287 |
+
"een hoogte en breedte direct aangegeven zijn in de inhoud.)"
|
288 |
+
|
289 |
+
#: ../functions/settings.php:152
|
290 |
+
msgid ""
|
291 |
+
"you use a plugin that expect the original image size. (The original image-"
|
292 |
+
"size is also \"stored\" in the filename.)"
|
293 |
+
msgstr ""
|
294 |
+
"Je gebruikt een plugin die de originele afbeeldingsgroottes verwacht. (De "
|
295 |
+
"oorspronkelijke afbeeldingsgrootte is ook \"opgeslagen\" in de bestandsnaam.)"
|
296 |
+
|
297 |
+
#: ../functions/settings.php:154
|
298 |
+
msgid ""
|
299 |
+
"The \"full\" image-size will never be cropped, otherwise you are not able to "
|
300 |
+
"restore any image-size."
|
301 |
+
msgstr ""
|
302 |
+
"De \"ful'\" afbeeldingsgrootte zal nooit bijgesneden worden, anders kunnen "
|
303 |
+
"afbeeldingsgroottes niet hersteld worden."
|
lang/cpt_lang-pt_BR.po
CHANGED
@@ -1,332 +1,332 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Crop Thumbnails v0.7.0\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2015-11-18 22:26+0100\n"
|
6 |
-
"PO-Revision-Date: 2015-11-18 22:26+0100\n"
|
7 |
-
"Last-Translator: Volkmar Kantor <volkmar.kantor@gmx.de>\n"
|
8 |
-
"Language-Team: \n"
|
9 |
-
"Language: pt_BR\n"
|
10 |
-
"MIME-Version: 1.0\n"
|
11 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
-
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
14 |
-
"X-Poedit-SourceCharset: utf-8\n"
|
15 |
-
"X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html__;esc_attr_e;esc_attr__\n"
|
16 |
-
"X-Poedit-Basepath: ../\n"
|
17 |
-
"X-Textdomain-Support: yes\n"
|
18 |
-
"X-Generator: Poedit 1.7.6\n"
|
19 |
-
"X-Poedit-SearchPath-0: .\n"
|
20 |
-
|
21 |
-
# @ default
|
22 |
-
#: crop-thumbnails.php:35
|
23 |
-
msgid "Crop your thumbnails, the easy way."
|
24 |
-
msgstr "Cortando suas miniaturas de uma maneira mais simples"
|
25 |
-
|
26 |
-
# @ cpt_lang
|
27 |
-
#: functions/backendpreparer.php:84 functions/backendpreparer.php:87
|
28 |
-
msgid "Crop Thumbnails"
|
29 |
-
msgstr "Cortar Miniaturas"
|
30 |
-
|
31 |
-
#: functions/backendpreparer.php:98 functions/backendpreparer.php:101
|
32 |
-
msgid "Crop Featured Image"
|
33 |
-
msgstr "Cortar Imagem Destacada"
|
34 |
-
|
35 |
-
# @ cpt_lang
|
36 |
-
#: functions/backendpreparer.php:127 functions/backendpreparer.php:130
|
37 |
-
#: functions/backendpreparer.php:252 functions/backendpreparer.php:253
|
38 |
-
msgid "Crop Thumbnail"
|
39 |
-
msgstr "Cortar Miniatura"
|
40 |
-
|
41 |
-
#: functions/editor.php:25
|
42 |
-
msgid "You are not allowed to do this."
|
43 |
-
msgstr ""
|
44 |
-
|
45 |
-
#: functions/editor.php:41
|
46 |
-
msgid "No featured image set for this post until now."
|
47 |
-
msgstr "Sem Imagem Destacada definida para este post até o momento."
|
48 |
-
|
49 |
-
# @ cpt_lang
|
50 |
-
#: functions/editor.php:45
|
51 |
-
msgid "An error occurred!"
|
52 |
-
msgstr "Ocorreu um erro!"
|
53 |
-
|
54 |
-
# @ cpt_lang
|
55 |
-
#: functions/editor.php:78 functions/editor.php:204
|
56 |
-
msgid "Cropping is disabled for this post-type."
|
57 |
-
msgstr "O corte está desativado para este tipo de post."
|
58 |
-
|
59 |
-
# @ cpt_lang
|
60 |
-
#: functions/editor.php:80
|
61 |
-
msgid ""
|
62 |
-
"No images attached to this post yet. Please upload some via the upload "
|
63 |
-
"dialog."
|
64 |
-
msgstr ""
|
65 |
-
"Não há imagens neste post ainda. Você tem que carregar alguma através da "
|
66 |
-
"caixa de diálogo de upload."
|
67 |
-
|
68 |
-
# @ cpt_lang
|
69 |
-
#: functions/editor.php:101
|
70 |
-
msgid "Choose the image you want to crop."
|
71 |
-
msgstr "Escolha a imagem que você deseja cortar."
|
72 |
-
|
73 |
-
# @ cpt_lang
|
74 |
-
#: functions/editor.php:107
|
75 |
-
msgid "Post Thumbnail"
|
76 |
-
msgstr "Publicar Miniatura"
|
77 |
-
|
78 |
-
# @ cpt_lang
|
79 |
-
#: functions/editor.php:107
|
80 |
-
#, php-format
|
81 |
-
msgid "Image %d"
|
82 |
-
msgstr "Imagem %d"
|
83 |
-
|
84 |
-
# @ cpt_lang
|
85 |
-
#: functions/editor.php:180
|
86 |
-
msgid "Bug--this should not have occurred."
|
87 |
-
msgstr "bug - isso não devia ter acontececido"
|
88 |
-
|
89 |
-
# @ cpt_lang
|
90 |
-
#: functions/editor.php:181
|
91 |
-
msgid ""
|
92 |
-
"Warning: the original image is too small to be cropped in good quality with "
|
93 |
-
"this thumbnail size."
|
94 |
-
msgstr ""
|
95 |
-
"Atenção: a imagem original é muito pequena para ser cortada em boa qualidade "
|
96 |
-
"neste tamanho de miniatura."
|
97 |
-
|
98 |
-
# @ cpt_lang
|
99 |
-
#: functions/editor.php:182
|
100 |
-
msgid "First, select an image. Then, click once again."
|
101 |
-
msgstr "Primeiro, selecione uma imagem. Em seguida, clique novamente."
|
102 |
-
|
103 |
-
# @ cpt_lang
|
104 |
-
#: functions/editor.php:209
|
105 |
-
msgid "back to image list"
|
106 |
-
msgstr "volte a lista de imagens"
|
107 |
-
|
108 |
-
# @ cpt_lang
|
109 |
-
#: functions/editor.php:210
|
110 |
-
msgid "Please wait until the images are cropped."
|
111 |
-
msgstr "Por favor, aguarde até que as imagens sejam cortadas."
|
112 |
-
|
113 |
-
# @ cpt_lang
|
114 |
-
#: functions/editor.php:213
|
115 |
-
msgid "Raw"
|
116 |
-
msgstr "Bruta"
|
117 |
-
|
118 |
-
# @ cpt_lang
|
119 |
-
#: functions/editor.php:213 functions/editor.php:279
|
120 |
-
msgid "pixel"
|
121 |
-
msgstr "pixel"
|
122 |
-
|
123 |
-
# @ cpt_lang
|
124 |
-
#: functions/editor.php:215
|
125 |
-
msgid "Save Crop"
|
126 |
-
msgstr "Cortar e Salvar"
|
127 |
-
|
128 |
-
# @ cpt_lang
|
129 |
-
#: functions/editor.php:216
|
130 |
-
msgid "Quick Instructions"
|
131 |
-
msgstr "Instruções Rápidas"
|
132 |
-
|
133 |
-
# @ cpt_lang
|
134 |
-
#: functions/editor.php:218
|
135 |
-
msgid "Step 1: Choose an image from the right."
|
136 |
-
msgstr "Passo 1: Escolha uma imagem à direita."
|
137 |
-
|
138 |
-
# @ cpt_lang
|
139 |
-
#: functions/editor.php:219
|
140 |
-
msgid ""
|
141 |
-
"Step 2: Use your mouse to change the size of the rectangle on the image "
|
142 |
-
"above."
|
143 |
-
msgstr ""
|
144 |
-
"Passo 2: Use o mouse para alterar o tamanho do retângulo na imagem acima."
|
145 |
-
|
146 |
-
# @ cpt_lang
|
147 |
-
#: functions/editor.php:220
|
148 |
-
msgid "Step 3: Click on \"Save Crop\"."
|
149 |
-
msgstr "Passo 3: Clique em \"Cortar e Salvar\"."
|
150 |
-
|
151 |
-
# @ cpt_lang
|
152 |
-
#: functions/editor.php:225
|
153 |
-
msgid "Crop all images with same ratio at once"
|
154 |
-
msgstr "Selecionar imagens com mesma proporção de uma só vez"
|
155 |
-
|
156 |
-
# @ cpt_lang
|
157 |
-
#: functions/editor.php:226
|
158 |
-
msgid "deselect all"
|
159 |
-
msgstr "Desmarcar Todos"
|
160 |
-
|
161 |
-
# @ cpt_lang
|
162 |
-
#: functions/editor.php:262
|
163 |
-
msgid "cropped"
|
164 |
-
msgstr "Cortadas"
|
165 |
-
|
166 |
-
#: functions/editor.php:271
|
167 |
-
msgid "maximum"
|
168 |
-
msgstr ""
|
169 |
-
|
170 |
-
# @ cpt_lang
|
171 |
-
#: functions/editor.php:286
|
172 |
-
msgid "Original image size too small for good crop quality!"
|
173 |
-
msgstr "Imagem original muito pequena para um corte de qualidade!"
|
174 |
-
|
175 |
-
# @ cpt_lang
|
176 |
-
#: functions/editor.php:292
|
177 |
-
msgid "Dimensions:"
|
178 |
-
msgstr "Dimensões:"
|
179 |
-
|
180 |
-
# @ cpt_lang
|
181 |
-
#: functions/editor.php:293
|
182 |
-
msgid "Ratio:"
|
183 |
-
msgstr "Relação:"
|
184 |
-
|
185 |
-
#: functions/save.php:106
|
186 |
-
#, php-format
|
187 |
-
msgid "Can't generate filesize '%s'."
|
188 |
-
msgstr "Não é possível gerar o tamanho '%s'."
|
189 |
-
|
190 |
-
# @ cpt_lang
|
191 |
-
#: functions/save.php:113
|
192 |
-
msgid "Can't copy temporary file to media library."
|
193 |
-
msgstr "Não é possível copiar arquivo temporário para a biblioteca de mídia."
|
194 |
-
|
195 |
-
# @ cpt_lang
|
196 |
-
#: functions/save.php:117
|
197 |
-
msgid "Can't delete temporary file."
|
198 |
-
msgstr "Não é possível excluir arquivo temporário."
|
199 |
-
|
200 |
-
# @ cpt_lang
|
201 |
-
#: functions/save.php:205
|
202 |
-
msgid "ERROR: Security Check failed (maybe a timeout - please try again)."
|
203 |
-
msgstr ""
|
204 |
-
"ERRO: Verificação de Segurança falhou (talvez pelo tempo limite ter sido "
|
205 |
-
"atingido - por favor, tente novamente)."
|
206 |
-
|
207 |
-
# @ cpt_lang
|
208 |
-
#: functions/save.php:209
|
209 |
-
msgid "ERROR: Submitted data is incomplete."
|
210 |
-
msgstr "ERRO: Dados enviados não estão completos."
|
211 |
-
|
212 |
-
# @ cpt_lang
|
213 |
-
#: functions/save.php:217
|
214 |
-
msgid "Cropping to these dimensions on this image is not possible."
|
215 |
-
msgstr "Um corte com estas dimensões sobre esta imagem não é possível."
|
216 |
-
|
217 |
-
# @ cpt_lang
|
218 |
-
#: functions/save.php:228
|
219 |
-
msgid "ERROR: Can't find original image in database!"
|
220 |
-
msgstr "ERRO: Não é possível localizar a imagem original no banco de dados!"
|
221 |
-
|
222 |
-
# @ cpt_lang
|
223 |
-
#: functions/save.php:231
|
224 |
-
msgid "ERROR: Can't find original image file!"
|
225 |
-
msgstr "ERRO: Não é possível encontrar arquivo de imagem original!"
|
226 |
-
|
227 |
-
# @ cpt_lang
|
228 |
-
#: functions/save.php:234
|
229 |
-
msgid "ERROR: Can't find original image metadata!"
|
230 |
-
msgstr "ERRO: Não é possível encontrar os metadados da imagem original!"
|
231 |
-
|
232 |
-
# @ cpt_lang
|
233 |
-
#: functions/settings.php:24 functions/settings.php:38
|
234 |
-
msgid "Settings"
|
235 |
-
msgstr "Configurações"
|
236 |
-
|
237 |
-
# @ cpt_lang
|
238 |
-
#: functions/settings.php:31
|
239 |
-
msgid "Crop Post Thumbnail Page"
|
240 |
-
msgstr "Cortar miniaturas na página do post"
|
241 |
-
|
242 |
-
# @ cpt_lang
|
243 |
-
#: functions/settings.php:44
|
244 |
-
msgid "Save Changes"
|
245 |
-
msgstr "Salvar Mudanças"
|
246 |
-
|
247 |
-
# @ cpt_lang
|
248 |
-
#: functions/settings.php:49
|
249 |
-
msgid "Support the plugin author"
|
250 |
-
msgstr "Apoiar o autor do plugin"
|
251 |
-
|
252 |
-
# @ cpt_lang
|
253 |
-
#: functions/settings.php:50
|
254 |
-
msgid ""
|
255 |
-
"You can support the plugin author <br />(and let him know you love this "
|
256 |
-
"plugin) <br />by donating via Paypal. Thanks a lot!"
|
257 |
-
msgstr ""
|
258 |
-
"Você pode apoiar o autor do plugin <br />(e deixá-lo saber que você ama este "
|
259 |
-
"plugin)<br /> doando via Paypal. Muito obrigado!"
|
260 |
-
|
261 |
-
# @ cpt_lang
|
262 |
-
#: functions/settings.php:72
|
263 |
-
msgid "Sizes and Post Types"
|
264 |
-
msgstr "Tamanhos e Tipos de Post"
|
265 |
-
|
266 |
-
# @ cpt_lang
|
267 |
-
#: functions/settings.php:73
|
268 |
-
msgid "Choose the image size options you want to hide for each post type."
|
269 |
-
msgstr ""
|
270 |
-
"Escolha os tamanhos de imagem que você deseja esconder. Escolha um tipo de "
|
271 |
-
"post para evitar qualquer uso do plugin para essas entradas."
|
272 |
-
|
273 |
-
#: functions/settings.php:81
|
274 |
-
msgid "Developer Settings"
|
275 |
-
msgstr ""
|
276 |
-
|
277 |
-
#: functions/settings.php:83
|
278 |
-
msgid "Enable JS-Debug."
|
279 |
-
msgstr ""
|
280 |
-
|
281 |
-
#: functions/settings.php:85
|
282 |
-
msgid "Enable Data-Debug."
|
283 |
-
msgstr ""
|
284 |
-
|
285 |
-
# @ cpt_lang
|
286 |
-
#: functions/settings.php:90
|
287 |
-
msgid ""
|
288 |
-
"Crop-Thumbnails is designed to make cropping images easy. For some post "
|
289 |
-
"types, not all crop sizes are needed, but the plugin will automatically "
|
290 |
-
"create all the crop sizes. Here you can select which crop sizes are "
|
291 |
-
"available in the cropping interface for each post type.."
|
292 |
-
msgstr ""
|
293 |
-
"Crop-Thumbnails é criado para fazer recorte fácil para o usuário. Muitas "
|
294 |
-
"vezes o utilizador necessita somente de um recorte, pois depende dele em seu "
|
295 |
-
"post. Mas o sistema irá criar também todos os outros tamanhos. Então, aqui "
|
296 |
-
"você pode selecionar para que as miniaturas de seu post sejam visíveis na "
|
297 |
-
"interface do plugin."
|
298 |
-
|
299 |
-
# @ cpt_lang
|
300 |
-
#: functions/settings.php:91
|
301 |
-
msgid ""
|
302 |
-
"Crop-Thumbnails will only show cropped images. Sizes with no crop will "
|
303 |
-
"always be hidden."
|
304 |
-
msgstr ""
|
305 |
-
"Crop-Thumbnails só irá mostrar imagens cortadas - tamanhos sem cortes serão "
|
306 |
-
"sempre escondidos."
|
307 |
-
|
308 |
-
#: functions/settings.php:149
|
309 |
-
msgid ""
|
310 |
-
"ATTENTION: be aware that you can break things, when you activate this. When "
|
311 |
-
"activated your are able to cut those images to a spezific dimension that are "
|
312 |
-
"not cropped. The name of the image will not change. You should be extra "
|
313 |
-
"carefull when:"
|
314 |
-
msgstr ""
|
315 |
-
|
316 |
-
#: functions/settings.php:151
|
317 |
-
msgid ""
|
318 |
-
"you had inserted the image before on any page or post. (There may be height "
|
319 |
-
"and width stored directly in the page-content.)"
|
320 |
-
msgstr ""
|
321 |
-
|
322 |
-
#: functions/settings.php:152
|
323 |
-
msgid ""
|
324 |
-
"you use a plugin that expect the original image size. (The original image-"
|
325 |
-
"size is also \"stored\" in the filename.)"
|
326 |
-
msgstr ""
|
327 |
-
|
328 |
-
#: functions/settings.php:154
|
329 |
-
msgid ""
|
330 |
-
"The \"full\" image-size will never be cropped, otherwise you are not able to "
|
331 |
-
"restore any image-size."
|
332 |
-
msgstr ""
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Crop Thumbnails v0.7.0\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2015-11-18 22:26+0100\n"
|
6 |
+
"PO-Revision-Date: 2015-11-18 22:26+0100\n"
|
7 |
+
"Last-Translator: Volkmar Kantor <volkmar.kantor@gmx.de>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"Language: pt_BR\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
14 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
15 |
+
"X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html__;esc_attr_e;esc_attr__\n"
|
16 |
+
"X-Poedit-Basepath: ../\n"
|
17 |
+
"X-Textdomain-Support: yes\n"
|
18 |
+
"X-Generator: Poedit 1.7.6\n"
|
19 |
+
"X-Poedit-SearchPath-0: .\n"
|
20 |
+
|
21 |
+
# @ default
|
22 |
+
#: crop-thumbnails.php:35
|
23 |
+
msgid "Crop your thumbnails, the easy way."
|
24 |
+
msgstr "Cortando suas miniaturas de uma maneira mais simples"
|
25 |
+
|
26 |
+
# @ cpt_lang
|
27 |
+
#: functions/backendpreparer.php:84 functions/backendpreparer.php:87
|
28 |
+
msgid "Crop Thumbnails"
|
29 |
+
msgstr "Cortar Miniaturas"
|
30 |
+
|
31 |
+
#: functions/backendpreparer.php:98 functions/backendpreparer.php:101
|
32 |
+
msgid "Crop Featured Image"
|
33 |
+
msgstr "Cortar Imagem Destacada"
|
34 |
+
|
35 |
+
# @ cpt_lang
|
36 |
+
#: functions/backendpreparer.php:127 functions/backendpreparer.php:130
|
37 |
+
#: functions/backendpreparer.php:252 functions/backendpreparer.php:253
|
38 |
+
msgid "Crop Thumbnail"
|
39 |
+
msgstr "Cortar Miniatura"
|
40 |
+
|
41 |
+
#: functions/editor.php:25
|
42 |
+
msgid "You are not allowed to do this."
|
43 |
+
msgstr ""
|
44 |
+
|
45 |
+
#: functions/editor.php:41
|
46 |
+
msgid "No featured image set for this post until now."
|
47 |
+
msgstr "Sem Imagem Destacada definida para este post até o momento."
|
48 |
+
|
49 |
+
# @ cpt_lang
|
50 |
+
#: functions/editor.php:45
|
51 |
+
msgid "An error occurred!"
|
52 |
+
msgstr "Ocorreu um erro!"
|
53 |
+
|
54 |
+
# @ cpt_lang
|
55 |
+
#: functions/editor.php:78 functions/editor.php:204
|
56 |
+
msgid "Cropping is disabled for this post-type."
|
57 |
+
msgstr "O corte está desativado para este tipo de post."
|
58 |
+
|
59 |
+
# @ cpt_lang
|
60 |
+
#: functions/editor.php:80
|
61 |
+
msgid ""
|
62 |
+
"No images attached to this post yet. Please upload some via the upload "
|
63 |
+
"dialog."
|
64 |
+
msgstr ""
|
65 |
+
"Não há imagens neste post ainda. Você tem que carregar alguma através da "
|
66 |
+
"caixa de diálogo de upload."
|
67 |
+
|
68 |
+
# @ cpt_lang
|
69 |
+
#: functions/editor.php:101
|
70 |
+
msgid "Choose the image you want to crop."
|
71 |
+
msgstr "Escolha a imagem que você deseja cortar."
|
72 |
+
|
73 |
+
# @ cpt_lang
|
74 |
+
#: functions/editor.php:107
|
75 |
+
msgid "Post Thumbnail"
|
76 |
+
msgstr "Publicar Miniatura"
|
77 |
+
|
78 |
+
# @ cpt_lang
|
79 |
+
#: functions/editor.php:107
|
80 |
+
#, php-format
|
81 |
+
msgid "Image %d"
|
82 |
+
msgstr "Imagem %d"
|
83 |
+
|
84 |
+
# @ cpt_lang
|
85 |
+
#: functions/editor.php:180
|
86 |
+
msgid "Bug--this should not have occurred."
|
87 |
+
msgstr "bug - isso não devia ter acontececido"
|
88 |
+
|
89 |
+
# @ cpt_lang
|
90 |
+
#: functions/editor.php:181
|
91 |
+
msgid ""
|
92 |
+
"Warning: the original image is too small to be cropped in good quality with "
|
93 |
+
"this thumbnail size."
|
94 |
+
msgstr ""
|
95 |
+
"Atenção: a imagem original é muito pequena para ser cortada em boa qualidade "
|
96 |
+
"neste tamanho de miniatura."
|
97 |
+
|
98 |
+
# @ cpt_lang
|
99 |
+
#: functions/editor.php:182
|
100 |
+
msgid "First, select an image. Then, click once again."
|
101 |
+
msgstr "Primeiro, selecione uma imagem. Em seguida, clique novamente."
|
102 |
+
|
103 |
+
# @ cpt_lang
|
104 |
+
#: functions/editor.php:209
|
105 |
+
msgid "back to image list"
|
106 |
+
msgstr "volte a lista de imagens"
|
107 |
+
|
108 |
+
# @ cpt_lang
|
109 |
+
#: functions/editor.php:210
|
110 |
+
msgid "Please wait until the images are cropped."
|
111 |
+
msgstr "Por favor, aguarde até que as imagens sejam cortadas."
|
112 |
+
|
113 |
+
# @ cpt_lang
|
114 |
+
#: functions/editor.php:213
|
115 |
+
msgid "Raw"
|
116 |
+
msgstr "Bruta"
|
117 |
+
|
118 |
+
# @ cpt_lang
|
119 |
+
#: functions/editor.php:213 functions/editor.php:279
|
120 |
+
msgid "pixel"
|
121 |
+
msgstr "pixel"
|
122 |
+
|
123 |
+
# @ cpt_lang
|
124 |
+
#: functions/editor.php:215
|
125 |
+
msgid "Save Crop"
|
126 |
+
msgstr "Cortar e Salvar"
|
127 |
+
|
128 |
+
# @ cpt_lang
|
129 |
+
#: functions/editor.php:216
|
130 |
+
msgid "Quick Instructions"
|
131 |
+
msgstr "Instruções Rápidas"
|
132 |
+
|
133 |
+
# @ cpt_lang
|
134 |
+
#: functions/editor.php:218
|
135 |
+
msgid "Step 1: Choose an image from the right."
|
136 |
+
msgstr "Passo 1: Escolha uma imagem à direita."
|
137 |
+
|
138 |
+
# @ cpt_lang
|
139 |
+
#: functions/editor.php:219
|
140 |
+
msgid ""
|
141 |
+
"Step 2: Use your mouse to change the size of the rectangle on the image "
|
142 |
+
"above."
|
143 |
+
msgstr ""
|
144 |
+
"Passo 2: Use o mouse para alterar o tamanho do retângulo na imagem acima."
|
145 |
+
|
146 |
+
# @ cpt_lang
|
147 |
+
#: functions/editor.php:220
|
148 |
+
msgid "Step 3: Click on \"Save Crop\"."
|
149 |
+
msgstr "Passo 3: Clique em \"Cortar e Salvar\"."
|
150 |
+
|
151 |
+
# @ cpt_lang
|
152 |
+
#: functions/editor.php:225
|
153 |
+
msgid "Crop all images with same ratio at once"
|
154 |
+
msgstr "Selecionar imagens com mesma proporção de uma só vez"
|
155 |
+
|
156 |
+
# @ cpt_lang
|
157 |
+
#: functions/editor.php:226
|
158 |
+
msgid "deselect all"
|
159 |
+
msgstr "Desmarcar Todos"
|
160 |
+
|
161 |
+
# @ cpt_lang
|
162 |
+
#: functions/editor.php:262
|
163 |
+
msgid "cropped"
|
164 |
+
msgstr "Cortadas"
|
165 |
+
|
166 |
+
#: functions/editor.php:271
|
167 |
+
msgid "maximum"
|
168 |
+
msgstr ""
|
169 |
+
|
170 |
+
# @ cpt_lang
|
171 |
+
#: functions/editor.php:286
|
172 |
+
msgid "Original image size too small for good crop quality!"
|
173 |
+
msgstr "Imagem original muito pequena para um corte de qualidade!"
|
174 |
+
|
175 |
+
# @ cpt_lang
|
176 |
+
#: functions/editor.php:292
|
177 |
+
msgid "Dimensions:"
|
178 |
+
msgstr "Dimensões:"
|
179 |
+
|
180 |
+
# @ cpt_lang
|
181 |
+
#: functions/editor.php:293
|
182 |
+
msgid "Ratio:"
|
183 |
+
msgstr "Relação:"
|
184 |
+
|
185 |
+
#: functions/save.php:106
|
186 |
+
#, php-format
|
187 |
+
msgid "Can't generate filesize '%s'."
|
188 |
+
msgstr "Não é possível gerar o tamanho '%s'."
|
189 |
+
|
190 |
+
# @ cpt_lang
|
191 |
+
#: functions/save.php:113
|
192 |
+
msgid "Can't copy temporary file to media library."
|
193 |
+
msgstr "Não é possível copiar arquivo temporário para a biblioteca de mídia."
|
194 |
+
|
195 |
+
# @ cpt_lang
|
196 |
+
#: functions/save.php:117
|
197 |
+
msgid "Can't delete temporary file."
|
198 |
+
msgstr "Não é possível excluir arquivo temporário."
|
199 |
+
|
200 |
+
# @ cpt_lang
|
201 |
+
#: functions/save.php:205
|
202 |
+
msgid "ERROR: Security Check failed (maybe a timeout - please try again)."
|
203 |
+
msgstr ""
|
204 |
+
"ERRO: Verificação de Segurança falhou (talvez pelo tempo limite ter sido "
|
205 |
+
"atingido - por favor, tente novamente)."
|
206 |
+
|
207 |
+
# @ cpt_lang
|
208 |
+
#: functions/save.php:209
|
209 |
+
msgid "ERROR: Submitted data is incomplete."
|
210 |
+
msgstr "ERRO: Dados enviados não estão completos."
|
211 |
+
|
212 |
+
# @ cpt_lang
|
213 |
+
#: functions/save.php:217
|
214 |
+
msgid "Cropping to these dimensions on this image is not possible."
|
215 |
+
msgstr "Um corte com estas dimensões sobre esta imagem não é possível."
|
216 |
+
|
217 |
+
# @ cpt_lang
|
218 |
+
#: functions/save.php:228
|
219 |
+
msgid "ERROR: Can't find original image in database!"
|
220 |
+
msgstr "ERRO: Não é possível localizar a imagem original no banco de dados!"
|
221 |
+
|
222 |
+
# @ cpt_lang
|
223 |
+
#: functions/save.php:231
|
224 |
+
msgid "ERROR: Can't find original image file!"
|
225 |
+
msgstr "ERRO: Não é possível encontrar arquivo de imagem original!"
|
226 |
+
|
227 |
+
# @ cpt_lang
|
228 |
+
#: functions/save.php:234
|
229 |
+
msgid "ERROR: Can't find original image metadata!"
|
230 |
+
msgstr "ERRO: Não é possível encontrar os metadados da imagem original!"
|
231 |
+
|
232 |
+
# @ cpt_lang
|
233 |
+
#: functions/settings.php:24 functions/settings.php:38
|
234 |
+
msgid "Settings"
|
235 |
+
msgstr "Configurações"
|
236 |
+
|
237 |
+
# @ cpt_lang
|
238 |
+
#: functions/settings.php:31
|
239 |
+
msgid "Crop Post Thumbnail Page"
|
240 |
+
msgstr "Cortar miniaturas na página do post"
|
241 |
+
|
242 |
+
# @ cpt_lang
|
243 |
+
#: functions/settings.php:44
|
244 |
+
msgid "Save Changes"
|
245 |
+
msgstr "Salvar Mudanças"
|
246 |
+
|
247 |
+
# @ cpt_lang
|
248 |
+
#: functions/settings.php:49
|
249 |
+
msgid "Support the plugin author"
|
250 |
+
msgstr "Apoiar o autor do plugin"
|
251 |
+
|
252 |
+
# @ cpt_lang
|
253 |
+
#: functions/settings.php:50
|
254 |
+
msgid ""
|
255 |
+
"You can support the plugin author <br />(and let him know you love this "
|
256 |
+
"plugin) <br />by donating via Paypal. Thanks a lot!"
|
257 |
+
msgstr ""
|
258 |
+
"Você pode apoiar o autor do plugin <br />(e deixá-lo saber que você ama este "
|
259 |
+
"plugin)<br /> doando via Paypal. Muito obrigado!"
|
260 |
+
|
261 |
+
# @ cpt_lang
|
262 |
+
#: functions/settings.php:72
|
263 |
+
msgid "Sizes and Post Types"
|
264 |
+
msgstr "Tamanhos e Tipos de Post"
|
265 |
+
|
266 |
+
# @ cpt_lang
|
267 |
+
#: functions/settings.php:73
|
268 |
+
msgid "Choose the image size options you want to hide for each post type."
|
269 |
+
msgstr ""
|
270 |
+
"Escolha os tamanhos de imagem que você deseja esconder. Escolha um tipo de "
|
271 |
+
"post para evitar qualquer uso do plugin para essas entradas."
|
272 |
+
|
273 |
+
#: functions/settings.php:81
|
274 |
+
msgid "Developer Settings"
|
275 |
+
msgstr ""
|
276 |
+
|
277 |
+
#: functions/settings.php:83
|
278 |
+
msgid "Enable JS-Debug."
|
279 |
+
msgstr ""
|
280 |
+
|
281 |
+
#: functions/settings.php:85
|
282 |
+
msgid "Enable Data-Debug."
|
283 |
+
msgstr ""
|
284 |
+
|
285 |
+
# @ cpt_lang
|
286 |
+
#: functions/settings.php:90
|
287 |
+
msgid ""
|
288 |
+
"Crop-Thumbnails is designed to make cropping images easy. For some post "
|
289 |
+
"types, not all crop sizes are needed, but the plugin will automatically "
|
290 |
+
"create all the crop sizes. Here you can select which crop sizes are "
|
291 |
+
"available in the cropping interface for each post type.."
|
292 |
+
msgstr ""
|
293 |
+
"Crop-Thumbnails é criado para fazer recorte fácil para o usuário. Muitas "
|
294 |
+
"vezes o utilizador necessita somente de um recorte, pois depende dele em seu "
|
295 |
+
"post. Mas o sistema irá criar também todos os outros tamanhos. Então, aqui "
|
296 |
+
"você pode selecionar para que as miniaturas de seu post sejam visíveis na "
|
297 |
+
"interface do plugin."
|
298 |
+
|
299 |
+
# @ cpt_lang
|
300 |
+
#: functions/settings.php:91
|
301 |
+
msgid ""
|
302 |
+
"Crop-Thumbnails will only show cropped images. Sizes with no crop will "
|
303 |
+
"always be hidden."
|
304 |
+
msgstr ""
|
305 |
+
"Crop-Thumbnails só irá mostrar imagens cortadas - tamanhos sem cortes serão "
|
306 |
+
"sempre escondidos."
|
307 |
+
|
308 |
+
#: functions/settings.php:149
|
309 |
+
msgid ""
|
310 |
+
"ATTENTION: be aware that you can break things, when you activate this. When "
|
311 |
+
"activated your are able to cut those images to a spezific dimension that are "
|
312 |
+
"not cropped. The name of the image will not change. You should be extra "
|
313 |
+
"carefull when:"
|
314 |
+
msgstr ""
|
315 |
+
|
316 |
+
#: functions/settings.php:151
|
317 |
+
msgid ""
|
318 |
+
"you had inserted the image before on any page or post. (There may be height "
|
319 |
+
"and width stored directly in the page-content.)"
|
320 |
+
msgstr ""
|
321 |
+
|
322 |
+
#: functions/settings.php:152
|
323 |
+
msgid ""
|
324 |
+
"you use a plugin that expect the original image size. (The original image-"
|
325 |
+
"size is also \"stored\" in the filename.)"
|
326 |
+
msgstr ""
|
327 |
+
|
328 |
+
#: functions/settings.php:154
|
329 |
+
msgid ""
|
330 |
+
"The \"full\" image-size will never be cropped, otherwise you are not able to "
|
331 |
+
"restore any image-size."
|
332 |
+
msgstr ""
|
lang/cpt_lang-uk.po
CHANGED
@@ -1,275 +1,275 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Crop-Post-Thumbnails\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2015-11-18 22:26+0100\n"
|
6 |
-
"PO-Revision-Date: 2015-11-18 22:26+0100\n"
|
7 |
-
"Last-Translator: Jurko Chervony <info@skinik.name>\n"
|
8 |
-
"Language-Team: Skinik <info@skinik.name>\n"
|
9 |
-
"Language: uk\n"
|
10 |
-
"MIME-Version: 1.0\n"
|
11 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
-
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"X-Poedit-KeywordsList: __;_e;esc_attr_e;esc_attr__;esc_html_e\n"
|
14 |
-
"X-Poedit-Basepath: .\n"
|
15 |
-
"X-Generator: Poedit 1.7.6\n"
|
16 |
-
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
-
"X-Poedit-SearchPath-0: ..\n"
|
18 |
-
|
19 |
-
#: ../crop-thumbnails.php:35
|
20 |
-
msgid "Crop your thumbnails, the easy way."
|
21 |
-
msgstr "Обрізайте мініатюри простим методом."
|
22 |
-
|
23 |
-
#: ../functions/backendpreparer.php:84 ../functions/backendpreparer.php:87
|
24 |
-
msgid "Crop Thumbnails"
|
25 |
-
msgstr "Обрізати мініатюри"
|
26 |
-
|
27 |
-
#: ../functions/backendpreparer.php:98 ../functions/backendpreparer.php:101
|
28 |
-
msgid "Crop Featured Image"
|
29 |
-
msgstr "Обрізати головне зображення"
|
30 |
-
|
31 |
-
#: ../functions/backendpreparer.php:127 ../functions/backendpreparer.php:130
|
32 |
-
#: ../functions/backendpreparer.php:252
|
33 |
-
msgid "Crop Thumbnail"
|
34 |
-
msgstr "Обрізати мініатюру"
|
35 |
-
|
36 |
-
#: ../functions/editor.php:25
|
37 |
-
msgid "You are not allowed to do this."
|
38 |
-
msgstr ""
|
39 |
-
|
40 |
-
#: ../functions/editor.php:41
|
41 |
-
msgid "No featured image set for this post until now."
|
42 |
-
msgstr ""
|
43 |
-
|
44 |
-
#: ../functions/editor.php:45
|
45 |
-
msgid "An error occurred!"
|
46 |
-
msgstr "Виникла помилка!"
|
47 |
-
|
48 |
-
#: ../functions/editor.php:78 ../functions/editor.php:204
|
49 |
-
msgid "Cropping is disabled for this post-type."
|
50 |
-
msgstr "Обрізання картинок вимкнене для цього типу матеріалу."
|
51 |
-
|
52 |
-
#: ../functions/editor.php:80
|
53 |
-
msgid ""
|
54 |
-
"No images attached to this post yet. Please upload some via the upload "
|
55 |
-
"dialog."
|
56 |
-
msgstr ""
|
57 |
-
|
58 |
-
#: ../functions/editor.php:101
|
59 |
-
msgid "Choose the image you want to crop."
|
60 |
-
msgstr "Оберіть зображення, яке потрібно обрізати."
|
61 |
-
|
62 |
-
#: ../functions/editor.php:107
|
63 |
-
msgid "Post Thumbnail"
|
64 |
-
msgstr "Головне зображення"
|
65 |
-
|
66 |
-
#: ../functions/editor.php:107
|
67 |
-
#, php-format
|
68 |
-
msgid "Image %d"
|
69 |
-
msgstr ""
|
70 |
-
|
71 |
-
#: ../functions/editor.php:180
|
72 |
-
msgid "Bug--this should not have occurred."
|
73 |
-
msgstr ""
|
74 |
-
|
75 |
-
#: ../functions/editor.php:181
|
76 |
-
msgid ""
|
77 |
-
"Warning: the original image is too small to be cropped in good quality with "
|
78 |
-
"this thumbnail size."
|
79 |
-
msgstr ""
|
80 |
-
|
81 |
-
#: ../functions/editor.php:182
|
82 |
-
msgid "First, select an image. Then, click once again."
|
83 |
-
msgstr "Спочатку виберіть справа зображення. Потім натисніть кнопку ще раз."
|
84 |
-
|
85 |
-
#: ../functions/editor.php:209
|
86 |
-
msgid "back to image list"
|
87 |
-
msgstr ""
|
88 |
-
|
89 |
-
#: ../functions/editor.php:210
|
90 |
-
msgid "Please wait until the images are cropped."
|
91 |
-
msgstr "Будь ласка, зачекайте. Триває обробка зображення."
|
92 |
-
|
93 |
-
#: ../functions/editor.php:213
|
94 |
-
msgid "Raw"
|
95 |
-
msgstr "Оригінал"
|
96 |
-
|
97 |
-
#: ../functions/editor.php:213 ../functions/editor.php:279
|
98 |
-
msgid "pixel"
|
99 |
-
msgstr "пікселів"
|
100 |
-
|
101 |
-
#: ../functions/editor.php:215
|
102 |
-
msgid "Save Crop"
|
103 |
-
msgstr "Обрізати"
|
104 |
-
|
105 |
-
#: ../functions/editor.php:216
|
106 |
-
msgid "Quick Instructions"
|
107 |
-
msgstr "Коротка інструкція"
|
108 |
-
|
109 |
-
#: ../functions/editor.php:218
|
110 |
-
msgid "Step 1: Choose an image from the right."
|
111 |
-
msgstr "1) Оберіть розмір зображення справа."
|
112 |
-
|
113 |
-
#: ../functions/editor.php:219
|
114 |
-
msgid ""
|
115 |
-
"Step 2: Use your mouse to change the size of the rectangle on the image "
|
116 |
-
"above."
|
117 |
-
msgstr "2) Переміщуйте виділену область, яку слід залишити на картинці."
|
118 |
-
|
119 |
-
#: ../functions/editor.php:220
|
120 |
-
msgid "Step 3: Click on \"Save Crop\"."
|
121 |
-
msgstr "3) Натисніть кнопку «Обрізати»."
|
122 |
-
|
123 |
-
#: ../functions/editor.php:225
|
124 |
-
msgid "Crop all images with same ratio at once"
|
125 |
-
msgstr "Одразу виділити область з потрібними пропорціями"
|
126 |
-
|
127 |
-
#: ../functions/editor.php:226
|
128 |
-
msgid "deselect all"
|
129 |
-
msgstr "скасувати виділення"
|
130 |
-
|
131 |
-
#: ../functions/editor.php:262
|
132 |
-
msgid "cropped"
|
133 |
-
msgstr "обрізано"
|
134 |
-
|
135 |
-
#: ../functions/editor.php:271
|
136 |
-
msgid "maximum"
|
137 |
-
msgstr ""
|
138 |
-
|
139 |
-
#: ../functions/editor.php:286
|
140 |
-
msgid "Original image size too small for good crop quality!"
|
141 |
-
msgstr ""
|
142 |
-
|
143 |
-
#: ../functions/editor.php:292
|
144 |
-
msgid "Dimensions:"
|
145 |
-
msgstr "Розмір:"
|
146 |
-
|
147 |
-
#: ../functions/editor.php:293
|
148 |
-
msgid "Ratio:"
|
149 |
-
msgstr "Пропорції:"
|
150 |
-
|
151 |
-
#: ../functions/save.php:106
|
152 |
-
#, php-format
|
153 |
-
msgid "Can't generate filesize '%s'."
|
154 |
-
msgstr ""
|
155 |
-
|
156 |
-
#: ../functions/save.php:113
|
157 |
-
msgid "Can't copy temporary file to media library."
|
158 |
-
msgstr "Неможливо скопіювати тимчасовий файл до медіа-бібліотеки."
|
159 |
-
|
160 |
-
#: ../functions/save.php:117
|
161 |
-
msgid "Can't delete temporary file."
|
162 |
-
msgstr "Неможливо видалити тимчасовий файл."
|
163 |
-
|
164 |
-
#: ../functions/save.php:205
|
165 |
-
msgid "ERROR: Security Check failed (maybe a timeout - please try again)."
|
166 |
-
msgstr ""
|
167 |
-
|
168 |
-
#: ../functions/save.php:209
|
169 |
-
msgid "ERROR: Submitted data is incomplete."
|
170 |
-
msgstr ""
|
171 |
-
|
172 |
-
#: ../functions/save.php:217
|
173 |
-
msgid "Cropping to these dimensions on this image is not possible."
|
174 |
-
msgstr "Неможливо обрізати це зображення з такими розмірами."
|
175 |
-
|
176 |
-
#: ../functions/save.php:228
|
177 |
-
msgid "ERROR: Can't find original image in database!"
|
178 |
-
msgstr ""
|
179 |
-
|
180 |
-
#: ../functions/save.php:231
|
181 |
-
msgid "ERROR: Can't find original image file!"
|
182 |
-
msgstr ""
|
183 |
-
|
184 |
-
#: ../functions/save.php:234
|
185 |
-
msgid "ERROR: Can't find original image metadata!"
|
186 |
-
msgstr ""
|
187 |
-
|
188 |
-
#: ../functions/settings.php:24 ../functions/settings.php:38
|
189 |
-
msgid "Settings"
|
190 |
-
msgstr "Налаштування"
|
191 |
-
|
192 |
-
#: ../functions/settings.php:31
|
193 |
-
msgid "Crop Post Thumbnail Page"
|
194 |
-
msgstr ""
|
195 |
-
|
196 |
-
#: ../functions/settings.php:44
|
197 |
-
msgid "Save Changes"
|
198 |
-
msgstr "Зберегти зміни"
|
199 |
-
|
200 |
-
#: ../functions/settings.php:49
|
201 |
-
msgid "Support the plugin author"
|
202 |
-
msgstr "Підтримайте розробника плаґіну"
|
203 |
-
|
204 |
-
#: ../functions/settings.php:50
|
205 |
-
msgid ""
|
206 |
-
"You can support the plugin author <br />(and let him know you love this "
|
207 |
-
"plugin) <br />by donating via Paypal. Thanks a lot!"
|
208 |
-
msgstr ""
|
209 |
-
"Ви можете підтримати розвиток плаґіну<br /> переказавши кошти автору через "
|
210 |
-
"Paypal."
|
211 |
-
|
212 |
-
#: ../functions/settings.php:72
|
213 |
-
msgid "Sizes and Post Types"
|
214 |
-
msgstr "Розміри і типи матеріалів"
|
215 |
-
|
216 |
-
#: ../functions/settings.php:73
|
217 |
-
msgid "Choose the image size options you want to hide for each post type."
|
218 |
-
msgstr ""
|
219 |
-
"Виберіть розміри картинок, які Ви хочете приховати. Також можете вказати "
|
220 |
-
"типи матеріалів, де слід заборонити обрізання картинок."
|
221 |
-
|
222 |
-
#: ../functions/settings.php:81
|
223 |
-
msgid "Developer Settings"
|
224 |
-
msgstr ""
|
225 |
-
|
226 |
-
#: ../functions/settings.php:83
|
227 |
-
msgid "Enable JS-Debug."
|
228 |
-
msgstr ""
|
229 |
-
|
230 |
-
#: ../functions/settings.php:85
|
231 |
-
msgid "Enable Data-Debug."
|
232 |
-
msgstr ""
|
233 |
-
|
234 |
-
#: ../functions/settings.php:90
|
235 |
-
msgid ""
|
236 |
-
"Crop-Thumbnails is designed to make cropping images easy. For some post "
|
237 |
-
"types, not all crop sizes are needed, but the plugin will automatically "
|
238 |
-
"create all the crop sizes. Here you can select which crop sizes are "
|
239 |
-
"available in the cropping interface for each post type.."
|
240 |
-
msgstr ""
|
241 |
-
"Цей плаґін створенно, щоб Ви могли легко і зручно обрізати зображення. Можна "
|
242 |
-
"вказати для яких типів матеріалів дозволити обрізання картинок, а також які "
|
243 |
-
"розміри зображень можна обрізати."
|
244 |
-
|
245 |
-
#: ../functions/settings.php:91
|
246 |
-
msgid ""
|
247 |
-
"Crop-Thumbnails will only show cropped images. Sizes with no crop will "
|
248 |
-
"always be hidden."
|
249 |
-
msgstr "Ті розміри зображень, які Ви не дозволили обрізати — буде приховано."
|
250 |
-
|
251 |
-
#: ../functions/settings.php:149
|
252 |
-
msgid ""
|
253 |
-
"ATTENTION: be aware that you can break things, when you activate this. When "
|
254 |
-
"activated your are able to cut those images to a spezific dimension that are "
|
255 |
-
"not cropped. The name of the image will not change. You should be extra "
|
256 |
-
"carefull when:"
|
257 |
-
msgstr ""
|
258 |
-
|
259 |
-
#: ../functions/settings.php:151
|
260 |
-
msgid ""
|
261 |
-
"you had inserted the image before on any page or post. (There may be height "
|
262 |
-
"and width stored directly in the page-content.)"
|
263 |
-
msgstr ""
|
264 |
-
|
265 |
-
#: ../functions/settings.php:152
|
266 |
-
msgid ""
|
267 |
-
"you use a plugin that expect the original image size. (The original image-"
|
268 |
-
"size is also \"stored\" in the filename.)"
|
269 |
-
msgstr ""
|
270 |
-
|
271 |
-
#: ../functions/settings.php:154
|
272 |
-
msgid ""
|
273 |
-
"The \"full\" image-size will never be cropped, otherwise you are not able to "
|
274 |
-
"restore any image-size."
|
275 |
-
msgstr ""
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Crop-Post-Thumbnails\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2015-11-18 22:26+0100\n"
|
6 |
+
"PO-Revision-Date: 2015-11-18 22:26+0100\n"
|
7 |
+
"Last-Translator: Jurko Chervony <info@skinik.name>\n"
|
8 |
+
"Language-Team: Skinik <info@skinik.name>\n"
|
9 |
+
"Language: uk\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e;esc_attr_e;esc_attr__;esc_html_e\n"
|
14 |
+
"X-Poedit-Basepath: .\n"
|
15 |
+
"X-Generator: Poedit 1.7.6\n"
|
16 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
+
"X-Poedit-SearchPath-0: ..\n"
|
18 |
+
|
19 |
+
#: ../crop-thumbnails.php:35
|
20 |
+
msgid "Crop your thumbnails, the easy way."
|
21 |
+
msgstr "Обрізайте мініатюри простим методом."
|
22 |
+
|
23 |
+
#: ../functions/backendpreparer.php:84 ../functions/backendpreparer.php:87
|
24 |
+
msgid "Crop Thumbnails"
|
25 |
+
msgstr "Обрізати мініатюри"
|
26 |
+
|
27 |
+
#: ../functions/backendpreparer.php:98 ../functions/backendpreparer.php:101
|
28 |
+
msgid "Crop Featured Image"
|
29 |
+
msgstr "Обрізати головне зображення"
|
30 |
+
|
31 |
+
#: ../functions/backendpreparer.php:127 ../functions/backendpreparer.php:130
|
32 |
+
#: ../functions/backendpreparer.php:252
|
33 |
+
msgid "Crop Thumbnail"
|
34 |
+
msgstr "Обрізати мініатюру"
|
35 |
+
|
36 |
+
#: ../functions/editor.php:25
|
37 |
+
msgid "You are not allowed to do this."
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: ../functions/editor.php:41
|
41 |
+
msgid "No featured image set for this post until now."
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
#: ../functions/editor.php:45
|
45 |
+
msgid "An error occurred!"
|
46 |
+
msgstr "Виникла помилка!"
|
47 |
+
|
48 |
+
#: ../functions/editor.php:78 ../functions/editor.php:204
|
49 |
+
msgid "Cropping is disabled for this post-type."
|
50 |
+
msgstr "Обрізання картинок вимкнене для цього типу матеріалу."
|
51 |
+
|
52 |
+
#: ../functions/editor.php:80
|
53 |
+
msgid ""
|
54 |
+
"No images attached to this post yet. Please upload some via the upload "
|
55 |
+
"dialog."
|
56 |
+
msgstr ""
|
57 |
+
|
58 |
+
#: ../functions/editor.php:101
|
59 |
+
msgid "Choose the image you want to crop."
|
60 |
+
msgstr "Оберіть зображення, яке потрібно обрізати."
|
61 |
+
|
62 |
+
#: ../functions/editor.php:107
|
63 |
+
msgid "Post Thumbnail"
|
64 |
+
msgstr "Головне зображення"
|
65 |
+
|
66 |
+
#: ../functions/editor.php:107
|
67 |
+
#, php-format
|
68 |
+
msgid "Image %d"
|
69 |
+
msgstr ""
|
70 |
+
|
71 |
+
#: ../functions/editor.php:180
|
72 |
+
msgid "Bug--this should not have occurred."
|
73 |
+
msgstr ""
|
74 |
+
|
75 |
+
#: ../functions/editor.php:181
|
76 |
+
msgid ""
|
77 |
+
"Warning: the original image is too small to be cropped in good quality with "
|
78 |
+
"this thumbnail size."
|
79 |
+
msgstr ""
|
80 |
+
|
81 |
+
#: ../functions/editor.php:182
|
82 |
+
msgid "First, select an image. Then, click once again."
|
83 |
+
msgstr "Спочатку виберіть справа зображення. Потім натисніть кнопку ще раз."
|
84 |
+
|
85 |
+
#: ../functions/editor.php:209
|
86 |
+
msgid "back to image list"
|
87 |
+
msgstr ""
|
88 |
+
|
89 |
+
#: ../functions/editor.php:210
|
90 |
+
msgid "Please wait until the images are cropped."
|
91 |
+
msgstr "Будь ласка, зачекайте. Триває обробка зображення."
|
92 |
+
|
93 |
+
#: ../functions/editor.php:213
|
94 |
+
msgid "Raw"
|
95 |
+
msgstr "Оригінал"
|
96 |
+
|
97 |
+
#: ../functions/editor.php:213 ../functions/editor.php:279
|
98 |
+
msgid "pixel"
|
99 |
+
msgstr "пікселів"
|
100 |
+
|
101 |
+
#: ../functions/editor.php:215
|
102 |
+
msgid "Save Crop"
|
103 |
+
msgstr "Обрізати"
|
104 |
+
|
105 |
+
#: ../functions/editor.php:216
|
106 |
+
msgid "Quick Instructions"
|
107 |
+
msgstr "Коротка інструкція"
|
108 |
+
|
109 |
+
#: ../functions/editor.php:218
|
110 |
+
msgid "Step 1: Choose an image from the right."
|
111 |
+
msgstr "1) Оберіть розмір зображення справа."
|
112 |
+
|
113 |
+
#: ../functions/editor.php:219
|
114 |
+
msgid ""
|
115 |
+
"Step 2: Use your mouse to change the size of the rectangle on the image "
|
116 |
+
"above."
|
117 |
+
msgstr "2) Переміщуйте виділену область, яку слід залишити на картинці."
|
118 |
+
|
119 |
+
#: ../functions/editor.php:220
|
120 |
+
msgid "Step 3: Click on \"Save Crop\"."
|
121 |
+
msgstr "3) Натисніть кнопку «Обрізати»."
|
122 |
+
|
123 |
+
#: ../functions/editor.php:225
|
124 |
+
msgid "Crop all images with same ratio at once"
|
125 |
+
msgstr "Одразу виділити область з потрібними пропорціями"
|
126 |
+
|
127 |
+
#: ../functions/editor.php:226
|
128 |
+
msgid "deselect all"
|
129 |
+
msgstr "скасувати виділення"
|
130 |
+
|
131 |
+
#: ../functions/editor.php:262
|
132 |
+
msgid "cropped"
|
133 |
+
msgstr "обрізано"
|
134 |
+
|
135 |
+
#: ../functions/editor.php:271
|
136 |
+
msgid "maximum"
|
137 |
+
msgstr ""
|
138 |
+
|
139 |
+
#: ../functions/editor.php:286
|
140 |
+
msgid "Original image size too small for good crop quality!"
|
141 |
+
msgstr ""
|
142 |
+
|
143 |
+
#: ../functions/editor.php:292
|
144 |
+
msgid "Dimensions:"
|
145 |
+
msgstr "Розмір:"
|
146 |
+
|
147 |
+
#: ../functions/editor.php:293
|
148 |
+
msgid "Ratio:"
|
149 |
+
msgstr "Пропорції:"
|
150 |
+
|
151 |
+
#: ../functions/save.php:106
|
152 |
+
#, php-format
|
153 |
+
msgid "Can't generate filesize '%s'."
|
154 |
+
msgstr ""
|
155 |
+
|
156 |
+
#: ../functions/save.php:113
|
157 |
+
msgid "Can't copy temporary file to media library."
|
158 |
+
msgstr "Неможливо скопіювати тимчасовий файл до медіа-бібліотеки."
|
159 |
+
|
160 |
+
#: ../functions/save.php:117
|
161 |
+
msgid "Can't delete temporary file."
|
162 |
+
msgstr "Неможливо видалити тимчасовий файл."
|
163 |
+
|
164 |
+
#: ../functions/save.php:205
|
165 |
+
msgid "ERROR: Security Check failed (maybe a timeout - please try again)."
|
166 |
+
msgstr ""
|
167 |
+
|
168 |
+
#: ../functions/save.php:209
|
169 |
+
msgid "ERROR: Submitted data is incomplete."
|
170 |
+
msgstr ""
|
171 |
+
|
172 |
+
#: ../functions/save.php:217
|
173 |
+
msgid "Cropping to these dimensions on this image is not possible."
|
174 |
+
msgstr "Неможливо обрізати це зображення з такими розмірами."
|
175 |
+
|
176 |
+
#: ../functions/save.php:228
|
177 |
+
msgid "ERROR: Can't find original image in database!"
|
178 |
+
msgstr ""
|
179 |
+
|
180 |
+
#: ../functions/save.php:231
|
181 |
+
msgid "ERROR: Can't find original image file!"
|
182 |
+
msgstr ""
|
183 |
+
|
184 |
+
#: ../functions/save.php:234
|
185 |
+
msgid "ERROR: Can't find original image metadata!"
|
186 |
+
msgstr ""
|
187 |
+
|
188 |
+
#: ../functions/settings.php:24 ../functions/settings.php:38
|
189 |
+
msgid "Settings"
|
190 |
+
msgstr "Налаштування"
|
191 |
+
|
192 |
+
#: ../functions/settings.php:31
|
193 |
+
msgid "Crop Post Thumbnail Page"
|
194 |
+
msgstr ""
|
195 |
+
|
196 |
+
#: ../functions/settings.php:44
|
197 |
+
msgid "Save Changes"
|
198 |
+
msgstr "Зберегти зміни"
|
199 |
+
|
200 |
+
#: ../functions/settings.php:49
|
201 |
+
msgid "Support the plugin author"
|
202 |
+
msgstr "Підтримайте розробника плаґіну"
|
203 |
+
|
204 |
+
#: ../functions/settings.php:50
|
205 |
+
msgid ""
|
206 |
+
"You can support the plugin author <br />(and let him know you love this "
|
207 |
+
"plugin) <br />by donating via Paypal. Thanks a lot!"
|
208 |
+
msgstr ""
|
209 |
+
"Ви можете підтримати розвиток плаґіну<br /> переказавши кошти автору через "
|
210 |
+
"Paypal."
|
211 |
+
|
212 |
+
#: ../functions/settings.php:72
|
213 |
+
msgid "Sizes and Post Types"
|
214 |
+
msgstr "Розміри і типи матеріалів"
|
215 |
+
|
216 |
+
#: ../functions/settings.php:73
|
217 |
+
msgid "Choose the image size options you want to hide for each post type."
|
218 |
+
msgstr ""
|
219 |
+
"Виберіть розміри картинок, які Ви хочете приховати. Також можете вказати "
|
220 |
+
"типи матеріалів, де слід заборонити обрізання картинок."
|
221 |
+
|
222 |
+
#: ../functions/settings.php:81
|
223 |
+
msgid "Developer Settings"
|
224 |
+
msgstr ""
|
225 |
+
|
226 |
+
#: ../functions/settings.php:83
|
227 |
+
msgid "Enable JS-Debug."
|
228 |
+
msgstr ""
|
229 |
+
|
230 |
+
#: ../functions/settings.php:85
|
231 |
+
msgid "Enable Data-Debug."
|
232 |
+
msgstr ""
|
233 |
+
|
234 |
+
#: ../functions/settings.php:90
|
235 |
+
msgid ""
|
236 |
+
"Crop-Thumbnails is designed to make cropping images easy. For some post "
|
237 |
+
"types, not all crop sizes are needed, but the plugin will automatically "
|
238 |
+
"create all the crop sizes. Here you can select which crop sizes are "
|
239 |
+
"available in the cropping interface for each post type.."
|
240 |
+
msgstr ""
|
241 |
+
"Цей плаґін створенно, щоб Ви могли легко і зручно обрізати зображення. Можна "
|
242 |
+
"вказати для яких типів матеріалів дозволити обрізання картинок, а також які "
|
243 |
+
"розміри зображень можна обрізати."
|
244 |
+
|
245 |
+
#: ../functions/settings.php:91
|
246 |
+
msgid ""
|
247 |
+
"Crop-Thumbnails will only show cropped images. Sizes with no crop will "
|
248 |
+
"always be hidden."
|
249 |
+
msgstr "Ті розміри зображень, які Ви не дозволили обрізати — буде приховано."
|
250 |
+
|
251 |
+
#: ../functions/settings.php:149
|
252 |
+
msgid ""
|
253 |
+
"ATTENTION: be aware that you can break things, when you activate this. When "
|
254 |
+
"activated your are able to cut those images to a spezific dimension that are "
|
255 |
+
"not cropped. The name of the image will not change. You should be extra "
|
256 |
+
"carefull when:"
|
257 |
+
msgstr ""
|
258 |
+
|
259 |
+
#: ../functions/settings.php:151
|
260 |
+
msgid ""
|
261 |
+
"you had inserted the image before on any page or post. (There may be height "
|
262 |
+
"and width stored directly in the page-content.)"
|
263 |
+
msgstr ""
|
264 |
+
|
265 |
+
#: ../functions/settings.php:152
|
266 |
+
msgid ""
|
267 |
+
"you use a plugin that expect the original image size. (The original image-"
|
268 |
+
"size is also \"stored\" in the filename.)"
|
269 |
+
msgstr ""
|
270 |
+
|
271 |
+
#: ../functions/settings.php:154
|
272 |
+
msgid ""
|
273 |
+
"The \"full\" image-size will never be cropped, otherwise you are not able to "
|
274 |
+
"restore any image-size."
|
275 |
+
msgstr ""
|
license.txt
CHANGED
@@ -1,674 +1,674 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 3, 29 June 2007
|
3 |
-
|
4 |
-
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5 |
-
Everyone is permitted to copy and distribute verbatim copies
|
6 |
-
of this license document, but changing it is not allowed.
|
7 |
-
|
8 |
-
Preamble
|
9 |
-
|
10 |
-
The GNU General Public License is a free, copyleft license for
|
11 |
-
software and other kinds of works.
|
12 |
-
|
13 |
-
The licenses for most software and other practical works are designed
|
14 |
-
to take away your freedom to share and change the works. By contrast,
|
15 |
-
the GNU General Public License is intended to guarantee your freedom to
|
16 |
-
share and change all versions of a program--to make sure it remains free
|
17 |
-
software for all its users. We, the Free Software Foundation, use the
|
18 |
-
GNU General Public License for most of our software; it applies also to
|
19 |
-
any other work released this way by its authors. You can apply it to
|
20 |
-
your programs, too.
|
21 |
-
|
22 |
-
When we speak of free software, we are referring to freedom, not
|
23 |
-
price. Our General Public Licenses are designed to make sure that you
|
24 |
-
have the freedom to distribute copies of free software (and charge for
|
25 |
-
them if you wish), that you receive source code or can get it if you
|
26 |
-
want it, that you can change the software or use pieces of it in new
|
27 |
-
free programs, and that you know you can do these things.
|
28 |
-
|
29 |
-
To protect your rights, we need to prevent others from denying you
|
30 |
-
these rights or asking you to surrender the rights. Therefore, you have
|
31 |
-
certain responsibilities if you distribute copies of the software, or if
|
32 |
-
you modify it: responsibilities to respect the freedom of others.
|
33 |
-
|
34 |
-
For example, if you distribute copies of such a program, whether
|
35 |
-
gratis or for a fee, you must pass on to the recipients the same
|
36 |
-
freedoms that you received. You must make sure that they, too, receive
|
37 |
-
or can get the source code. And you must show them these terms so they
|
38 |
-
know their rights.
|
39 |
-
|
40 |
-
Developers that use the GNU GPL protect your rights with two steps:
|
41 |
-
(1) assert copyright on the software, and (2) offer you this License
|
42 |
-
giving you legal permission to copy, distribute and/or modify it.
|
43 |
-
|
44 |
-
For the developers' and authors' protection, the GPL clearly explains
|
45 |
-
that there is no warranty for this free software. For both users' and
|
46 |
-
authors' sake, the GPL requires that modified versions be marked as
|
47 |
-
changed, so that their problems will not be attributed erroneously to
|
48 |
-
authors of previous versions.
|
49 |
-
|
50 |
-
Some devices are designed to deny users access to install or run
|
51 |
-
modified versions of the software inside them, although the manufacturer
|
52 |
-
can do so. This is fundamentally incompatible with the aim of
|
53 |
-
protecting users' freedom to change the software. The systematic
|
54 |
-
pattern of such abuse occurs in the area of products for individuals to
|
55 |
-
use, which is precisely where it is most unacceptable. Therefore, we
|
56 |
-
have designed this version of the GPL to prohibit the practice for those
|
57 |
-
products. If such problems arise substantially in other domains, we
|
58 |
-
stand ready to extend this provision to those domains in future versions
|
59 |
-
of the GPL, as needed to protect the freedom of users.
|
60 |
-
|
61 |
-
Finally, every program is threatened constantly by software patents.
|
62 |
-
States should not allow patents to restrict development and use of
|
63 |
-
software on general-purpose computers, but in those that do, we wish to
|
64 |
-
avoid the special danger that patents applied to a free program could
|
65 |
-
make it effectively proprietary. To prevent this, the GPL assures that
|
66 |
-
patents cannot be used to render the program non-free.
|
67 |
-
|
68 |
-
The precise terms and conditions for copying, distribution and
|
69 |
-
modification follow.
|
70 |
-
|
71 |
-
TERMS AND CONDITIONS
|
72 |
-
|
73 |
-
0. Definitions.
|
74 |
-
|
75 |
-
"This License" refers to version 3 of the GNU General Public License.
|
76 |
-
|
77 |
-
"Copyright" also means copyright-like laws that apply to other kinds of
|
78 |
-
works, such as semiconductor masks.
|
79 |
-
|
80 |
-
"The Program" refers to any copyrightable work licensed under this
|
81 |
-
License. Each licensee is addressed as "you". "Licensees" and
|
82 |
-
"recipients" may be individuals or organizations.
|
83 |
-
|
84 |
-
To "modify" a work means to copy from or adapt all or part of the work
|
85 |
-
in a fashion requiring copyright permission, other than the making of an
|
86 |
-
exact copy. The resulting work is called a "modified version" of the
|
87 |
-
earlier work or a work "based on" the earlier work.
|
88 |
-
|
89 |
-
A "covered work" means either the unmodified Program or a work based
|
90 |
-
on the Program.
|
91 |
-
|
92 |
-
To "propagate" a work means to do anything with it that, without
|
93 |
-
permission, would make you directly or secondarily liable for
|
94 |
-
infringement under applicable copyright law, except executing it on a
|
95 |
-
computer or modifying a private copy. Propagation includes copying,
|
96 |
-
distribution (with or without modification), making available to the
|
97 |
-
public, and in some countries other activities as well.
|
98 |
-
|
99 |
-
To "convey" a work means any kind of propagation that enables other
|
100 |
-
parties to make or receive copies. Mere interaction with a user through
|
101 |
-
a computer network, with no transfer of a copy, is not conveying.
|
102 |
-
|
103 |
-
An interactive user interface displays "Appropriate Legal Notices"
|
104 |
-
to the extent that it includes a convenient and prominently visible
|
105 |
-
feature that (1) displays an appropriate copyright notice, and (2)
|
106 |
-
tells the user that there is no warranty for the work (except to the
|
107 |
-
extent that warranties are provided), that licensees may convey the
|
108 |
-
work under this License, and how to view a copy of this License. If
|
109 |
-
the interface presents a list of user commands or options, such as a
|
110 |
-
menu, a prominent item in the list meets this criterion.
|
111 |
-
|
112 |
-
1. Source Code.
|
113 |
-
|
114 |
-
The "source code" for a work means the preferred form of the work
|
115 |
-
for making modifications to it. "Object code" means any non-source
|
116 |
-
form of a work.
|
117 |
-
|
118 |
-
A "Standard Interface" means an interface that either is an official
|
119 |
-
standard defined by a recognized standards body, or, in the case of
|
120 |
-
interfaces specified for a particular programming language, one that
|
121 |
-
is widely used among developers working in that language.
|
122 |
-
|
123 |
-
The "System Libraries" of an executable work include anything, other
|
124 |
-
than the work as a whole, that (a) is included in the normal form of
|
125 |
-
packaging a Major Component, but which is not part of that Major
|
126 |
-
Component, and (b) serves only to enable use of the work with that
|
127 |
-
Major Component, or to implement a Standard Interface for which an
|
128 |
-
implementation is available to the public in source code form. A
|
129 |
-
"Major Component", in this context, means a major essential component
|
130 |
-
(kernel, window system, and so on) of the specific operating system
|
131 |
-
(if any) on which the executable work runs, or a compiler used to
|
132 |
-
produce the work, or an object code interpreter used to run it.
|
133 |
-
|
134 |
-
The "Corresponding Source" for a work in object code form means all
|
135 |
-
the source code needed to generate, install, and (for an executable
|
136 |
-
work) run the object code and to modify the work, including scripts to
|
137 |
-
control those activities. However, it does not include the work's
|
138 |
-
System Libraries, or general-purpose tools or generally available free
|
139 |
-
programs which are used unmodified in performing those activities but
|
140 |
-
which are not part of the work. For example, Corresponding Source
|
141 |
-
includes interface definition files associated with source files for
|
142 |
-
the work, and the source code for shared libraries and dynamically
|
143 |
-
linked subprograms that the work is specifically designed to require,
|
144 |
-
such as by intimate data communication or control flow between those
|
145 |
-
subprograms and other parts of the work.
|
146 |
-
|
147 |
-
The Corresponding Source need not include anything that users
|
148 |
-
can regenerate automatically from other parts of the Corresponding
|
149 |
-
Source.
|
150 |
-
|
151 |
-
The Corresponding Source for a work in source code form is that
|
152 |
-
same work.
|
153 |
-
|
154 |
-
2. Basic Permissions.
|
155 |
-
|
156 |
-
All rights granted under this License are granted for the term of
|
157 |
-
copyright on the Program, and are irrevocable provided the stated
|
158 |
-
conditions are met. This License explicitly affirms your unlimited
|
159 |
-
permission to run the unmodified Program. The output from running a
|
160 |
-
covered work is covered by this License only if the output, given its
|
161 |
-
content, constitutes a covered work. This License acknowledges your
|
162 |
-
rights of fair use or other equivalent, as provided by copyright law.
|
163 |
-
|
164 |
-
You may make, run and propagate covered works that you do not
|
165 |
-
convey, without conditions so long as your license otherwise remains
|
166 |
-
in force. You may convey covered works to others for the sole purpose
|
167 |
-
of having them make modifications exclusively for you, or provide you
|
168 |
-
with facilities for running those works, provided that you comply with
|
169 |
-
the terms of this License in conveying all material for which you do
|
170 |
-
not control copyright. Those thus making or running the covered works
|
171 |
-
for you must do so exclusively on your behalf, under your direction
|
172 |
-
and control, on terms that prohibit them from making any copies of
|
173 |
-
your copyrighted material outside their relationship with you.
|
174 |
-
|
175 |
-
Conveying under any other circumstances is permitted solely under
|
176 |
-
the conditions stated below. Sublicensing is not allowed; section 10
|
177 |
-
makes it unnecessary.
|
178 |
-
|
179 |
-
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
180 |
-
|
181 |
-
No covered work shall be deemed part of an effective technological
|
182 |
-
measure under any applicable law fulfilling obligations under article
|
183 |
-
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
184 |
-
similar laws prohibiting or restricting circumvention of such
|
185 |
-
measures.
|
186 |
-
|
187 |
-
When you convey a covered work, you waive any legal power to forbid
|
188 |
-
circumvention of technological measures to the extent such circumvention
|
189 |
-
is effected by exercising rights under this License with respect to
|
190 |
-
the covered work, and you disclaim any intention to limit operation or
|
191 |
-
modification of the work as a means of enforcing, against the work's
|
192 |
-
users, your or third parties' legal rights to forbid circumvention of
|
193 |
-
technological measures.
|
194 |
-
|
195 |
-
4. Conveying Verbatim Copies.
|
196 |
-
|
197 |
-
You may convey verbatim copies of the Program's source code as you
|
198 |
-
receive it, in any medium, provided that you conspicuously and
|
199 |
-
appropriately publish on each copy an appropriate copyright notice;
|
200 |
-
keep intact all notices stating that this License and any
|
201 |
-
non-permissive terms added in accord with section 7 apply to the code;
|
202 |
-
keep intact all notices of the absence of any warranty; and give all
|
203 |
-
recipients a copy of this License along with the Program.
|
204 |
-
|
205 |
-
You may charge any price or no price for each copy that you convey,
|
206 |
-
and you may offer support or warranty protection for a fee.
|
207 |
-
|
208 |
-
5. Conveying Modified Source Versions.
|
209 |
-
|
210 |
-
You may convey a work based on the Program, or the modifications to
|
211 |
-
produce it from the Program, in the form of source code under the
|
212 |
-
terms of section 4, provided that you also meet all of these conditions:
|
213 |
-
|
214 |
-
a) The work must carry prominent notices stating that you modified
|
215 |
-
it, and giving a relevant date.
|
216 |
-
|
217 |
-
b) The work must carry prominent notices stating that it is
|
218 |
-
released under this License and any conditions added under section
|
219 |
-
7. This requirement modifies the requirement in section 4 to
|
220 |
-
"keep intact all notices".
|
221 |
-
|
222 |
-
c) You must license the entire work, as a whole, under this
|
223 |
-
License to anyone who comes into possession of a copy. This
|
224 |
-
License will therefore apply, along with any applicable section 7
|
225 |
-
additional terms, to the whole of the work, and all its parts,
|
226 |
-
regardless of how they are packaged. This License gives no
|
227 |
-
permission to license the work in any other way, but it does not
|
228 |
-
invalidate such permission if you have separately received it.
|
229 |
-
|
230 |
-
d) If the work has interactive user interfaces, each must display
|
231 |
-
Appropriate Legal Notices; however, if the Program has interactive
|
232 |
-
interfaces that do not display Appropriate Legal Notices, your
|
233 |
-
work need not make them do so.
|
234 |
-
|
235 |
-
A compilation of a covered work with other separate and independent
|
236 |
-
works, which are not by their nature extensions of the covered work,
|
237 |
-
and which are not combined with it such as to form a larger program,
|
238 |
-
in or on a volume of a storage or distribution medium, is called an
|
239 |
-
"aggregate" if the compilation and its resulting copyright are not
|
240 |
-
used to limit the access or legal rights of the compilation's users
|
241 |
-
beyond what the individual works permit. Inclusion of a covered work
|
242 |
-
in an aggregate does not cause this License to apply to the other
|
243 |
-
parts of the aggregate.
|
244 |
-
|
245 |
-
6. Conveying Non-Source Forms.
|
246 |
-
|
247 |
-
You may convey a covered work in object code form under the terms
|
248 |
-
of sections 4 and 5, provided that you also convey the
|
249 |
-
machine-readable Corresponding Source under the terms of this License,
|
250 |
-
in one of these ways:
|
251 |
-
|
252 |
-
a) Convey the object code in, or embodied in, a physical product
|
253 |
-
(including a physical distribution medium), accompanied by the
|
254 |
-
Corresponding Source fixed on a durable physical medium
|
255 |
-
customarily used for software interchange.
|
256 |
-
|
257 |
-
b) Convey the object code in, or embodied in, a physical product
|
258 |
-
(including a physical distribution medium), accompanied by a
|
259 |
-
written offer, valid for at least three years and valid for as
|
260 |
-
long as you offer spare parts or customer support for that product
|
261 |
-
model, to give anyone who possesses the object code either (1) a
|
262 |
-
copy of the Corresponding Source for all the software in the
|
263 |
-
product that is covered by this License, on a durable physical
|
264 |
-
medium customarily used for software interchange, for a price no
|
265 |
-
more than your reasonable cost of physically performing this
|
266 |
-
conveying of source, or (2) access to copy the
|
267 |
-
Corresponding Source from a network server at no charge.
|
268 |
-
|
269 |
-
c) Convey individual copies of the object code with a copy of the
|
270 |
-
written offer to provide the Corresponding Source. This
|
271 |
-
alternative is allowed only occasionally and noncommercially, and
|
272 |
-
only if you received the object code with such an offer, in accord
|
273 |
-
with subsection 6b.
|
274 |
-
|
275 |
-
d) Convey the object code by offering access from a designated
|
276 |
-
place (gratis or for a charge), and offer equivalent access to the
|
277 |
-
Corresponding Source in the same way through the same place at no
|
278 |
-
further charge. You need not require recipients to copy the
|
279 |
-
Corresponding Source along with the object code. If the place to
|
280 |
-
copy the object code is a network server, the Corresponding Source
|
281 |
-
may be on a different server (operated by you or a third party)
|
282 |
-
that supports equivalent copying facilities, provided you maintain
|
283 |
-
clear directions next to the object code saying where to find the
|
284 |
-
Corresponding Source. Regardless of what server hosts the
|
285 |
-
Corresponding Source, you remain obligated to ensure that it is
|
286 |
-
available for as long as needed to satisfy these requirements.
|
287 |
-
|
288 |
-
e) Convey the object code using peer-to-peer transmission, provided
|
289 |
-
you inform other peers where the object code and Corresponding
|
290 |
-
Source of the work are being offered to the general public at no
|
291 |
-
charge under subsection 6d.
|
292 |
-
|
293 |
-
A separable portion of the object code, whose source code is excluded
|
294 |
-
from the Corresponding Source as a System Library, need not be
|
295 |
-
included in conveying the object code work.
|
296 |
-
|
297 |
-
A "User Product" is either (1) a "consumer product", which means any
|
298 |
-
tangible personal property which is normally used for personal, family,
|
299 |
-
or household purposes, or (2) anything designed or sold for incorporation
|
300 |
-
into a dwelling. In determining whether a product is a consumer product,
|
301 |
-
doubtful cases shall be resolved in favor of coverage. For a particular
|
302 |
-
product received by a particular user, "normally used" refers to a
|
303 |
-
typical or common use of that class of product, regardless of the status
|
304 |
-
of the particular user or of the way in which the particular user
|
305 |
-
actually uses, or expects or is expected to use, the product. A product
|
306 |
-
is a consumer product regardless of whether the product has substantial
|
307 |
-
commercial, industrial or non-consumer uses, unless such uses represent
|
308 |
-
the only significant mode of use of the product.
|
309 |
-
|
310 |
-
"Installation Information" for a User Product means any methods,
|
311 |
-
procedures, authorization keys, or other information required to install
|
312 |
-
and execute modified versions of a covered work in that User Product from
|
313 |
-
a modified version of its Corresponding Source. The information must
|
314 |
-
suffice to ensure that the continued functioning of the modified object
|
315 |
-
code is in no case prevented or interfered with solely because
|
316 |
-
modification has been made.
|
317 |
-
|
318 |
-
If you convey an object code work under this section in, or with, or
|
319 |
-
specifically for use in, a User Product, and the conveying occurs as
|
320 |
-
part of a transaction in which the right of possession and use of the
|
321 |
-
User Product is transferred to the recipient in perpetuity or for a
|
322 |
-
fixed term (regardless of how the transaction is characterized), the
|
323 |
-
Corresponding Source conveyed under this section must be accompanied
|
324 |
-
by the Installation Information. But this requirement does not apply
|
325 |
-
if neither you nor any third party retains the ability to install
|
326 |
-
modified object code on the User Product (for example, the work has
|
327 |
-
been installed in ROM).
|
328 |
-
|
329 |
-
The requirement to provide Installation Information does not include a
|
330 |
-
requirement to continue to provide support service, warranty, or updates
|
331 |
-
for a work that has been modified or installed by the recipient, or for
|
332 |
-
the User Product in which it has been modified or installed. Access to a
|
333 |
-
network may be denied when the modification itself materially and
|
334 |
-
adversely affects the operation of the network or violates the rules and
|
335 |
-
protocols for communication across the network.
|
336 |
-
|
337 |
-
Corresponding Source conveyed, and Installation Information provided,
|
338 |
-
in accord with this section must be in a format that is publicly
|
339 |
-
documented (and with an implementation available to the public in
|
340 |
-
source code form), and must require no special password or key for
|
341 |
-
unpacking, reading or copying.
|
342 |
-
|
343 |
-
7. Additional Terms.
|
344 |
-
|
345 |
-
"Additional permissions" are terms that supplement the terms of this
|
346 |
-
License by making exceptions from one or more of its conditions.
|
347 |
-
Additional permissions that are applicable to the entire Program shall
|
348 |
-
be treated as though they were included in this License, to the extent
|
349 |
-
that they are valid under applicable law. If additional permissions
|
350 |
-
apply only to part of the Program, that part may be used separately
|
351 |
-
under those permissions, but the entire Program remains governed by
|
352 |
-
this License without regard to the additional permissions.
|
353 |
-
|
354 |
-
When you convey a copy of a covered work, you may at your option
|
355 |
-
remove any additional permissions from that copy, or from any part of
|
356 |
-
it. (Additional permissions may be written to require their own
|
357 |
-
removal in certain cases when you modify the work.) You may place
|
358 |
-
additional permissions on material, added by you to a covered work,
|
359 |
-
for which you have or can give appropriate copyright permission.
|
360 |
-
|
361 |
-
Notwithstanding any other provision of this License, for material you
|
362 |
-
add to a covered work, you may (if authorized by the copyright holders of
|
363 |
-
that material) supplement the terms of this License with terms:
|
364 |
-
|
365 |
-
a) Disclaiming warranty or limiting liability differently from the
|
366 |
-
terms of sections 15 and 16 of this License; or
|
367 |
-
|
368 |
-
b) Requiring preservation of specified reasonable legal notices or
|
369 |
-
author attributions in that material or in the Appropriate Legal
|
370 |
-
Notices displayed by works containing it; or
|
371 |
-
|
372 |
-
c) Prohibiting misrepresentation of the origin of that material, or
|
373 |
-
requiring that modified versions of such material be marked in
|
374 |
-
reasonable ways as different from the original version; or
|
375 |
-
|
376 |
-
d) Limiting the use for publicity purposes of names of licensors or
|
377 |
-
authors of the material; or
|
378 |
-
|
379 |
-
e) Declining to grant rights under trademark law for use of some
|
380 |
-
trade names, trademarks, or service marks; or
|
381 |
-
|
382 |
-
f) Requiring indemnification of licensors and authors of that
|
383 |
-
material by anyone who conveys the material (or modified versions of
|
384 |
-
it) with contractual assumptions of liability to the recipient, for
|
385 |
-
any liability that these contractual assumptions directly impose on
|
386 |
-
those licensors and authors.
|
387 |
-
|
388 |
-
All other non-permissive additional terms are considered "further
|
389 |
-
restrictions" within the meaning of section 10. If the Program as you
|
390 |
-
received it, or any part of it, contains a notice stating that it is
|
391 |
-
governed by this License along with a term that is a further
|
392 |
-
restriction, you may remove that term. If a license document contains
|
393 |
-
a further restriction but permits relicensing or conveying under this
|
394 |
-
License, you may add to a covered work material governed by the terms
|
395 |
-
of that license document, provided that the further restriction does
|
396 |
-
not survive such relicensing or conveying.
|
397 |
-
|
398 |
-
If you add terms to a covered work in accord with this section, you
|
399 |
-
must place, in the relevant source files, a statement of the
|
400 |
-
additional terms that apply to those files, or a notice indicating
|
401 |
-
where to find the applicable terms.
|
402 |
-
|
403 |
-
Additional terms, permissive or non-permissive, may be stated in the
|
404 |
-
form of a separately written license, or stated as exceptions;
|
405 |
-
the above requirements apply either way.
|
406 |
-
|
407 |
-
8. Termination.
|
408 |
-
|
409 |
-
You may not propagate or modify a covered work except as expressly
|
410 |
-
provided under this License. Any attempt otherwise to propagate or
|
411 |
-
modify it is void, and will automatically terminate your rights under
|
412 |
-
this License (including any patent licenses granted under the third
|
413 |
-
paragraph of section 11).
|
414 |
-
|
415 |
-
However, if you cease all violation of this License, then your
|
416 |
-
license from a particular copyright holder is reinstated (a)
|
417 |
-
provisionally, unless and until the copyright holder explicitly and
|
418 |
-
finally terminates your license, and (b) permanently, if the copyright
|
419 |
-
holder fails to notify you of the violation by some reasonable means
|
420 |
-
prior to 60 days after the cessation.
|
421 |
-
|
422 |
-
Moreover, your license from a particular copyright holder is
|
423 |
-
reinstated permanently if the copyright holder notifies you of the
|
424 |
-
violation by some reasonable means, this is the first time you have
|
425 |
-
received notice of violation of this License (for any work) from that
|
426 |
-
copyright holder, and you cure the violation prior to 30 days after
|
427 |
-
your receipt of the notice.
|
428 |
-
|
429 |
-
Termination of your rights under this section does not terminate the
|
430 |
-
licenses of parties who have received copies or rights from you under
|
431 |
-
this License. If your rights have been terminated and not permanently
|
432 |
-
reinstated, you do not qualify to receive new licenses for the same
|
433 |
-
material under section 10.
|
434 |
-
|
435 |
-
9. Acceptance Not Required for Having Copies.
|
436 |
-
|
437 |
-
You are not required to accept this License in order to receive or
|
438 |
-
run a copy of the Program. Ancillary propagation of a covered work
|
439 |
-
occurring solely as a consequence of using peer-to-peer transmission
|
440 |
-
to receive a copy likewise does not require acceptance. However,
|
441 |
-
nothing other than this License grants you permission to propagate or
|
442 |
-
modify any covered work. These actions infringe copyright if you do
|
443 |
-
not accept this License. Therefore, by modifying or propagating a
|
444 |
-
covered work, you indicate your acceptance of this License to do so.
|
445 |
-
|
446 |
-
10. Automatic Licensing of Downstream Recipients.
|
447 |
-
|
448 |
-
Each time you convey a covered work, the recipient automatically
|
449 |
-
receives a license from the original licensors, to run, modify and
|
450 |
-
propagate that work, subject to this License. You are not responsible
|
451 |
-
for enforcing compliance by third parties with this License.
|
452 |
-
|
453 |
-
An "entity transaction" is a transaction transferring control of an
|
454 |
-
organization, or substantially all assets of one, or subdividing an
|
455 |
-
organization, or merging organizations. If propagation of a covered
|
456 |
-
work results from an entity transaction, each party to that
|
457 |
-
transaction who receives a copy of the work also receives whatever
|
458 |
-
licenses to the work the party's predecessor in interest had or could
|
459 |
-
give under the previous paragraph, plus a right to possession of the
|
460 |
-
Corresponding Source of the work from the predecessor in interest, if
|
461 |
-
the predecessor has it or can get it with reasonable efforts.
|
462 |
-
|
463 |
-
You may not impose any further restrictions on the exercise of the
|
464 |
-
rights granted or affirmed under this License. For example, you may
|
465 |
-
not impose a license fee, royalty, or other charge for exercise of
|
466 |
-
rights granted under this License, and you may not initiate litigation
|
467 |
-
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
468 |
-
any patent claim is infringed by making, using, selling, offering for
|
469 |
-
sale, or importing the Program or any portion of it.
|
470 |
-
|
471 |
-
11. Patents.
|
472 |
-
|
473 |
-
A "contributor" is a copyright holder who authorizes use under this
|
474 |
-
License of the Program or a work on which the Program is based. The
|
475 |
-
work thus licensed is called the contributor's "contributor version".
|
476 |
-
|
477 |
-
A contributor's "essential patent claims" are all patent claims
|
478 |
-
owned or controlled by the contributor, whether already acquired or
|
479 |
-
hereafter acquired, that would be infringed by some manner, permitted
|
480 |
-
by this License, of making, using, or selling its contributor version,
|
481 |
-
but do not include claims that would be infringed only as a
|
482 |
-
consequence of further modification of the contributor version. For
|
483 |
-
purposes of this definition, "control" includes the right to grant
|
484 |
-
patent sublicenses in a manner consistent with the requirements of
|
485 |
-
this License.
|
486 |
-
|
487 |
-
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
488 |
-
patent license under the contributor's essential patent claims, to
|
489 |
-
make, use, sell, offer for sale, import and otherwise run, modify and
|
490 |
-
propagate the contents of its contributor version.
|
491 |
-
|
492 |
-
In the following three paragraphs, a "patent license" is any express
|
493 |
-
agreement or commitment, however denominated, not to enforce a patent
|
494 |
-
(such as an express permission to practice a patent or covenant not to
|
495 |
-
sue for patent infringement). To "grant" such a patent license to a
|
496 |
-
party means to make such an agreement or commitment not to enforce a
|
497 |
-
patent against the party.
|
498 |
-
|
499 |
-
If you convey a covered work, knowingly relying on a patent license,
|
500 |
-
and the Corresponding Source of the work is not available for anyone
|
501 |
-
to copy, free of charge and under the terms of this License, through a
|
502 |
-
publicly available network server or other readily accessible means,
|
503 |
-
then you must either (1) cause the Corresponding Source to be so
|
504 |
-
available, or (2) arrange to deprive yourself of the benefit of the
|
505 |
-
patent license for this particular work, or (3) arrange, in a manner
|
506 |
-
consistent with the requirements of this License, to extend the patent
|
507 |
-
license to downstream recipients. "Knowingly relying" means you have
|
508 |
-
actual knowledge that, but for the patent license, your conveying the
|
509 |
-
covered work in a country, or your recipient's use of the covered work
|
510 |
-
in a country, would infringe one or more identifiable patents in that
|
511 |
-
country that you have reason to believe are valid.
|
512 |
-
|
513 |
-
If, pursuant to or in connection with a single transaction or
|
514 |
-
arrangement, you convey, or propagate by procuring conveyance of, a
|
515 |
-
covered work, and grant a patent license to some of the parties
|
516 |
-
receiving the covered work authorizing them to use, propagate, modify
|
517 |
-
or convey a specific copy of the covered work, then the patent license
|
518 |
-
you grant is automatically extended to all recipients of the covered
|
519 |
-
work and works based on it.
|
520 |
-
|
521 |
-
A patent license is "discriminatory" if it does not include within
|
522 |
-
the scope of its coverage, prohibits the exercise of, or is
|
523 |
-
conditioned on the non-exercise of one or more of the rights that are
|
524 |
-
specifically granted under this License. You may not convey a covered
|
525 |
-
work if you are a party to an arrangement with a third party that is
|
526 |
-
in the business of distributing software, under which you make payment
|
527 |
-
to the third party based on the extent of your activity of conveying
|
528 |
-
the work, and under which the third party grants, to any of the
|
529 |
-
parties who would receive the covered work from you, a discriminatory
|
530 |
-
patent license (a) in connection with copies of the covered work
|
531 |
-
conveyed by you (or copies made from those copies), or (b) primarily
|
532 |
-
for and in connection with specific products or compilations that
|
533 |
-
contain the covered work, unless you entered into that arrangement,
|
534 |
-
or that patent license was granted, prior to 28 March 2007.
|
535 |
-
|
536 |
-
Nothing in this License shall be construed as excluding or limiting
|
537 |
-
any implied license or other defenses to infringement that may
|
538 |
-
otherwise be available to you under applicable patent law.
|
539 |
-
|
540 |
-
12. No Surrender of Others' Freedom.
|
541 |
-
|
542 |
-
If conditions are imposed on you (whether by court order, agreement or
|
543 |
-
otherwise) that contradict the conditions of this License, they do not
|
544 |
-
excuse you from the conditions of this License. If you cannot convey a
|
545 |
-
covered work so as to satisfy simultaneously your obligations under this
|
546 |
-
License and any other pertinent obligations, then as a consequence you may
|
547 |
-
not convey it at all. For example, if you agree to terms that obligate you
|
548 |
-
to collect a royalty for further conveying from those to whom you convey
|
549 |
-
the Program, the only way you could satisfy both those terms and this
|
550 |
-
License would be to refrain entirely from conveying the Program.
|
551 |
-
|
552 |
-
13. Use with the GNU Affero General Public License.
|
553 |
-
|
554 |
-
Notwithstanding any other provision of this License, you have
|
555 |
-
permission to link or combine any covered work with a work licensed
|
556 |
-
under version 3 of the GNU Affero General Public License into a single
|
557 |
-
combined work, and to convey the resulting work. The terms of this
|
558 |
-
License will continue to apply to the part which is the covered work,
|
559 |
-
but the special requirements of the GNU Affero General Public License,
|
560 |
-
section 13, concerning interaction through a network will apply to the
|
561 |
-
combination as such.
|
562 |
-
|
563 |
-
14. Revised Versions of this License.
|
564 |
-
|
565 |
-
The Free Software Foundation may publish revised and/or new versions of
|
566 |
-
the GNU General Public License from time to time. Such new versions will
|
567 |
-
be similar in spirit to the present version, but may differ in detail to
|
568 |
-
address new problems or concerns.
|
569 |
-
|
570 |
-
Each version is given a distinguishing version number. If the
|
571 |
-
Program specifies that a certain numbered version of the GNU General
|
572 |
-
Public License "or any later version" applies to it, you have the
|
573 |
-
option of following the terms and conditions either of that numbered
|
574 |
-
version or of any later version published by the Free Software
|
575 |
-
Foundation. If the Program does not specify a version number of the
|
576 |
-
GNU General Public License, you may choose any version ever published
|
577 |
-
by the Free Software Foundation.
|
578 |
-
|
579 |
-
If the Program specifies that a proxy can decide which future
|
580 |
-
versions of the GNU General Public License can be used, that proxy's
|
581 |
-
public statement of acceptance of a version permanently authorizes you
|
582 |
-
to choose that version for the Program.
|
583 |
-
|
584 |
-
Later license versions may give you additional or different
|
585 |
-
permissions. However, no additional obligations are imposed on any
|
586 |
-
author or copyright holder as a result of your choosing to follow a
|
587 |
-
later version.
|
588 |
-
|
589 |
-
15. Disclaimer of Warranty.
|
590 |
-
|
591 |
-
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
592 |
-
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
593 |
-
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
594 |
-
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
595 |
-
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
596 |
-
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
597 |
-
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
598 |
-
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
599 |
-
|
600 |
-
16. Limitation of Liability.
|
601 |
-
|
602 |
-
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
603 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
604 |
-
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
605 |
-
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
606 |
-
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
607 |
-
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
608 |
-
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
609 |
-
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
610 |
-
SUCH DAMAGES.
|
611 |
-
|
612 |
-
17. Interpretation of Sections 15 and 16.
|
613 |
-
|
614 |
-
If the disclaimer of warranty and limitation of liability provided
|
615 |
-
above cannot be given local legal effect according to their terms,
|
616 |
-
reviewing courts shall apply local law that most closely approximates
|
617 |
-
an absolute waiver of all civil liability in connection with the
|
618 |
-
Program, unless a warranty or assumption of liability accompanies a
|
619 |
-
copy of the Program in return for a fee.
|
620 |
-
|
621 |
-
END OF TERMS AND CONDITIONS
|
622 |
-
|
623 |
-
How to Apply These Terms to Your New Programs
|
624 |
-
|
625 |
-
If you develop a new program, and you want it to be of the greatest
|
626 |
-
possible use to the public, the best way to achieve this is to make it
|
627 |
-
free software which everyone can redistribute and change under these terms.
|
628 |
-
|
629 |
-
To do so, attach the following notices to the program. It is safest
|
630 |
-
to attach them to the start of each source file to most effectively
|
631 |
-
state the exclusion of warranty; and each file should have at least
|
632 |
-
the "copyright" line and a pointer to where the full notice is found.
|
633 |
-
|
634 |
-
<one line to give the program's name and a brief idea of what it does.>
|
635 |
-
Copyright (C) <year> <name of author>
|
636 |
-
|
637 |
-
This program is free software: you can redistribute it and/or modify
|
638 |
-
it under the terms of the GNU General Public License as published by
|
639 |
-
the Free Software Foundation, either version 3 of the License, or
|
640 |
-
(at your option) any later version.
|
641 |
-
|
642 |
-
This program is distributed in the hope that it will be useful,
|
643 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
644 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
645 |
-
GNU General Public License for more details.
|
646 |
-
|
647 |
-
You should have received a copy of the GNU General Public License
|
648 |
-
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
649 |
-
|
650 |
-
Also add information on how to contact you by electronic and paper mail.
|
651 |
-
|
652 |
-
If the program does terminal interaction, make it output a short
|
653 |
-
notice like this when it starts in an interactive mode:
|
654 |
-
|
655 |
-
<program> Copyright (C) <year> <name of author>
|
656 |
-
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
657 |
-
This is free software, and you are welcome to redistribute it
|
658 |
-
under certain conditions; type `show c' for details.
|
659 |
-
|
660 |
-
The hypothetical commands `show w' and `show c' should show the appropriate
|
661 |
-
parts of the General Public License. Of course, your program's commands
|
662 |
-
might be different; for a GUI interface, you would use an "about box".
|
663 |
-
|
664 |
-
You should also get your employer (if you work as a programmer) or school,
|
665 |
-
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
666 |
-
For more information on this, and how to apply and follow the GNU GPL, see
|
667 |
-
<http://www.gnu.org/licenses/>.
|
668 |
-
|
669 |
-
The GNU General Public License does not permit incorporating your program
|
670 |
-
into proprietary programs. If your program is a subroutine library, you
|
671 |
-
may consider it more useful to permit linking proprietary applications with
|
672 |
-
the library. If this is what you want to do, use the GNU Lesser General
|
673 |
-
Public License instead of this License. But first, please read
|
674 |
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
1 |
+
GNU GENERAL PUBLIC LICENSE
|
2 |
+
Version 3, 29 June 2007
|
3 |
+
|
4 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5 |
+
Everyone is permitted to copy and distribute verbatim copies
|
6 |
+
of this license document, but changing it is not allowed.
|
7 |
+
|
8 |
+
Preamble
|
9 |
+
|
10 |
+
The GNU General Public License is a free, copyleft license for
|
11 |
+
software and other kinds of works.
|
12 |
+
|
13 |
+
The licenses for most software and other practical works are designed
|
14 |
+
to take away your freedom to share and change the works. By contrast,
|
15 |
+
the GNU General Public License is intended to guarantee your freedom to
|
16 |
+
share and change all versions of a program--to make sure it remains free
|
17 |
+
software for all its users. We, the Free Software Foundation, use the
|
18 |
+
GNU General Public License for most of our software; it applies also to
|
19 |
+
any other work released this way by its authors. You can apply it to
|
20 |
+
your programs, too.
|
21 |
+
|
22 |
+
When we speak of free software, we are referring to freedom, not
|
23 |
+
price. Our General Public Licenses are designed to make sure that you
|
24 |
+
have the freedom to distribute copies of free software (and charge for
|
25 |
+
them if you wish), that you receive source code or can get it if you
|
26 |
+
want it, that you can change the software or use pieces of it in new
|
27 |
+
free programs, and that you know you can do these things.
|
28 |
+
|
29 |
+
To protect your rights, we need to prevent others from denying you
|
30 |
+
these rights or asking you to surrender the rights. Therefore, you have
|
31 |
+
certain responsibilities if you distribute copies of the software, or if
|
32 |
+
you modify it: responsibilities to respect the freedom of others.
|
33 |
+
|
34 |
+
For example, if you distribute copies of such a program, whether
|
35 |
+
gratis or for a fee, you must pass on to the recipients the same
|
36 |
+
freedoms that you received. You must make sure that they, too, receive
|
37 |
+
or can get the source code. And you must show them these terms so they
|
38 |
+
know their rights.
|
39 |
+
|
40 |
+
Developers that use the GNU GPL protect your rights with two steps:
|
41 |
+
(1) assert copyright on the software, and (2) offer you this License
|
42 |
+
giving you legal permission to copy, distribute and/or modify it.
|
43 |
+
|
44 |
+
For the developers' and authors' protection, the GPL clearly explains
|
45 |
+
that there is no warranty for this free software. For both users' and
|
46 |
+
authors' sake, the GPL requires that modified versions be marked as
|
47 |
+
changed, so that their problems will not be attributed erroneously to
|
48 |
+
authors of previous versions.
|
49 |
+
|
50 |
+
Some devices are designed to deny users access to install or run
|
51 |
+
modified versions of the software inside them, although the manufacturer
|
52 |
+
can do so. This is fundamentally incompatible with the aim of
|
53 |
+
protecting users' freedom to change the software. The systematic
|
54 |
+
pattern of such abuse occurs in the area of products for individuals to
|
55 |
+
use, which is precisely where it is most unacceptable. Therefore, we
|
56 |
+
have designed this version of the GPL to prohibit the practice for those
|
57 |
+
products. If such problems arise substantially in other domains, we
|
58 |
+
stand ready to extend this provision to those domains in future versions
|
59 |
+
of the GPL, as needed to protect the freedom of users.
|
60 |
+
|
61 |
+
Finally, every program is threatened constantly by software patents.
|
62 |
+
States should not allow patents to restrict development and use of
|
63 |
+
software on general-purpose computers, but in those that do, we wish to
|
64 |
+
avoid the special danger that patents applied to a free program could
|
65 |
+
make it effectively proprietary. To prevent this, the GPL assures that
|
66 |
+
patents cannot be used to render the program non-free.
|
67 |
+
|
68 |
+
The precise terms and conditions for copying, distribution and
|
69 |
+
modification follow.
|
70 |
+
|
71 |
+
TERMS AND CONDITIONS
|
72 |
+
|
73 |
+
0. Definitions.
|
74 |
+
|
75 |
+
"This License" refers to version 3 of the GNU General Public License.
|
76 |
+
|
77 |
+
"Copyright" also means copyright-like laws that apply to other kinds of
|
78 |
+
works, such as semiconductor masks.
|
79 |
+
|
80 |
+
"The Program" refers to any copyrightable work licensed under this
|
81 |
+
License. Each licensee is addressed as "you". "Licensees" and
|
82 |
+
"recipients" may be individuals or organizations.
|
83 |
+
|
84 |
+
To "modify" a work means to copy from or adapt all or part of the work
|
85 |
+
in a fashion requiring copyright permission, other than the making of an
|
86 |
+
exact copy. The resulting work is called a "modified version" of the
|
87 |
+
earlier work or a work "based on" the earlier work.
|
88 |
+
|
89 |
+
A "covered work" means either the unmodified Program or a work based
|
90 |
+
on the Program.
|
91 |
+
|
92 |
+
To "propagate" a work means to do anything with it that, without
|
93 |
+
permission, would make you directly or secondarily liable for
|
94 |
+
infringement under applicable copyright law, except executing it on a
|
95 |
+
computer or modifying a private copy. Propagation includes copying,
|
96 |
+
distribution (with or without modification), making available to the
|
97 |
+
public, and in some countries other activities as well.
|
98 |
+
|
99 |
+
To "convey" a work means any kind of propagation that enables other
|
100 |
+
parties to make or receive copies. Mere interaction with a user through
|
101 |
+
a computer network, with no transfer of a copy, is not conveying.
|
102 |
+
|
103 |
+
An interactive user interface displays "Appropriate Legal Notices"
|
104 |
+
to the extent that it includes a convenient and prominently visible
|
105 |
+
feature that (1) displays an appropriate copyright notice, and (2)
|
106 |
+
tells the user that there is no warranty for the work (except to the
|
107 |
+
extent that warranties are provided), that licensees may convey the
|
108 |
+
work under this License, and how to view a copy of this License. If
|
109 |
+
the interface presents a list of user commands or options, such as a
|
110 |
+
menu, a prominent item in the list meets this criterion.
|
111 |
+
|
112 |
+
1. Source Code.
|
113 |
+
|
114 |
+
The "source code" for a work means the preferred form of the work
|
115 |
+
for making modifications to it. "Object code" means any non-source
|
116 |
+
form of a work.
|
117 |
+
|
118 |
+
A "Standard Interface" means an interface that either is an official
|
119 |
+
standard defined by a recognized standards body, or, in the case of
|
120 |
+
interfaces specified for a particular programming language, one that
|
121 |
+
is widely used among developers working in that language.
|
122 |
+
|
123 |
+
The "System Libraries" of an executable work include anything, other
|
124 |
+
than the work as a whole, that (a) is included in the normal form of
|
125 |
+
packaging a Major Component, but which is not part of that Major
|
126 |
+
Component, and (b) serves only to enable use of the work with that
|
127 |
+
Major Component, or to implement a Standard Interface for which an
|
128 |
+
implementation is available to the public in source code form. A
|
129 |
+
"Major Component", in this context, means a major essential component
|
130 |
+
(kernel, window system, and so on) of the specific operating system
|
131 |
+
(if any) on which the executable work runs, or a compiler used to
|
132 |
+
produce the work, or an object code interpreter used to run it.
|
133 |
+
|
134 |
+
The "Corresponding Source" for a work in object code form means all
|
135 |
+
the source code needed to generate, install, and (for an executable
|
136 |
+
work) run the object code and to modify the work, including scripts to
|
137 |
+
control those activities. However, it does not include the work's
|
138 |
+
System Libraries, or general-purpose tools or generally available free
|
139 |
+
programs which are used unmodified in performing those activities but
|
140 |
+
which are not part of the work. For example, Corresponding Source
|
141 |
+
includes interface definition files associated with source files for
|
142 |
+
the work, and the source code for shared libraries and dynamically
|
143 |
+
linked subprograms that the work is specifically designed to require,
|
144 |
+
such as by intimate data communication or control flow between those
|
145 |
+
subprograms and other parts of the work.
|
146 |
+
|
147 |
+
The Corresponding Source need not include anything that users
|
148 |
+
can regenerate automatically from other parts of the Corresponding
|
149 |
+
Source.
|
150 |
+
|
151 |
+
The Corresponding Source for a work in source code form is that
|
152 |
+
same work.
|
153 |
+
|
154 |
+
2. Basic Permissions.
|
155 |
+
|
156 |
+
All rights granted under this License are granted for the term of
|
157 |
+
copyright on the Program, and are irrevocable provided the stated
|
158 |
+
conditions are met. This License explicitly affirms your unlimited
|
159 |
+
permission to run the unmodified Program. The output from running a
|
160 |
+
covered work is covered by this License only if the output, given its
|
161 |
+
content, constitutes a covered work. This License acknowledges your
|
162 |
+
rights of fair use or other equivalent, as provided by copyright law.
|
163 |
+
|
164 |
+
You may make, run and propagate covered works that you do not
|
165 |
+
convey, without conditions so long as your license otherwise remains
|
166 |
+
in force. You may convey covered works to others for the sole purpose
|
167 |
+
of having them make modifications exclusively for you, or provide you
|
168 |
+
with facilities for running those works, provided that you comply with
|
169 |
+
the terms of this License in conveying all material for which you do
|
170 |
+
not control copyright. Those thus making or running the covered works
|
171 |
+
for you must do so exclusively on your behalf, under your direction
|
172 |
+
and control, on terms that prohibit them from making any copies of
|
173 |
+
your copyrighted material outside their relationship with you.
|
174 |
+
|
175 |
+
Conveying under any other circumstances is permitted solely under
|
176 |
+
the conditions stated below. Sublicensing is not allowed; section 10
|
177 |
+
makes it unnecessary.
|
178 |
+
|
179 |
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
180 |
+
|
181 |
+
No covered work shall be deemed part of an effective technological
|
182 |
+
measure under any applicable law fulfilling obligations under article
|
183 |
+
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
184 |
+
similar laws prohibiting or restricting circumvention of such
|
185 |
+
measures.
|
186 |
+
|
187 |
+
When you convey a covered work, you waive any legal power to forbid
|
188 |
+
circumvention of technological measures to the extent such circumvention
|
189 |
+
is effected by exercising rights under this License with respect to
|
190 |
+
the covered work, and you disclaim any intention to limit operation or
|
191 |
+
modification of the work as a means of enforcing, against the work's
|
192 |
+
users, your or third parties' legal rights to forbid circumvention of
|
193 |
+
technological measures.
|
194 |
+
|
195 |
+
4. Conveying Verbatim Copies.
|
196 |
+
|
197 |
+
You may convey verbatim copies of the Program's source code as you
|
198 |
+
receive it, in any medium, provided that you conspicuously and
|
199 |
+
appropriately publish on each copy an appropriate copyright notice;
|
200 |
+
keep intact all notices stating that this License and any
|
201 |
+
non-permissive terms added in accord with section 7 apply to the code;
|
202 |
+
keep intact all notices of the absence of any warranty; and give all
|
203 |
+
recipients a copy of this License along with the Program.
|
204 |
+
|
205 |
+
You may charge any price or no price for each copy that you convey,
|
206 |
+
and you may offer support or warranty protection for a fee.
|
207 |
+
|
208 |
+
5. Conveying Modified Source Versions.
|
209 |
+
|
210 |
+
You may convey a work based on the Program, or the modifications to
|
211 |
+
produce it from the Program, in the form of source code under the
|
212 |
+
terms of section 4, provided that you also meet all of these conditions:
|
213 |
+
|
214 |
+
a) The work must carry prominent notices stating that you modified
|
215 |
+
it, and giving a relevant date.
|
216 |
+
|
217 |
+
b) The work must carry prominent notices stating that it is
|
218 |
+
released under this License and any conditions added under section
|
219 |
+
7. This requirement modifies the requirement in section 4 to
|
220 |
+
"keep intact all notices".
|
221 |
+
|
222 |
+
c) You must license the entire work, as a whole, under this
|
223 |
+
License to anyone who comes into possession of a copy. This
|
224 |
+
License will therefore apply, along with any applicable section 7
|
225 |
+
additional terms, to the whole of the work, and all its parts,
|
226 |
+
regardless of how they are packaged. This License gives no
|
227 |
+
permission to license the work in any other way, but it does not
|
228 |
+
invalidate such permission if you have separately received it.
|
229 |
+
|
230 |
+
d) If the work has interactive user interfaces, each must display
|
231 |
+
Appropriate Legal Notices; however, if the Program has interactive
|
232 |
+
interfaces that do not display Appropriate Legal Notices, your
|
233 |
+
work need not make them do so.
|
234 |
+
|
235 |
+
A compilation of a covered work with other separate and independent
|
236 |
+
works, which are not by their nature extensions of the covered work,
|
237 |
+
and which are not combined with it such as to form a larger program,
|
238 |
+
in or on a volume of a storage or distribution medium, is called an
|
239 |
+
"aggregate" if the compilation and its resulting copyright are not
|
240 |
+
used to limit the access or legal rights of the compilation's users
|
241 |
+
beyond what the individual works permit. Inclusion of a covered work
|
242 |
+
in an aggregate does not cause this License to apply to the other
|
243 |
+
parts of the aggregate.
|
244 |
+
|
245 |
+
6. Conveying Non-Source Forms.
|
246 |
+
|
247 |
+
You may convey a covered work in object code form under the terms
|
248 |
+
of sections 4 and 5, provided that you also convey the
|
249 |
+
machine-readable Corresponding Source under the terms of this License,
|
250 |
+
in one of these ways:
|
251 |
+
|
252 |
+
a) Convey the object code in, or embodied in, a physical product
|
253 |
+
(including a physical distribution medium), accompanied by the
|
254 |
+
Corresponding Source fixed on a durable physical medium
|
255 |
+
customarily used for software interchange.
|
256 |
+
|
257 |
+
b) Convey the object code in, or embodied in, a physical product
|
258 |
+
(including a physical distribution medium), accompanied by a
|
259 |
+
written offer, valid for at least three years and valid for as
|
260 |
+
long as you offer spare parts or customer support for that product
|
261 |
+
model, to give anyone who possesses the object code either (1) a
|
262 |
+
copy of the Corresponding Source for all the software in the
|
263 |
+
product that is covered by this License, on a durable physical
|
264 |
+
medium customarily used for software interchange, for a price no
|
265 |
+
more than your reasonable cost of physically performing this
|
266 |
+
conveying of source, or (2) access to copy the
|
267 |
+
Corresponding Source from a network server at no charge.
|
268 |
+
|
269 |
+
c) Convey individual copies of the object code with a copy of the
|
270 |
+
written offer to provide the Corresponding Source. This
|
271 |
+
alternative is allowed only occasionally and noncommercially, and
|
272 |
+
only if you received the object code with such an offer, in accord
|
273 |
+
with subsection 6b.
|
274 |
+
|
275 |
+
d) Convey the object code by offering access from a designated
|
276 |
+
place (gratis or for a charge), and offer equivalent access to the
|
277 |
+
Corresponding Source in the same way through the same place at no
|
278 |
+
further charge. You need not require recipients to copy the
|
279 |
+
Corresponding Source along with the object code. If the place to
|
280 |
+
copy the object code is a network server, the Corresponding Source
|
281 |
+
may be on a different server (operated by you or a third party)
|
282 |
+
that supports equivalent copying facilities, provided you maintain
|
283 |
+
clear directions next to the object code saying where to find the
|
284 |
+
Corresponding Source. Regardless of what server hosts the
|
285 |
+
Corresponding Source, you remain obligated to ensure that it is
|
286 |
+
available for as long as needed to satisfy these requirements.
|
287 |
+
|
288 |
+
e) Convey the object code using peer-to-peer transmission, provided
|
289 |
+
you inform other peers where the object code and Corresponding
|
290 |
+
Source of the work are being offered to the general public at no
|
291 |
+
charge under subsection 6d.
|
292 |
+
|
293 |
+
A separable portion of the object code, whose source code is excluded
|
294 |
+
from the Corresponding Source as a System Library, need not be
|
295 |
+
included in conveying the object code work.
|
296 |
+
|
297 |
+
A "User Product" is either (1) a "consumer product", which means any
|
298 |
+
tangible personal property which is normally used for personal, family,
|
299 |
+
or household purposes, or (2) anything designed or sold for incorporation
|
300 |
+
into a dwelling. In determining whether a product is a consumer product,
|
301 |
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
302 |
+
product received by a particular user, "normally used" refers to a
|
303 |
+
typical or common use of that class of product, regardless of the status
|
304 |
+
of the particular user or of the way in which the particular user
|
305 |
+
actually uses, or expects or is expected to use, the product. A product
|
306 |
+
is a consumer product regardless of whether the product has substantial
|
307 |
+
commercial, industrial or non-consumer uses, unless such uses represent
|
308 |
+
the only significant mode of use of the product.
|
309 |
+
|
310 |
+
"Installation Information" for a User Product means any methods,
|
311 |
+
procedures, authorization keys, or other information required to install
|
312 |
+
and execute modified versions of a covered work in that User Product from
|
313 |
+
a modified version of its Corresponding Source. The information must
|
314 |
+
suffice to ensure that the continued functioning of the modified object
|
315 |
+
code is in no case prevented or interfered with solely because
|
316 |
+
modification has been made.
|
317 |
+
|
318 |
+
If you convey an object code work under this section in, or with, or
|
319 |
+
specifically for use in, a User Product, and the conveying occurs as
|
320 |
+
part of a transaction in which the right of possession and use of the
|
321 |
+
User Product is transferred to the recipient in perpetuity or for a
|
322 |
+
fixed term (regardless of how the transaction is characterized), the
|
323 |
+
Corresponding Source conveyed under this section must be accompanied
|
324 |
+
by the Installation Information. But this requirement does not apply
|
325 |
+
if neither you nor any third party retains the ability to install
|
326 |
+
modified object code on the User Product (for example, the work has
|
327 |
+
been installed in ROM).
|
328 |
+
|
329 |
+
The requirement to provide Installation Information does not include a
|
330 |
+
requirement to continue to provide support service, warranty, or updates
|
331 |
+
for a work that has been modified or installed by the recipient, or for
|
332 |
+
the User Product in which it has been modified or installed. Access to a
|
333 |
+
network may be denied when the modification itself materially and
|
334 |
+
adversely affects the operation of the network or violates the rules and
|
335 |
+
protocols for communication across the network.
|
336 |
+
|
337 |
+
Corresponding Source conveyed, and Installation Information provided,
|
338 |
+
in accord with this section must be in a format that is publicly
|
339 |
+
documented (and with an implementation available to the public in
|
340 |
+
source code form), and must require no special password or key for
|
341 |
+
unpacking, reading or copying.
|
342 |
+
|
343 |
+
7. Additional Terms.
|
344 |
+
|
345 |
+
"Additional permissions" are terms that supplement the terms of this
|
346 |
+
License by making exceptions from one or more of its conditions.
|
347 |
+
Additional permissions that are applicable to the entire Program shall
|
348 |
+
be treated as though they were included in this License, to the extent
|
349 |
+
that they are valid under applicable law. If additional permissions
|
350 |
+
apply only to part of the Program, that part may be used separately
|
351 |
+
under those permissions, but the entire Program remains governed by
|
352 |
+
this License without regard to the additional permissions.
|
353 |
+
|
354 |
+
When you convey a copy of a covered work, you may at your option
|
355 |
+
remove any additional permissions from that copy, or from any part of
|
356 |
+
it. (Additional permissions may be written to require their own
|
357 |
+
removal in certain cases when you modify the work.) You may place
|
358 |
+
additional permissions on material, added by you to a covered work,
|
359 |
+
for which you have or can give appropriate copyright permission.
|
360 |
+
|
361 |
+
Notwithstanding any other provision of this License, for material you
|
362 |
+
add to a covered work, you may (if authorized by the copyright holders of
|
363 |
+
that material) supplement the terms of this License with terms:
|
364 |
+
|
365 |
+
a) Disclaiming warranty or limiting liability differently from the
|
366 |
+
terms of sections 15 and 16 of this License; or
|
367 |
+
|
368 |
+
b) Requiring preservation of specified reasonable legal notices or
|
369 |
+
author attributions in that material or in the Appropriate Legal
|
370 |
+
Notices displayed by works containing it; or
|
371 |
+
|
372 |
+
c) Prohibiting misrepresentation of the origin of that material, or
|
373 |
+
requiring that modified versions of such material be marked in
|
374 |
+
reasonable ways as different from the original version; or
|
375 |
+
|
376 |
+
d) Limiting the use for publicity purposes of names of licensors or
|
377 |
+
authors of the material; or
|
378 |
+
|
379 |
+
e) Declining to grant rights under trademark law for use of some
|
380 |
+
trade names, trademarks, or service marks; or
|
381 |
+
|
382 |
+
f) Requiring indemnification of licensors and authors of that
|
383 |
+
material by anyone who conveys the material (or modified versions of
|
384 |
+
it) with contractual assumptions of liability to the recipient, for
|
385 |
+
any liability that these contractual assumptions directly impose on
|
386 |
+
those licensors and authors.
|
387 |
+
|
388 |
+
All other non-permissive additional terms are considered "further
|
389 |
+
restrictions" within the meaning of section 10. If the Program as you
|
390 |
+
received it, or any part of it, contains a notice stating that it is
|
391 |
+
governed by this License along with a term that is a further
|
392 |
+
restriction, you may remove that term. If a license document contains
|
393 |
+
a further restriction but permits relicensing or conveying under this
|
394 |
+
License, you may add to a covered work material governed by the terms
|
395 |
+
of that license document, provided that the further restriction does
|
396 |
+
not survive such relicensing or conveying.
|
397 |
+
|
398 |
+
If you add terms to a covered work in accord with this section, you
|
399 |
+
must place, in the relevant source files, a statement of the
|
400 |
+
additional terms that apply to those files, or a notice indicating
|
401 |
+
where to find the applicable terms.
|
402 |
+
|
403 |
+
Additional terms, permissive or non-permissive, may be stated in the
|
404 |
+
form of a separately written license, or stated as exceptions;
|
405 |
+
the above requirements apply either way.
|
406 |
+
|
407 |
+
8. Termination.
|
408 |
+
|
409 |
+
You may not propagate or modify a covered work except as expressly
|
410 |
+
provided under this License. Any attempt otherwise to propagate or
|
411 |
+
modify it is void, and will automatically terminate your rights under
|
412 |
+
this License (including any patent licenses granted under the third
|
413 |
+
paragraph of section 11).
|
414 |
+
|
415 |
+
However, if you cease all violation of this License, then your
|
416 |
+
license from a particular copyright holder is reinstated (a)
|
417 |
+
provisionally, unless and until the copyright holder explicitly and
|
418 |
+
finally terminates your license, and (b) permanently, if the copyright
|
419 |
+
holder fails to notify you of the violation by some reasonable means
|
420 |
+
prior to 60 days after the cessation.
|
421 |
+
|
422 |
+
Moreover, your license from a particular copyright holder is
|
423 |
+
reinstated permanently if the copyright holder notifies you of the
|
424 |
+
violation by some reasonable means, this is the first time you have
|
425 |
+
received notice of violation of this License (for any work) from that
|
426 |
+
copyright holder, and you cure the violation prior to 30 days after
|
427 |
+
your receipt of the notice.
|
428 |
+
|
429 |
+
Termination of your rights under this section does not terminate the
|
430 |
+
licenses of parties who have received copies or rights from you under
|
431 |
+
this License. If your rights have been terminated and not permanently
|
432 |
+
reinstated, you do not qualify to receive new licenses for the same
|
433 |
+
material under section 10.
|
434 |
+
|
435 |
+
9. Acceptance Not Required for Having Copies.
|
436 |
+
|
437 |
+
You are not required to accept this License in order to receive or
|
438 |
+
run a copy of the Program. Ancillary propagation of a covered work
|
439 |
+
occurring solely as a consequence of using peer-to-peer transmission
|
440 |
+
to receive a copy likewise does not require acceptance. However,
|
441 |
+
nothing other than this License grants you permission to propagate or
|
442 |
+
modify any covered work. These actions infringe copyright if you do
|
443 |
+
not accept this License. Therefore, by modifying or propagating a
|
444 |
+
covered work, you indicate your acceptance of this License to do so.
|
445 |
+
|
446 |
+
10. Automatic Licensing of Downstream Recipients.
|
447 |
+
|
448 |
+
Each time you convey a covered work, the recipient automatically
|
449 |
+
receives a license from the original licensors, to run, modify and
|
450 |
+
propagate that work, subject to this License. You are not responsible
|
451 |
+
for enforcing compliance by third parties with this License.
|
452 |
+
|
453 |
+
An "entity transaction" is a transaction transferring control of an
|
454 |
+
organization, or substantially all assets of one, or subdividing an
|
455 |
+
organization, or merging organizations. If propagation of a covered
|
456 |
+
work results from an entity transaction, each party to that
|
457 |
+
transaction who receives a copy of the work also receives whatever
|
458 |
+
licenses to the work the party's predecessor in interest had or could
|
459 |
+
give under the previous paragraph, plus a right to possession of the
|
460 |
+
Corresponding Source of the work from the predecessor in interest, if
|
461 |
+
the predecessor has it or can get it with reasonable efforts.
|
462 |
+
|
463 |
+
You may not impose any further restrictions on the exercise of the
|
464 |
+
rights granted or affirmed under this License. For example, you may
|
465 |
+
not impose a license fee, royalty, or other charge for exercise of
|
466 |
+
rights granted under this License, and you may not initiate litigation
|
467 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
468 |
+
any patent claim is infringed by making, using, selling, offering for
|
469 |
+
sale, or importing the Program or any portion of it.
|
470 |
+
|
471 |
+
11. Patents.
|
472 |
+
|
473 |
+
A "contributor" is a copyright holder who authorizes use under this
|
474 |
+
License of the Program or a work on which the Program is based. The
|
475 |
+
work thus licensed is called the contributor's "contributor version".
|
476 |
+
|
477 |
+
A contributor's "essential patent claims" are all patent claims
|
478 |
+
owned or controlled by the contributor, whether already acquired or
|
479 |
+
hereafter acquired, that would be infringed by some manner, permitted
|
480 |
+
by this License, of making, using, or selling its contributor version,
|
481 |
+
but do not include claims that would be infringed only as a
|
482 |
+
consequence of further modification of the contributor version. For
|
483 |
+
purposes of this definition, "control" includes the right to grant
|
484 |
+
patent sublicenses in a manner consistent with the requirements of
|
485 |
+
this License.
|
486 |
+
|
487 |
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
488 |
+
patent license under the contributor's essential patent claims, to
|
489 |
+
make, use, sell, offer for sale, import and otherwise run, modify and
|
490 |
+
propagate the contents of its contributor version.
|
491 |
+
|
492 |
+
In the following three paragraphs, a "patent license" is any express
|
493 |
+
agreement or commitment, however denominated, not to enforce a patent
|
494 |
+
(such as an express permission to practice a patent or covenant not to
|
495 |
+
sue for patent infringement). To "grant" such a patent license to a
|
496 |
+
party means to make such an agreement or commitment not to enforce a
|
497 |
+
patent against the party.
|
498 |
+
|
499 |
+
If you convey a covered work, knowingly relying on a patent license,
|
500 |
+
and the Corresponding Source of the work is not available for anyone
|
501 |
+
to copy, free of charge and under the terms of this License, through a
|
502 |
+
publicly available network server or other readily accessible means,
|
503 |
+
then you must either (1) cause the Corresponding Source to be so
|
504 |
+
available, or (2) arrange to deprive yourself of the benefit of the
|
505 |
+
patent license for this particular work, or (3) arrange, in a manner
|
506 |
+
consistent with the requirements of this License, to extend the patent
|
507 |
+
license to downstream recipients. "Knowingly relying" means you have
|
508 |
+
actual knowledge that, but for the patent license, your conveying the
|
509 |
+
covered work in a country, or your recipient's use of the covered work
|
510 |
+
in a country, would infringe one or more identifiable patents in that
|
511 |
+
country that you have reason to believe are valid.
|
512 |
+
|
513 |
+
If, pursuant to or in connection with a single transaction or
|
514 |
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
515 |
+
covered work, and grant a patent license to some of the parties
|
516 |
+
receiving the covered work authorizing them to use, propagate, modify
|
517 |
+
or convey a specific copy of the covered work, then the patent license
|
518 |
+
you grant is automatically extended to all recipients of the covered
|
519 |
+
work and works based on it.
|
520 |
+
|
521 |
+
A patent license is "discriminatory" if it does not include within
|
522 |
+
the scope of its coverage, prohibits the exercise of, or is
|
523 |
+
conditioned on the non-exercise of one or more of the rights that are
|
524 |
+
specifically granted under this License. You may not convey a covered
|
525 |
+
work if you are a party to an arrangement with a third party that is
|
526 |
+
in the business of distributing software, under which you make payment
|
527 |
+
to the third party based on the extent of your activity of conveying
|
528 |
+
the work, and under which the third party grants, to any of the
|
529 |
+
parties who would receive the covered work from you, a discriminatory
|
530 |
+
patent license (a) in connection with copies of the covered work
|
531 |
+
conveyed by you (or copies made from those copies), or (b) primarily
|
532 |
+
for and in connection with specific products or compilations that
|
533 |
+
contain the covered work, unless you entered into that arrangement,
|
534 |
+
or that patent license was granted, prior to 28 March 2007.
|
535 |
+
|
536 |
+
Nothing in this License shall be construed as excluding or limiting
|
537 |
+
any implied license or other defenses to infringement that may
|
538 |
+
otherwise be available to you under applicable patent law.
|
539 |
+
|
540 |
+
12. No Surrender of Others' Freedom.
|
541 |
+
|
542 |
+
If conditions are imposed on you (whether by court order, agreement or
|
543 |
+
otherwise) that contradict the conditions of this License, they do not
|
544 |
+
excuse you from the conditions of this License. If you cannot convey a
|
545 |
+
covered work so as to satisfy simultaneously your obligations under this
|
546 |
+
License and any other pertinent obligations, then as a consequence you may
|
547 |
+
not convey it at all. For example, if you agree to terms that obligate you
|
548 |
+
to collect a royalty for further conveying from those to whom you convey
|
549 |
+
the Program, the only way you could satisfy both those terms and this
|
550 |
+
License would be to refrain entirely from conveying the Program.
|
551 |
+
|
552 |
+
13. Use with the GNU Affero General Public License.
|
553 |
+
|
554 |
+
Notwithstanding any other provision of this License, you have
|
555 |
+
permission to link or combine any covered work with a work licensed
|
556 |
+
under version 3 of the GNU Affero General Public License into a single
|
557 |
+
combined work, and to convey the resulting work. The terms of this
|
558 |
+
License will continue to apply to the part which is the covered work,
|
559 |
+
but the special requirements of the GNU Affero General Public License,
|
560 |
+
section 13, concerning interaction through a network will apply to the
|
561 |
+
combination as such.
|
562 |
+
|
563 |
+
14. Revised Versions of this License.
|
564 |
+
|
565 |
+
The Free Software Foundation may publish revised and/or new versions of
|
566 |
+
the GNU General Public License from time to time. Such new versions will
|
567 |
+
be similar in spirit to the present version, but may differ in detail to
|
568 |
+
address new problems or concerns.
|
569 |
+
|
570 |
+
Each version is given a distinguishing version number. If the
|
571 |
+
Program specifies that a certain numbered version of the GNU General
|
572 |
+
Public License "or any later version" applies to it, you have the
|
573 |
+
option of following the terms and conditions either of that numbered
|
574 |
+
version or of any later version published by the Free Software
|
575 |
+
Foundation. If the Program does not specify a version number of the
|
576 |
+
GNU General Public License, you may choose any version ever published
|
577 |
+
by the Free Software Foundation.
|
578 |
+
|
579 |
+
If the Program specifies that a proxy can decide which future
|
580 |
+
versions of the GNU General Public License can be used, that proxy's
|
581 |
+
public statement of acceptance of a version permanently authorizes you
|
582 |
+
to choose that version for the Program.
|
583 |
+
|
584 |
+
Later license versions may give you additional or different
|
585 |
+
permissions. However, no additional obligations are imposed on any
|
586 |
+
author or copyright holder as a result of your choosing to follow a
|
587 |
+
later version.
|
588 |
+
|
589 |
+
15. Disclaimer of Warranty.
|
590 |
+
|
591 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
592 |
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
593 |
+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
594 |
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
595 |
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
596 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
597 |
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
598 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
599 |
+
|
600 |
+
16. Limitation of Liability.
|
601 |
+
|
602 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
603 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
604 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
605 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
606 |
+
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
607 |
+
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
608 |
+
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
609 |
+
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
610 |
+
SUCH DAMAGES.
|
611 |
+
|
612 |
+
17. Interpretation of Sections 15 and 16.
|
613 |
+
|
614 |
+
If the disclaimer of warranty and limitation of liability provided
|
615 |
+
above cannot be given local legal effect according to their terms,
|
616 |
+
reviewing courts shall apply local law that most closely approximates
|
617 |
+
an absolute waiver of all civil liability in connection with the
|
618 |
+
Program, unless a warranty or assumption of liability accompanies a
|
619 |
+
copy of the Program in return for a fee.
|
620 |
+
|
621 |
+
END OF TERMS AND CONDITIONS
|
622 |
+
|
623 |
+
How to Apply These Terms to Your New Programs
|
624 |
+
|
625 |
+
If you develop a new program, and you want it to be of the greatest
|
626 |
+
possible use to the public, the best way to achieve this is to make it
|
627 |
+
free software which everyone can redistribute and change under these terms.
|
628 |
+
|
629 |
+
To do so, attach the following notices to the program. It is safest
|
630 |
+
to attach them to the start of each source file to most effectively
|
631 |
+
state the exclusion of warranty; and each file should have at least
|
632 |
+
the "copyright" line and a pointer to where the full notice is found.
|
633 |
+
|
634 |
+
<one line to give the program's name and a brief idea of what it does.>
|
635 |
+
Copyright (C) <year> <name of author>
|
636 |
+
|
637 |
+
This program is free software: you can redistribute it and/or modify
|
638 |
+
it under the terms of the GNU General Public License as published by
|
639 |
+
the Free Software Foundation, either version 3 of the License, or
|
640 |
+
(at your option) any later version.
|
641 |
+
|
642 |
+
This program is distributed in the hope that it will be useful,
|
643 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
644 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
645 |
+
GNU General Public License for more details.
|
646 |
+
|
647 |
+
You should have received a copy of the GNU General Public License
|
648 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
649 |
+
|
650 |
+
Also add information on how to contact you by electronic and paper mail.
|
651 |
+
|
652 |
+
If the program does terminal interaction, make it output a short
|
653 |
+
notice like this when it starts in an interactive mode:
|
654 |
+
|
655 |
+
<program> Copyright (C) <year> <name of author>
|
656 |
+
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
657 |
+
This is free software, and you are welcome to redistribute it
|
658 |
+
under certain conditions; type `show c' for details.
|
659 |
+
|
660 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
661 |
+
parts of the General Public License. Of course, your program's commands
|
662 |
+
might be different; for a GUI interface, you would use an "about box".
|
663 |
+
|
664 |
+
You should also get your employer (if you work as a programmer) or school,
|
665 |
+
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
666 |
+
For more information on this, and how to apply and follow the GNU GPL, see
|
667 |
+
<http://www.gnu.org/licenses/>.
|
668 |
+
|
669 |
+
The GNU General Public License does not permit incorporating your program
|
670 |
+
into proprietary programs. If your program is a subroutine library, you
|
671 |
+
may consider it more useful to permit linking proprietary applications with
|
672 |
+
the library. If this is what you want to do, use the GNU Lesser General
|
673 |
+
Public License instead of this License. But first, please read
|
674 |
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
readme.txt
CHANGED
@@ -60,6 +60,17 @@ function myCustomStyle($content) {
|
|
60 |
return $content;
|
61 |
}`
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
= Can i make the modal-dialog fullscreen? =
|
64 |
Yes, i added a filter with some settings for the modal-dialog, so you can adjust the size:
|
65 |
`add_filter('crop_thumbnails_modal_window_settings','crop_thumbnails_modal_window_settings_override');
|
@@ -92,6 +103,14 @@ If you fork and planning to publish the forked plugin, please contact me.
|
|
92 |
5. Choose what image-sizes should be hidden (for what post-types), for better usability.
|
93 |
|
94 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
= 0.10.3 =
|
96 |
* small language adjustments
|
97 |
|
60 |
return $content;
|
61 |
}`
|
62 |
|
63 |
+
= I have two image-sizes that have nearly the same ratio. I want to make use of the feature "Crop all images with same ratio at once", but cause the ratios are slightly different they wont be selected together.
|
64 |
+
You can add the following filter in the functions.php of your theme to adjust the ratio of one or more specified image-sizes.
|
65 |
+
CAUTION: use only when the ratios are really close.
|
66 |
+
`add_filter( 'crop_thumbnails_editor_printratio', 'my_crop_thumbnails_editor_printratio', 10, 2);
|
67 |
+
function my_crop_thumbnails_editor_printratio( $printRatio, $imageSizeName) {
|
68 |
+
if($imageSizeName === 'strange-image-ratio') {
|
69 |
+
$printRatio = '4:3';//do override ratio
|
70 |
+
}
|
71 |
+
return $printRatio;
|
72 |
+
}`
|
73 |
+
|
74 |
= Can i make the modal-dialog fullscreen? =
|
75 |
Yes, i added a filter with some settings for the modal-dialog, so you can adjust the size:
|
76 |
`add_filter('crop_thumbnails_modal_window_settings','crop_thumbnails_modal_window_settings_override');
|
103 |
5. Choose what image-sizes should be hidden (for what post-types), for better usability.
|
104 |
|
105 |
== Changelog ==
|
106 |
+
= 0.10.4 =
|
107 |
+
* i18n of the button in the image-media-view changed
|
108 |
+
* add 'medium_large' size to (intern) default-sizes (fix notice)
|
109 |
+
* add action-hook 'crop_thumbnails_after_save_new_thumb' after save the new thumbnail
|
110 |
+
* add filter-hook 'crop_thumbnails_before_update_metadata' before update metadata
|
111 |
+
* add filter-hook 'crop_thumbnails_editor_jsonDataValues' in the editor, to adjust dataValues
|
112 |
+
* add filter-hook 'crop_thumbnails_editor_printratio' in the editor (see F.A.Q. for details of usage)
|
113 |
+
|
114 |
= 0.10.3 =
|
115 |
* small language adjustments
|
116 |
|