Version Description
- Translation: Thanks to mepmepmep who has translated Document Gallery into Swedish!
- Translation: Thanks to Marc Liotard who has translated Document Gallery into French!
- Note: If you would like to help translate Document Gallery into another language, get started here!
-
Note: This is an extremely minor release, but big changes are on the
way in version
2.2
! Stay tuned as it should be going live in the very near future. Look for a complete makeover of the admin options including lots of new ways to configure DG to best meet your needs!
Download this release
Release Info
Developer | dan.rossiter |
Plugin | Document Gallery |
Version | 2.1.1 |
Comparing to | |
See all releases |
Code changes from version 2.2.5 to 2.1.1
- README.txt +43 -106
- Thumbs.db +0 -0
- admin/class-admin.php +149 -712
- assets/css/admin.css +0 -288
- assets/js/admin.js +0 -93
- document-gallery.php +49 -100
- inc/class-document.php +21 -27
- inc/class-gallery.php +72 -149
- inc/class-image-editor-imagick.php +2 -2
- inc/class-logger.php +0 -228
- inc/class-setup.php +35 -126
- inc/class-thumber.php +54 -82
- languages/document-gallery-es_ES.mo +0 -0
- languages/document-gallery-es_ES.po +2 -2
- languages/document-gallery-fr_FR.mo +0 -0
- languages/document-gallery-fr_FR.po +268 -461
- languages/document-gallery-ru_RU.mo +0 -0
- languages/document-gallery-ru_RU.po +58 -222
- languages/document-gallery-sv_SE.mo +0 -0
- languages/document-gallery-sv_SE.po +81 -262
- languages/document-gallery-uk_UA.mo +0 -0
- languages/document-gallery-uk_UA.po +58 -222
- languages/document-gallery.pot +53 -224
- log/.htaccess +0 -4
README.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Document Gallery ===
|
2 |
-
Contributors: dan.rossiter
|
3 |
Tags: attachments, thumbnail, documents, gallery, MS office, pdf
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=EE5LWRLG933EN&lc=US&item_name=Document%20Gallery%20Plugin&item_number=document%2dgallery¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 4.0
|
7 |
-
Stable tag: 2.
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -26,11 +26,11 @@ Read more in the **Installation** tab!
|
|
26 |
|
27 |
Document Gallery has to-date been translated into **5** languages, listed below.
|
28 |
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
|
35 |
= Developers =
|
36 |
|
@@ -205,62 +205,42 @@ For those unfamiliar with content filters, [here is some
|
|
205 |
documentation](http://codex.wordpress.org/Plugin_API/Filter_Reference) that you
|
206 |
should read before continuing.
|
207 |
|
208 |
-
**Filter
|
209 |
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
of
|
215 |
-
These filtered templates are used when dynamically generating output for each
|
216 |
-
gallery.
|
217 |
|
218 |
-
|
219 |
-
|
220 |
-
|
|
|
|
|
221 |
|
222 |
-
|
223 |
-
|
224 |
-
|
|
|
225 |
|
226 |
-
|
227 |
-
|
228 |
-
content prior to or following your document galleries. The filter
|
229 |
-
exposes 1 special tag which is replaced during gallery generation
|
230 |
-
with data specific to that gallery. The tag is described below:
|
231 |
|
232 |
-
|
233 |
-
|
234 |
-
everything after this string will be rendered following the gallery.
|
235 |
|
|
|
|
|
236 |
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
which are replaced during gallery generation with row-specific data.
|
241 |
-
These tags are as follows:
|
242 |
-
|
243 |
-
* **%class%**: The class attribute value for this row.
|
244 |
-
* **%icons%**: The icon data for this row.
|
245 |
-
|
246 |
-
|
247 |
-
If you wish to modify the HTML that wraps individual icons, the
|
248 |
-
`dg_icon_template` filter is what you will use. The filter is passed
|
249 |
-
two arguments which may be used to gain additional information about
|
250 |
-
the document that will be used in generating this icon. The first
|
251 |
-
argument is a bool value which indicates whether descriptions will
|
252 |
-
be used along with the icon and the second value is an integer WordPress
|
253 |
-
attachment ID which may be used to lookup any relevant information
|
254 |
-
you need specific to that document. The filter exposes 5 special tags
|
255 |
-
which are replaced during gallery generation with document-specific data.
|
256 |
-
These tags are as follows:
|
257 |
-
|
258 |
-
* **%link%**: The URL that will be loaded when the user clicks the icon.
|
259 |
-
* **%img%**: The URL pointing the the image that will be displayed.
|
260 |
-
* **%title%**: The human-readable title of the attachment.
|
261 |
-
* **%title_attribute%**: The escaped title (above), safe for using HTML tag attributes.
|
262 |
-
* **%description%**: The attachment description (only present when rendering descriptions).
|
263 |
|
|
|
|
|
|
|
|
|
264 |
|
265 |
**Filter Thumbnail Generation Methods**
|
266 |
|
@@ -389,57 +369,14 @@ Note that the display inherits styling from your active theme.
|
|
389 |
|
390 |
= Features For The Future =
|
391 |
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
*
|
398 |
-
|
399 |
-
|
400 |
-
for updating the French translation to include new phrases throughout the plugin!
|
401 |
-
|
402 |
-
= 2.2.4 =
|
403 |
-
* **Translation:**: Thanks to [mepmepmep](http://wordpress.org/support/profile/mepmepmep)
|
404 |
-
who has just updated the Document Gallery Swedish translation!
|
405 |
-
|
406 |
-
= 2.2.3 =
|
407 |
-
* **Enhancement:** This will only be relevant to developers. `%descriptions%` tag
|
408 |
-
is now available in the `dg_icon_template` filter.
|
409 |
-
|
410 |
-
= 2.2.2 =
|
411 |
-
* **Bug Fix:** Resolves minor issue in `2.2.1` that resulted in a warning being
|
412 |
-
logged while interacting with the new thumbnail management table in the
|
413 |
-
Document Gallery settings.
|
414 |
-
|
415 |
-
= 2.2.1 =
|
416 |
-
* **Bug Fix:** PHP installs older than 5.3 were crashing with version 2.2. This release
|
417 |
-
patches the issue.
|
418 |
-
|
419 |
-
= 2.2 =
|
420 |
-
* **Note:** This release is the first release where development has been done by
|
421 |
-
multiple people. I would like to give a massive thank you to
|
422 |
-
[demur](http://wordpress.org/support/profile/demur) who has been an equal
|
423 |
-
partner throughout the development of this version. Couldn't have done it without you!
|
424 |
-
* **Note:** With multiple developing this project, it made sense to setup
|
425 |
-
a formal method to track issues and possible future enhancements. With this in mind
|
426 |
-
we've begun to maintain an [issue tracker](https://github.com/thenadz/document-gallery/issues).
|
427 |
-
Feel free to read through possible future features and even suggest new features
|
428 |
-
you would like to see!
|
429 |
-
* **Enhancement:** You can now view which thumbnails have been generated and manually
|
430 |
-
delete individual thumbnails from the Document Gallery settings page, located at
|
431 |
-
Dashboard -> Settings -> Document Gallery.
|
432 |
-
* **Enhancement:* The logging for Document Gallery is now **much** more advanced.
|
433 |
-
Logging can be configured and viewed directly from the Document Gallery settings
|
434 |
-
page.
|
435 |
-
* **Enhancement:** Max width and height of generated thumbnails is now configurable.
|
436 |
-
* **Enhancement:** We had a couple of reports of the Document Gallery options
|
437 |
-
being corrupted in some installs, so we added functionality to force validation
|
438 |
-
of option structure on save. This will not be of much use to most users, but
|
439 |
-
will help us track down some of the more difficult to reproduce bugs.
|
440 |
-
* **Enhancement:** For developers. New filters have been added to support modifying all
|
441 |
-
aspects of HTML generated by the plugin. Look at the Installation tab for documentation
|
442 |
-
on these new filters.
|
443 |
|
444 |
= 2.1.1 =
|
445 |
* **Translation:** Thanks to [mepmepmep](http://wordpress.org/support/profile/mepmepmep)
|
1 |
=== Document Gallery ===
|
2 |
+
Contributors: dan.rossiter
|
3 |
Tags: attachments, thumbnail, documents, gallery, MS office, pdf
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=EE5LWRLG933EN&lc=US&item_name=Document%20Gallery%20Plugin&item_number=document%2dgallery¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 4.0
|
7 |
+
Stable tag: 2.1.1
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
26 |
|
27 |
Document Gallery has to-date been translated into **5** languages, listed below.
|
28 |
|
29 |
+
1. **French** — *Thanks, Marc Liotard!*
|
30 |
+
1. **Russian** — *Thanks, [demur](http://wordpress.org/support/profile/demur)!*
|
31 |
+
1. **Spanish** — *Thanks, Andrew Kurtis and [WebHostingHub](http://www.webhostinghub.com/)!*
|
32 |
+
1. **Swedish** — *Thanks, [mepmepmep](http://wordpress.org/support/profile/mepmepmep)!*
|
33 |
+
1. **Ukrainian** — *Thanks, [demur](http://wordpress.org/support/profile/demur)!*
|
34 |
|
35 |
= Developers =
|
36 |
|
205 |
documentation](http://codex.wordpress.org/Plugin_API/Filter_Reference) that you
|
206 |
should read before continuing.
|
207 |
|
208 |
+
**Filter .document-icon Content**
|
209 |
|
210 |
+
Document Gallery provides a filter allowing developers to customize
|
211 |
+
the HTML returned. Specifically, the `div.document-icon` content, including
|
212 |
+
the div itself, the URL to the attachment, the attachment icon, and the
|
213 |
+
attachment title. Hooking into the `dg_doc_icon` filter will allow you to
|
214 |
+
modify any of this content before it reaches your users.
|
|
|
|
|
215 |
|
216 |
+
Any function using this filter will receive two parameters, the content to be
|
217 |
+
filtered and the ID number of the file represented by the icon in question.
|
218 |
+
If you are implementing something to override the plugin default functionality,
|
219 |
+
it may be useful to be able to query various attributes of the attachment with
|
220 |
+
this value.
|
221 |
|
222 |
+
One example use for this filter, which I have personally used in a project I
|
223 |
+
am working on, will add a query parameter to the end of each attachment URL.
|
224 |
+
This parameter, `rid`, specifies the referring page and allows the page
|
225 |
+
receiving the URL to dynamically detect which page ID the link came from.
|
226 |
|
227 |
+
`function dg_doc_icon( $icon, $id ){
|
228 |
+
$ptn = '/(.* href=")([^"]+)(".*)/s';
|
|
|
|
|
|
|
229 |
|
230 |
+
if( !preg_match( $ptn, $icon, $matches ) || count( $matches ) !== 4 )
|
231 |
+
return $icon;
|
|
|
232 |
|
233 |
+
if( strpos( $matches[2], '?' ) !== false )
|
234 |
+
return "{$matches[1]}{$matches[2]}&rid=".get_the_ID().$matches[3];
|
235 |
|
236 |
+
return "{$matches[1]}{$matches[2]}?rid=".get_the_ID().$matches[3];
|
237 |
+
}
|
238 |
+
add_filter( 'dg_doc_icon', 'dg_doc_icon', null, 2 );`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
|
240 |
+
Obviously this is just one very specific example, but anything that requires
|
241 |
+
modifying the image tag, the anchor tag, or the title can be handled with this
|
242 |
+
filter. Note that this function does not use the $id value it receives, which
|
243 |
+
is perfectly alright.
|
244 |
|
245 |
**Filter Thumbnail Generation Methods**
|
246 |
|
369 |
|
370 |
= Features For The Future =
|
371 |
|
372 |
+
* Full integration with the new [Wordpress 3.5 Media
|
373 |
+
Manager](http://codex.wordpress.org/Version_3.5#Highlights).
|
374 |
+
* Option to open music or video files directly from your gallery.
|
375 |
+
* Option to open documents directly from your gallery (à la [Google Drive
|
376 |
+
Viewer](https://drive.google.com/viewer)).
|
377 |
+
* Whatever else **you** would like (post on the [support
|
378 |
+
forum](http://wordpress.org/support/plugin/document-gallery) if you have
|
379 |
+
ideas)!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
380 |
|
381 |
= 2.1.1 =
|
382 |
* **Translation:** Thanks to [mepmepmep](http://wordpress.org/support/profile/mepmepmep)
|
Thumbs.db
ADDED
Binary file
|
admin/class-admin.php
CHANGED
@@ -1,70 +1,29 @@
|
|
1 |
<?php
|
2 |
defined('WPINC') OR exit;
|
3 |
|
4 |
-
DG_Admin::init();
|
5 |
-
|
6 |
class DG_Admin {
|
7 |
-
|
8 |
-
* @var string The hook for the Document Gallery settings page.
|
9 |
-
*/
|
10 |
-
private static $hook;
|
11 |
-
|
12 |
-
/**
|
13 |
-
* @var string The current tab being rendered.
|
14 |
-
*/
|
15 |
-
private static $current;
|
16 |
-
|
17 |
-
/**
|
18 |
-
* @var multitype:string Associative array containing all tab names, keyed by tab slug.
|
19 |
-
*/
|
20 |
-
private static $tabs;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Initializes static values for this class.
|
24 |
-
*/
|
25 |
-
public static function init() {
|
26 |
-
if (empty(self::$tabs)) {
|
27 |
-
self::$tabs = array(
|
28 |
-
'General' => __('General', 'document-gallery'),
|
29 |
-
'Thumbnail' => __('Thumbnail Management', 'document-gallery'),
|
30 |
-
'Logging' => __('Logging', 'document-gallery'),
|
31 |
-
'Advanced' => __('Advanced', 'document-gallery'));
|
32 |
-
}
|
33 |
-
}
|
34 |
-
|
35 |
/**
|
36 |
* Renders Document Gallery options page.
|
37 |
*/
|
38 |
public static function renderOptions() { ?>
|
39 |
<div class="wrap">
|
40 |
-
|
41 |
-
|
42 |
-
<h2 class="nav-tab-wrapper">
|
43 |
-
<?php foreach (self::$tabs as $tab => $name) {
|
44 |
-
$class = ($tab == self::$current) ? ' nav-tab-active' : '';
|
45 |
-
echo '<a class="nav-tab '.$tab.'-tab'.$class.'" href="?page=' . DG_OPTION_NAME . '&tab='.$tab.'">'.$name.'</a>';
|
46 |
-
} ?>
|
47 |
-
</h2>
|
48 |
|
49 |
-
|
50 |
-
|
51 |
-
<?php
|
52 |
-
|
53 |
-
do_settings_sections(DG_OPTION_NAME);
|
54 |
-
if (self::$current != 'Thumbnail' && self::$current != 'Logging') {
|
55 |
-
submit_button();
|
56 |
-
}
|
57 |
-
?>
|
58 |
</form>
|
59 |
|
60 |
</div>
|
61 |
-
<?php }
|
62 |
|
63 |
/**
|
64 |
* Adds settings link to main plugin view.
|
65 |
*/
|
66 |
public static function addSettingsLink($links) {
|
67 |
-
$settings = '<a href="options-general.php?page=
|
68 |
__('Settings', 'document-gallery') . '</a>';
|
69 |
array_unshift($links, $settings);
|
70 |
return $links;
|
@@ -74,68 +33,47 @@ class DG_Admin {
|
|
74 |
* Adds Document Gallery settings page to admin navigation.
|
75 |
*/
|
76 |
public static function addAdminPage() {
|
77 |
-
|
78 |
__('Document Gallery Settings', 'document-gallery'),
|
79 |
__('Document Gallery', 'document-gallery'),
|
80 |
-
'manage_options',
|
81 |
-
add_action('admin_enqueue_scripts', array(__CLASS__, 'enqueueScriptsAndStyles'));
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
* Enqueues styles and scripts for the admin settings page.
|
86 |
-
*/
|
87 |
-
public static function enqueueScriptsAndStyles($hook) {
|
88 |
-
if ($hook !== DG_Admin::$hook) return;
|
89 |
-
|
90 |
-
wp_enqueue_style('document-gallery-admin', DG_URL . 'assets/css/admin.css', null, DG_VERSION);
|
91 |
-
wp_enqueue_script('document-gallery-admin', DG_URL . 'assets/js/admin.js', array('jquery'), DG_VERSION, true);
|
92 |
}
|
93 |
|
94 |
/**
|
95 |
* Registers settings for the Document Gallery options page.
|
96 |
*/
|
97 |
public static function registerSettings() {
|
98 |
-
if (empty($_REQUEST['tab']) || !array_key_exists($_REQUEST['tab'], self::$tabs)) {
|
99 |
-
reset(self::$tabs);
|
100 |
-
self::$current = key(self::$tabs);
|
101 |
-
} else {
|
102 |
-
self::$current = $_REQUEST['tab'];
|
103 |
-
}
|
104 |
-
|
105 |
-
register_setting(DG_OPTION_NAME, DG_OPTION_NAME, array(__CLASS__, 'validateSettings'));
|
106 |
-
|
107 |
-
$funct = 'register' . self::$current . 'Settings';
|
108 |
-
DG_Admin::$funct();
|
109 |
-
}
|
110 |
-
|
111 |
-
/**
|
112 |
-
* Registers settings for the general tab.
|
113 |
-
*/
|
114 |
-
private static function registerGeneralSettings() {
|
115 |
global $dg_options;
|
116 |
|
117 |
include_once DG_PATH . 'inc/class-gallery.php';
|
118 |
include_once DG_PATH . 'inc/class-thumber.php';
|
119 |
|
120 |
-
$defaults = $dg_options['gallery'];
|
121 |
-
$
|
|
|
|
|
|
|
122 |
|
123 |
add_settings_section(
|
124 |
'gallery_defaults', __('Default Settings', 'document-gallery'),
|
125 |
-
array(__CLASS__, 'renderDefaultSettingsSection'),
|
126 |
|
127 |
add_settings_section(
|
128 |
-
'
|
129 |
-
array(__CLASS__, 'renderThumberSection'),
|
130 |
|
131 |
add_settings_section(
|
132 |
'css', __('Custom CSS', 'document-gallery'),
|
133 |
-
array(__CLASS__, 'renderCssSection'),
|
|
|
|
|
|
|
|
|
134 |
|
135 |
add_settings_field(
|
136 |
'gallery_defaults_attachment_pg', 'attachment_pg',
|
137 |
array(__CLASS__, 'renderCheckboxField'),
|
138 |
-
|
139 |
array (
|
140 |
'label_for' => 'label_gallery_defaults_attachment_pg',
|
141 |
'name' => 'gallery_defaults][attachment_pg',
|
@@ -147,7 +85,7 @@ class DG_Admin {
|
|
147 |
add_settings_field(
|
148 |
'gallery_defaults_descriptions', 'descriptions',
|
149 |
array(__CLASS__, 'renderCheckboxField'),
|
150 |
-
|
151 |
array (
|
152 |
'label_for' => 'label_gallery_defaults_descriptions',
|
153 |
'name' => 'gallery_defaults][descriptions',
|
@@ -159,7 +97,7 @@ class DG_Admin {
|
|
159 |
add_settings_field(
|
160 |
'gallery_defaults_fancy', 'fancy',
|
161 |
array(__CLASS__, 'renderCheckboxField'),
|
162 |
-
|
163 |
array (
|
164 |
'label_for' => 'label_gallery_defaults_fancy',
|
165 |
'name' => 'gallery_defaults][fancy',
|
@@ -171,7 +109,7 @@ class DG_Admin {
|
|
171 |
add_settings_field(
|
172 |
'gallery_defaults_images', 'images',
|
173 |
array(__CLASS__, 'renderCheckboxField'),
|
174 |
-
|
175 |
array (
|
176 |
'label_for' => 'label_gallery_defaults_images',
|
177 |
'name' => 'gallery_defaults][images',
|
@@ -183,7 +121,7 @@ class DG_Admin {
|
|
183 |
add_settings_field(
|
184 |
'gallery_defaults_localpost', 'localpost',
|
185 |
array(__CLASS__, 'renderCheckboxField'),
|
186 |
-
|
187 |
array (
|
188 |
'label_for' => 'label_gallery_defaults_localpost',
|
189 |
'name' => 'gallery_defaults][localpost',
|
@@ -195,7 +133,7 @@ class DG_Admin {
|
|
195 |
add_settings_field(
|
196 |
'gallery_defaults_order', 'order',
|
197 |
array(__CLASS__, 'renderSelectField'),
|
198 |
-
|
199 |
array (
|
200 |
'label_for' => 'label_gallery_defaults_order',
|
201 |
'name' => 'gallery_defaults][order',
|
@@ -208,7 +146,7 @@ class DG_Admin {
|
|
208 |
add_settings_field(
|
209 |
'gallery_defaults_orderby', 'orderby',
|
210 |
array(__CLASS__, 'renderSelectField'),
|
211 |
-
|
212 |
array (
|
213 |
'label_for' => 'label_gallery_defaults_orderby',
|
214 |
'name' => 'gallery_defaults][orderby',
|
@@ -221,7 +159,7 @@ class DG_Admin {
|
|
221 |
add_settings_field(
|
222 |
'gallery_defaults_relation', 'relation',
|
223 |
array(__CLASS__, 'renderSelectField'),
|
224 |
-
|
225 |
array (
|
226 |
'label_for' => 'label_gallery_defaults_relation',
|
227 |
'name' => 'gallery_defaults][relation',
|
@@ -230,27 +168,27 @@ class DG_Admin {
|
|
230 |
'option_name' => DG_OPTION_NAME,
|
231 |
'description' => __('Whether matched documents must have all taxa_names (AND) or at least one (OR)', 'document-gallery')
|
232 |
));
|
233 |
-
|
234 |
add_settings_field(
|
235 |
-
'
|
236 |
array(__CLASS__, 'renderCheckboxField'),
|
237 |
-
|
238 |
array (
|
239 |
-
'label_for' => '
|
240 |
-
'name' => '
|
241 |
-
'value' => esc_attr($
|
242 |
'option_name' => DG_OPTION_NAME,
|
243 |
'description' => esc_html__('Locally generate thumbnails for audio & video files.', 'document-gallery')
|
244 |
));
|
245 |
|
246 |
add_settings_field(
|
247 |
-
'
|
248 |
array(__CLASS__, 'renderCheckboxField'),
|
249 |
-
|
250 |
array (
|
251 |
-
'label_for' => '
|
252 |
-
'name' => '
|
253 |
-
'value' => esc_attr($
|
254 |
'option_name' => DG_OPTION_NAME,
|
255 |
'description' => DG_Thumber::isGhostscriptAvailable()
|
256 |
? __('Use <a href="http://www.ghostscript.com/" target="_blank">Ghostscript</a> for faster local PDF processing (compared to Imagick).', 'document-gallery')
|
@@ -259,13 +197,13 @@ class DG_Admin {
|
|
259 |
));
|
260 |
|
261 |
add_settings_field(
|
262 |
-
'
|
263 |
array(__CLASS__, 'renderCheckboxField'),
|
264 |
-
|
265 |
array (
|
266 |
-
'label_for' => '
|
267 |
-
'name' => '
|
268 |
-
'value' => esc_attr($
|
269 |
'option_name' => DG_OPTION_NAME,
|
270 |
'description' => DG_Thumber::isImagickAvailable()
|
271 |
? __('Use <a href="http://www.php.net/manual/en/book.imagick.php" target="_blank">Imagick</a> to handle lots of filetypes locally.', 'document-gallery')
|
@@ -274,13 +212,13 @@ class DG_Admin {
|
|
274 |
));
|
275 |
|
276 |
add_settings_field(
|
277 |
-
'
|
278 |
array(__CLASS__, 'renderCheckboxField'),
|
279 |
-
|
280 |
array (
|
281 |
-
'label_for' => '
|
282 |
-
'name' => '
|
283 |
-
'value' => esc_attr($
|
284 |
'option_name' => DG_OPTION_NAME,
|
285 |
'description' => DG_Thumber::isGoogleDriveAvailable()
|
286 |
? __('Use <a href="https://drive.google.com/viewer" target="_blank">Google Drive Viewer</a> to generate thumbnails for MS Office files and many other file types remotely.', 'document-gallery')
|
@@ -289,302 +227,18 @@ class DG_Admin {
|
|
289 |
));
|
290 |
|
291 |
add_settings_field(
|
292 |
-
|
293 |
-
array(__CLASS__, 'renderMultiTextField'),
|
294 |
-
DG_OPTION_NAME, 'thumbnail_generation',
|
295 |
-
array (
|
296 |
-
array (
|
297 |
-
'label_for' => 'label_advanced_width',
|
298 |
-
'name' => 'thumbnail_generation][width',
|
299 |
-
'value' => esc_attr($dg_options['thumber']['width']),
|
300 |
-
'type' => 'number" min="1" step="1',
|
301 |
-
'option_name' => DG_OPTION_NAME,
|
302 |
-
'description' => ' x '),
|
303 |
-
array (
|
304 |
-
'label_for' => 'label_advanced_height',
|
305 |
-
'name' => 'thumbnail_generation][height',
|
306 |
-
'value' => esc_attr($dg_options['thumber']['height']),
|
307 |
-
'type' => 'number" min="1" step="1',
|
308 |
-
'option_name' => DG_OPTION_NAME,
|
309 |
-
'description' => __('The max width and height (in pixels) that thumbnails will be generated.', 'document-gallery'))
|
310 |
-
));
|
311 |
-
}
|
312 |
-
|
313 |
-
/**
|
314 |
-
* Registers settings for the thumbnail management tab.
|
315 |
-
*/
|
316 |
-
private static function registerThumbnailSettings() {
|
317 |
-
add_settings_section(
|
318 |
-
'thumbnail_table', '',
|
319 |
-
array(__CLASS__, 'renderThumbnailSection'), DG_OPTION_NAME);
|
320 |
-
}
|
321 |
-
|
322 |
-
/**
|
323 |
-
* Registers settings for the logging tab.
|
324 |
-
*/
|
325 |
-
private static function registerLoggingSettings() {
|
326 |
-
add_settings_section(
|
327 |
-
'logging_table', '',
|
328 |
-
array(__CLASS__, 'renderLoggingSection'), DG_OPTION_NAME);
|
329 |
-
}
|
330 |
-
|
331 |
-
/**
|
332 |
-
* Registers settings for the advanced tab.
|
333 |
-
*/
|
334 |
-
private static function registerAdvancedSettings() {
|
335 |
-
global $dg_options;
|
336 |
-
|
337 |
-
add_settings_section(
|
338 |
-
'advanced', __('Advanced Thumbnail Generation', 'document-gallery'),
|
339 |
-
array(__CLASS__, 'renderAdvancedSection'), DG_OPTION_NAME);
|
340 |
-
|
341 |
-
add_settings_field(
|
342 |
-
'advanced_logging', 'Logging',
|
343 |
-
array(__CLASS__, 'renderCheckboxField'),
|
344 |
-
DG_OPTION_NAME, 'advanced',
|
345 |
-
array (
|
346 |
-
'label_for' => 'label_advanced_logging',
|
347 |
-
'name' => 'logging',
|
348 |
-
'value' => esc_attr($dg_options['logging']),
|
349 |
-
'option_name' => DG_OPTION_NAME,
|
350 |
-
'description' => __('Whether to log debug and error information related to Document Gallery.', 'document-gallery')
|
351 |
-
));
|
352 |
-
|
353 |
-
add_settings_field(
|
354 |
-
'advanced_validation', 'Option Validation',
|
355 |
-
array(__CLASS__, 'renderCheckboxField'),
|
356 |
-
DG_OPTION_NAME, 'advanced',
|
357 |
-
array (
|
358 |
-
'label_for' => 'label_advanced_validation',
|
359 |
-
'name' => 'validation',
|
360 |
-
'value' => esc_attr($dg_options['validation']),
|
361 |
-
'option_name' => DG_OPTION_NAME,
|
362 |
-
'description' => __('Whether option structure should be validated before save. This is not generally necessary.', 'document-gallery')
|
363 |
-
));
|
364 |
-
|
365 |
-
add_settings_field(
|
366 |
-
'advanced_thumb_timeout', 'Thumbnail Generation Timeout',
|
367 |
-
array(__CLASS__, 'renderTextField'),
|
368 |
-
DG_OPTION_NAME, 'advanced',
|
369 |
-
array (
|
370 |
-
'label_for' => 'label_advanced_thumb_timeout',
|
371 |
-
'name' => 'timeout',
|
372 |
-
'value' => esc_attr($dg_options['thumber']['timeout']),
|
373 |
-
'type' => 'number" min="1" step="1',
|
374 |
-
'option_name' => DG_OPTION_NAME,
|
375 |
-
'description' => __('Max number of seconds to wait for thumbnail generation before defaulting to filetype icons.', 'document-gallery') .
|
376 |
-
' <em>' . __('Note that generation will continue where timeout happened next time the gallery is loaded.', 'document-gallery') . '</em>'));
|
377 |
-
|
378 |
-
add_settings_field(
|
379 |
-
'advanced_gs', 'Ghostscript Absolute Path',
|
380 |
array(__CLASS__, 'renderTextField'),
|
381 |
-
|
382 |
array (
|
383 |
-
'label_for' => '
|
384 |
-
'name' => 'gs',
|
385 |
-
'value' => esc_attr($
|
386 |
'option_name' => DG_OPTION_NAME,
|
387 |
-
'description' => $
|
388 |
? __('Successfully auto-detected the location of Ghostscript.', 'document-gallery')
|
389 |
: __('Failed to auto-detect the location of Ghostscript.', 'document-gallery')
|
390 |
));
|
391 |
-
|
392 |
-
add_settings_section(
|
393 |
-
'advanced_options_dump', __('Options Array Dump', 'document-gallery'),
|
394 |
-
array(__CLASS__, 'renderOptionsDumpSection'), DG_OPTION_NAME);
|
395 |
-
}
|
396 |
-
|
397 |
-
/**
|
398 |
-
* Validates submitted options, sanitizing any invalid options.
|
399 |
-
* @param array $values User-submitted new options.
|
400 |
-
* @return array Sanitized new options.
|
401 |
-
*/
|
402 |
-
public static function validateSettings($values) {
|
403 |
-
if (empty($values['tab']) || !array_key_exists($values['tab'], self::$tabs)) {
|
404 |
-
reset(self::$tabs);
|
405 |
-
$values['tab'] = key(self::$tabs);
|
406 |
-
}
|
407 |
-
$funct = 'validate'.$values['tab'].'Settings';
|
408 |
-
unset($values['tab']);
|
409 |
-
return DG_Admin::$funct($values);
|
410 |
-
}
|
411 |
-
|
412 |
-
/**
|
413 |
-
* Validates general settings, sanitizing any invalid options.
|
414 |
-
* @param array $values User-submitted new options.
|
415 |
-
* @return array Sanitized new options.
|
416 |
-
*/
|
417 |
-
private static function validateGeneralSettings($values) {
|
418 |
-
global $dg_options;
|
419 |
-
$ret = $dg_options;
|
420 |
-
|
421 |
-
include_once DG_PATH . 'inc/class-gallery.php';
|
422 |
-
|
423 |
-
$thumbs_cleared = false;
|
424 |
-
|
425 |
-
// handle gallery shortcode defaults
|
426 |
-
$errs = array();
|
427 |
-
$ret['gallery'] = DG_Gallery::sanitizeDefaults($values['gallery_defaults'], $errs);
|
428 |
-
|
429 |
-
foreach ($errs as $k => $v) {
|
430 |
-
add_settings_error(DG_OPTION_NAME, str_replace('_', '-', $k), $v);
|
431 |
-
}
|
432 |
-
|
433 |
-
// handle setting width
|
434 |
-
if (isset($values['thumbnail_generation']['width'])) {
|
435 |
-
$width = (int)$values['thumbnail_generation']['width'];
|
436 |
-
if ($width > 0) {
|
437 |
-
$ret['thumber']['width'] = $width;
|
438 |
-
} else {
|
439 |
-
add_settings_error(DG_OPTION_NAME, 'thumber-width',
|
440 |
-
__('Invalid width given: ', 'document-gallery') . $values['thumbnail_generation']['width']);
|
441 |
-
}
|
442 |
-
|
443 |
-
unset($values['thumbnail_generation']['width']);
|
444 |
-
}
|
445 |
-
|
446 |
-
// handle setting height
|
447 |
-
if (isset($values['thumbnail_generation']['height'])) {
|
448 |
-
$height = (int)$values['thumbnail_generation']['height'];
|
449 |
-
if ($height > 0) {
|
450 |
-
$ret['thumber']['height'] = $height;
|
451 |
-
} else {
|
452 |
-
add_settings_error(DG_OPTION_NAME, 'thumber-height',
|
453 |
-
__('Invalid height given: ', 'document-gallery') . $values['thumbnail_generation']['height']);
|
454 |
-
}
|
455 |
-
|
456 |
-
unset($values['thumbnail_generation']['width']);
|
457 |
-
}
|
458 |
-
|
459 |
-
// delete thumb cache to force regeneration if max dimensions changed
|
460 |
-
if ($ret['thumber']['width'] !== $dg_options['thumber']['width'] ||
|
461 |
-
$ret['thumber']['height'] !== $dg_options['thumber']['height']) {
|
462 |
-
foreach ($ret['thumber']['thumbs'] as $v) {
|
463 |
-
if (isset($v['thumber'])) {
|
464 |
-
@unlink($v['thumb_path']);
|
465 |
-
}
|
466 |
-
}
|
467 |
-
|
468 |
-
$ret['thumber']['thumbs'] = array();
|
469 |
-
$thumbs_cleared = true;
|
470 |
-
}
|
471 |
-
|
472 |
-
// handle setting the active thumbers
|
473 |
-
foreach (array_keys($ret['thumber']['active']) as $k) {
|
474 |
-
$ret['thumber']['active'][$k] = isset($values['thumbnail_generation'][$k]);
|
475 |
-
}
|
476 |
-
|
477 |
-
// if new thumbers available, clear failed thumbnails for retry
|
478 |
-
if (!$thumbs_cleared) {
|
479 |
-
foreach ($dg_options['thumber']['active'] as $k => $v) {
|
480 |
-
if (!$v && $ret['thumber']['active'][$k]) {
|
481 |
-
foreach ($dg_options['thumber']['thumbs'] as $k => $v) {
|
482 |
-
if (empty($v['thumber'])) {
|
483 |
-
unset($ret['thumber']['thumbs'][$k]);
|
484 |
-
}
|
485 |
-
}
|
486 |
-
break;
|
487 |
-
}
|
488 |
-
}
|
489 |
-
}
|
490 |
-
|
491 |
-
// handle modified CSS
|
492 |
-
if (trim($ret['css']['text']) !== trim($values['css'])) {
|
493 |
-
$ret['css']['text'] = trim($values['css']);
|
494 |
-
$ret['css']['version']++;
|
495 |
-
$ret['css']['last-modified'] = gmdate('D, d M Y H:i:s');
|
496 |
-
$ret['css']['etag'] = md5($ret['css']['last-modified']);
|
497 |
-
|
498 |
-
if (empty($ret['css']['text'])) {
|
499 |
-
unset($ret['css']['minified']);
|
500 |
-
} else {
|
501 |
-
$ret['css']['minified'] = DocumentGallery::compileCustomCss($ret['css']['text']);
|
502 |
-
}
|
503 |
-
}
|
504 |
-
|
505 |
-
return $ret;
|
506 |
-
}
|
507 |
-
|
508 |
-
/**
|
509 |
-
* Validates thumbnail management settings, sanitizing any invalid options.
|
510 |
-
* @param array $values User-submitted new options.
|
511 |
-
* @return array Sanitized new options.
|
512 |
-
*/
|
513 |
-
private static function validateThumbnailSettings($values) {
|
514 |
-
global $dg_options;
|
515 |
-
$ret = $dg_options;
|
516 |
-
|
517 |
-
if (isset($values['ids'])) {
|
518 |
-
$deleted = array_values(array_intersect(array_keys($dg_options['thumber']['thumbs']), $values['ids']));
|
519 |
-
|
520 |
-
foreach ($deleted as $k) {
|
521 |
-
if (isset($ret['thumber']['thumbs'][$k]['thumber'])) {
|
522 |
-
@unlink($ret['thumber']['thumbs'][$k]['thumb_path']);
|
523 |
-
}
|
524 |
-
|
525 |
-
unset($ret['thumber']['thumbs'][$k]);
|
526 |
-
}
|
527 |
-
|
528 |
-
if (isset($values['ajax'])) {
|
529 |
-
echo '[' . implode(',', $deleted) . ']';
|
530 |
-
add_filter('wp_redirect', array(__CLASS__, '_exit'), 1, 0);
|
531 |
-
}
|
532 |
-
}
|
533 |
-
|
534 |
-
return $ret;
|
535 |
-
}
|
536 |
-
|
537 |
-
/**
|
538 |
-
* Validates logging settings, sanitizing any invalid options.
|
539 |
-
* @param array $values User-submitted new options.
|
540 |
-
* @return array Sanitized new options.
|
541 |
-
*/
|
542 |
-
private static function validateLoggingSettings($values) {
|
543 |
-
global $dg_options;
|
544 |
-
if (isset($values['clearLog'])) {
|
545 |
-
DG_Logger::clearLog();
|
546 |
-
}
|
547 |
-
return $dg_options;
|
548 |
-
}
|
549 |
-
|
550 |
-
/**
|
551 |
-
* Validates advanced settings, sanitizing any invalid options.
|
552 |
-
* @param array $values User-submitted new options.
|
553 |
-
* @return array Sanitized new options.
|
554 |
-
*/
|
555 |
-
private static function validateAdvancedSettings($values) {
|
556 |
-
global $dg_options;
|
557 |
-
$ret = $dg_options;
|
558 |
-
|
559 |
-
// handle setting the Ghostscript path
|
560 |
-
if (isset($values['gs']) &&
|
561 |
-
0 != strcmp($values['gs'], $ret['thumber']['gs'])) {
|
562 |
-
if (false === strpos($values['gs'], ';')) {
|
563 |
-
$ret['thumber']['gs'] = $values['gs'];
|
564 |
-
} else {
|
565 |
-
add_settings_error(DG_OPTION_NAME, 'thumber-gs',
|
566 |
-
__('Invalid Ghostscript path given: ', 'document-gallery') . $values['gs']);
|
567 |
-
}
|
568 |
-
}
|
569 |
-
|
570 |
-
// handle setting timeout
|
571 |
-
if (isset($values['timeout'])) {
|
572 |
-
$timeout = (int)$values['timeout'];
|
573 |
-
if ($timeout > 0) {
|
574 |
-
$ret['thumber']['timeout'] = $timeout;
|
575 |
-
} else {
|
576 |
-
add_settings_error(DG_OPTION_NAME, 'thumber-timeout',
|
577 |
-
__('Invalid timeout given: ', 'document-gallery') . $values['timeout']);
|
578 |
-
}
|
579 |
-
}
|
580 |
-
|
581 |
-
// validation checkbox
|
582 |
-
$ret['validation'] = isset($values['validation']);
|
583 |
-
|
584 |
-
// logging checkbox
|
585 |
-
$ret['logging'] = isset($values['logging']);
|
586 |
-
|
587 |
-
return $ret;
|
588 |
}
|
589 |
|
590 |
/**
|
@@ -605,316 +259,50 @@ class DG_Admin {
|
|
605 |
* Render the Default Settings section.
|
606 |
*/
|
607 |
public static function renderDefaultSettingsSection() { ?>
|
608 |
-
<p><?php _e('The following values will be used by default in the shortcode. You can still manually set each of these values in each individual shortcode.', 'document-gallery'); ?></p>
|
609 |
-
<?php }
|
610 |
|
611 |
/**
|
612 |
* Render the Thumber section.
|
613 |
*/
|
614 |
public static function renderThumberSection() { ?>
|
615 |
-
<p><?php _e('Select which tools to use when generating thumbnails.', 'document-gallery'); ?></p>
|
616 |
-
<?php }
|
617 |
|
618 |
-
/**
|
619 |
-
* Renders a text field for use when modifying the CSS to be printed in addition to the default CSS.
|
620 |
-
*/
|
621 |
public static function renderCssSection() {
|
622 |
global $dg_options; ?>
|
623 |
-
<p><?php printf(
|
624 |
__('Enter custom CSS styling for use with document galleries. To see which ids and classes you can style, take a look at <a href="%s" target="_blank">style.css</a>.'),
|
625 |
DG_URL . 'assets/css/style.css'); ?></p>
|
626 |
-
<table class="form-table">
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
</table>
|
635 |
-
<?php }
|
636 |
|
637 |
/**
|
638 |
* Render the Thumber Advanced section.
|
639 |
*/
|
640 |
-
public static function
|
641 |
include_once DG_PATH . 'inc/class-thumber.php';?>
|
642 |
-
<p><?php _e('Unless you <em>really</em> know what you\'re doing, you should not touch these values.', 'document-gallery'); ?></p>
|
643 |
-
<?php if (!DG_Thumber::isExecAvailable()) : ?>
|
644 |
-
<p>
|
645 |
-
|
646 |
-
</p>
|
647 |
-
<?php endif; ?>
|
648 |
-
<?php }
|
649 |
-
|
650 |
-
/**
|
651 |
-
* Renders a readonly textfield containing a dump of current DG options.
|
652 |
-
*/
|
653 |
-
public static function renderOptionsDumpSection() {
|
654 |
-
global $dg_options; ?>
|
655 |
-
<p><?php
|
656 |
-
_e('The following <em>readonly text</em> should be provided when <a href="http://wordpress.org/support/plugin/document-gallery" target="_blank">reporting a bug</a>:', 'documet-gallery');
|
657 |
-
?></p>
|
658 |
-
<table class="form-table">
|
659 |
-
<tbody>
|
660 |
-
<tr valign="top">
|
661 |
-
<td>
|
662 |
-
<textarea readonly="true" rows="10" cols="50" id="options-dump" class="large-text code"><?php var_dump($dg_options); ?></textarea>
|
663 |
-
</td>
|
664 |
-
</tr>
|
665 |
-
</tbody>
|
666 |
-
</table>
|
667 |
<?php }
|
668 |
|
669 |
-
/**
|
670 |
-
* Render the Thumbnail table.
|
671 |
-
*/
|
672 |
-
public static function renderThumbnailSection() {
|
673 |
-
include_once DG_PATH . 'inc/class-thumber.php';
|
674 |
-
$options = DG_Thumber::getOptions();
|
675 |
-
|
676 |
-
$URL_params = array('page' => DG_OPTION_NAME, 'tab' => 'Thumbnail');
|
677 |
-
$att_ids = array();
|
678 |
-
|
679 |
-
if (isset($_REQUEST['orderby']) && in_array(strtolower($_REQUEST['orderby']), array('title', 'date'))) {
|
680 |
-
$orderby = strtolower($_REQUEST['orderby']);
|
681 |
-
$URL_params['orderby'] = $orderby;
|
682 |
-
|
683 |
-
switch ($orderby)
|
684 |
-
{
|
685 |
-
case 'date':
|
686 |
-
foreach ($options['thumbs'] as $key => $node) {
|
687 |
-
$keyArray[$key] = $node['timestamp'];
|
688 |
-
$options['thumbs'][$key]['thumb_id'] = $att_ids[] = $key;
|
689 |
-
}
|
690 |
-
break;
|
691 |
-
|
692 |
-
case 'title':
|
693 |
-
foreach ($options['thumbs'] as $key => $node) {
|
694 |
-
$keyArray[$key] = basename($node['thumb_path']);
|
695 |
-
$options['thumbs'][$key]['thumb_id'] = $att_ids[] = $key;
|
696 |
-
}
|
697 |
-
break;
|
698 |
-
}
|
699 |
-
|
700 |
-
$order = strtolower($_REQUEST['order']);
|
701 |
-
if (!isset($_REQUEST['order']) || !in_array($order, array('asc', 'desc'))) {
|
702 |
-
$order = 'asc';
|
703 |
-
}
|
704 |
-
$URL_params['order'] = $order;
|
705 |
-
|
706 |
-
if ($order == 'asc') {
|
707 |
-
array_multisort($keyArray, SORT_ASC, $options['thumbs']);
|
708 |
-
} else {
|
709 |
-
array_multisort($keyArray, SORT_DESC, $options['thumbs']);
|
710 |
-
}
|
711 |
-
} else {
|
712 |
-
$orderby = '';
|
713 |
-
foreach ($options['thumbs'] as $key => $node) {
|
714 |
-
$options['thumbs'][$key]['thumb_id'] = $att_ids[] = $key;
|
715 |
-
}
|
716 |
-
}
|
717 |
-
|
718 |
-
static $limit_options = array(10, 25, 75);
|
719 |
-
if (!isset($_REQUEST['limit']) || !in_array(intval($_REQUEST['limit']), $limit_options)) {
|
720 |
-
$limit = $limit_options[0];
|
721 |
-
} else {
|
722 |
-
$limit = intval($_REQUEST['limit']);
|
723 |
-
}
|
724 |
-
|
725 |
-
$URL_params['limit'] = $limit;
|
726 |
-
$select_limit = '';
|
727 |
-
foreach ($limit_options as $l_o) {
|
728 |
-
$select_limit .= '<option value="'.$l_o.'"'.selected($limit, $l_o, false).'>'.$l_o.'</option>'.PHP_EOL;
|
729 |
-
}
|
730 |
-
$thumbs_number = count($options['thumbs']);
|
731 |
-
$lastsheet = ceil($thumbs_number/$limit);
|
732 |
-
$sheet = isset($_REQUEST['sheet']) ? intval($_REQUEST['sheet']) : 1;
|
733 |
-
if ($sheet <= 0 || $sheet > $lastsheet) {
|
734 |
-
$sheet = 1;
|
735 |
-
}
|
736 |
-
|
737 |
-
$offset = ($sheet - 1) * $limit;
|
738 |
-
|
739 |
-
$att_ids = array_slice($att_ids, $offset, $limit);
|
740 |
-
$atts = get_posts(
|
741 |
-
array(
|
742 |
-
'post_type' => 'attachment',
|
743 |
-
'post_status' => 'inherit',
|
744 |
-
'numberposts' => -1,
|
745 |
-
'post__in' => $att_ids,
|
746 |
-
'orderby' => 'post__in'
|
747 |
-
));
|
748 |
-
$titles = array();
|
749 |
-
foreach ($atts as $att) {
|
750 |
-
$path_parts = pathinfo($att->guid);
|
751 |
-
$titles[$att->ID] = $att->post_title.'.'.$path_parts['extension'];
|
752 |
-
}
|
753 |
-
unset($atts);
|
754 |
-
|
755 |
-
$thead = '<tr>'.
|
756 |
-
'<th scope="col" class="manage-column column-cb check-column">'.
|
757 |
-
'<label class="screen-reader-text" for="cb-select-all-%1$d">'.__('Select All', 'document-gallery').'</label>'.
|
758 |
-
'<input id="cb-select-all-%1$d" type="checkbox">'.
|
759 |
-
'</th>'.
|
760 |
-
'<th scope="col" class="manage-column column-icon">'.__('Thumbnail', 'document-gallery').'</th>'.
|
761 |
-
'<th scope="col" class="manage-column column-title '.(($orderby != 'title')?'sortable desc':'sorted '.$order).'"><a href="?'.http_build_query(array_merge($URL_params, array('orderby'=>'title','order'=>(($orderby != 'title')?'asc':(($order == 'asc')?'desc':'asc'))))).'"><span>'.__('File name', 'document-gallery').'</span><span class="sorting-indicator"></span></th>'.
|
762 |
-
'<th scope="col" class="manage-column column-date '.(($orderby != 'date')?'sortable asc':'sorted '.$order).'"><a href="?'.http_build_query(array_merge($URL_params, array('orderby'=>'date','order'=>(($orderby != 'date')?'desc':(($order == 'asc')?'desc':'asc'))))).'"><span>'.__('Date', 'document-gallery').'</span><span class="sorting-indicator"></span></th>'.
|
763 |
-
'</tr>';
|
764 |
-
|
765 |
-
$pagination = '<div class="alignleft bulkactions"><button class="button action deleteSelected">'.__('Delete Selected', 'document-gallery').'</button></div><div class="tablenav-pages">'.
|
766 |
-
'<span class="displaying-num">'.
|
767 |
-
$thumbs_number.' '._n('item', 'items', $thumbs_number).
|
768 |
-
'</span>'.($lastsheet>1?
|
769 |
-
'<span class="pagination-links">'.
|
770 |
-
'<a class="first-page'.( $sheet==1 ? ' disabled' : '').'" title="'.__('Go to the first page', 'document-gallery').'"'.( $sheet==1 ? '' : ' href="?'.http_build_query($URL_params).'"').'>«</a>'.
|
771 |
-
'<a class="prev-page'.( $sheet==1 ? ' disabled' : '').'" title="'.__('Go to the previous page', 'document-gallery').'"'.( $sheet==1 ? '' : ' href="?'.http_build_query(array_merge($URL_params, array('sheet'=>$sheet-1))).'"').'>‹</a>'.
|
772 |
-
'<span class="paging-input">'.
|
773 |
-
'<input class="current-page" title="'.__('Current page', 'document-gallery').'" type="text" name="paged" value="'.$sheet.'" size="'.strlen($sheet).'" maxlength="'.strlen($sheet).'"> '.__('of', 'document-gallery').' <span class="total-pages">'.$lastsheet.'</span></span>'.
|
774 |
-
'<a class="next-page'.( $sheet==$lastsheet ? ' disabled' : '').'" title="'.__('Go to the next page', 'document-gallery').'"'.( $sheet==$lastsheet ? '' : ' href="?'.http_build_query(array_merge($URL_params, array('sheet'=>$sheet+1))).'"').'>›</a>'.
|
775 |
-
'<a class="last-page'.( $sheet==$lastsheet ? ' disabled' : '').'" title="'.__('Go to the last page', 'document-gallery').'"'.( $sheet==$lastsheet ? '' : ' href="?'.http_build_query(array_merge($URL_params, array('sheet'=>$lastsheet))).'"').'>»</a>'.
|
776 |
-
'</span>':' <b>|</b> ').
|
777 |
-
'<span class="displaying-num"><select dir="rtl" class="limit_per_page">'.$select_limit.'</select> '.__('items per page', 'document-gallery').'</span>'.
|
778 |
-
'</div>'.
|
779 |
-
'<br class="clear" />';
|
780 |
-
|
781 |
-
// Avoiding json_encode to avoid compatibility issues on some systems
|
782 |
-
$json_like = '';
|
783 |
-
foreach ($URL_params as $k => $v) {
|
784 |
-
$json_like .= '"'.$k.'":"'.$v.'",';
|
785 |
-
}
|
786 |
-
?>
|
787 |
-
|
788 |
-
<script type="text/javascript">
|
789 |
-
var URL_params = <?php echo '{'.trim($json_like,', ').'}'; ?>;
|
790 |
-
</script>
|
791 |
-
<div class="thumbs-list-wrapper">
|
792 |
-
<div>
|
793 |
-
<div class="tablenav top"><?php echo $pagination; ?></div>
|
794 |
-
<table id="ThumbsTable" class="wp-list-table widefat fixed media"
|
795 |
-
cellpadding="0" cellspacing="0">
|
796 |
-
<thead>
|
797 |
-
<?php printf($thead, 1); ?>
|
798 |
-
</thead>
|
799 |
-
<tfoot>
|
800 |
-
<?php printf($thead, 2); ?>
|
801 |
-
</tfoot>
|
802 |
-
<tbody><?php
|
803 |
-
$i = 0;
|
804 |
-
foreach ($options['thumbs'] as $v) {
|
805 |
-
if ($i < $offset) { $i++; continue; }
|
806 |
-
if (++$i > $offset + $limit) { break; }
|
807 |
-
|
808 |
-
$icon = isset($v['thumb_url']) ? $v['thumb_url'] : DG_URL . 'assets/icons/missing.png';
|
809 |
-
$title = isset($titles[$v['thumb_id']]) ? $titles[$v['thumb_id']] : '';
|
810 |
-
$date = DocumentGallery::localDateTimeFromTimestamp($v['timestamp']);
|
811 |
-
|
812 |
-
echo '<tr><td scope="row" class="check-column"><input type="checkbox" class="cb-ids" name="' . DG_OPTION_NAME . '[ids][]" value="' .
|
813 |
-
$v['thumb_id'].'"></td><td class="column-icon media-icon"><img src="' .
|
814 |
-
$icon.'" />'.'</td><td class="title column-title">' .
|
815 |
-
($title ? '<strong><a href="' . home_url('/?attachment_id='.$v['thumb_id']).'" target="_blank" title="'.__('View', 'document-gallery').' \'' .
|
816 |
-
$title.'\' '.__('attachment page', 'document-gallery').'">'.$title.'</a></strong>' : __('Attachment not found', 'document-gallery')) .
|
817 |
-
'</td><td class="date column-date">'.$date.'</td></tr>'.PHP_EOL;
|
818 |
-
} ?>
|
819 |
-
</tbody>
|
820 |
-
</table>
|
821 |
-
<div class="tablenav bottom"><?php echo $pagination; ?></div>
|
822 |
-
</div>
|
823 |
-
</div>
|
824 |
-
<?php }
|
825 |
-
/**
|
826 |
-
* Render the Logging table.
|
827 |
-
*/
|
828 |
-
public static function renderLoggingSection() {
|
829 |
-
$log_list = DG_Logger::readLog();
|
830 |
-
if ($log_list) {
|
831 |
-
$levels = array_map(array(__CLASS__, 'getLogLabelSpan'), array_keys(DG_LogLevel::getLogLevels()));
|
832 |
-
|
833 |
-
$thead = '<tr>'.
|
834 |
-
'<th scope="col" class="manage-column column-date"><span>'.__('Date', 'document-gallery').'</span></th>'.
|
835 |
-
'<th scope="col" class="manage-column column-level"><span>'.__('Level', 'document-gallery').'</span></th>'.
|
836 |
-
'<th scope="col" class="manage-column column-message"><span>'.__('Message', 'document-gallery').'</span></th>'.
|
837 |
-
'</tr>';
|
838 |
-
|
839 |
-
?>
|
840 |
-
<div class="log-list-wrapper">
|
841 |
-
<div>
|
842 |
-
<div class="tablenav top">
|
843 |
-
<div class="alignleft bulkactions">
|
844 |
-
<button class="action expandAll">
|
845 |
-
<?php echo __('Expand All', 'document-gallery'); ?>
|
846 |
-
</button>
|
847 |
-
<button class="action collapseAll">
|
848 |
-
<?php echo __('Collapse All', 'document-gallery'); ?>
|
849 |
-
</button>
|
850 |
-
</div>
|
851 |
-
<div class="levelSelector">
|
852 |
-
<input type="checkbox" id="allLevels" name="lswitch" value="all" checked />
|
853 |
-
<label for="allLevels" class="allLevels">ALL</label>
|
854 |
-
<?php
|
855 |
-
foreach (array_keys(DG_LogLevel::getLogLevels()) as $k) { ?>
|
856 |
-
<?php
|
857 |
-
$lower = strtolower($k);
|
858 |
-
$upper = strtoupper($k);
|
859 |
-
?>
|
860 |
-
<input type="checkbox" id="<?php echo $lower; ?>Level" name="lswitch" value="<?php echo $lower; ?>" checked />
|
861 |
-
<label for="<?php echo $lower; ?>Level" class="<?php echo $lower; ?>Level"><?php echo $upper; ?></label>
|
862 |
-
<?php }
|
863 |
-
?>
|
864 |
-
</div>
|
865 |
-
</div>
|
866 |
-
<table id="LogTable" class="wp-list-table widefat fixed media" cellpadding="0" cellspacing="0">
|
867 |
-
<thead>
|
868 |
-
<?php echo $thead; ?>
|
869 |
-
</thead>
|
870 |
-
<tfoot>
|
871 |
-
<?php echo $thead; ?>
|
872 |
-
</tfoot>
|
873 |
-
<tbody><?php
|
874 |
-
$i = 0;
|
875 |
-
foreach ($log_list as $v) {
|
876 |
-
$date = DocumentGallery::localDateTimeFromTimestamp($v[0]);
|
877 |
-
$v[2] = preg_replace('/ (attachment #)(\d+) /', ' <a href="' . home_url() . '/?attachment_id=\2" target="_blank">\1<strong>\2</strong></a> ', $v[2]);
|
878 |
-
$v[2] = preg_replace('/^(\(\w+::\w+\)) /', '<strong>\1</strong> ', $v[2]);
|
879 |
-
$v[2] = preg_replace('/(\(?\w+::\w+\)?)/m', '<i>\1</i>', $v[2]);
|
880 |
-
|
881 |
-
echo '<tr><td class="date column-date" data-sort-value="'.$v[0].'"><span class="logLabel date">'.$date.'</span></td>' .
|
882 |
-
'<td class="column-level">'.$levels[$v[1]].'</td>' .
|
883 |
-
'<td class="column-entry">'.(empty($v[3]) ? '<pre>'.$v[2].'</pre>' : '<div class="expander" title="Click to Expand"><pre>'.$v[2].'</pre><div><span class="dashicons dashicons-arrow-down-alt2"></span></div></div><div class="spoiler-body"><pre>'.$v[3].'</pre></div>').'</td>' .
|
884 |
-
'</tr>'.PHP_EOL;
|
885 |
-
} ?>
|
886 |
-
</tbody>
|
887 |
-
</table>
|
888 |
-
<div class="tablenav bottom">
|
889 |
-
<div class="alignright bulkactions">
|
890 |
-
<button class="button action clearLog" name = '<?php echo DG_OPTION_NAME; ?>[clearLog]' value = 'true'>
|
891 |
-
<?php echo __('Clear Log', 'document-gallery'); ?>
|
892 |
-
</button>
|
893 |
-
</div>
|
894 |
-
</div>
|
895 |
-
</div>
|
896 |
-
</div>
|
897 |
-
<?php } else {
|
898 |
-
echo '<div class="noLog">'.__('There are no log entries at this time.', 'document-gallery').'<br />'.__('For Your information:', 'document-gallery').' <strong><i>'.__('Logging', 'document-gallery').'</i></strong> '.(DG_Logger::logEnabled()?'<span class="loggingON">'.__('is turned ON', 'document-gallery').'!</span>':'<span class="loggingOFF">'.__('is turned OFF', 'document-gallery').'!</span>').'</div>';
|
899 |
-
}
|
900 |
-
}
|
901 |
-
|
902 |
-
/**
|
903 |
-
* Takes label name and returns SPAN tag.
|
904 |
-
* @param string $e label name.
|
905 |
-
* @return string SPAN tag
|
906 |
-
*/
|
907 |
-
private static function getLogLabelSpan($e) {
|
908 |
-
return '<span class="logLabel ' . strtolower($e) . '">' . strtoupper($e) . '</span>';
|
909 |
-
}
|
910 |
-
|
911 |
/**
|
912 |
* Render a checkbox field.
|
913 |
* @param array $args
|
914 |
*/
|
915 |
public static function renderCheckboxField($args) {
|
916 |
$args['disabled'] = isset($args['disabled']) ? $args['disabled'] : false;
|
917 |
-
printf('<
|
918 |
$args['option_name'],
|
919 |
$args['name'],
|
920 |
$args['label_for'],
|
@@ -928,23 +316,12 @@ var URL_params = <?php echo '{'.trim($json_like,', ').'}'; ?>;
|
|
928 |
* @param array $args
|
929 |
*/
|
930 |
public static function renderTextField($args) {
|
931 |
-
printf('<input type="
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
$args['description']);
|
938 |
-
}
|
939 |
-
|
940 |
-
/**
|
941 |
-
* Accepts a two-dimensional array where each inner array consists of valid arguments for renderTextField.
|
942 |
-
* @param array $args
|
943 |
-
*/
|
944 |
-
public static function renderMultiTextField($args) {
|
945 |
-
foreach ($args as $arg) {
|
946 |
-
self::renderTextField($arg);
|
947 |
-
}
|
948 |
}
|
949 |
|
950 |
/**
|
@@ -967,12 +344,72 @@ var URL_params = <?php echo '{'.trim($json_like,', ').'}'; ?>;
|
|
967 |
|
968 |
print '</select> ' . $args['description'];
|
969 |
}
|
970 |
-
|
971 |
/**
|
972 |
-
*
|
|
|
|
|
973 |
*/
|
974 |
-
public static function
|
975 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
976 |
}
|
977 |
|
978 |
/**
|
1 |
<?php
|
2 |
defined('WPINC') OR exit;
|
3 |
|
|
|
|
|
4 |
class DG_Admin {
|
5 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
/**
|
7 |
* Renders Document Gallery options page.
|
8 |
*/
|
9 |
public static function renderOptions() { ?>
|
10 |
<div class="wrap">
|
11 |
+
<h2>Document Gallery Settings</h2>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
+
<form method="post" action="options.php">
|
14 |
+
<?php settings_fields(DG_OPTION_NAME); ?>
|
15 |
+
<?php do_settings_sections('document_gallery'); ?>
|
16 |
+
<?php submit_button(); ?>
|
|
|
|
|
|
|
|
|
|
|
17 |
</form>
|
18 |
|
19 |
</div>
|
20 |
+
<?php }
|
21 |
|
22 |
/**
|
23 |
* Adds settings link to main plugin view.
|
24 |
*/
|
25 |
public static function addSettingsLink($links) {
|
26 |
+
$settings = '<a href="options-general.php?page=document_gallery">' .
|
27 |
__('Settings', 'document-gallery') . '</a>';
|
28 |
array_unshift($links, $settings);
|
29 |
return $links;
|
33 |
* Adds Document Gallery settings page to admin navigation.
|
34 |
*/
|
35 |
public static function addAdminPage() {
|
36 |
+
add_options_page(
|
37 |
__('Document Gallery Settings', 'document-gallery'),
|
38 |
__('Document Gallery', 'document-gallery'),
|
39 |
+
'manage_options', 'document_gallery', array(__CLASS__, 'renderOptions'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
}
|
41 |
|
42 |
/**
|
43 |
* Registers settings for the Document Gallery options page.
|
44 |
*/
|
45 |
public static function registerSettings() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
global $dg_options;
|
47 |
|
48 |
include_once DG_PATH . 'inc/class-gallery.php';
|
49 |
include_once DG_PATH . 'inc/class-thumber.php';
|
50 |
|
51 |
+
$defaults = $dg_options['gallery']['defaults'];
|
52 |
+
$thumber_active = $dg_options['thumber']['active'];
|
53 |
+
$thumber_gs = $dg_options['thumber']['gs'];
|
54 |
+
|
55 |
+
register_setting(DG_OPTION_NAME, DG_OPTION_NAME, array(__CLASS__, 'validateSettings'));
|
56 |
|
57 |
add_settings_section(
|
58 |
'gallery_defaults', __('Default Settings', 'document-gallery'),
|
59 |
+
array(__CLASS__, 'renderDefaultSettingsSection'), 'document_gallery');
|
60 |
|
61 |
add_settings_section(
|
62 |
+
'thumber_active', __('Thumbnail Generation', 'document-gallery'),
|
63 |
+
array(__CLASS__, 'renderThumberSection'), 'document_gallery');
|
64 |
|
65 |
add_settings_section(
|
66 |
'css', __('Custom CSS', 'document-gallery'),
|
67 |
+
array(__CLASS__, 'renderCssSection'), 'document_gallery');
|
68 |
+
|
69 |
+
add_settings_section(
|
70 |
+
'thumber_advanced', __('Advanced Thumbnail Generation', 'document-gallery'),
|
71 |
+
array(__CLASS__, 'renderThumberAdvancedSection'), 'document_gallery');
|
72 |
|
73 |
add_settings_field(
|
74 |
'gallery_defaults_attachment_pg', 'attachment_pg',
|
75 |
array(__CLASS__, 'renderCheckboxField'),
|
76 |
+
'document_gallery', 'gallery_defaults',
|
77 |
array (
|
78 |
'label_for' => 'label_gallery_defaults_attachment_pg',
|
79 |
'name' => 'gallery_defaults][attachment_pg',
|
85 |
add_settings_field(
|
86 |
'gallery_defaults_descriptions', 'descriptions',
|
87 |
array(__CLASS__, 'renderCheckboxField'),
|
88 |
+
'document_gallery', 'gallery_defaults',
|
89 |
array (
|
90 |
'label_for' => 'label_gallery_defaults_descriptions',
|
91 |
'name' => 'gallery_defaults][descriptions',
|
97 |
add_settings_field(
|
98 |
'gallery_defaults_fancy', 'fancy',
|
99 |
array(__CLASS__, 'renderCheckboxField'),
|
100 |
+
'document_gallery', 'gallery_defaults',
|
101 |
array (
|
102 |
'label_for' => 'label_gallery_defaults_fancy',
|
103 |
'name' => 'gallery_defaults][fancy',
|
109 |
add_settings_field(
|
110 |
'gallery_defaults_images', 'images',
|
111 |
array(__CLASS__, 'renderCheckboxField'),
|
112 |
+
'document_gallery', 'gallery_defaults',
|
113 |
array (
|
114 |
'label_for' => 'label_gallery_defaults_images',
|
115 |
'name' => 'gallery_defaults][images',
|
121 |
add_settings_field(
|
122 |
'gallery_defaults_localpost', 'localpost',
|
123 |
array(__CLASS__, 'renderCheckboxField'),
|
124 |
+
'document_gallery', 'gallery_defaults',
|
125 |
array (
|
126 |
'label_for' => 'label_gallery_defaults_localpost',
|
127 |
'name' => 'gallery_defaults][localpost',
|
133 |
add_settings_field(
|
134 |
'gallery_defaults_order', 'order',
|
135 |
array(__CLASS__, 'renderSelectField'),
|
136 |
+
'document_gallery', 'gallery_defaults',
|
137 |
array (
|
138 |
'label_for' => 'label_gallery_defaults_order',
|
139 |
'name' => 'gallery_defaults][order',
|
146 |
add_settings_field(
|
147 |
'gallery_defaults_orderby', 'orderby',
|
148 |
array(__CLASS__, 'renderSelectField'),
|
149 |
+
'document_gallery', 'gallery_defaults',
|
150 |
array (
|
151 |
'label_for' => 'label_gallery_defaults_orderby',
|
152 |
'name' => 'gallery_defaults][orderby',
|
159 |
add_settings_field(
|
160 |
'gallery_defaults_relation', 'relation',
|
161 |
array(__CLASS__, 'renderSelectField'),
|
162 |
+
'document_gallery', 'gallery_defaults',
|
163 |
array (
|
164 |
'label_for' => 'label_gallery_defaults_relation',
|
165 |
'name' => 'gallery_defaults][relation',
|
168 |
'option_name' => DG_OPTION_NAME,
|
169 |
'description' => __('Whether matched documents must have all taxa_names (AND) or at least one (OR)', 'document-gallery')
|
170 |
));
|
171 |
+
|
172 |
add_settings_field(
|
173 |
+
'thumber_active_av', 'Audio/Video',
|
174 |
array(__CLASS__, 'renderCheckboxField'),
|
175 |
+
'document_gallery', 'thumber_active',
|
176 |
array (
|
177 |
+
'label_for' => 'label_thumber_active_av',
|
178 |
+
'name' => 'thumber_active][av',
|
179 |
+
'value' => esc_attr($thumber_active['av']),
|
180 |
'option_name' => DG_OPTION_NAME,
|
181 |
'description' => esc_html__('Locally generate thumbnails for audio & video files.', 'document-gallery')
|
182 |
));
|
183 |
|
184 |
add_settings_field(
|
185 |
+
'thumber_active_gs', 'Ghostscript',
|
186 |
array(__CLASS__, 'renderCheckboxField'),
|
187 |
+
'document_gallery', 'thumber_active',
|
188 |
array (
|
189 |
+
'label_for' => 'label_thumber_active_gs',
|
190 |
+
'name' => 'thumber_active][gs',
|
191 |
+
'value' => esc_attr($thumber_active['gs']),
|
192 |
'option_name' => DG_OPTION_NAME,
|
193 |
'description' => DG_Thumber::isGhostscriptAvailable()
|
194 |
? __('Use <a href="http://www.ghostscript.com/" target="_blank">Ghostscript</a> for faster local PDF processing (compared to Imagick).', 'document-gallery')
|
197 |
));
|
198 |
|
199 |
add_settings_field(
|
200 |
+
'thumber_active_imagick', 'Imagick',
|
201 |
array(__CLASS__, 'renderCheckboxField'),
|
202 |
+
'document_gallery', 'thumber_active',
|
203 |
array (
|
204 |
+
'label_for' => 'label_thumber_active_imagick',
|
205 |
+
'name' => 'thumber_active][imagick',
|
206 |
+
'value' => esc_attr($thumber_active['imagick']),
|
207 |
'option_name' => DG_OPTION_NAME,
|
208 |
'description' => DG_Thumber::isImagickAvailable()
|
209 |
? __('Use <a href="http://www.php.net/manual/en/book.imagick.php" target="_blank">Imagick</a> to handle lots of filetypes locally.', 'document-gallery')
|
212 |
));
|
213 |
|
214 |
add_settings_field(
|
215 |
+
'thumber_active_google', 'Google Drive Viewer',
|
216 |
array(__CLASS__, 'renderCheckboxField'),
|
217 |
+
'document_gallery', 'thumber_active',
|
218 |
array (
|
219 |
+
'label_for' => 'label_thumber_active_google',
|
220 |
+
'name' => 'thumber_active][google',
|
221 |
+
'value' => esc_attr($thumber_active['google']),
|
222 |
'option_name' => DG_OPTION_NAME,
|
223 |
'description' => DG_Thumber::isGoogleDriveAvailable()
|
224 |
? __('Use <a href="https://drive.google.com/viewer" target="_blank">Google Drive Viewer</a> to generate thumbnails for MS Office files and many other file types remotely.', 'document-gallery')
|
227 |
));
|
228 |
|
229 |
add_settings_field(
|
230 |
+
'thumber_advanced_gs', 'Ghostscript Absolute Path',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
array(__CLASS__, 'renderTextField'),
|
232 |
+
'document_gallery', 'thumber_advanced',
|
233 |
array (
|
234 |
+
'label_for' => 'label_thumber_advanced_gs',
|
235 |
+
'name' => 'thumber_advanced][gs',
|
236 |
+
'value' => esc_attr($thumber_gs),
|
237 |
'option_name' => DG_OPTION_NAME,
|
238 |
+
'description' => $thumber_gs
|
239 |
? __('Successfully auto-detected the location of Ghostscript.', 'document-gallery')
|
240 |
: __('Failed to auto-detect the location of Ghostscript.', 'document-gallery')
|
241 |
));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
}
|
243 |
|
244 |
/**
|
259 |
* Render the Default Settings section.
|
260 |
*/
|
261 |
public static function renderDefaultSettingsSection() { ?>
|
262 |
+
<p><?php _e('The following values will be used by default in the shortcode. You can still manually set each of these values in each individual shortcode.', 'document-gallery'); ?></p>
|
263 |
+
<?php }
|
264 |
|
265 |
/**
|
266 |
* Render the Thumber section.
|
267 |
*/
|
268 |
public static function renderThumberSection() { ?>
|
269 |
+
<p><?php _e('Select which tools to use when generating thumbnails.', 'document-gallery'); ?></p>
|
270 |
+
<?php }
|
271 |
|
|
|
|
|
|
|
272 |
public static function renderCssSection() {
|
273 |
global $dg_options; ?>
|
274 |
+
<p><?php printf(
|
275 |
__('Enter custom CSS styling for use with document galleries. To see which ids and classes you can style, take a look at <a href="%s" target="_blank">style.css</a>.'),
|
276 |
DG_URL . 'assets/css/style.css'); ?></p>
|
277 |
+
<table class="form-table">
|
278 |
+
<tbody>
|
279 |
+
<tr valign="top">
|
280 |
+
<td>
|
281 |
+
<textarea name="document_gallery[css]" rows="10" cols="50" class="large-text code"><?php echo $dg_options['css']['text']; ?></textarea>
|
282 |
+
</td>
|
283 |
+
</tr>
|
284 |
+
</tbody>
|
285 |
+
</table>
|
286 |
+
<?php }
|
287 |
|
288 |
/**
|
289 |
* Render the Thumber Advanced section.
|
290 |
*/
|
291 |
+
public static function renderThumberAdvancedSection() {
|
292 |
include_once DG_PATH . 'inc/class-thumber.php';?>
|
293 |
+
<p><?php _e('Unless you <em>really</em> know what you\'re doing, you should not touch these values.', 'document-gallery'); ?></p>
|
294 |
+
<?php if (!DG_Thumber::isExecAvailable()) : ?>
|
295 |
+
<p><em><?php _e('NOTE: <code>exec()</code> is not accessible. Ghostscript will not function.', 'document-gallery'); ?></em></p>
|
296 |
+
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
297 |
<?php }
|
298 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
299 |
/**
|
300 |
* Render a checkbox field.
|
301 |
* @param array $args
|
302 |
*/
|
303 |
public static function renderCheckboxField($args) {
|
304 |
$args['disabled'] = isset($args['disabled']) ? $args['disabled'] : false;
|
305 |
+
printf('<input type="checkbox" value="1" name="%1$s[%2$s]" id="%3$s" %4$s %5$s/> %6$s',
|
306 |
$args['option_name'],
|
307 |
$args['name'],
|
308 |
$args['label_for'],
|
316 |
* @param array $args
|
317 |
*/
|
318 |
public static function renderTextField($args) {
|
319 |
+
printf('<input type="text" value="%1$s" name="%2$s[%3$s]" id="%4$s" /> %5$s',
|
320 |
+
$args['value'],
|
321 |
+
$args['option_name'],
|
322 |
+
$args['name'],
|
323 |
+
$args['label_for'],
|
324 |
+
$args['description']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
325 |
}
|
326 |
|
327 |
/**
|
344 |
|
345 |
print '</select> ' . $args['description'];
|
346 |
}
|
347 |
+
|
348 |
/**
|
349 |
+
* Validates submitted options, sanitizing any invalid options.
|
350 |
+
* @param array $values User-submitted new options.
|
351 |
+
* @return array Sanitized new options.
|
352 |
*/
|
353 |
+
public static function validateSettings($values) {
|
354 |
+
include_once DG_PATH . 'inc/class-gallery.php';
|
355 |
+
|
356 |
+
global $dg_options;
|
357 |
+
$ret = $dg_options;
|
358 |
+
|
359 |
+
// handle gallery shortcode defaults
|
360 |
+
$errs = array();
|
361 |
+
$ret['gallery']['defaults'] =
|
362 |
+
DG_Gallery::sanitizeDefaults($values['gallery_defaults'], $errs);
|
363 |
+
|
364 |
+
foreach ($errs as $k => $v) {
|
365 |
+
add_settings_error(DG_OPTION_NAME, str_replace('_', '-', $k), $v);
|
366 |
+
}
|
367 |
+
|
368 |
+
// handle setting the active thumbers
|
369 |
+
foreach ($ret['thumber']['active'] as $k => $v) {
|
370 |
+
$ret['thumber']['active'][$k] = isset($values['thumber_active'][$k]);
|
371 |
+
}
|
372 |
+
|
373 |
+
// if new thumbers available, clear failed thumbnails for retry
|
374 |
+
foreach ($dg_options['thumber']['active'] as $k => $v) {
|
375 |
+
if (!$v && $ret['thumber']['active'][$k]) {
|
376 |
+
foreach ($dg_options['thumber']['thumbs'] as $k => $v) {
|
377 |
+
if (false === $v) {
|
378 |
+
unset($ret['thumber']['thumbs'][$k]);
|
379 |
+
}
|
380 |
+
}
|
381 |
+
break;
|
382 |
+
}
|
383 |
+
}
|
384 |
+
|
385 |
+
// handle modified CSS
|
386 |
+
if (trim($ret['css']['text']) !== trim($values['css'])) {
|
387 |
+
$ret['css']['text'] = trim($values['css']);
|
388 |
+
$ret['css']['version']++;
|
389 |
+
$ret['css']['last-modified'] = gmdate('D, d M Y H:i:s');
|
390 |
+
$ret['css']['etag'] = md5($ret['css']['last-modified']);
|
391 |
+
|
392 |
+
if (empty($ret['css']['text'])) {
|
393 |
+
unset($ret['css']['minified']);
|
394 |
+
} else {
|
395 |
+
$ret['css']['minified'] =
|
396 |
+
DocumentGallery::compileCustomCss($ret['css']['text']);
|
397 |
+
}
|
398 |
+
}
|
399 |
+
|
400 |
+
// handle setting the Ghostscript path
|
401 |
+
if (isset($values['thumber_advanced']['gs']) &&
|
402 |
+
0 != strcmp($values['thumber_advanced']['gs'], $ret['thumber']['gs'])) {
|
403 |
+
if (false === strpos($values['thumber_advanced']['gs'], ';')) {
|
404 |
+
$ret['thumber']['gs'] = $values['thumber_advanced']['gs'];
|
405 |
+
} else {
|
406 |
+
add_settings_error(DG_OPTION_NAME, 'thumber-gs',
|
407 |
+
__('Invalid Ghostscript path given: ', 'document-gallery')
|
408 |
+
. $values['thumber_advanced']['gs']);
|
409 |
+
}
|
410 |
+
}
|
411 |
+
|
412 |
+
return $ret;
|
413 |
}
|
414 |
|
415 |
/**
|
assets/css/admin.css
DELETED
@@ -1,288 +0,0 @@
|
|
1 |
-
div.thumbs-list-wrapper, div.log-list-wrapper{
|
2 |
-
text-align:center;
|
3 |
-
margin-top: 1.5em;
|
4 |
-
}
|
5 |
-
div.thumbs-list-wrapper>div, div.log-list-wrapper>div{
|
6 |
-
margin: 0 auto;
|
7 |
-
display: inline-block;
|
8 |
-
}
|
9 |
-
#ThumbsTable, #LogTable{
|
10 |
-
border: none;
|
11 |
-
box-shadow: none;
|
12 |
-
-webkit-box-shadow: none;
|
13 |
-
-moz-box-shadow: none;
|
14 |
-
border-radius: 10px;
|
15 |
-
-webkit-border-radius: 10px;
|
16 |
-
-moz-border-radius: 10px;
|
17 |
-
background: #B9C9FE;
|
18 |
-
color: #039;
|
19 |
-
width: auto;
|
20 |
-
margin: 10px auto;
|
21 |
-
}
|
22 |
-
#ThumbsTable tbody, #LogTable tbody {
|
23 |
-
background: #e8edff;
|
24 |
-
color: #669;
|
25 |
-
}
|
26 |
-
#ThumbsTable>tbody>tr:hover, #LogTable>tbody>tr:hover {
|
27 |
-
background: #d0dafd;
|
28 |
-
}
|
29 |
-
#ThumbsTable>tbody>tr:not(:last-child) td, #LogTable>tbody>tr:not(:last-child) td {
|
30 |
-
border-bottom-color: #b9c9fe;
|
31 |
-
border-bottom-style: solid;
|
32 |
-
border-bottom-width: 1px;
|
33 |
-
}
|
34 |
-
#ThumbsTable td, #ThumbsTable th, #LogTable td, #LogTable th{
|
35 |
-
text-align: center;
|
36 |
-
vertical-align: middle;
|
37 |
-
margin: 0;
|
38 |
-
padding: 4px;
|
39 |
-
}
|
40 |
-
#LogTable td {
|
41 |
-
text-align: left;
|
42 |
-
}
|
43 |
-
td.title.column-title{
|
44 |
-
text-align: left !important;
|
45 |
-
}
|
46 |
-
#ThumbsTable img{
|
47 |
-
display: block;
|
48 |
-
margin: 5px auto;
|
49 |
-
}
|
50 |
-
#LogTable td > pre, .spoiler-body > pre, .expander pre, .collapser pre {
|
51 |
-
margin: 0;
|
52 |
-
display: inline-block;
|
53 |
-
white-space: pre-line;
|
54 |
-
}
|
55 |
-
tr.selected{
|
56 |
-
background: #B6ADCE;
|
57 |
-
}
|
58 |
-
tr.selected:hover{
|
59 |
-
background: #D8D3E5 !important;
|
60 |
-
}
|
61 |
-
.column-date, .column-level, .check-column, .column-icon {
|
62 |
-
white-space: nowrap;
|
63 |
-
}
|
64 |
-
.column-entry, .column-title {
|
65 |
-
width: 100%;
|
66 |
-
}
|
67 |
-
.nav-tab:before, .deleteSelected:before, .clearLog:before, .expandAll:before, .collapseAll:before, .logLabel.date:before, .collapser:after, .expander:after{
|
68 |
-
display: inline-block;
|
69 |
-
-webkit-font-smoothing: antialiased;
|
70 |
-
font: normal 20px/1 'dashicons';
|
71 |
-
vertical-align: text-bottom;
|
72 |
-
padding-right: 5px;
|
73 |
-
}
|
74 |
-
.General-tab:before{
|
75 |
-
content: '\f108';
|
76 |
-
}
|
77 |
-
.Thumbnail-tab:before{
|
78 |
-
content: '\f233';
|
79 |
-
}
|
80 |
-
.Logging-tab:before{
|
81 |
-
content: '\f163';
|
82 |
-
}
|
83 |
-
.Advanced-tab:before{
|
84 |
-
content: '\f332';
|
85 |
-
}
|
86 |
-
.deleteSelected:before, .clearLog:before{
|
87 |
-
content: '\f182';
|
88 |
-
}
|
89 |
-
.expandAll:before {
|
90 |
-
content: '\f211';
|
91 |
-
}
|
92 |
-
.collapseAll:before {
|
93 |
-
content: '\f506';
|
94 |
-
}
|
95 |
-
.expandAll, .collapseAll {
|
96 |
-
display: none;
|
97 |
-
}
|
98 |
-
#ThumbsTable .title a:after, #LogTable>tbody a:after{
|
99 |
-
content: '\f504';
|
100 |
-
display: inline-block;
|
101 |
-
-webkit-font-smoothing: antialiased;
|
102 |
-
font-family: 'dashicons';
|
103 |
-
font-size: inherit;
|
104 |
-
font-style: normal;
|
105 |
-
font-variant: normal;
|
106 |
-
font-weight: normal;
|
107 |
-
line-height: 1;
|
108 |
-
vertical-align: inherit;
|
109 |
-
padding-left: 5px;
|
110 |
-
}
|
111 |
-
#LogTable>tbody a {
|
112 |
-
-webkit-transition: none;
|
113 |
-
transition: none;
|
114 |
-
text-decoration: none;
|
115 |
-
outline: 0;
|
116 |
-
}
|
117 |
-
#LogTable>tbody pre strong {
|
118 |
-
font-weight: bolder;
|
119 |
-
}
|
120 |
-
#LogTable>tbody a:active, #LogTable>tbody a:hover {
|
121 |
-
color: #2ea2cc;
|
122 |
-
}
|
123 |
-
.levelSelector {
|
124 |
-
float: right;
|
125 |
-
}
|
126 |
-
.logLabel {
|
127 |
-
padding: 0 10px;
|
128 |
-
color: #fff !important;
|
129 |
-
text-decoration: none;
|
130 |
-
font-weight: bolder;
|
131 |
-
border: none !important;
|
132 |
-
float:left;
|
133 |
-
margin-left: 1px;
|
134 |
-
margin-top: 1px;
|
135 |
-
-webkit-border-radius: 100px;
|
136 |
-
-moz-border-radius: 100px;
|
137 |
-
border-radius: 100px;
|
138 |
-
cursor: context-menu;
|
139 |
-
}
|
140 |
-
.logLabel.warning {
|
141 |
-
background: #F89406;
|
142 |
-
}
|
143 |
-
.logLabel.detail {
|
144 |
-
background: #3A87AD;
|
145 |
-
}
|
146 |
-
.logLabel.error {
|
147 |
-
background: #CC0000;
|
148 |
-
}
|
149 |
-
.logLabel.date {
|
150 |
-
background: #999999;
|
151 |
-
white-space: nowrap;
|
152 |
-
font-weight: inherit;
|
153 |
-
}
|
154 |
-
.logLabel.date:before{
|
155 |
-
font-size: inherit;
|
156 |
-
vertical-align: middle;
|
157 |
-
padding-bottom: 0.2em;
|
158 |
-
content: '\f469';
|
159 |
-
}
|
160 |
-
.spoiler-body {
|
161 |
-
padding: 1px 6px 2px;
|
162 |
-
display: none;
|
163 |
-
border-top: 1px solid #C3CBD1;
|
164 |
-
background: #F5F5F5;
|
165 |
-
}
|
166 |
-
.column-entry {
|
167 |
-
text-align: left !important;
|
168 |
-
}
|
169 |
-
.expander pre, .collapser pre {
|
170 |
-
vertical-align: middle;
|
171 |
-
float: left;
|
172 |
-
white-space: pre-wrap;
|
173 |
-
}
|
174 |
-
.expander, .collapser {
|
175 |
-
display: table;
|
176 |
-
vertical-align: middle;
|
177 |
-
width: 100%;
|
178 |
-
cursor: pointer;
|
179 |
-
}
|
180 |
-
.expander > div, .collapser > div {
|
181 |
-
display: table-cell;
|
182 |
-
vertical-align: middle;
|
183 |
-
height: 100%;
|
184 |
-
}
|
185 |
-
.dashicons.dashicons-arrow-down-alt2, .dashicons.dashicons-arrow-up-alt2 {
|
186 |
-
float: right;
|
187 |
-
padding-right: 15px;
|
188 |
-
}
|
189 |
-
.levelSelector > * {
|
190 |
-
-webkit-touch-callout: none;
|
191 |
-
-webkit-user-select: none;
|
192 |
-
-khtml-user-select: none;
|
193 |
-
-moz-user-select: none;
|
194 |
-
-ms-user-select: none;
|
195 |
-
user-select: none;
|
196 |
-
}
|
197 |
-
.levelSelector > input[type=checkbox] {
|
198 |
-
display:none;
|
199 |
-
}
|
200 |
-
.levelSelector > input[type=checkbox] + label {
|
201 |
-
color: #6B6B6B;
|
202 |
-
font-weight: bolder;
|
203 |
-
margin: 4px 0px;
|
204 |
-
overflow: auto;
|
205 |
-
text-align: center;
|
206 |
-
padding: 3px 8px;
|
207 |
-
display: table-cell;
|
208 |
-
background-color: #f5f5f5;
|
209 |
-
background-image: -moz-linear-gradient(top,#fff,#e6e6e6);
|
210 |
-
background-image: -webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));
|
211 |
-
background-image: -webkit-linear-gradient(top,#fff,#e6e6e6);
|
212 |
-
background-image: -o-linear-gradient(top,#fff,#e6e6e6);
|
213 |
-
background-image: linear-gradient(to bottom,#fff,#e6e6e6);
|
214 |
-
background-repeat: repeat-x;
|
215 |
-
border: 1px solid #ccc;
|
216 |
-
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
|
217 |
-
border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);
|
218 |
-
border-bottom-color: #b3b3b3;
|
219 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);
|
220 |
-
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
221 |
-
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
|
222 |
-
-moz-box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
|
223 |
-
box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
|
224 |
-
}
|
225 |
-
.levelSelector > input[type=checkbox] + label:first-of-type {
|
226 |
-
border-top-left-radius: 4px;
|
227 |
-
border-bottom-left-radius: 4px;
|
228 |
-
}
|
229 |
-
.levelSelector > input[type=checkbox] + label:last-of-type {
|
230 |
-
border-top-right-radius: 4px;
|
231 |
-
border-bottom-right-radius: 4px;
|
232 |
-
}
|
233 |
-
.levelSelector > input[type=checkbox]:checked + label {
|
234 |
-
background-image: none;
|
235 |
-
outline: 0;
|
236 |
-
-webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);
|
237 |
-
-moz-box-shadow: inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);
|
238 |
-
box-shadow: inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);
|
239 |
-
}
|
240 |
-
.levelSelector > input[type=checkbox] + label.errorLevel {
|
241 |
-
color: #CC0000;
|
242 |
-
}
|
243 |
-
.levelSelector > input[type=checkbox]:checked + label.errorLevel {
|
244 |
-
background-color: #CC0000;
|
245 |
-
color: #fff;
|
246 |
-
}
|
247 |
-
.levelSelector > input[type=checkbox] + label.warningLevel {
|
248 |
-
color: #F89406;
|
249 |
-
}
|
250 |
-
.levelSelector > input[type=checkbox]:checked + label.warningLevel {
|
251 |
-
background-color: #F89406;
|
252 |
-
color: #fff;
|
253 |
-
}
|
254 |
-
.levelSelector > input[type=checkbox] + label.detailLevel {
|
255 |
-
color: #3A87AD;
|
256 |
-
}
|
257 |
-
.levelSelector > input[type=checkbox]:checked + label.detailLevel {
|
258 |
-
background-color: #3A87AD;
|
259 |
-
color: #fff;
|
260 |
-
}
|
261 |
-
.noLog {
|
262 |
-
font-size: x-large;
|
263 |
-
display: block;
|
264 |
-
width: 100%;
|
265 |
-
text-align: center;
|
266 |
-
margin-top: 20ex;
|
267 |
-
line-height: 150%;
|
268 |
-
}
|
269 |
-
.loggingON, .loggingOFF {
|
270 |
-
font-weight: bolder;
|
271 |
-
}
|
272 |
-
.loggingON {
|
273 |
-
color: green;
|
274 |
-
}
|
275 |
-
.loggingOFF {
|
276 |
-
color: red;
|
277 |
-
}
|
278 |
-
th input{
|
279 |
-
margin-left: 0 !important;
|
280 |
-
margin-top: 1px !important;
|
281 |
-
}
|
282 |
-
td input{
|
283 |
-
margin-right: 0 !important;
|
284 |
-
}
|
285 |
-
|
286 |
-
textarea[readonly], input[readonly], select[readonly] {
|
287 |
-
background-color: #dcdcdc;
|
288 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/admin.js
DELETED
@@ -1,93 +0,0 @@
|
|
1 |
-
jQuery(document).ready(function(){
|
2 |
-
jQuery('.cb-ids').change(function() {
|
3 |
-
if(jQuery(this).is(':checked')) {
|
4 |
-
jQuery(this).closest('tr').addClass('selected');
|
5 |
-
}
|
6 |
-
else {
|
7 |
-
jQuery(this).closest('tr').removeClass('selected');
|
8 |
-
}
|
9 |
-
});
|
10 |
-
jQuery('th input:checkbox').change(function() {
|
11 |
-
if(jQuery(this).is(':checked')) {
|
12 |
-
jQuery('#ThumbsTable tbody tr').addClass('selected');
|
13 |
-
}
|
14 |
-
else {
|
15 |
-
jQuery('#ThumbsTable tbody tr').removeClass('selected');
|
16 |
-
}
|
17 |
-
});
|
18 |
-
jQuery('input.current-page').bind('keypress', {}, function(e) {
|
19 |
-
var code = (e.keyCode ? e.keyCode : e.which);
|
20 |
-
if (code == 13) { //Enter keycode
|
21 |
-
e.preventDefault();
|
22 |
-
jQuery(location).attr('href','?'+jQuery.param(jQuery.extend(URL_params,{ sheet: this.value })));
|
23 |
-
}
|
24 |
-
});
|
25 |
-
jQuery('select.limit_per_page').change(function() {
|
26 |
-
jQuery(location).attr('href','?'+jQuery.param(jQuery.extend(URL_params,{ limit: this.value })));
|
27 |
-
});
|
28 |
-
jQuery('#tab-Thumbnail').submit( function (event) {
|
29 |
-
event.preventDefault();
|
30 |
-
if (jQuery('.cb-ids:checked').length > 0) {
|
31 |
-
var a = jQuery(this).attr('action');
|
32 |
-
var b = jQuery(this).serialize() + '&document_gallery%5Bajax%5D=true';
|
33 |
-
jQuery.post(a, b, function(response) {
|
34 |
-
if (response.indexOf("\n") == -1) {
|
35 |
-
var result = eval(response);
|
36 |
-
for (var index in result) {
|
37 |
-
jQuery('input[type=checkbox][value='+result[index]+']').closest('tr').fadeOut('slow', 0.00, function() {jQuery(this).slideUp('slow', function() {jQuery(this).remove();});});
|
38 |
-
}
|
39 |
-
} else {
|
40 |
-
console.log('Invalid response from server:');
|
41 |
-
console.log(response);
|
42 |
-
}
|
43 |
-
} ).fail(function() {
|
44 |
-
console.log( 'Problem in reaching the server' );
|
45 |
-
});
|
46 |
-
}
|
47 |
-
return false;
|
48 |
-
});
|
49 |
-
|
50 |
-
jQuery('#tab-Advanced #options-dump').click(function() {
|
51 |
-
jQuery(this).select();
|
52 |
-
});
|
53 |
-
|
54 |
-
function toggleSpoiler() {
|
55 |
-
var sel = getSelection().toString();
|
56 |
-
if(!sel){
|
57 |
-
jQuery(this).next().slideToggle('slow');
|
58 |
-
jQuery(this).find('.dashicons').toggleClass('dashicons-arrow-down-alt2 dashicons-arrow-up-alt2');
|
59 |
-
jQuery(this).toggleClass('expander collapser');
|
60 |
-
jQuery(this).attr('title', (jQuery(this).hasClass('expander') ? 'Click to Expand' : 'Click to Collapse'));
|
61 |
-
}
|
62 |
-
}
|
63 |
-
|
64 |
-
jQuery('.expander').click(toggleSpoiler);
|
65 |
-
|
66 |
-
if (jQuery('.spoiler-body').length)
|
67 |
-
{
|
68 |
-
jQuery('.expandAll, .collapseAll').addClass('button');
|
69 |
-
jQuery('.expandAll').click(function(e) {
|
70 |
-
e.preventDefault();
|
71 |
-
jQuery('.expander').trigger('click');
|
72 |
-
});
|
73 |
-
jQuery('.collapseAll').click(function(e) {
|
74 |
-
e.preventDefault();
|
75 |
-
jQuery('.collapser').trigger('click');
|
76 |
-
});
|
77 |
-
}
|
78 |
-
|
79 |
-
jQuery('.levelSelector input').change(function() {
|
80 |
-
if (jQuery(this).val() == 'all') {
|
81 |
-
jQuery('.levelSelector input').not("[value='all']").prop('checked', jQuery(this).is(':checked'));
|
82 |
-
jQuery(this).is(':checked') ? jQuery('#LogTable tbody tr').show() : jQuery('#LogTable tbody tr').hide();
|
83 |
-
}
|
84 |
-
else {
|
85 |
-
jQuery(this).is(':checked') ? jQuery('#LogTable tbody tr:has(span.'+jQuery(this).val()+')').show() : jQuery('#LogTable tbody tr:has(span.'+jQuery(this).val()+')').hide();
|
86 |
-
if ( (jQuery('.levelSelector input:checked').not("[value='all']").length + 1) == jQuery('.levelSelector input[type="checkbox"]').length ) {
|
87 |
-
jQuery('.levelSelector input[value="all"]').prop('checked', true);
|
88 |
-
} else {
|
89 |
-
jQuery('.levelSelector input[value="all"]').prop('checked', false);
|
90 |
-
}
|
91 |
-
}
|
92 |
-
});
|
93 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
document-gallery.php
CHANGED
@@ -5,14 +5,14 @@ defined('WPINC') OR exit;
|
|
5 |
Plugin Name: Document Gallery
|
6 |
Plugin URI: http://wordpress.org/extend/plugins/document-gallery/
|
7 |
Description: Display non-images (and images) in gallery format on a page or post with the [dg] shortcode.
|
8 |
-
Version: 2.
|
9 |
Author: Dan Rossiter
|
10 |
Author URI: http://danrossiter.org/
|
11 |
License: GPLv2
|
12 |
Text Domain: document-gallery
|
13 |
*/
|
14 |
|
15 |
-
define('DG_VERSION', '2.
|
16 |
|
17 |
// define helper paths & URLs
|
18 |
define('DG_BASENAME', plugin_basename(__FILE__));
|
@@ -26,9 +26,6 @@ global $dg_options;
|
|
26 |
define('DG_OPTION_NAME', 'document_gallery');
|
27 |
$dg_options = get_option(DG_OPTION_NAME, null);
|
28 |
|
29 |
-
// logging functionality
|
30 |
-
include_once DG_PATH . 'inc/class-logger.php';
|
31 |
-
|
32 |
// handle activation, updates, and uninstallation
|
33 |
include_once DG_PATH . 'inc/class-setup.php';
|
34 |
register_activation_hook(__FILE__, array('DG_Setup', 'activate'));
|
@@ -36,11 +33,6 @@ add_action('wpmu_new_blog', array('DG_Setup','activateNewBlog'));
|
|
36 |
register_uninstall_hook(__FILE__, array('DG_Setup', 'uninstall'));
|
37 |
DG_Setup::maybeUpdate();
|
38 |
|
39 |
-
// validate options if desired
|
40 |
-
if ($dg_options['validation']) {
|
41 |
-
add_action('init', array('DocumentGallery', 'addValidation'));
|
42 |
-
}
|
43 |
-
|
44 |
// I18n
|
45 |
add_action('plugins_loaded', array('DocumentGallery', 'loadTextDomain'));
|
46 |
|
@@ -53,7 +45,8 @@ if (is_admin()) {
|
|
53 |
include_once DG_PATH . 'admin/class-admin.php';
|
54 |
|
55 |
// add settings link
|
56 |
-
add_filter('plugin_action_links_' . DG_BASENAME,
|
|
|
57 |
|
58 |
// build options page
|
59 |
add_action('admin_menu', array('DG_Admin', 'addAdminPage'));
|
@@ -94,15 +87,15 @@ class DocumentGallery {
|
|
94 |
* Takes values passed from attributes and returns sutable HTML to represent
|
95 |
* all valid attachments requested.
|
96 |
*
|
97 |
-
* @param
|
98 |
-
* @return string
|
99 |
*/
|
100 |
public static function doShortcode($atts) {
|
101 |
include_once 'inc/class-gallery.php';
|
102 |
|
103 |
$start = microtime(true);
|
104 |
$gallery = (string)new DG_Gallery($atts);
|
105 |
-
|
106 |
|
107 |
return $gallery;
|
108 |
}
|
@@ -111,7 +104,8 @@ class DocumentGallery {
|
|
111 |
* Enqueue standard DG CSS.
|
112 |
*/
|
113 |
public static function enqueueGalleryStyle() {
|
114 |
-
|
|
|
115 |
}
|
116 |
|
117 |
/**
|
@@ -127,8 +121,8 @@ class DocumentGallery {
|
|
127 |
/**
|
128 |
* Add query custom CSS query string.
|
129 |
* Taken from here: http://ottopress.com/2010/dont-include-wp-load-please/
|
130 |
-
* @param
|
131 |
-
* @return
|
132 |
*/
|
133 |
public static function addCustomStyleQueryVar($vars) {
|
134 |
$vars[] = self::$query_var;
|
@@ -156,12 +150,45 @@ class DocumentGallery {
|
|
156 |
}
|
157 |
|
158 |
/*==========================================================================
|
159 |
-
*
|
160 |
*=========================================================================*/
|
161 |
|
162 |
/**
|
163 |
-
*
|
|
|
|
|
164 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
public static function loadTextDomain() {
|
166 |
load_plugin_textdomain('document-gallery', false, dirname(DG_BASENAME) . '/languages/');
|
167 |
}
|
@@ -172,7 +199,7 @@ class DocumentGallery {
|
|
172 |
|
173 |
/**
|
174 |
* @param int $blog ID of the blog to be retrieved in multisite env.
|
175 |
-
* @return
|
176 |
*/
|
177 |
public static function getOptions($blog = null) {
|
178 |
global $dg_options;
|
@@ -181,10 +208,6 @@ class DocumentGallery {
|
|
181 |
: get_blog_option($blog, DG_OPTION_NAME, null);
|
182 |
}
|
183 |
|
184 |
-
/**
|
185 |
-
* @param multitype:unknown $options
|
186 |
-
* @param int $blog ID of the blog to be set in multisite env.
|
187 |
-
*/
|
188 |
public static function setOptions($options, $blog = null) {
|
189 |
if (is_null($blog)) {
|
190 |
global $dg_options;
|
@@ -195,9 +218,6 @@ class DocumentGallery {
|
|
195 |
}
|
196 |
}
|
197 |
|
198 |
-
/**
|
199 |
-
* @param int $blog ID of the blog to be deleted in multisite env.
|
200 |
-
*/
|
201 |
public static function deleteOptions($blog = null) {
|
202 |
if (is_null($blog)) {
|
203 |
delete_option(DG_OPTION_NAME);
|
@@ -206,82 +226,11 @@ class DocumentGallery {
|
|
206 |
}
|
207 |
}
|
208 |
|
209 |
-
/**
|
210 |
-
* Adds hook to validate DG options every time save is attempted.
|
211 |
-
*/
|
212 |
-
public static function addValidation() {
|
213 |
-
add_filter('pre_update_option_' . DG_OPTION_NAME, array('DocumentGallery', 'validateOptionsStructure'), 10, 2);
|
214 |
-
}
|
215 |
-
|
216 |
-
/**
|
217 |
-
* Checks whether the given options match the option schema.
|
218 |
-
* @param multivar $new The new options to be validated.
|
219 |
-
* @param multivar $old The old options.
|
220 |
-
* @return array The options to be saved.
|
221 |
-
*/
|
222 |
-
public static function validateOptionsStructure($new, $old) {
|
223 |
-
if (self::isValidOptionsStructure($new)) {
|
224 |
-
$ret = $new;
|
225 |
-
} else {
|
226 |
-
$ret = $old;
|
227 |
-
DG_Logger::writeLog(DG_LogLevel::Error, 'Attempted to save invalid options.' . PHP_EOL . print_r($new, true), true, true);
|
228 |
-
}
|
229 |
-
|
230 |
-
return $ret;
|
231 |
-
}
|
232 |
-
|
233 |
-
/**
|
234 |
-
* @param multivar|unknown $o The options structure to validate.
|
235 |
-
* @param multivar $schema The schema to validate against (note that only keys matter -- non-array values are ignored).
|
236 |
-
* @return bool Whether the given options structure matches the schema.
|
237 |
-
*/
|
238 |
-
private static function isValidOptionsStructure($o, $schema = null) {
|
239 |
-
if (is_null($schema)) {
|
240 |
-
include_once DG_PATH . 'inc/class-setup.php';
|
241 |
-
$schema = DG_Setup::getDefaultOptions(true);
|
242 |
-
}
|
243 |
-
|
244 |
-
// simple checks first
|
245 |
-
$valid = is_array($o) && (count($schema) === count($o));
|
246 |
-
|
247 |
-
if ($valid) {
|
248 |
-
foreach ($schema as $sk => $sv) {
|
249 |
-
$valid = array_key_exists($sk, $o);
|
250 |
-
if (is_array($sv) && !empty($sv)) {
|
251 |
-
$valid = $valid && self::isValidOptionsStructure($o[$sk], $sv);
|
252 |
-
}
|
253 |
-
|
254 |
-
if (!$valid) {
|
255 |
-
break;
|
256 |
-
}
|
257 |
-
}
|
258 |
-
}
|
259 |
-
|
260 |
-
return $valid;
|
261 |
-
}
|
262 |
-
|
263 |
-
/**
|
264 |
-
* Function takes a GMT timestamp and returns a date/time string in the
|
265 |
-
* current timezone and WP format.
|
266 |
-
* @param int $timestamp The GMT timestamp to translate.
|
267 |
-
* @return string The local time in the WP date/time format.
|
268 |
-
*/
|
269 |
-
public static function localDateTimeFromTimestamp($timestamp) {
|
270 |
-
static $gmt_offet = null;
|
271 |
-
static $wp_format = null;
|
272 |
-
if (is_null($gmt_offet)) {
|
273 |
-
$gmt_offet = get_option('gmt_offset');
|
274 |
-
$wp_format = get_option('date_format').' '.get_option('time_format');
|
275 |
-
}
|
276 |
-
|
277 |
-
return date($wp_format, $timestamp + $gmt_offet * 3600);
|
278 |
-
}
|
279 |
-
|
280 |
/**
|
281 |
* Compiles any custom CSS plus the default CSS together,
|
282 |
* minifying in the process.
|
283 |
-
* @param
|
284 |
-
* @return
|
285 |
*/
|
286 |
public static function compileCustomCss($custom) {
|
287 |
$css = file_get_contents(DG_PATH . 'assets/css/style.css');
|
5 |
Plugin Name: Document Gallery
|
6 |
Plugin URI: http://wordpress.org/extend/plugins/document-gallery/
|
7 |
Description: Display non-images (and images) in gallery format on a page or post with the [dg] shortcode.
|
8 |
+
Version: 2.1.1
|
9 |
Author: Dan Rossiter
|
10 |
Author URI: http://danrossiter.org/
|
11 |
License: GPLv2
|
12 |
Text Domain: document-gallery
|
13 |
*/
|
14 |
|
15 |
+
define('DG_VERSION', '2.1.1');
|
16 |
|
17 |
// define helper paths & URLs
|
18 |
define('DG_BASENAME', plugin_basename(__FILE__));
|
26 |
define('DG_OPTION_NAME', 'document_gallery');
|
27 |
$dg_options = get_option(DG_OPTION_NAME, null);
|
28 |
|
|
|
|
|
|
|
29 |
// handle activation, updates, and uninstallation
|
30 |
include_once DG_PATH . 'inc/class-setup.php';
|
31 |
register_activation_hook(__FILE__, array('DG_Setup', 'activate'));
|
33 |
register_uninstall_hook(__FILE__, array('DG_Setup', 'uninstall'));
|
34 |
DG_Setup::maybeUpdate();
|
35 |
|
|
|
|
|
|
|
|
|
|
|
36 |
// I18n
|
37 |
add_action('plugins_loaded', array('DocumentGallery', 'loadTextDomain'));
|
38 |
|
45 |
include_once DG_PATH . 'admin/class-admin.php';
|
46 |
|
47 |
// add settings link
|
48 |
+
add_filter('plugin_action_links_' . DG_BASENAME,
|
49 |
+
array('DG_Admin', 'addSettingsLink'));
|
50 |
|
51 |
// build options page
|
52 |
add_action('admin_menu', array('DG_Admin', 'addAdminPage'));
|
87 |
* Takes values passed from attributes and returns sutable HTML to represent
|
88 |
* all valid attachments requested.
|
89 |
*
|
90 |
+
* @param array $atts Arguments from the user.
|
91 |
+
* @return string HTML for the Document Gallery.
|
92 |
*/
|
93 |
public static function doShortcode($atts) {
|
94 |
include_once 'inc/class-gallery.php';
|
95 |
|
96 |
$start = microtime(true);
|
97 |
$gallery = (string)new DG_Gallery($atts);
|
98 |
+
DocumentGallery::writeLog('Generation Time: ' . (microtime(true) - $start) . ' s');
|
99 |
|
100 |
return $gallery;
|
101 |
}
|
104 |
* Enqueue standard DG CSS.
|
105 |
*/
|
106 |
public static function enqueueGalleryStyle() {
|
107 |
+
wp_register_style('document-gallery', DG_URL . 'assets/css/style.css', null, DG_VERSION);
|
108 |
+
wp_enqueue_style('document-gallery');
|
109 |
}
|
110 |
|
111 |
/**
|
121 |
/**
|
122 |
* Add query custom CSS query string.
|
123 |
* Taken from here: http://ottopress.com/2010/dont-include-wp-load-please/
|
124 |
+
* @param array $vars
|
125 |
+
* @return array
|
126 |
*/
|
127 |
public static function addCustomStyleQueryVar($vars) {
|
128 |
$vars[] = self::$query_var;
|
150 |
}
|
151 |
|
152 |
/*==========================================================================
|
153 |
+
* Logging
|
154 |
*=========================================================================*/
|
155 |
|
156 |
/**
|
157 |
+
* Appends error log with $entry if WordPress is in debug mode.
|
158 |
+
*
|
159 |
+
* @param str $entry
|
160 |
*/
|
161 |
+
public static function writeLog($entry) {
|
162 |
+
if (self::logEnabled()) {
|
163 |
+
// NOTE: First entry in stack trace is this method -- need to get second
|
164 |
+
$callers = debug_backtrace();
|
165 |
+
$caller = $callers[1];
|
166 |
+
$caller = (isset($caller['class']) ? $caller['class'] : '') . $caller['type'] . $caller['function'];
|
167 |
+
|
168 |
+
// build log entry, removing any extra spaces
|
169 |
+
$err = preg_replace('/\s+/', ' ', trim(print_r($entry, true)));
|
170 |
+
$err = 'DG (' . $caller . '): ' . $err . PHP_EOL;
|
171 |
+
|
172 |
+
// insert log entry
|
173 |
+
if (defined('ERRORLOGFILE')) {
|
174 |
+
error_log($err, 3, ERRORLOGFILE);
|
175 |
+
} else {
|
176 |
+
error_log($err);
|
177 |
+
}
|
178 |
+
}
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* @return bool Whether debug logging is currently enabled.
|
183 |
+
*/
|
184 |
+
public static function logEnabled() {
|
185 |
+
return defined('WP_DEBUG') && WP_DEBUG;
|
186 |
+
}
|
187 |
+
|
188 |
+
/*==========================================================================
|
189 |
+
* I18n
|
190 |
+
*=========================================================================*/
|
191 |
+
|
192 |
public static function loadTextDomain() {
|
193 |
load_plugin_textdomain('document-gallery', false, dirname(DG_BASENAME) . '/languages/');
|
194 |
}
|
199 |
|
200 |
/**
|
201 |
* @param int $blog ID of the blog to be retrieved in multisite env.
|
202 |
+
* @return array Options for the blog.
|
203 |
*/
|
204 |
public static function getOptions($blog = null) {
|
205 |
global $dg_options;
|
208 |
: get_blog_option($blog, DG_OPTION_NAME, null);
|
209 |
}
|
210 |
|
|
|
|
|
|
|
|
|
211 |
public static function setOptions($options, $blog = null) {
|
212 |
if (is_null($blog)) {
|
213 |
global $dg_options;
|
218 |
}
|
219 |
}
|
220 |
|
|
|
|
|
|
|
221 |
public static function deleteOptions($blog = null) {
|
222 |
if (is_null($blog)) {
|
223 |
delete_option(DG_OPTION_NAME);
|
226 |
}
|
227 |
}
|
228 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
/**
|
230 |
* Compiles any custom CSS plus the default CSS together,
|
231 |
* minifying in the process.
|
232 |
+
* @param str $custom The custom CSS to compile.
|
233 |
+
* @return str Compiled CSS, including both standard and any custom.
|
234 |
*/
|
235 |
public static function compileCustomCss($custom) {
|
236 |
$css = file_get_contents(DG_PATH . 'assets/css/style.css');
|
inc/class-document.php
CHANGED
@@ -12,6 +12,10 @@ class DG_Document {
|
|
12 |
* PRIVATE FIELDS
|
13 |
*=========================================================================*/
|
14 |
|
|
|
|
|
|
|
|
|
15 |
// general document data
|
16 |
private $description, $gallery, $ID, $link, $title, $title_attribute;
|
17 |
|
@@ -26,7 +30,16 @@ class DG_Document {
|
|
26 |
*/
|
27 |
public function __construct($attachment, $gallery) {
|
28 |
include_once DG_PATH . 'inc/class-thumber.php';
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
// init general document data
|
31 |
$this->gallery = $gallery;
|
32 |
$this->description = $attachment->post_content;
|
@@ -44,41 +57,22 @@ class DG_Document {
|
|
44 |
|
45 |
/**
|
46 |
* Returns HTML representing this Document.
|
47 |
-
* @filter dg_icon_template Filters the DG icon HTML. Passes a single
|
48 |
-
* bool value indicating whether the gallery is using descriptions or not.
|
49 |
-
* @filter dg_doc_icon Deprecated. To be removed in a future relesase.
|
50 |
* @return string
|
51 |
*/
|
52 |
public function __toString() {
|
53 |
$thumb = $this->gallery->useFancyThumbs()
|
54 |
? DG_Thumber::getThumbnail($this->ID)
|
55 |
: DG_Thumber::getDefaultThumbnail($this->ID);
|
|
|
|
|
|
|
56 |
|
57 |
-
|
58 |
-
|
59 |
-
$description = '';
|
60 |
-
|
61 |
-
// if descriptions then add filterable tag and value to replaced tag
|
62 |
-
if ($this->gallery->useDescriptions()) {
|
63 |
-
$repl[] = $this->description;
|
64 |
-
$find[] = '%description%';
|
65 |
-
$description = ' <p>%description%</p>';
|
66 |
}
|
67 |
-
|
68 |
-
// allow developers to filter icon output
|
69 |
-
$doc_icon = apply_filters(
|
70 |
-
'dg_icon_template',
|
71 |
-
' <div class="document-icon">' . PHP_EOL .
|
72 |
-
' <a href="%link%"><img src="%img%" title="%title_attribute%" alt="%title_attribute%" /><br>%title%</a>' . PHP_EOL .
|
73 |
-
' </div>' . PHP_EOL .
|
74 |
-
$description,
|
75 |
-
$this->gallery->useDescriptions(),
|
76 |
-
$this->ID);
|
77 |
-
|
78 |
-
$core = str_replace($find, $repl, $doc_icon);
|
79 |
|
80 |
-
//
|
81 |
-
return apply_filters('dg_doc_icon', $core, $this->ID
|
82 |
}
|
83 |
}
|
84 |
|
12 |
* PRIVATE FIELDS
|
13 |
*=========================================================================*/
|
14 |
|
15 |
+
// templates for HTML output
|
16 |
+
private static $doc_icon = false;
|
17 |
+
private static $img_string = '<img src="%s" title="%s" alt="%s" />';
|
18 |
+
|
19 |
// general document data
|
20 |
private $description, $gallery, $ID, $link, $title, $title_attribute;
|
21 |
|
30 |
*/
|
31 |
public function __construct($attachment, $gallery) {
|
32 |
include_once DG_PATH . 'inc/class-thumber.php';
|
33 |
+
|
34 |
+
// init template for HTML output
|
35 |
+
if(false === self::$doc_icon)
|
36 |
+
{
|
37 |
+
self::$doc_icon =
|
38 |
+
' <div class="document-icon">' . PHP_EOL .
|
39 |
+
' <a href="%s">%s<br>%s</a>' . PHP_EOL .
|
40 |
+
' </div>' . PHP_EOL;
|
41 |
+
}
|
42 |
+
|
43 |
// init general document data
|
44 |
$this->gallery = $gallery;
|
45 |
$this->description = $attachment->post_content;
|
57 |
|
58 |
/**
|
59 |
* Returns HTML representing this Document.
|
|
|
|
|
|
|
60 |
* @return string
|
61 |
*/
|
62 |
public function __toString() {
|
63 |
$thumb = $this->gallery->useFancyThumbs()
|
64 |
? DG_Thumber::getThumbnail($this->ID)
|
65 |
: DG_Thumber::getDefaultThumbnail($this->ID);
|
66 |
+
$icon = sprintf(self::$img_string, $thumb,
|
67 |
+
$this->title_attribute, $this->title_attribute);
|
68 |
+
$core = sprintf(self::$doc_icon, $this->link, $icon, $this->title);
|
69 |
|
70 |
+
if($this->gallery->useDescriptions()) {
|
71 |
+
$core .= " <p>$this->description</p>" . PHP_EOL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
+
// users may filter icon here
|
75 |
+
return apply_filters('dg_doc_icon', $core, $this->ID);
|
76 |
}
|
77 |
}
|
78 |
|
inc/class-gallery.php
CHANGED
@@ -19,31 +19,31 @@ class DG_Gallery {
|
|
19 |
private $errs = array();
|
20 |
|
21 |
// templates for HTML output
|
22 |
-
private static $no_docs =
|
23 |
-
private static $
|
|
|
24 |
|
25 |
-
private static $binary_err =
|
26 |
|
27 |
/*==========================================================================
|
28 |
* PUBLIC FUNCTIONS
|
29 |
*=========================================================================*/
|
30 |
|
31 |
/**
|
32 |
-
*
|
|
|
33 |
*/
|
34 |
public function linkToAttachmentPg() {
|
35 |
return $this->atts['attachment_pg'];
|
36 |
}
|
37 |
|
38 |
-
/**
|
39 |
-
* @return bool Whether to use "fancy" thumbnails.
|
40 |
-
*/
|
41 |
public function useFancyThumbs() {
|
42 |
return $this->atts['fancy'];
|
43 |
}
|
44 |
|
45 |
/**
|
46 |
-
*
|
|
|
47 |
*/
|
48 |
public function useDescriptions() {
|
49 |
return $this->atts['descriptions'];
|
@@ -54,50 +54,56 @@ class DG_Gallery {
|
|
54 |
*=========================================================================*/
|
55 |
|
56 |
/**
|
57 |
-
*
|
58 |
-
* @return
|
59 |
*/
|
60 |
-
public static function getOptions(
|
61 |
-
|
62 |
-
return $
|
63 |
}
|
64 |
|
65 |
/**
|
66 |
-
*
|
67 |
-
* @param
|
68 |
*/
|
69 |
-
public static function setOptions($options
|
70 |
-
$dg_options
|
71 |
$dg_options['gallery'] = $options;
|
72 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
}
|
74 |
|
75 |
/*==========================================================================
|
76 |
* INIT GALLERY
|
77 |
*=========================================================================*/
|
78 |
|
79 |
-
/**
|
80 |
-
* Initializes static values for this class.
|
81 |
-
*/
|
82 |
public static function init() {
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
self::$binary_err = __('The %s parameter may only be "%s" or "%s." You entered "%s."', 'document-gallery');
|
90 |
-
}
|
91 |
}
|
92 |
|
93 |
/**
|
94 |
* Builds a gallery object with attributes passed.
|
95 |
-
* @param
|
96 |
*/
|
97 |
public function __construct($atts) {
|
98 |
// empty string is passed when no arguments are given, but constructor expects an array
|
99 |
$atts = empty($atts) ? array() : $atts;
|
100 |
-
$defaults = self::
|
101 |
|
102 |
// values used to construct tax query (may be empty)
|
103 |
$this->taxa = array_diff_key($atts, $defaults);
|
@@ -123,11 +129,10 @@ class DG_Gallery {
|
|
123 |
|
124 |
/**
|
125 |
* Cleans up user input, making sure we don't pass crap on to WP core.
|
126 |
-
* @
|
127 |
-
* @param multitype:string &$errs The array of errors, which will be appended with any errors found.
|
128 |
*/
|
129 |
public static function sanitizeDefaults($defaults, &$errs) {
|
130 |
-
$old_defaults = self::
|
131 |
|
132 |
// remove invalid keys
|
133 |
$defaults = array_intersect_key($defaults, $old_defaults);
|
@@ -202,14 +207,8 @@ class DG_Gallery {
|
|
202 |
return $defaults;
|
203 |
}
|
204 |
|
205 |
-
/**
|
206 |
-
* Takes the provided value and returns a sanitized value.
|
207 |
-
* @param string $value The attachment_pg value to be sanitized.
|
208 |
-
* @param multitype:string &$errs The array of errors, which will be appended with any errors found.
|
209 |
-
* @return bool The sanitized attachment_pg value.
|
210 |
-
*/
|
211 |
private static function sanitizeAttachmentPg($value, &$err) {
|
212 |
-
$defaults = self::
|
213 |
$ret = $defaults['attachment_pg'];
|
214 |
|
215 |
$attachment_pg = self::toBool($value);
|
@@ -223,14 +222,8 @@ class DG_Gallery {
|
|
223 |
return $ret;
|
224 |
}
|
225 |
|
226 |
-
/**
|
227 |
-
* Takes the provided value and returns a sanitized value.
|
228 |
-
* @param string $value The descriptions value to be sanitized.
|
229 |
-
* @param multitype:string &$errs The array of errors, which will be appended with any errors found.
|
230 |
-
* @return bool The sanitized descriptions value.
|
231 |
-
*/
|
232 |
private static function sanitizeDescriptions($value, &$err) {
|
233 |
-
$defaults = self::
|
234 |
$ret = $defaults['descriptions'];
|
235 |
|
236 |
$descriptions = self::toBool($value);
|
@@ -244,14 +237,8 @@ class DG_Gallery {
|
|
244 |
return $ret;
|
245 |
}
|
246 |
|
247 |
-
/**
|
248 |
-
* Takes the provided value and returns a sanitized value.
|
249 |
-
* @param string $value The fancy value to be sanitized.
|
250 |
-
* @param multitype:string &$errs The array of errors, which will be appended with any errors found.
|
251 |
-
* @return bool The sanitized fancy value.
|
252 |
-
*/
|
253 |
private static function sanitizeFancy($value, &$err) {
|
254 |
-
$defaults = self::
|
255 |
$ret = $defaults['fancy'];
|
256 |
|
257 |
$fancy = self::toBool($value);
|
@@ -265,14 +252,8 @@ class DG_Gallery {
|
|
265 |
return $ret;
|
266 |
}
|
267 |
|
268 |
-
/**
|
269 |
-
* Takes the provided value and returns a sanitized value.
|
270 |
-
* @param string $value The ids value to be sanitized.
|
271 |
-
* @param multitype:string &$errs The array of errors, which will be appended with any errors found.
|
272 |
-
* @return bool|multitype:int The sanitized ids value.
|
273 |
-
*/
|
274 |
private static function sanitizeIds($value, &$err) {
|
275 |
-
$defaults = self::
|
276 |
$ret = $defaults['ids'];
|
277 |
|
278 |
if(false === self::toBool($value)) {
|
@@ -294,14 +275,8 @@ class DG_Gallery {
|
|
294 |
return $ret;
|
295 |
}
|
296 |
|
297 |
-
/**
|
298 |
-
* Takes the provided value and returns a sanitized value.
|
299 |
-
* @param string $value The images value to be sanitized.
|
300 |
-
* @param multitype:string &$errs The array of errors, which will be appended with any errors found.
|
301 |
-
* @return bool The sanitized images value.
|
302 |
-
*/
|
303 |
private static function sanitizeImages($value, &$err) {
|
304 |
-
$defaults = self::
|
305 |
$ret = $defaults['images'];
|
306 |
|
307 |
$images = self::toBool($value);
|
@@ -315,14 +290,8 @@ class DG_Gallery {
|
|
315 |
return $ret;
|
316 |
}
|
317 |
|
318 |
-
/**
|
319 |
-
* Takes the provided value and returns a sanitized value.
|
320 |
-
* @param string $value The localpost value to be sanitized.
|
321 |
-
* @param multitype:string &$errs The array of errors, which will be appended with any errors found.
|
322 |
-
* @return bool The sanitized localpost value.
|
323 |
-
*/
|
324 |
private static function sanitizeLocalpost($value, &$err) {
|
325 |
-
$defaults = self::
|
326 |
$ret = $defaults['localpost'];
|
327 |
|
328 |
$localpost = self::toBool($value);
|
@@ -336,14 +305,8 @@ class DG_Gallery {
|
|
336 |
return $ret;
|
337 |
}
|
338 |
|
339 |
-
/**
|
340 |
-
* Takes the provided value and returns a sanitized value.
|
341 |
-
* @param string $value The order value to be sanitized.
|
342 |
-
* @param multitype:string &$errs The array of errors, which will be appended with any errors found.
|
343 |
-
* @return string The sanitized order value.
|
344 |
-
*/
|
345 |
private static function sanitizeOrder($value, &$err) {
|
346 |
-
$defaults = self::
|
347 |
$ret = $defaults['order'];
|
348 |
|
349 |
$order = strtoupper($value);
|
@@ -356,21 +319,12 @@ class DG_Gallery {
|
|
356 |
return $ret;
|
357 |
}
|
358 |
|
359 |
-
/**
|
360 |
-
* @return multitype:string The valid options for order parameter.
|
361 |
-
*/
|
362 |
public static function getOrderOptions() {
|
363 |
return array('ASC', 'DESC');
|
364 |
}
|
365 |
|
366 |
-
/**
|
367 |
-
* Takes the provided value and returns a sanitized value.
|
368 |
-
* @param string $value The orderby value to be sanitized.
|
369 |
-
* @param multitype:string &$errs The array of errors, which will be appended with any errors found.
|
370 |
-
* @return string The sanitized orderby value.
|
371 |
-
*/
|
372 |
private static function sanitizeOrderby($value, &$err) {
|
373 |
-
$defaults = self::
|
374 |
$ret = $defaults['orderby'];
|
375 |
|
376 |
$orderby = 'ID' === strtoupper($value) ? 'ID' : strtolower($value);
|
@@ -385,23 +339,14 @@ class DG_Gallery {
|
|
385 |
return $ret;
|
386 |
}
|
387 |
|
388 |
-
/**
|
389 |
-
* @return multitype:string The valid options for orderby parameter.
|
390 |
-
*/
|
391 |
public static function getOrderbyOptions() {
|
392 |
return array('author', 'comment_count', 'date', 'ID',
|
393 |
'menu_order', 'modified', 'name', 'none',
|
394 |
'parent', 'post__in', 'rand', 'title');
|
395 |
}
|
396 |
|
397 |
-
/**
|
398 |
-
* Takes the provided value and returns a sanitized value.
|
399 |
-
* @param string $value The relation value to be sanitized.
|
400 |
-
* @param multitype:string &$errs The array of errors, which will be appended with any errors found.
|
401 |
-
* @return string The sanitized relation value.
|
402 |
-
*/
|
403 |
private static function sanitizeRelation($value, &$err) {
|
404 |
-
$defaults = self::
|
405 |
$ret = $defaults['relation'];
|
406 |
|
407 |
$relation = strtoupper($value);
|
@@ -414,16 +359,13 @@ class DG_Gallery {
|
|
414 |
return $ret;
|
415 |
}
|
416 |
|
417 |
-
/**
|
418 |
-
* @return multitype:string The valid options for relation parameter.
|
419 |
-
*/
|
420 |
public static function getRelationOptions() {
|
421 |
return array('AND', 'OR');
|
422 |
}
|
423 |
|
424 |
/**
|
425 |
* Gets all valid Documents based on the attributes passed by the user.
|
426 |
-
* @return
|
427 |
* @throws InvalidArgumentException Thrown when $this->errs is not empty.
|
428 |
*/
|
429 |
private function getDocuments() {
|
@@ -459,8 +401,8 @@ class DG_Gallery {
|
|
459 |
* Function loops through all attributes passed that did not match
|
460 |
* self::$defaults. If they are the name of a taxonomy, they are plugged
|
461 |
* into the query, otherwise $this->errs is appended with an error string.
|
462 |
-
* @global string $wp_version
|
463 |
-
* @param
|
464 |
*/
|
465 |
private function setTaxa(&$query) {
|
466 |
if(!empty($this->taxa)) {
|
@@ -493,9 +435,9 @@ class DG_Gallery {
|
|
493 |
/**
|
494 |
* Returns an array of term ids when provided with a list of term names.
|
495 |
* Also appends an entry onto $errs if any invalid names are found.
|
496 |
-
* @param string $taxon
|
497 |
-
* @param
|
498 |
-
* @return
|
499 |
*/
|
500 |
private function getTermIdsByNames($taxon, $term_names) {
|
501 |
return $this->getTermXByNames('term_id', $taxon, $term_names);
|
@@ -504,24 +446,24 @@ class DG_Gallery {
|
|
504 |
/**
|
505 |
* Returns an array of term slugs when provided with a list of term names.
|
506 |
* Also appends an entry onto $errs if any invalid names are found.
|
507 |
-
* @param string $taxon
|
508 |
-
* @param
|
509 |
-
* @return
|
510 |
*/
|
511 |
private function getTermSlugsByNames($taxon, $term_names) {
|
512 |
return $this->getTermXByNames('slug', $taxon, $term_names);
|
513 |
}
|
514 |
|
515 |
/**
|
516 |
-
* Returns a list of x, where x may be any of the fields within a
|
517 |
* term object, when provided with a list of term names (not slugs).
|
518 |
* (http://codex.wordpress.org/Function_Reference/get_term_by#Return_Values)
|
519 |
*
|
520 |
* Also appends an entry onto $errs if any invalid names are found.
|
521 |
-
* @param string $x
|
522 |
-
* @param string $taxon
|
523 |
-
* @param
|
524 |
-
* @return
|
525 |
*/
|
526 |
private function getTermXByNames($x, $taxon, $term_names) {
|
527 |
$ret = array();
|
@@ -540,7 +482,7 @@ class DG_Gallery {
|
|
540 |
|
541 |
/**
|
542 |
* Given a list of IDs, all attachments represented by these IDs are returned.
|
543 |
-
* @return
|
544 |
*/
|
545 |
private function getAttachmentsByIds() {
|
546 |
$args = array(
|
@@ -565,11 +507,6 @@ class DG_Gallery {
|
|
565 |
|| (int)$var < 0; // isn't positive
|
566 |
}
|
567 |
|
568 |
-
/**
|
569 |
-
* Converts provided value to bool.
|
570 |
-
* @param unknown $val To be converted.
|
571 |
-
* @return bool|NULL Bool value if can be parsed, else NULL.
|
572 |
-
*/
|
573 |
private static function toBool($val) {
|
574 |
if (is_bool($val)) {
|
575 |
return $val;
|
@@ -598,17 +535,10 @@ class DG_Gallery {
|
|
598 |
*=========================================================================*/
|
599 |
|
600 |
/**
|
601 |
-
*
|
602 |
-
* @
|
603 |
-
* bool value indicating whether the gallery is using descriptions or not.
|
604 |
-
* @return string HTML representing this Gallery.
|
605 |
*/
|
606 |
public function __toString() {
|
607 |
-
static $find = null;
|
608 |
-
if (is_null($find)) {
|
609 |
-
$find = array('%class%', '%icons%');
|
610 |
-
}
|
611 |
-
|
612 |
if(!empty($this->errs)) {
|
613 |
return '<p>' . implode('</p><p>', $this->errs) . '</p>';
|
614 |
}
|
@@ -616,11 +546,6 @@ class DG_Gallery {
|
|
616 |
if(empty($this->docs)) {
|
617 |
return self::$no_docs;
|
618 |
}
|
619 |
-
|
620 |
-
$icon_wrapper = apply_filters(
|
621 |
-
'dg_row_template',
|
622 |
-
'<div class="%class%">'. PHP_EOL . '%icons%' . PHP_EOL . '</div>' . PHP_EOL,
|
623 |
-
$this->useDescriptions());
|
624 |
|
625 |
$core = '';
|
626 |
$classes = array('document-icon-wrapper');
|
@@ -628,28 +553,26 @@ class DG_Gallery {
|
|
628 |
$classes[] = 'descriptions';
|
629 |
}
|
630 |
|
631 |
-
$
|
|
|
632 |
if($this->useDescriptions()) {
|
633 |
foreach($this->docs as $doc) {
|
634 |
-
$
|
635 |
-
$core .= str_replace($find, $repl, $icon_wrapper);
|
636 |
}
|
637 |
} else {
|
638 |
for($i = 0; $i < count($this->docs); $i+=4) {
|
639 |
-
$
|
640 |
|
641 |
$min = min($i+4, count($this->docs));
|
642 |
for($x = $i; $x < $min; $x++) {
|
643 |
-
$
|
644 |
}
|
645 |
|
646 |
-
$core .=
|
647 |
}
|
648 |
}
|
649 |
|
650 |
-
|
651 |
-
$gallery = apply_filters('dg_gallery_template', '%rows%', $this->useDescriptions());
|
652 |
-
return self::$comment . str_replace('%rows%', $core, $gallery);
|
653 |
}
|
654 |
}
|
655 |
|
19 |
private $errs = array();
|
20 |
|
21 |
// templates for HTML output
|
22 |
+
private static $no_docs = false;
|
23 |
+
private static $icon_wrapper = false;
|
24 |
+
private static $comment = false;
|
25 |
|
26 |
+
private static $binary_err = false;
|
27 |
|
28 |
/*==========================================================================
|
29 |
* PUBLIC FUNCTIONS
|
30 |
*=========================================================================*/
|
31 |
|
32 |
/**
|
33 |
+
* Returns whether to link to attachment pg.
|
34 |
+
* @return bool
|
35 |
*/
|
36 |
public function linkToAttachmentPg() {
|
37 |
return $this->atts['attachment_pg'];
|
38 |
}
|
39 |
|
|
|
|
|
|
|
40 |
public function useFancyThumbs() {
|
41 |
return $this->atts['fancy'];
|
42 |
}
|
43 |
|
44 |
/**
|
45 |
+
* Returns whether descriptions should be included in output.
|
46 |
+
* @return bool
|
47 |
*/
|
48 |
public function useDescriptions() {
|
49 |
return $this->atts['descriptions'];
|
54 |
*=========================================================================*/
|
55 |
|
56 |
/**
|
57 |
+
* Gets the DG options specific to Gallery.
|
58 |
+
* @return array
|
59 |
*/
|
60 |
+
public static function getOptions() {
|
61 |
+
global $dg_options;
|
62 |
+
return $dg_options['gallery'];
|
63 |
}
|
64 |
|
65 |
/**
|
66 |
+
* Sets the DG options specific to Gallery.
|
67 |
+
* @param array $options
|
68 |
*/
|
69 |
+
public static function setOptions($options) {
|
70 |
+
global $dg_options;
|
71 |
$dg_options['gallery'] = $options;
|
72 |
+
update_option(DG_OPTION_NAME, $dg_options);
|
73 |
+
}
|
74 |
+
|
75 |
+
public static function getDefaults() {
|
76 |
+
$options = self::getOptions();
|
77 |
+
return $options['defaults'];
|
78 |
+
}
|
79 |
+
|
80 |
+
public static function setDefaults($defaults) {
|
81 |
+
$options = self::getOptions();
|
82 |
+
$options['defaults'] = $defaults;
|
83 |
+
self::setOptions($options);
|
84 |
}
|
85 |
|
86 |
/*==========================================================================
|
87 |
* INIT GALLERY
|
88 |
*=========================================================================*/
|
89 |
|
|
|
|
|
|
|
90 |
public static function init() {
|
91 |
+
self::$comment =
|
92 |
+
PHP_EOL . '<!-- ' . __('Generated using Document Gallery. Get yours here: ', 'document-gallery') .
|
93 |
+
'http://wordpress.org/extend/plugins/document-gallery -->' . PHP_EOL;
|
94 |
+
self::$icon_wrapper = '<div class="%s">'. PHP_EOL . '%s</div>' . PHP_EOL;
|
95 |
+
self::$no_docs = '<!-- ' . __('No attachments to display. How boring! :(', 'document-gallery') . ' -->';
|
96 |
+
self::$binary_err = __('The %s parameter may only be "%s" or "%s." You entered "%s."', 'document-gallery');
|
|
|
|
|
97 |
}
|
98 |
|
99 |
/**
|
100 |
* Builds a gallery object with attributes passed.
|
101 |
+
* @param array $atts Array of attributes used in shortcode.
|
102 |
*/
|
103 |
public function __construct($atts) {
|
104 |
// empty string is passed when no arguments are given, but constructor expects an array
|
105 |
$atts = empty($atts) ? array() : $atts;
|
106 |
+
$defaults = self::getDefaults();
|
107 |
|
108 |
// values used to construct tax query (may be empty)
|
109 |
$this->taxa = array_diff_key($atts, $defaults);
|
129 |
|
130 |
/**
|
131 |
* Cleans up user input, making sure we don't pass crap on to WP core.
|
132 |
+
* @global string $wp_version
|
|
|
133 |
*/
|
134 |
public static function sanitizeDefaults($defaults, &$errs) {
|
135 |
+
$old_defaults = self::getDefaults();
|
136 |
|
137 |
// remove invalid keys
|
138 |
$defaults = array_intersect_key($defaults, $old_defaults);
|
207 |
return $defaults;
|
208 |
}
|
209 |
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
private static function sanitizeAttachmentPg($value, &$err) {
|
211 |
+
$defaults = self::getDefaults();
|
212 |
$ret = $defaults['attachment_pg'];
|
213 |
|
214 |
$attachment_pg = self::toBool($value);
|
222 |
return $ret;
|
223 |
}
|
224 |
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
private static function sanitizeDescriptions($value, &$err) {
|
226 |
+
$defaults = self::getDefaults();
|
227 |
$ret = $defaults['descriptions'];
|
228 |
|
229 |
$descriptions = self::toBool($value);
|
237 |
return $ret;
|
238 |
}
|
239 |
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
private static function sanitizeFancy($value, &$err) {
|
241 |
+
$defaults = self::getDefaults();
|
242 |
$ret = $defaults['fancy'];
|
243 |
|
244 |
$fancy = self::toBool($value);
|
252 |
return $ret;
|
253 |
}
|
254 |
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
private static function sanitizeIds($value, &$err) {
|
256 |
+
$defaults = self::getDefaults();
|
257 |
$ret = $defaults['ids'];
|
258 |
|
259 |
if(false === self::toBool($value)) {
|
275 |
return $ret;
|
276 |
}
|
277 |
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
private static function sanitizeImages($value, &$err) {
|
279 |
+
$defaults = self::getDefaults();
|
280 |
$ret = $defaults['images'];
|
281 |
|
282 |
$images = self::toBool($value);
|
290 |
return $ret;
|
291 |
}
|
292 |
|
|
|
|
|
|
|
|
|
|
|
|
|
293 |
private static function sanitizeLocalpost($value, &$err) {
|
294 |
+
$defaults = self::getDefaults();
|
295 |
$ret = $defaults['localpost'];
|
296 |
|
297 |
$localpost = self::toBool($value);
|
305 |
return $ret;
|
306 |
}
|
307 |
|
|
|
|
|
|
|
|
|
|
|
|
|
308 |
private static function sanitizeOrder($value, &$err) {
|
309 |
+
$defaults = self::getDefaults();
|
310 |
$ret = $defaults['order'];
|
311 |
|
312 |
$order = strtoupper($value);
|
319 |
return $ret;
|
320 |
}
|
321 |
|
|
|
|
|
|
|
322 |
public static function getOrderOptions() {
|
323 |
return array('ASC', 'DESC');
|
324 |
}
|
325 |
|
|
|
|
|
|
|
|
|
|
|
|
|
326 |
private static function sanitizeOrderby($value, &$err) {
|
327 |
+
$defaults = self::getDefaults();
|
328 |
$ret = $defaults['orderby'];
|
329 |
|
330 |
$orderby = 'ID' === strtoupper($value) ? 'ID' : strtolower($value);
|
339 |
return $ret;
|
340 |
}
|
341 |
|
|
|
|
|
|
|
342 |
public static function getOrderbyOptions() {
|
343 |
return array('author', 'comment_count', 'date', 'ID',
|
344 |
'menu_order', 'modified', 'name', 'none',
|
345 |
'parent', 'post__in', 'rand', 'title');
|
346 |
}
|
347 |
|
|
|
|
|
|
|
|
|
|
|
|
|
348 |
private static function sanitizeRelation($value, &$err) {
|
349 |
+
$defaults = self::getDefaults();
|
350 |
$ret = $defaults['relation'];
|
351 |
|
352 |
$relation = strtoupper($value);
|
359 |
return $ret;
|
360 |
}
|
361 |
|
|
|
|
|
|
|
362 |
public static function getRelationOptions() {
|
363 |
return array('AND', 'OR');
|
364 |
}
|
365 |
|
366 |
/**
|
367 |
* Gets all valid Documents based on the attributes passed by the user.
|
368 |
+
* @return array Contains all documents matching the query.
|
369 |
* @throws InvalidArgumentException Thrown when $this->errs is not empty.
|
370 |
*/
|
371 |
private function getDocuments() {
|
401 |
* Function loops through all attributes passed that did not match
|
402 |
* self::$defaults. If they are the name of a taxonomy, they are plugged
|
403 |
* into the query, otherwise $this->errs is appended with an error string.
|
404 |
+
* @global string $wp_version Determines which tax query to use.
|
405 |
+
* @param array $query Query to insert tax query into.
|
406 |
*/
|
407 |
private function setTaxa(&$query) {
|
408 |
if(!empty($this->taxa)) {
|
435 |
/**
|
436 |
* Returns an array of term ids when provided with a list of term names.
|
437 |
* Also appends an entry onto $errs if any invalid names are found.
|
438 |
+
* @param string $taxon
|
439 |
+
* @param array $term_names
|
440 |
+
* @return array
|
441 |
*/
|
442 |
private function getTermIdsByNames($taxon, $term_names) {
|
443 |
return $this->getTermXByNames('term_id', $taxon, $term_names);
|
446 |
/**
|
447 |
* Returns an array of term slugs when provided with a list of term names.
|
448 |
* Also appends an entry onto $errs if any invalid names are found.
|
449 |
+
* @param string $taxon
|
450 |
+
* @param array $term_names
|
451 |
+
* @return array
|
452 |
*/
|
453 |
private function getTermSlugsByNames($taxon, $term_names) {
|
454 |
return $this->getTermXByNames('slug', $taxon, $term_names);
|
455 |
}
|
456 |
|
457 |
/**
|
458 |
+
* (WP >= 2.3) Returns a list of x, where x may be any of the fields within a
|
459 |
* term object, when provided with a list of term names (not slugs).
|
460 |
* (http://codex.wordpress.org/Function_Reference/get_term_by#Return_Values)
|
461 |
*
|
462 |
* Also appends an entry onto $errs if any invalid names are found.
|
463 |
+
* @param string $x
|
464 |
+
* @param string $taxon
|
465 |
+
* @param array $term_names
|
466 |
+
* @return array
|
467 |
*/
|
468 |
private function getTermXByNames($x, $taxon, $term_names) {
|
469 |
$ret = array();
|
482 |
|
483 |
/**
|
484 |
* Given a list of IDs, all attachments represented by these IDs are returned.
|
485 |
+
* @return array post objects
|
486 |
*/
|
487 |
private function getAttachmentsByIds() {
|
488 |
$args = array(
|
507 |
|| (int)$var < 0; // isn't positive
|
508 |
}
|
509 |
|
|
|
|
|
|
|
|
|
|
|
510 |
private static function toBool($val) {
|
511 |
if (is_bool($val)) {
|
512 |
return $val;
|
535 |
*=========================================================================*/
|
536 |
|
537 |
/**
|
538 |
+
* Returns HTML representing this Gallery.
|
539 |
+
* @return string
|
|
|
|
|
540 |
*/
|
541 |
public function __toString() {
|
|
|
|
|
|
|
|
|
|
|
542 |
if(!empty($this->errs)) {
|
543 |
return '<p>' . implode('</p><p>', $this->errs) . '</p>';
|
544 |
}
|
546 |
if(empty($this->docs)) {
|
547 |
return self::$no_docs;
|
548 |
}
|
|
|
|
|
|
|
|
|
|
|
549 |
|
550 |
$core = '';
|
551 |
$classes = array('document-icon-wrapper');
|
553 |
$classes[] = 'descriptions';
|
554 |
}
|
555 |
|
556 |
+
$icon_wrapper = sprintf(self::$icon_wrapper, implode(' ', $classes), '%s');
|
557 |
+
|
558 |
if($this->useDescriptions()) {
|
559 |
foreach($this->docs as $doc) {
|
560 |
+
$core .= sprintf($icon_wrapper, $doc);
|
|
|
561 |
}
|
562 |
} else {
|
563 |
for($i = 0; $i < count($this->docs); $i+=4) {
|
564 |
+
$row = '';
|
565 |
|
566 |
$min = min($i+4, count($this->docs));
|
567 |
for($x = $i; $x < $min; $x++) {
|
568 |
+
$row .= $this->docs[$x];
|
569 |
}
|
570 |
|
571 |
+
$core .= sprintf($icon_wrapper, $row);
|
572 |
}
|
573 |
}
|
574 |
|
575 |
+
return self::$comment . $core;
|
|
|
|
|
576 |
}
|
577 |
}
|
578 |
|
inc/class-image-editor-imagick.php
CHANGED
@@ -42,10 +42,10 @@ class DG_Image_Editor_Imagick extends WP_Image_Editor_Imagick {
|
|
42 |
// log anything on failure...
|
43 |
try {
|
44 |
if (!$this->image->setIteratorIndex($this->pg)) {
|
45 |
-
|
46 |
}
|
47 |
} catch(Exception $e) {
|
48 |
-
|
49 |
}
|
50 |
}
|
51 |
|
42 |
// log anything on failure...
|
43 |
try {
|
44 |
if (!$this->image->setIteratorIndex($this->pg)) {
|
45 |
+
DocumentGallery::writeLog($err . '.');
|
46 |
}
|
47 |
} catch(Exception $e) {
|
48 |
+
DocumentGallery::writeLog($err . ': ' . $e->getMessage());
|
49 |
}
|
50 |
}
|
51 |
|
inc/class-logger.php
DELETED
@@ -1,228 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
defined('WPINC') OR exit;
|
3 |
-
|
4 |
-
/**
|
5 |
-
* Encapsulates the logic required to maintain and read log files.
|
6 |
-
*/
|
7 |
-
class DG_Logger {
|
8 |
-
/**
|
9 |
-
* Appends DG log file if logging is enabled. The following format is used for each line:
|
10 |
-
* datetime | level | entry | stacktrace (optional)
|
11 |
-
*
|
12 |
-
* @param int The level of serverity (should be passed using DG_LogLevel consts).
|
13 |
-
* @param string $entry Value to be logged.
|
14 |
-
* @param bool $stacktrace Whether to include full stack trace.
|
15 |
-
* @param bool $force Whether to ignore logging flag and log no matter what.
|
16 |
-
*/
|
17 |
-
public static function writeLog($level, $entry, $stacktrace = false, $force = false) {
|
18 |
-
if ($force || self::logEnabled()) {
|
19 |
-
$fp = fopen(self::getLogFileName(), 'a');
|
20 |
-
if (false !== $fp) {
|
21 |
-
$fields = array(time(), $level, $entry);
|
22 |
-
|
23 |
-
$trace = debug_backtrace(false);
|
24 |
-
if ($stacktrace) {
|
25 |
-
unset($trace[0]);
|
26 |
-
|
27 |
-
$trace_str = '';
|
28 |
-
$i = 1;
|
29 |
-
|
30 |
-
foreach($trace as $node) {
|
31 |
-
$trace_str .= "#$i ";
|
32 |
-
|
33 |
-
$file = '';
|
34 |
-
if (isset($node['file'])) {
|
35 |
-
// convert to relative path from WP root
|
36 |
-
$file = str_replace(ABSPATH, '', $node['file']);
|
37 |
-
}
|
38 |
-
|
39 |
-
if (isset($node['line'])) {
|
40 |
-
$file .= "({$node['line']})";
|
41 |
-
}
|
42 |
-
|
43 |
-
if ($file) {
|
44 |
-
$trace_str .= "$file: ";
|
45 |
-
}
|
46 |
-
|
47 |
-
if(isset($node['class'])) {
|
48 |
-
$trace_str .= "{$node['class']}{$node['type']}";
|
49 |
-
}
|
50 |
-
|
51 |
-
if (isset($node['function'])) {
|
52 |
-
$args = '';
|
53 |
-
if (isset($node['args'])) {
|
54 |
-
$args = implode(', ', array_map(array(__CLASS__, 'print_r'), $node['args']));
|
55 |
-
}
|
56 |
-
|
57 |
-
$trace_str .= "{$node['function']}($args)" . PHP_EOL;
|
58 |
-
}
|
59 |
-
$i++;
|
60 |
-
}
|
61 |
-
|
62 |
-
$fields[] = $trace_str;
|
63 |
-
} else {
|
64 |
-
// Remove first item from backtrace as it's this function which is redundant.
|
65 |
-
$caller = $trace[1];
|
66 |
-
$caller = (isset($caller['class']) ? $caller['class'] : '') . $caller['type'] . $caller['function'];
|
67 |
-
$fields[2] = '(' . $caller . ') ' . $fields[2];
|
68 |
-
}
|
69 |
-
|
70 |
-
fputcsv($fp, $fields);
|
71 |
-
fclose($fp);
|
72 |
-
} // TODO: else
|
73 |
-
}
|
74 |
-
}
|
75 |
-
|
76 |
-
/**
|
77 |
-
* Reads the current blog's log file, placing the values in to a 2-dimensional array.
|
78 |
-
* @param int $skip How many lines to skip before returning rows.
|
79 |
-
* @param int $limit Max number of lines to read.
|
80 |
-
* @return multitype:multitype:string|null The rows from the log file or null if failed to open log.
|
81 |
-
*/
|
82 |
-
public static function readLog($skip = 0, $limit = PHP_INT_MAX) {
|
83 |
-
$ret = null;
|
84 |
-
$fp = @fopen(self::getLogFileName(), 'r');
|
85 |
-
|
86 |
-
if ($fp !== false) {
|
87 |
-
$ret = array();
|
88 |
-
while (count($ret) < $limit && ($fields = fgetcsv($fp)) !== false) {
|
89 |
-
if ($skip > 0) {
|
90 |
-
$skip--;
|
91 |
-
continue;
|
92 |
-
}
|
93 |
-
|
94 |
-
if (!is_null($fields)) {
|
95 |
-
$ret[] = $fields;
|
96 |
-
}
|
97 |
-
}
|
98 |
-
}
|
99 |
-
|
100 |
-
return $ret;
|
101 |
-
}
|
102 |
-
|
103 |
-
/**
|
104 |
-
* Clears the log file for the active blog.
|
105 |
-
*/
|
106 |
-
public static function clearLog() {
|
107 |
-
// we don't care if the file actually exists -- it won't when we're done
|
108 |
-
@unlink(self::getLogFileName());
|
109 |
-
}
|
110 |
-
|
111 |
-
/**
|
112 |
-
* @return bool Whether debug logging is currently enabled.
|
113 |
-
*/
|
114 |
-
public static function logEnabled() {
|
115 |
-
global $dg_options;
|
116 |
-
return $dg_options['logging'];
|
117 |
-
}
|
118 |
-
|
119 |
-
/**
|
120 |
-
* @return string Full path to log file for current blog.
|
121 |
-
*/
|
122 |
-
private static function getLogFileName() {
|
123 |
-
return DG_PATH . 'log/' . get_current_blog_id() . '.log';
|
124 |
-
}
|
125 |
-
|
126 |
-
/**
|
127 |
-
* Wraps print_r passing true for the return argument.
|
128 |
-
* @param unknown $v Value to be printed.
|
129 |
-
* @return string Printed value.
|
130 |
-
*/
|
131 |
-
private static function print_r($v) {
|
132 |
-
return print_r($v, true);
|
133 |
-
}
|
134 |
-
}
|
135 |
-
|
136 |
-
/**
|
137 |
-
* LogLevel acts as an enumeration of all possible log levels.
|
138 |
-
*/
|
139 |
-
class DG_LogLevel {
|
140 |
-
/**
|
141 |
-
* @var int Log level for anything that doesn't indicate a problem.
|
142 |
-
*/
|
143 |
-
const Detail = 0;
|
144 |
-
|
145 |
-
/**
|
146 |
-
* @var int Log level for anything that is a minor issue.
|
147 |
-
*/
|
148 |
-
const Warning = 1;
|
149 |
-
|
150 |
-
/**
|
151 |
-
* @var int Log level for when something went wrong.
|
152 |
-
*/
|
153 |
-
const Error = 2;
|
154 |
-
|
155 |
-
/**
|
156 |
-
* @var ReflectionClass Backs the getter.
|
157 |
-
*/
|
158 |
-
private static $ref = null;
|
159 |
-
|
160 |
-
/**
|
161 |
-
* @return ReflectionClass Instance of reflection class for this class.
|
162 |
-
*/
|
163 |
-
private static function getReflectionClass() {
|
164 |
-
if (is_null(self::$ref)) {
|
165 |
-
self::$ref = new ReflectionClass(__CLASS__);
|
166 |
-
}
|
167 |
-
|
168 |
-
return self::$ref;
|
169 |
-
}
|
170 |
-
|
171 |
-
/**
|
172 |
-
* @var multitype Backs the getter.
|
173 |
-
*/
|
174 |
-
private static $levels = null;
|
175 |
-
|
176 |
-
/**
|
177 |
-
* @return multitype Associative array containing all log level names mapped to their int value.
|
178 |
-
*/
|
179 |
-
public static function getLogLevels() {
|
180 |
-
if (is_null(self::$levels)) {
|
181 |
-
$ref = self::getReflectionClass();
|
182 |
-
self::$levels = $ref->getConstants();
|
183 |
-
}
|
184 |
-
|
185 |
-
return self::$levels;
|
186 |
-
}
|
187 |
-
|
188 |
-
/**
|
189 |
-
* @param string $name Name to be checked for validity.
|
190 |
-
* @return bool Whether given name represents valid log level.
|
191 |
-
*/
|
192 |
-
public static function isValidName($name) {
|
193 |
-
return array_key_exists($name, self::getLogLevels());
|
194 |
-
}
|
195 |
-
|
196 |
-
/**
|
197 |
-
* @param int $value Value to be checked for validity.
|
198 |
-
* @return bool Whether given value represents valid log level.
|
199 |
-
*/
|
200 |
-
public static function isValidValue($value) {
|
201 |
-
return (false !== array_search($value, self::getLogLevels()));
|
202 |
-
}
|
203 |
-
|
204 |
-
/**
|
205 |
-
* @param string $name The name for which to retrieve a value.
|
206 |
-
* @return int|null The value associated with the given name.
|
207 |
-
*/
|
208 |
-
public static function getValueByName($name) {
|
209 |
-
$levels = self::getLogLevels();
|
210 |
-
return array_key_exists($name, self::getLogLevels()) ? $levels[$name] : null;
|
211 |
-
}
|
212 |
-
|
213 |
-
/**
|
214 |
-
* @param int $value The value for which to retrieve a name.
|
215 |
-
* @return string|null The name associated with the given value.
|
216 |
-
*/
|
217 |
-
public static function getNameByValue($value) {
|
218 |
-
$ret = array_search($value, self::getLogLevels());
|
219 |
-
return (false !== $ret) ? $ret : null;
|
220 |
-
}
|
221 |
-
|
222 |
-
/**
|
223 |
-
* Blocks instantiation. All functions are static.
|
224 |
-
*/
|
225 |
-
private function __construct() {
|
226 |
-
|
227 |
-
}
|
228 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/class-setup.php
CHANGED
@@ -9,93 +9,44 @@ defined('WPINC') OR exit;
|
|
9 |
class DG_Setup {
|
10 |
|
11 |
/**
|
12 |
-
* The default DG options to be used on install and when validating structure of options.
|
13 |
-
* @param $skeleton bool When true, expensive values are not calculated. Only keys may be trusted when returning skeleton.
|
14 |
* @return array Contains default options for DG.
|
15 |
*/
|
16 |
-
public static function getDefaultOptions(
|
17 |
include_once DG_PATH . 'inc/class-thumber.php';
|
18 |
-
|
19 |
-
$
|
20 |
-
if (!$skeleton) {
|
21 |
-
$date = gmdate('D, d M Y H:i:s');
|
22 |
-
$etag = md5($date);
|
23 |
-
$gs = DG_Thumber::getGhostscriptExecutable();
|
24 |
-
}
|
25 |
-
|
26 |
return array(
|
27 |
'thumber' => array(
|
28 |
-
|
29 |
-
'
|
30 |
-
|
31 |
-
|
32 |
-
'
|
33 |
-
|
34 |
-
// which thumbnail generation methods are available
|
35 |
-
'active' => DG_Thumber::getDefaultThumbers($skeleton),
|
36 |
-
|
37 |
-
// max width to generate thumbnails
|
38 |
-
'width' => 200,
|
39 |
-
|
40 |
-
// max height to generate thumbnails
|
41 |
-
'height' => 200,
|
42 |
-
|
43 |
-
// time after which to quite trying to generate new thumbanils for gallery
|
44 |
-
'timeout' => 30
|
45 |
),
|
46 |
'gallery' => array(
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
// include just attached to the post using shortcode
|
63 |
-
'localpost' => true,
|
64 |
-
|
65 |
-
// ascending/descending order for included documents
|
66 |
-
'order' => 'ASC',
|
67 |
-
|
68 |
-
// which property to order by
|
69 |
-
'orderby' => 'menu_order',
|
70 |
-
|
71 |
-
// AND or OR
|
72 |
-
'relation' => 'AND'
|
73 |
),
|
74 |
'css' => array(
|
75 |
-
|
76 |
-
'
|
77 |
-
|
78 |
-
|
79 |
-
'minified' => '',
|
80 |
-
|
81 |
-
// date/time last modified
|
82 |
-
'last-modified' => $date,
|
83 |
-
|
84 |
-
// used when telling browser whether to load from cache
|
85 |
-
'etag' => $etag,
|
86 |
-
|
87 |
-
// used in cache busting after user modifies CSS
|
88 |
-
'version' => 0
|
89 |
),
|
90 |
-
|
91 |
-
// current DG version
|
92 |
-
'version' => DG_VERSION,
|
93 |
-
|
94 |
-
// whether to validate DG option structure on save
|
95 |
-
'validation' => false,
|
96 |
-
|
97 |
-
// whether to logging DG activity
|
98 |
-
'logging' => false
|
99 |
);
|
100 |
}
|
101 |
|
@@ -129,23 +80,22 @@ class DG_Setup {
|
|
129 |
$options = DocumentGallery::getOptions($blog);
|
130 |
if (is_null($options)) return;
|
131 |
|
132 |
-
// version-specific updates
|
133 |
-
self::twoPointTwo($options);
|
134 |
-
|
135 |
// update plugin version
|
136 |
$options['version'] = DG_VERSION;
|
137 |
|
138 |
// setup CSS
|
139 |
-
|
140 |
-
|
141 |
-
|
|
|
|
|
142 |
$options['css']['last-modified'] = gmdate('D, d M Y H:i:s');
|
143 |
$options['css']['etag'] = md5($options['css']['last-modified']);
|
144 |
|
145 |
// remove previously-failed thumbs
|
146 |
$thumbs = $options['thumber']['thumbs'];
|
147 |
foreach ($thumbs as $k => $v) {
|
148 |
-
if (
|
149 |
unset($options['thumber']['thumbs'][$k]);
|
150 |
}
|
151 |
}
|
@@ -153,47 +103,6 @@ class DG_Setup {
|
|
153 |
DocumentGallery::setOptions($options, $blog);
|
154 |
}
|
155 |
|
156 |
-
/**
|
157 |
-
* The 'created_timestamp' key in each thumb record is being moved
|
158 |
-
* to 'timestamp' as part of a move to store timestamp for failed
|
159 |
-
* thumbnails in addition to successful ones.
|
160 |
-
*
|
161 |
-
* The defaults sub-branch in the gallery branch is being flattened into its parent.
|
162 |
-
*
|
163 |
-
* @param array $options The options to be modified.
|
164 |
-
*/
|
165 |
-
private static function twoPointTwo(&$options) {
|
166 |
-
if (version_compare($options['version'], '2.2', '<')) {
|
167 |
-
$thumbs = array();
|
168 |
-
|
169 |
-
// "created_timestamp" moving to just "timestamp"
|
170 |
-
foreach ($options['thumber']['thumbs'] as $id => $thumb) {
|
171 |
-
if (false === $thumb) continue;
|
172 |
-
|
173 |
-
$thumbs[$id] = array(
|
174 |
-
'timestamp' => $thumb['created_timestamp'],
|
175 |
-
'thumb_url' => $thumb['thumb_url'],
|
176 |
-
'thumb_path' => $thumb['thumb_path'],
|
177 |
-
'thumber' => $thumb['thumber']
|
178 |
-
);
|
179 |
-
}
|
180 |
-
|
181 |
-
$options['thumber']['thumbs'] = $thumbs;
|
182 |
-
|
183 |
-
// adding default thumbnail generation timeout
|
184 |
-
$options['thumber']['timeout'] = 30;
|
185 |
-
|
186 |
-
// flatten out "defaults" level
|
187 |
-
$options['gallery'] = $options['gallery']['defaults'];
|
188 |
-
|
189 |
-
// adding "validation" branch
|
190 |
-
$options['validation'] = false;
|
191 |
-
|
192 |
-
// adding "logging" branch
|
193 |
-
$options['logging'] = false;
|
194 |
-
}
|
195 |
-
}
|
196 |
-
|
197 |
/**
|
198 |
* Sets up Document Gallery on all blog(s) activated.
|
199 |
* @param bool $networkwide Whether this is a network-wide update (multisite only).
|
@@ -265,7 +174,7 @@ class DG_Setup {
|
|
265 |
if (is_null($options)) return;
|
266 |
|
267 |
foreach ($options['thumbs'] as $val) {
|
268 |
-
if (
|
269 |
@unlink($val['thumb_path']);
|
270 |
}
|
271 |
}
|
9 |
class DG_Setup {
|
10 |
|
11 |
/**
|
|
|
|
|
12 |
* @return array Contains default options for DG.
|
13 |
*/
|
14 |
+
public static function getDefaultOptions() {
|
15 |
include_once DG_PATH . 'inc/class-thumber.php';
|
16 |
+
$date = gmdate('D, d M Y H:i:s');
|
17 |
+
$etag = md5($date);
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
return array(
|
19 |
'thumber' => array(
|
20 |
+
'thumbs' => array(),
|
21 |
+
'gs' => DG_Thumber::getGhostscriptExecutable(),
|
22 |
+
'active' => DG_Thumber::getDefaultThumbers(),
|
23 |
+
'width' => 200,
|
24 |
+
'height' => 200
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
),
|
26 |
'gallery' => array(
|
27 |
+
'defaults' => array(
|
28 |
+
// default: link directly to file (true to link to attachment pg)
|
29 |
+
'attachment_pg' => false,
|
30 |
+
'descriptions' => false,
|
31 |
+
// include thumbnail of actual document in gallery display
|
32 |
+
'fancy' => true,
|
33 |
+
// comma-separated list of attachment ids
|
34 |
+
'ids' => false,
|
35 |
+
// if true, all images attached to current page will be included also
|
36 |
+
'images' => false,
|
37 |
+
'localpost' => true,
|
38 |
+
'order' => 'ASC',
|
39 |
+
'orderby' => 'menu_order',
|
40 |
+
'relation' => 'AND'
|
41 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
),
|
43 |
'css' => array(
|
44 |
+
'text' => '',
|
45 |
+
'last-modified' => $date,
|
46 |
+
'etag' => $etag,
|
47 |
+
'version' => 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
),
|
49 |
+
'version' => DG_VERSION
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
);
|
51 |
}
|
52 |
|
80 |
$options = DocumentGallery::getOptions($blog);
|
81 |
if (is_null($options)) return;
|
82 |
|
|
|
|
|
|
|
83 |
// update plugin version
|
84 |
$options['version'] = DG_VERSION;
|
85 |
|
86 |
// setup CSS
|
87 |
+
if (!empty($options['css']['text'])) {
|
88 |
+
// Only populate minified if it will be used
|
89 |
+
$options['css']['minified'] =
|
90 |
+
DocumentGallery::compileCustomCss($options['css']['text']);
|
91 |
+
}
|
92 |
$options['css']['last-modified'] = gmdate('D, d M Y H:i:s');
|
93 |
$options['css']['etag'] = md5($options['css']['last-modified']);
|
94 |
|
95 |
// remove previously-failed thumbs
|
96 |
$thumbs = $options['thumber']['thumbs'];
|
97 |
foreach ($thumbs as $k => $v) {
|
98 |
+
if (false === $v) {
|
99 |
unset($options['thumber']['thumbs'][$k]);
|
100 |
}
|
101 |
}
|
103 |
DocumentGallery::setOptions($options, $blog);
|
104 |
}
|
105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
/**
|
107 |
* Sets up Document Gallery on all blog(s) activated.
|
108 |
* @param bool $networkwide Whether this is a network-wide update (multisite only).
|
174 |
if (is_null($options)) return;
|
175 |
|
176 |
foreach ($options['thumbs'] as $val) {
|
177 |
+
if (false !== $val) {
|
178 |
@unlink($val['thumb_path']);
|
179 |
}
|
180 |
}
|
inc/class-thumber.php
CHANGED
@@ -11,16 +11,11 @@ class DG_Thumber {
|
|
11 |
|
12 |
/**
|
13 |
* Returns the default mapping of thumber slug to whether it is active or not.
|
14 |
-
* @param $skeleton bool When true, values that require computation will be
|
15 |
-
* skipped. Useful when only structure of options is needed.
|
16 |
* @return array
|
17 |
*/
|
18 |
-
public static function getDefaultThumbers(
|
19 |
-
$gs_active =
|
20 |
-
|
21 |
-
$gs_active = (bool)self::getGhostscriptExecutable();
|
22 |
-
$imagick_active = self::isImagickAvailable();
|
23 |
-
}
|
24 |
|
25 |
return array('av' => true, 'gs' => $gs_active,
|
26 |
'imagick' => $imagick_active, 'google' => false);
|
@@ -34,17 +29,17 @@ class DG_Thumber {
|
|
34 |
* @return str URL to the thumbnail.
|
35 |
*/
|
36 |
public static function getThumbnail($ID, $pg = 1) {
|
37 |
-
static $
|
38 |
-
if (is_null($
|
39 |
-
$
|
40 |
}
|
41 |
|
42 |
$options = self::getOptions();
|
43 |
|
44 |
// if we haven't saved a thumb, generate one
|
45 |
-
if (
|
46 |
-
// prevent page timing out
|
47 |
-
if ((time() - $
|
48 |
return self::getDefaultThumbnail($ID, $pg);
|
49 |
}
|
50 |
|
@@ -54,31 +49,23 @@ class DG_Thumber {
|
|
54 |
foreach (self::getThumbers() as $ext_preg => $thumber) {
|
55 |
$ext_preg = '!\.(' . $ext_preg . ')$!i';
|
56 |
|
57 |
-
if (preg_match($ext_preg, $file)
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
'thumb_url' => $thumb['url'],
|
68 |
-
'thumb_path' => $thumb['path'],
|
69 |
-
'thumber' => $thumber
|
70 |
-
);
|
71 |
-
self::setOptions($options);
|
72 |
-
break;
|
73 |
-
}
|
74 |
}
|
75 |
}
|
76 |
}
|
77 |
|
78 |
-
$
|
79 |
-
|
80 |
-
|
81 |
-
$options['thumbs'][$ID] = array('timestamp' => time());
|
82 |
self::setOptions($options);
|
83 |
}
|
84 |
|
@@ -135,12 +122,12 @@ class DG_Thumber {
|
|
135 |
$temp_file = self::getTempFile($ext);
|
136 |
|
137 |
if (!$fp = @fopen($temp_file, 'wb')) {
|
138 |
-
|
139 |
return false;
|
140 |
}
|
141 |
|
142 |
if (!@fwrite($fp, $metadata['image']['data'])) {
|
143 |
-
|
144 |
fclose($fp);
|
145 |
return false;
|
146 |
}
|
@@ -175,10 +162,9 @@ class DG_Thumber {
|
|
175 |
$img = new DG_Image_Editor_Imagick($doc_path, $pg - 1);
|
176 |
$err = $img->load();
|
177 |
if(is_wp_error($err)) {
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
$err->get_error_message());
|
182 |
return false;
|
183 |
}
|
184 |
|
@@ -186,10 +172,9 @@ class DG_Thumber {
|
|
186 |
|
187 |
$err = $img->save($temp_file, 'image/png');
|
188 |
if (is_wp_error($err)) {
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
$err->get_error_message());
|
193 |
return false;
|
194 |
}
|
195 |
|
@@ -246,7 +231,7 @@ class DG_Thumber {
|
|
246 |
exec(sprintf($gs, $pg, $pg, $temp_path, $doc_path), $out, $ret);
|
247 |
|
248 |
if ($ret != 0) {
|
249 |
-
|
250 |
@unlink($temp_path);
|
251 |
return false;
|
252 |
}
|
@@ -375,7 +360,7 @@ class DG_Thumber {
|
|
375 |
);
|
376 |
|
377 |
// prevent PHP timeout before HTTP completes
|
378 |
-
|
379 |
|
380 |
$options = self::getOptions();
|
381 |
$google_viewer = sprintf($google_viewer, urlencode($doc_url), (int)$pg, $options['width']);
|
@@ -384,7 +369,7 @@ class DG_Thumber {
|
|
384 |
$response = wp_remote_get($google_viewer, $args);
|
385 |
|
386 |
if (is_wp_error($response) || !preg_match('/[23][0-9]{2}/', $response['response']['code'])) {
|
387 |
-
|
388 |
(is_wp_error($response)
|
389 |
? $response->get_error_message()
|
390 |
: $response['response']['message']));
|
@@ -548,7 +533,7 @@ class DG_Thumber {
|
|
548 |
/**
|
549 |
* Key: Attachment ID
|
550 |
* Val: array
|
551 |
-
* +
|
552 |
* + thumb_path - System path to thumbnail image.
|
553 |
* + thumb_url - URL pointing to the thumbnail for this document.
|
554 |
* + thumber - Generator used to create thumb OR false if failed to gen.
|
@@ -562,7 +547,7 @@ class DG_Thumber {
|
|
562 |
/**
|
563 |
* Key: Attachment ID
|
564 |
* Val: array
|
565 |
-
* +
|
566 |
* + thumb_path - System path to thumbnail image.
|
567 |
* + thumb_url - URL pointing to the thumbnail for this document.
|
568 |
* + thumber - Generator used to create thumb OR false if failed to gen.
|
@@ -626,22 +611,16 @@ class DG_Thumber {
|
|
626 |
$thumbers = array_filter($thumbers, 'is_callable');
|
627 |
|
628 |
// log which thumbers are being used
|
629 |
-
if (
|
630 |
if (count($thumbers) > 0) {
|
631 |
$entry = __('Thumbnail Generators: ', 'document-gallery');
|
632 |
foreach ($thumbers as $k => $v) {
|
633 |
-
$
|
634 |
-
|
635 |
-
// TODO: The following works for all internal regexes, but may have unpredictable
|
636 |
-
// results if developer adds additional thumbnail generators using different regexes
|
637 |
-
$filetypes = str_replace('|', ', ', $k);
|
638 |
-
|
639 |
-
$entry .= PHP_EOL . "$thumber: $filetypes";
|
640 |
}
|
641 |
} else {
|
642 |
$entry = __('No thumbnail generators enabled.', 'document-gallery');
|
643 |
}
|
644 |
-
|
645 |
}
|
646 |
}
|
647 |
|
@@ -680,10 +659,9 @@ class DG_Thumber {
|
|
680 |
$img = wp_get_image_editor($temp_path);
|
681 |
|
682 |
if (is_wp_error($img)) {
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
$img->get_error_message());
|
687 |
return false;
|
688 |
}
|
689 |
|
@@ -692,10 +670,9 @@ class DG_Thumber {
|
|
692 |
$err = $img->save($thumb_path);
|
693 |
|
694 |
if (is_wp_error($err)) {
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
$err->get_error_message());
|
699 |
return false;
|
700 |
}
|
701 |
|
@@ -739,27 +716,22 @@ class DG_Thumber {
|
|
739 |
}
|
740 |
|
741 |
/**
|
742 |
-
* Removes the existing thumbnail/document meta for the attachment
|
743 |
-
* with
|
744 |
*
|
745 |
-
* @param int
|
746 |
*/
|
747 |
-
public static function deleteThumbMeta($
|
748 |
$options = self::getOptions();
|
749 |
-
$modified = false;
|
750 |
|
751 |
-
|
752 |
-
if (
|
753 |
-
|
754 |
-
@unlink($options['thumbs'][$id]['thumb_path']);
|
755 |
-
}
|
756 |
-
|
757 |
-
unset($options['thumbs'][$id]);
|
758 |
-
$modified = true;
|
759 |
}
|
|
|
|
|
|
|
760 |
}
|
761 |
-
|
762 |
-
if ($modified) { self::setOptions($options); }
|
763 |
}
|
764 |
|
765 |
/**
|
11 |
|
12 |
/**
|
13 |
* Returns the default mapping of thumber slug to whether it is active or not.
|
|
|
|
|
14 |
* @return array
|
15 |
*/
|
16 |
+
public static function getDefaultThumbers() {
|
17 |
+
$gs_active = (bool)self::getGhostscriptExecutable();
|
18 |
+
$imagick_active = self::isImagickAvailable();
|
|
|
|
|
|
|
19 |
|
20 |
return array('av' => true, 'gs' => $gs_active,
|
21 |
'imagick' => $imagick_active, 'google' => false);
|
29 |
* @return str URL to the thumbnail.
|
30 |
*/
|
31 |
public static function getThumbnail($ID, $pg = 1) {
|
32 |
+
static $timeout = null;
|
33 |
+
if (is_null($timeout)) {
|
34 |
+
$timeout = time();
|
35 |
}
|
36 |
|
37 |
$options = self::getOptions();
|
38 |
|
39 |
// if we haven't saved a thumb, generate one
|
40 |
+
if (!isset($options['thumbs'][$ID])) {
|
41 |
+
// prevent page timing out -- generate for no more than 30 sec
|
42 |
+
if ((time() - $timeout) > 30) {
|
43 |
return self::getDefaultThumbnail($ID, $pg);
|
44 |
}
|
45 |
|
49 |
foreach (self::getThumbers() as $ext_preg => $thumber) {
|
50 |
$ext_preg = '!\.(' . $ext_preg . ')$!i';
|
51 |
|
52 |
+
if (preg_match($ext_preg, $file)
|
53 |
+
&& ($thumb = self::getThumbnailTemplate($thumber, $ID, $pg))) {
|
54 |
+
$options['thumbs'][$ID] = array(
|
55 |
+
'created_timestamp' => time(),
|
56 |
+
'thumb_url' => $thumb['url'],
|
57 |
+
'thumb_path' => $thumb['path'],
|
58 |
+
'thumber' => $thumber
|
59 |
+
);
|
60 |
+
self::setOptions($options);
|
61 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
}
|
63 |
}
|
64 |
}
|
65 |
|
66 |
+
if (!isset($options['thumbs'][$ID]) || false === $options['thumbs'][$ID]) {
|
67 |
+
if (!isset($options['thumbs'][$ID])) {
|
68 |
+
$options['thumbs'][$ID] = false;
|
|
|
69 |
self::setOptions($options);
|
70 |
}
|
71 |
|
122 |
$temp_file = self::getTempFile($ext);
|
123 |
|
124 |
if (!$fp = @fopen($temp_file, 'wb')) {
|
125 |
+
DocumentGallery::writeLog(__('Could not open file: ', 'document-gallery') . $temp_file);
|
126 |
return false;
|
127 |
}
|
128 |
|
129 |
if (!@fwrite($fp, $metadata['image']['data'])) {
|
130 |
+
DocumentGallery::writeLog(__('Could not write file: ', 'document-gallery') . $temp_file);
|
131 |
fclose($fp);
|
132 |
return false;
|
133 |
}
|
162 |
$img = new DG_Image_Editor_Imagick($doc_path, $pg - 1);
|
163 |
$err = $img->load();
|
164 |
if(is_wp_error($err)) {
|
165 |
+
DocumentGallery::writeLog(
|
166 |
+
__('Failed to open file in Imagick: ', 'document-gallery') .
|
167 |
+
$err->get_error_message());
|
|
|
168 |
return false;
|
169 |
}
|
170 |
|
172 |
|
173 |
$err = $img->save($temp_file, 'image/png');
|
174 |
if (is_wp_error($err)) {
|
175 |
+
DocumentGallery::writeLog(
|
176 |
+
__('Failed to save image in Imagick: ', 'document-gallery') .
|
177 |
+
$err->get_error_message());
|
|
|
178 |
return false;
|
179 |
}
|
180 |
|
231 |
exec(sprintf($gs, $pg, $pg, $temp_path, $doc_path), $out, $ret);
|
232 |
|
233 |
if ($ret != 0) {
|
234 |
+
DocumentGallery::writeLog(__('Ghostscript failed: ', 'document-gallery') . print_r($out));
|
235 |
@unlink($temp_path);
|
236 |
return false;
|
237 |
}
|
360 |
);
|
361 |
|
362 |
// prevent PHP timeout before HTTP completes
|
363 |
+
set_time_limit($timeout);
|
364 |
|
365 |
$options = self::getOptions();
|
366 |
$google_viewer = sprintf($google_viewer, urlencode($doc_url), (int)$pg, $options['width']);
|
369 |
$response = wp_remote_get($google_viewer, $args);
|
370 |
|
371 |
if (is_wp_error($response) || !preg_match('/[23][0-9]{2}/', $response['response']['code'])) {
|
372 |
+
DocumentGallery::writeLog(__('Failed to retrieve thumbnail from Google: ', 'document-gallery') .
|
373 |
(is_wp_error($response)
|
374 |
? $response->get_error_message()
|
375 |
: $response['response']['message']));
|
533 |
/**
|
534 |
* Key: Attachment ID
|
535 |
* Val: array
|
536 |
+
* + created_timestamp - When the thumbnail was generated.
|
537 |
* + thumb_path - System path to thumbnail image.
|
538 |
* + thumb_url - URL pointing to the thumbnail for this document.
|
539 |
* + thumber - Generator used to create thumb OR false if failed to gen.
|
547 |
/**
|
548 |
* Key: Attachment ID
|
549 |
* Val: array
|
550 |
+
* + created_timestamp - When the thumbnail was generated.
|
551 |
* + thumb_path - System path to thumbnail image.
|
552 |
* + thumb_url - URL pointing to the thumbnail for this document.
|
553 |
* + thumber - Generator used to create thumb OR false if failed to gen.
|
611 |
$thumbers = array_filter($thumbers, 'is_callable');
|
612 |
|
613 |
// log which thumbers are being used
|
614 |
+
if (DocumentGallery::logEnabled()) {
|
615 |
if (count($thumbers) > 0) {
|
616 |
$entry = __('Thumbnail Generators: ', 'document-gallery');
|
617 |
foreach ($thumbers as $k => $v) {
|
618 |
+
$entry .= '{' . $k . ' => ' . print_r($v, true) . '} ';
|
|
|
|
|
|
|
|
|
|
|
|
|
619 |
}
|
620 |
} else {
|
621 |
$entry = __('No thumbnail generators enabled.', 'document-gallery');
|
622 |
}
|
623 |
+
DocumentGallery::writeLog($entry);
|
624 |
}
|
625 |
}
|
626 |
|
659 |
$img = wp_get_image_editor($temp_path);
|
660 |
|
661 |
if (is_wp_error($img)) {
|
662 |
+
DocumentGallery::writeLog(
|
663 |
+
__('Failed to get image editor: ', 'document-gallery') .
|
664 |
+
$img->get_error_message());
|
|
|
665 |
return false;
|
666 |
}
|
667 |
|
670 |
$err = $img->save($thumb_path);
|
671 |
|
672 |
if (is_wp_error($err)) {
|
673 |
+
DocumentGallery::writeLog(
|
674 |
+
__('Failed to save image: ', 'document-gallery') .
|
675 |
+
$err->get_error_message());
|
|
|
676 |
return false;
|
677 |
}
|
678 |
|
716 |
}
|
717 |
|
718 |
/**
|
719 |
+
* Removes the existing thumbnail/document meta for the attachment
|
720 |
+
* with $ID, if such a thumbnail exists.
|
721 |
*
|
722 |
+
* @param int $ID
|
723 |
*/
|
724 |
+
public static function deleteThumbMeta($ID) {
|
725 |
$options = self::getOptions();
|
|
|
726 |
|
727 |
+
if (isset($options['thumbs'][$ID])) {
|
728 |
+
if (false !== $options['thumbs'][$ID]) {
|
729 |
+
@unlink($options['thumbs'][$ID]['thumb_path']);
|
|
|
|
|
|
|
|
|
|
|
730 |
}
|
731 |
+
|
732 |
+
unset($options['thumbs'][$ID]);
|
733 |
+
self::setOptions($options);
|
734 |
}
|
|
|
|
|
735 |
}
|
736 |
|
737 |
/**
|
languages/document-gallery-es_ES.mo
CHANGED
Binary file
|
languages/document-gallery-es_ES.po
CHANGED
@@ -8,10 +8,10 @@ msgstr ""
|
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"PO-Revision-Date: 2014-
|
12 |
"Last-Translator: Dan Rossiter <dan.rossiters@gmail.com>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
-
"X-Generator: Poedit 1.6.
|
15 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
"Language: es\n"
|
17 |
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2014-04-20 21:59-0600\n"
|
12 |
"Last-Translator: Dan Rossiter <dan.rossiters@gmail.com>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
+
"X-Generator: Poedit 1.6.4\n"
|
15 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
"Language: es\n"
|
17 |
|
languages/document-gallery-fr_FR.mo
CHANGED
Binary file
|
languages/document-gallery-fr_FR.po
CHANGED
@@ -1,461 +1,268 @@
|
|
1 |
-
# Copyright (C) 2014 Document Gallery
|
2 |
-
# This file is distributed under the same license as the Document Gallery package.
|
3 |
-
msgid ""
|
4 |
-
msgstr ""
|
5 |
-
"Project-Id-Version: Document Gallery 2.2\n"
|
6 |
-
"Report-Msgid-Bugs-To: http://wordpress.org/tag/document-gallery\n"
|
7 |
-
"POT-Creation-Date: 2014-
|
8 |
-
"MIME-Version: 1.0\n"
|
9 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
-
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"PO-Revision-Date: 2014-
|
12 |
-
"Last-Translator: Marc LIOTARD <tech@trafic-influence.com>\n"
|
13 |
-
"Language-Team:
|
14 |
-
"
|
15 |
-
"
|
16 |
-
"
|
17 |
-
|
18 |
-
#: admin/class-admin.php:
|
19 |
-
msgid "
|
20 |
-
msgstr "
|
21 |
-
|
22 |
-
#: admin/class-admin.php:
|
23 |
-
msgid "
|
24 |
-
msgstr "
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
#: admin/class-admin.php:79
|
44 |
-
msgid "
|
45 |
-
msgstr "
|
46 |
-
|
47 |
-
#: admin/class-admin.php:
|
48 |
-
msgid "
|
49 |
-
msgstr "
|
50 |
-
|
51 |
-
#: admin/class-admin.php:
|
52 |
-
msgid "
|
53 |
-
msgstr "
|
54 |
-
|
55 |
-
#: admin/class-admin.php:
|
56 |
-
msgid "
|
57 |
-
msgstr "
|
58 |
-
|
59 |
-
#: admin/class-admin.php:
|
60 |
-
msgid "
|
61 |
-
msgstr "
|
62 |
-
|
63 |
-
#: admin/class-admin.php:
|
64 |
-
msgid "
|
65 |
-
msgstr "
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
"
|
79 |
-
"
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
"
|
92 |
-
msgstr ""
|
93 |
-
"
|
94 |
-
"
|
95 |
-
|
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 |
-
"\"_blank\">
|
125 |
-
"
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
"
|
130 |
-
"
|
131 |
-
|
132 |
-
|
133 |
-
"
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
"
|
139 |
-
"
|
140 |
-
|
141 |
-
|
142 |
-
"
|
143 |
-
"
|
144 |
-
|
145 |
-
#: admin/class-admin.php:
|
146 |
-
msgid "
|
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 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
msgstr "
|
209 |
-
|
210 |
-
#:
|
211 |
-
msgid "
|
212 |
-
msgstr "
|
213 |
-
|
214 |
-
#:
|
215 |
-
msgid "
|
216 |
-
msgstr "
|
217 |
-
|
218 |
-
#:
|
219 |
-
msgid ""
|
220 |
-
"
|
221 |
-
|
222 |
-
|
223 |
-
"
|
224 |
-
"
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
"
|
236 |
-
msgstr ""
|
237 |
-
|
238 |
-
|
239 |
-
"
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
"
|
244 |
-
"
|
245 |
-
|
246 |
-
|
247 |
-
"
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
"
|
252 |
-
msgstr ""
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
"
|
260 |
-
"
|
261 |
-
|
262 |
-
|
263 |
-
"
|
264 |
-
"
|
265 |
-
|
266 |
-
|
267 |
-
msgid "
|
268 |
-
msgstr "
|
269 |
-
|
270 |
-
#: admin/class-admin.php:762
|
271 |
-
msgid "Thumbnail"
|
272 |
-
msgstr "Miniature"
|
273 |
-
|
274 |
-
#: admin/class-admin.php:763
|
275 |
-
msgid "File name"
|
276 |
-
msgstr "Nom de fichier"
|
277 |
-
|
278 |
-
#: admin/class-admin.php:764 admin/class-admin.php:839
|
279 |
-
msgid "Date"
|
280 |
-
msgstr "Date"
|
281 |
-
|
282 |
-
#: admin/class-admin.php:767
|
283 |
-
msgid "Delete Selected"
|
284 |
-
msgstr "Effacer les sélectionnés"
|
285 |
-
|
286 |
-
#: admin/class-admin.php:769
|
287 |
-
msgid "item"
|
288 |
-
msgid_plural "items"
|
289 |
-
msgstr[0] "élément"
|
290 |
-
msgstr[1] "éléments"
|
291 |
-
|
292 |
-
#: admin/class-admin.php:772
|
293 |
-
msgid "Go to the first page"
|
294 |
-
msgstr "Première page"
|
295 |
-
|
296 |
-
#: admin/class-admin.php:773
|
297 |
-
msgid "Go to the previous page"
|
298 |
-
msgstr "Page précédente"
|
299 |
-
|
300 |
-
#: admin/class-admin.php:775
|
301 |
-
msgid "Current page"
|
302 |
-
msgstr "Page actuelle"
|
303 |
-
|
304 |
-
#: admin/class-admin.php:775
|
305 |
-
msgid "of"
|
306 |
-
msgstr "sur"
|
307 |
-
|
308 |
-
#: admin/class-admin.php:776
|
309 |
-
msgid "Go to the next page"
|
310 |
-
msgstr "Page suivante"
|
311 |
-
|
312 |
-
#: admin/class-admin.php:777
|
313 |
-
msgid "Go to the last page"
|
314 |
-
msgstr "Dernière page"
|
315 |
-
|
316 |
-
#: admin/class-admin.php:779
|
317 |
-
msgid "items per page"
|
318 |
-
msgstr "éléments pas page"
|
319 |
-
|
320 |
-
#: admin/class-admin.php:818
|
321 |
-
msgid "View"
|
322 |
-
msgstr "Voir"
|
323 |
-
|
324 |
-
#: admin/class-admin.php:819
|
325 |
-
msgid "attachment page"
|
326 |
-
msgstr "page des médias"
|
327 |
-
|
328 |
-
#: admin/class-admin.php:819
|
329 |
-
msgid "Attachment not found"
|
330 |
-
msgstr "Média introuvable"
|
331 |
-
|
332 |
-
#: admin/class-admin.php:840
|
333 |
-
msgid "Level"
|
334 |
-
msgstr "Niveau"
|
335 |
-
|
336 |
-
#: admin/class-admin.php:841
|
337 |
-
msgid "Message"
|
338 |
-
msgstr "Message"
|
339 |
-
|
340 |
-
#: admin/class-admin.php:850
|
341 |
-
msgid "Expand All"
|
342 |
-
msgstr "Tout déplier"
|
343 |
-
|
344 |
-
#: admin/class-admin.php:853
|
345 |
-
msgid "Collapse All"
|
346 |
-
msgstr "Tout replier"
|
347 |
-
|
348 |
-
#: admin/class-admin.php:897
|
349 |
-
msgid "Clear Log"
|
350 |
-
msgstr "Effacer les logs"
|
351 |
-
|
352 |
-
#: admin/class-admin.php:904
|
353 |
-
msgid "There are no log entries at this time."
|
354 |
-
msgstr "Il n'y aucune entrée de log pour l'instant."
|
355 |
-
|
356 |
-
#: admin/class-admin.php:904
|
357 |
-
msgid "For Your information:"
|
358 |
-
msgstr "Information :"
|
359 |
-
|
360 |
-
#: admin/class-admin.php:904
|
361 |
-
msgid "is turned ON"
|
362 |
-
msgstr "est activé"
|
363 |
-
|
364 |
-
#: admin/class-admin.php:904
|
365 |
-
msgid "is turned OFF"
|
366 |
-
msgstr "n'est PAS activé"
|
367 |
-
|
368 |
-
#: inc/class-gallery.php:85
|
369 |
-
msgid "Generated using Document Gallery. Get yours here: "
|
370 |
-
msgstr "Génération réalisée avec Document Gallery. Obtenez votre version ici :"
|
371 |
-
|
372 |
-
#: inc/class-gallery.php:88
|
373 |
-
msgid "No attachments to display. How boring! :("
|
374 |
-
msgstr "Aucun média à afficher... Quel ennui ! :("
|
375 |
-
|
376 |
-
#: inc/class-gallery.php:89
|
377 |
-
msgid "The %s parameter may only be \"%s\" or \"%s.\" You entered \"%s.\""
|
378 |
-
msgstr ""
|
379 |
-
"Le paramètre %s ne peut être que \"%s\" ou \"%s.\" Vous avez saisi \"%s.\""
|
380 |
-
|
381 |
-
#: inc/class-gallery.php:285
|
382 |
-
msgid "The following ID is invalid: "
|
383 |
-
msgid_plural "The following IDs are invalid: "
|
384 |
-
msgstr[0] "L'ID suivant est invalide :"
|
385 |
-
msgstr[1] "Les ID suivants sont invalides :"
|
386 |
-
|
387 |
-
#: inc/class-gallery.php:378
|
388 |
-
msgid "The orderby value entered, \"%s,\" is not valid."
|
389 |
-
msgstr "La valeur orderby saisie, \"%s,\" est invalide."
|
390 |
-
|
391 |
-
#: inc/class-gallery.php:532
|
392 |
-
msgid "%s is not a valid term name in %s."
|
393 |
-
msgstr "%s n'est pas un terme valide dans %s."
|
394 |
-
|
395 |
-
#: inc/class-image-editor-imagick.php:37
|
396 |
-
msgid "Failed to set Imagick page number"
|
397 |
-
msgstr "Impossible de définir le numéro de page Imagick"
|
398 |
-
|
399 |
-
#: inc/class-thumber.php:59
|
400 |
-
msgid "Attempting to generate thumbnail for attachment #%d with (%s)"
|
401 |
-
msgstr "Tentative de génération de la miniature pour le média #%d avec '%s'"
|
402 |
-
|
403 |
-
#: inc/class-thumber.php:138
|
404 |
-
msgid "Could not open file: "
|
405 |
-
msgstr "Impossible d'ouvrir le fichier :"
|
406 |
-
|
407 |
-
#: inc/class-thumber.php:143
|
408 |
-
msgid "Could not write file: "
|
409 |
-
msgstr "Impossible d'écrire le fichier :"
|
410 |
-
|
411 |
-
#: inc/class-thumber.php:180
|
412 |
-
msgid "Failed to open file in Imagick: "
|
413 |
-
msgstr "Impossible d'ouvrir le fichier dans Imagick :"
|
414 |
-
|
415 |
-
#: inc/class-thumber.php:191
|
416 |
-
msgid "Failed to save image in Imagick: "
|
417 |
-
msgstr "Impossible d'enregistrer l'image dans Imagick :"
|
418 |
-
|
419 |
-
#: inc/class-thumber.php:249
|
420 |
-
msgid "Ghostscript failed: "
|
421 |
-
msgstr "Échec Ghostscript :"
|
422 |
-
|
423 |
-
#: inc/class-thumber.php:387
|
424 |
-
msgid "Failed to retrieve thumbnail from Google: "
|
425 |
-
msgstr "Impossible d'obtenir la miniature depuis Google :"
|
426 |
-
|
427 |
-
#: inc/class-thumber.php:631
|
428 |
-
msgid "Thumbnail Generators: "
|
429 |
-
msgstr "Générateurs de miniature :"
|
430 |
-
|
431 |
-
#: inc/class-thumber.php:642
|
432 |
-
msgid "No thumbnail generators enabled."
|
433 |
-
msgstr "Aucun générateur de miniature activé."
|
434 |
-
|
435 |
-
#: inc/class-thumber.php:685
|
436 |
-
msgid "Failed to get image editor: "
|
437 |
-
msgstr "Impossible d'obtenir l'éditeur d'image :"
|
438 |
-
|
439 |
-
#: inc/class-thumber.php:697
|
440 |
-
msgid "Failed to save image: "
|
441 |
-
msgstr "Impossible d'enregistrer l'image :"
|
442 |
-
|
443 |
-
#. Plugin URI of the plugin/theme
|
444 |
-
msgid "http://wordpress.org/extend/plugins/document-gallery/"
|
445 |
-
msgstr "http://wordpress.org/extend/plugins/document-gallery/"
|
446 |
-
|
447 |
-
#. Description of the plugin/theme
|
448 |
-
msgid ""
|
449 |
-
"Display non-images (and images) in gallery format on a page or post with the "
|
450 |
-
"[dg] shortcode."
|
451 |
-
msgstr ""
|
452 |
-
"Affiche les médias de type documents (et images) au format galerie dans une "
|
453 |
-
"page ou un article grâce au shortcode [dg]."
|
454 |
-
|
455 |
-
#. Author of the plugin/theme
|
456 |
-
msgid "Dan Rossiter"
|
457 |
-
msgstr "Dan Rossiter"
|
458 |
-
|
459 |
-
#. Author URI of the plugin/theme
|
460 |
-
msgid "http://danrossiter.org/"
|
461 |
-
msgstr "http://danrossiter.org/"
|
1 |
+
# Copyright (C) 2014 Document Gallery
|
2 |
+
# This file is distributed under the same license as the Document Gallery package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Document Gallery 2.0.2\n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/document-gallery\n"
|
7 |
+
"POT-Creation-Date: 2014-03-22 07:07:30+00:00\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2014-09-03 13:02+0100\n"
|
12 |
+
"Last-Translator: Marc LIOTARD <tech@trafic-influence.com>\n"
|
13 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
+
"X-Generator: Poedit 1.5.4\n"
|
15 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
+
"Language: fr\n"
|
17 |
+
|
18 |
+
#: admin/class-admin.php:27
|
19 |
+
msgid "Settings"
|
20 |
+
msgstr "Configuration"
|
21 |
+
|
22 |
+
#: admin/class-admin.php:37
|
23 |
+
msgid "Document Gallery Settings"
|
24 |
+
msgstr "Configuration de Document Gallery"
|
25 |
+
|
26 |
+
#. Plugin Name of the plugin/theme
|
27 |
+
#: admin/class-admin.php:38
|
28 |
+
msgid "Document Gallery"
|
29 |
+
msgstr "Document Gallery"
|
30 |
+
|
31 |
+
#: admin/class-admin.php:67
|
32 |
+
msgid "Default Settings"
|
33 |
+
msgstr "Configuration par défaut"
|
34 |
+
|
35 |
+
#: admin/class-admin.php:71
|
36 |
+
msgid "Thumbnail Generation"
|
37 |
+
msgstr "Génération de miniatures"
|
38 |
+
|
39 |
+
#: admin/class-admin.php:75
|
40 |
+
msgid "Custom CSS"
|
41 |
+
msgstr "CSS personnalisé"
|
42 |
+
|
43 |
+
#: admin/class-admin.php:79
|
44 |
+
msgid "Advanced Thumbnail Generation"
|
45 |
+
msgstr "Génération avancée de miniatures "
|
46 |
+
|
47 |
+
#: admin/class-admin.php:91
|
48 |
+
msgid "Link to attachment page rather than to file"
|
49 |
+
msgstr "Faire un lien vers la page du média plutôt que vers le fichier"
|
50 |
+
|
51 |
+
#: admin/class-admin.php:103
|
52 |
+
msgid "Include document descriptions"
|
53 |
+
msgstr "Inclure la description du document"
|
54 |
+
|
55 |
+
#: admin/class-admin.php:115
|
56 |
+
msgid "Use auto-generated document thumbnails"
|
57 |
+
msgstr "Utiliser les miniatures du document générées automatiquement"
|
58 |
+
|
59 |
+
#: admin/class-admin.php:127
|
60 |
+
msgid "Include image attachments in gallery"
|
61 |
+
msgstr "Inclure les images dans la galerie"
|
62 |
+
|
63 |
+
#: admin/class-admin.php:139
|
64 |
+
msgid "Only look for attachments in post where [dg] is used"
|
65 |
+
msgstr ""
|
66 |
+
"Chercher uniquement les médias attachés à l'article où [dg] est utilisé"
|
67 |
+
|
68 |
+
#: admin/class-admin.php:152
|
69 |
+
msgid "Ascending or descending sorting of documents"
|
70 |
+
msgstr "Classement ascendant ou descendant des documents"
|
71 |
+
|
72 |
+
#: admin/class-admin.php:165
|
73 |
+
msgid "Which field to order documents by"
|
74 |
+
msgstr "Champ par lequel classer les documents"
|
75 |
+
|
76 |
+
#: admin/class-admin.php:178
|
77 |
+
msgid ""
|
78 |
+
"Whether matched documents must have all taxa_names (AND) or at least one (OR)"
|
79 |
+
msgstr ""
|
80 |
+
"Permet de définir si les documents qui coïncident doivent avoir toutes les "
|
81 |
+
"taxa_names (AND) ou au moins une (OR)"
|
82 |
+
|
83 |
+
#: admin/class-admin.php:190
|
84 |
+
msgid "Locally generate thumbnails for audio & video files."
|
85 |
+
msgstr ""
|
86 |
+
"Générer localement les miniatures pour les médias de type audio et vidéo."
|
87 |
+
|
88 |
+
#: admin/class-admin.php:203
|
89 |
+
msgid ""
|
90 |
+
"Use <a href=\"http://www.ghostscript.com/\" target=\"_blank\">Ghostscript</"
|
91 |
+
"a> for faster local PDF processing (compared to Imagick)."
|
92 |
+
msgstr ""
|
93 |
+
"Utiliser <a href=\"http://www.ghostscript.com/\" target=\"_blank"
|
94 |
+
"\">Ghostscript</a> pour accélérer le processus de PDF localement (en "
|
95 |
+
"comparaison avec Imagick)."
|
96 |
+
|
97 |
+
#: admin/class-admin.php:204
|
98 |
+
msgid ""
|
99 |
+
"Your server is not configured to run <a href=\"http://www.ghostscript.com/\" "
|
100 |
+
"target=\"_blank\">Ghostscript</a>."
|
101 |
+
msgstr ""
|
102 |
+
"Votre serveur n'est pas configuré pour exécuter <a href=\"http://www."
|
103 |
+
"ghostscript.com/\" target=\"_blank\">Ghostscript</a>."
|
104 |
+
|
105 |
+
#: admin/class-admin.php:218
|
106 |
+
msgid ""
|
107 |
+
"Use <a href=\"http://www.php.net/manual/en/book.imagick.php\" target=\"_blank"
|
108 |
+
"\">Imagick</a> to handle lots of filetypes locally."
|
109 |
+
msgstr ""
|
110 |
+
"Utiliser <a href=\"http://www.php.net/manual/es/book.imagick.php\" target="
|
111 |
+
"\"_blank\">Imagick</a> pour gérer la majeure partie des types de fichier "
|
112 |
+
"localement."
|
113 |
+
|
114 |
+
#: admin/class-admin.php:219
|
115 |
+
msgid ""
|
116 |
+
"Your server is not configured to run <a href=\"http://www.php.net/manual/en/"
|
117 |
+
"book.imagick.php\" target=\"_blank\">Imagick</a>."
|
118 |
+
msgstr ""
|
119 |
+
"Votre serveur n'est pas configuré pour exécuter <a href=\"http://www.php.net/"
|
120 |
+
"manual/es/book.imagick.php\" target=\"_blank\">Imagick</a>."
|
121 |
+
|
122 |
+
#: admin/class-admin.php:233
|
123 |
+
msgid ""
|
124 |
+
"Use <a href=\"https://drive.google.com/viewer\" target=\"_blank\">Google "
|
125 |
+
"Drive Viewer</a> to generate thumbnails for MS Office files and many other "
|
126 |
+
"file types remotely."
|
127 |
+
msgstr ""
|
128 |
+
"Utiliser <a href=\"https://drive.google.com/viewer\" target=\"_blank"
|
129 |
+
"\">Google Drive Viewer</a> pour générer les miniatures des fichiers MS "
|
130 |
+
"Office et autres types de fichiers."
|
131 |
+
|
132 |
+
#: admin/class-admin.php:234
|
133 |
+
msgid "Your server does not allow remote HTTP access."
|
134 |
+
msgstr ""
|
135 |
+
"Votre serveur n'est pas configuré pour gérer les accès HTTP à distance."
|
136 |
+
|
137 |
+
#: admin/class-admin.php:248
|
138 |
+
msgid "Successfully auto-detected the location of Ghostscript."
|
139 |
+
msgstr "Le répertoire de GhostScript a été localisé avec succès."
|
140 |
+
|
141 |
+
#: admin/class-admin.php:249
|
142 |
+
msgid "Failed to auto-detect the location of Ghostscript."
|
143 |
+
msgstr "La tentative de localisation du répertoire de GhostScript a échoué."
|
144 |
+
|
145 |
+
#: admin/class-admin.php:257
|
146 |
+
msgid ""
|
147 |
+
"The following values will be used by default in the shortcode. You can still "
|
148 |
+
"manually set each of these values in each individual shortcode."
|
149 |
+
msgstr ""
|
150 |
+
"Les valeurs suivantes seront utilisées par défaut dans le shortcode [dg]. "
|
151 |
+
"Vous pouvez néanmoins paramétrer manuellement ces valeurs pour chaque "
|
152 |
+
"shortcode individuel."
|
153 |
+
|
154 |
+
#: admin/class-admin.php:264
|
155 |
+
msgid "Select which tools to use when generating thumbnails."
|
156 |
+
msgstr "Choisir les outils utilisés pour la génération des miniatures."
|
157 |
+
|
158 |
+
#: admin/class-admin.php:270
|
159 |
+
msgid ""
|
160 |
+
"Enter custom CSS styling for use with document galleries. To see which ids "
|
161 |
+
"and classes you can style, take a look at <a href=\"%s\" target=\"_blank"
|
162 |
+
"\">style.css</a>."
|
163 |
+
msgstr ""
|
164 |
+
"Saisissez CSS personalizado para su uso con galerías de documentos. Para ver "
|
165 |
+
"los identificadores de clases de estilo, vea <a href=\"%s\" target=\"_blank"
|
166 |
+
"\">style.css</a>."
|
167 |
+
|
168 |
+
#: admin/class-admin.php:288
|
169 |
+
msgid ""
|
170 |
+
"Unless you <em>really</em> know what you're doing, you should not touch "
|
171 |
+
"these values."
|
172 |
+
msgstr ""
|
173 |
+
"A moins de <em>vraiment</em> savoir ce que vous faites, vous ne devriez pas "
|
174 |
+
"modifier cette valeur."
|
175 |
+
|
176 |
+
#: admin/class-admin.php:290
|
177 |
+
msgid ""
|
178 |
+
"NOTE: <code>exec()</code> is not accessible. Ghostscript will not function."
|
179 |
+
msgstr ""
|
180 |
+
"NOTE : <code>exec()</code> n'est pas accessible. Ghostscript ne fonctionnera "
|
181 |
+
"pas."
|
182 |
+
|
183 |
+
#: admin/class-admin.php:387
|
184 |
+
msgid "Failed to update CSS file."
|
185 |
+
msgstr "Échec de l'enregistrement du fichier CSS."
|
186 |
+
|
187 |
+
#: admin/class-admin.php:398
|
188 |
+
msgid "Invalid Ghostscript path given: "
|
189 |
+
msgstr "Chemin de GhostScript invalide :"
|
190 |
+
|
191 |
+
#: inc/class-gallery.php:88
|
192 |
+
msgid "Generated using Document Gallery. Get yours here: "
|
193 |
+
msgstr "Génération réalisée avec Document Gallery. Obtenez votre version ici :"
|
194 |
+
|
195 |
+
#: inc/class-gallery.php:91
|
196 |
+
msgid "No attachments to display. How boring! :("
|
197 |
+
msgstr "Aucun média à afficher... Quel ennui ! :("
|
198 |
+
|
199 |
+
#: inc/class-gallery.php:92
|
200 |
+
msgid "The %s parameter may only be \"%s\" or \"%s.\" You entered \"%s.\""
|
201 |
+
msgstr ""
|
202 |
+
"Le paramètre %s ne peut être que \"%s\" ou \"%s.\" Vous avez saisi \"%s.\""
|
203 |
+
|
204 |
+
#: inc/class-gallery.php:263
|
205 |
+
msgid "The following ID is invalid: "
|
206 |
+
msgid_plural "The following IDs are invalid: "
|
207 |
+
msgstr[0] "L'ID suivant est invalide :"
|
208 |
+
msgstr[1] "Les ID suivants sont invalides :"
|
209 |
+
|
210 |
+
#: inc/class-gallery.php:329
|
211 |
+
msgid "The orderby value entered, \"%s,\" is not valid."
|
212 |
+
msgstr "La valeur orderby saisie, \"%s,\" est invalide."
|
213 |
+
|
214 |
+
#: inc/class-gallery.php:438
|
215 |
+
msgid "The following attributes are invalid: "
|
216 |
+
msgstr "Les attributs suivants sont invalides :"
|
217 |
+
|
218 |
+
#: inc/class-gallery.php:488
|
219 |
+
msgid "%s is not a valid term name in %s."
|
220 |
+
msgstr "%s n'est pas un terme valide dans %s."
|
221 |
+
|
222 |
+
#: inc/class-thumber.php:131
|
223 |
+
msgid "Could not open file: "
|
224 |
+
msgstr "Impossible d'ouvrir le fichier :"
|
225 |
+
|
226 |
+
#: inc/class-thumber.php:136
|
227 |
+
msgid "Could not write file: "
|
228 |
+
msgstr "Impossible d'écrire dans le fichier :"
|
229 |
+
|
230 |
+
#: inc/class-thumber.php:174
|
231 |
+
msgid "Failed to open file in Imagick: "
|
232 |
+
msgstr "Échec de l'ouverture du fichier dans Imagick:"
|
233 |
+
|
234 |
+
#: inc/class-thumber.php:184
|
235 |
+
msgid "Failed to save image in Imagick: "
|
236 |
+
msgstr "Échec de l'enregistrement de l'image dans Imagick:"
|
237 |
+
|
238 |
+
#: inc/class-thumber.php:244
|
239 |
+
msgid "Ghostscript failed: "
|
240 |
+
msgstr "Échec Ghostscript :"
|
241 |
+
|
242 |
+
#: inc/class-thumber.php:357
|
243 |
+
msgid "Failed to retrieve thumbnail from Google: "
|
244 |
+
msgstr "Échec de l'obtention de la miniature depuis Google :"
|
245 |
+
|
246 |
+
#: inc/class-thumber.php:644
|
247 |
+
msgid "Failed to get image editor: "
|
248 |
+
msgstr "Échec de l'obtention de l'éditeur d'image :"
|
249 |
+
|
250 |
+
#: inc/class-thumber.php:655
|
251 |
+
msgid "Failed to save image: "
|
252 |
+
msgstr "Échec de la sauvegarde de l'image :"
|
253 |
+
|
254 |
+
#. Description of the plugin/theme
|
255 |
+
msgid ""
|
256 |
+
"Display non-images (and images) in gallery format on a page or post with the "
|
257 |
+
"[dg] shortcode."
|
258 |
+
msgstr ""
|
259 |
+
"Affiche les fichiers non-images (et aussi les images) en format gallerie "
|
260 |
+
"dans une page ou un article grâce au shortcode [dg]."
|
261 |
+
|
262 |
+
#. Author of the plugin/theme
|
263 |
+
msgid "Dan Rossiter"
|
264 |
+
msgstr "Dan Rossiter"
|
265 |
+
|
266 |
+
#. Author URI of the plugin/theme
|
267 |
+
msgid "http://danrossiter.org/"
|
268 |
+
msgstr "http://danrossiter.org/"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/document-gallery-ru_RU.mo
CHANGED
Binary file
|
languages/document-gallery-ru_RU.po
CHANGED
@@ -2,102 +2,89 @@
|
|
2 |
# This file is distributed under the same license as the Document Gallery package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Document Gallery 2.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/document-gallery\n"
|
7 |
-
"POT-Creation-Date: 2014-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"PO-Revision-Date: 2014-
|
12 |
"Last-Translator: Dan Rossiter <dan.rossiters@gmail.com>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
-
"X-Generator: Poedit 1.6.
|
15 |
-
"Plural-Forms: nplurals=
|
16 |
-
"
|
17 |
-
"Language: ru_RU\n"
|
18 |
|
19 |
-
#: admin/class-admin.php:
|
20 |
-
msgid "General"
|
21 |
-
msgstr "Основные"
|
22 |
-
|
23 |
-
#: admin/class-admin.php:29
|
24 |
-
msgid "Thumbnail Management"
|
25 |
-
msgstr "Управление миниатюрами"
|
26 |
-
|
27 |
-
#: admin/class-admin.php:30
|
28 |
-
msgid "Logging"
|
29 |
-
msgstr "Журнал событий"
|
30 |
-
|
31 |
-
#: admin/class-admin.php:31
|
32 |
-
msgid "Advanced"
|
33 |
-
msgstr "Для опытных пользователей"
|
34 |
-
|
35 |
-
#: admin/class-admin.php:68
|
36 |
msgid "Settings"
|
37 |
msgstr "Настройки"
|
38 |
|
39 |
-
#: admin/class-admin.php:
|
40 |
msgid "Document Gallery Settings"
|
41 |
msgstr "Настройки Document Gallery"
|
42 |
|
43 |
#. Plugin Name of the plugin/theme
|
44 |
-
#: admin/class-admin.php:
|
45 |
msgid "Document Gallery"
|
46 |
msgstr "Document Gallery"
|
47 |
|
48 |
-
#: admin/class-admin.php:
|
49 |
msgid "Default Settings"
|
50 |
-
msgstr "Настройки
|
51 |
|
52 |
-
#: admin/class-admin.php:
|
53 |
msgid "Thumbnail Generation"
|
54 |
-
msgstr "Создание
|
55 |
|
56 |
-
#: admin/class-admin.php:
|
57 |
msgid "Custom CSS"
|
58 |
msgstr "Индивидуальные CSS"
|
59 |
|
60 |
-
#: admin/class-admin.php:
|
|
|
|
|
|
|
|
|
61 |
msgid "Link to attachment page rather than to file"
|
62 |
msgstr "Ссылка на страницу вложения, а не на сам файл"
|
63 |
|
64 |
-
#: admin/class-admin.php:
|
65 |
msgid "Include document descriptions"
|
66 |
msgstr "Включать описания документов"
|
67 |
|
68 |
-
#: admin/class-admin.php:
|
69 |
msgid "Use auto-generated document thumbnails"
|
70 |
msgstr "Использовать автоматически создаваемые миниатюры документов"
|
71 |
|
72 |
-
#: admin/class-admin.php:
|
73 |
msgid "Include image attachments in gallery"
|
74 |
msgstr "Включать прикрепленные к посту картинки в галерею"
|
75 |
|
76 |
-
#: admin/class-admin.php:
|
77 |
msgid "Only look for attachments in post where [dg] is used"
|
78 |
msgstr "Искать вложения только в постах, где используется [dg]"
|
79 |
|
80 |
-
#: admin/class-admin.php:
|
81 |
msgid "Ascending or descending sorting of documents"
|
82 |
msgstr "Сортировка документов по возрастанию или по убыванию"
|
83 |
|
84 |
-
#: admin/class-admin.php:
|
85 |
msgid "Which field to order documents by"
|
86 |
msgstr "По какому полю сортировать документы"
|
87 |
|
88 |
-
#: admin/class-admin.php:
|
89 |
msgid ""
|
90 |
"Whether matched documents must have all taxa_names (AND) or at least one (OR)"
|
91 |
msgstr ""
|
92 |
"Искать документы, принадлежащие всем категориям (AND) перечисленным в "
|
93 |
-
"параметре category, также
|
94 |
"одной (OR)"
|
95 |
|
96 |
-
#: admin/class-admin.php:
|
97 |
msgid "Locally generate thumbnails for audio & video files."
|
98 |
msgstr "Локально создавать миниатюры для аудио и видео файлов."
|
99 |
|
100 |
-
#: admin/class-admin.php:
|
101 |
msgid ""
|
102 |
"Use <a href=\"http://www.ghostscript.com/\" target=\"_blank\">Ghostscript</"
|
103 |
"a> for faster local PDF processing (compared to Imagick)."
|
@@ -106,7 +93,7 @@ msgstr ""
|
|
106 |
"\">Ghostscript</a> для более быстрой локальной обработки PDF (в сравнении с "
|
107 |
"Imagick)."
|
108 |
|
109 |
-
#: admin/class-admin.php:
|
110 |
msgid ""
|
111 |
"Your server is not configured to run <a href=\"http://www.ghostscript.com/\" "
|
112 |
"target=\"_blank\">Ghostscript</a>."
|
@@ -114,7 +101,7 @@ msgstr ""
|
|
114 |
"Ваш сервер не настроен для использования <a href=\"http://www.ghostscript."
|
115 |
"com/\" target=\"_blank\">Ghostscript</a>."
|
116 |
|
117 |
-
#: admin/class-admin.php:
|
118 |
msgid ""
|
119 |
"Use <a href=\"http://www.php.net/manual/en/book.imagick.php\" target=\"_blank"
|
120 |
"\">Imagick</a> to handle lots of filetypes locally."
|
@@ -122,7 +109,7 @@ msgstr ""
|
|
122 |
"Использовать <a href=\"http://www.php.net/manual/ru/book.imagick.php\" "
|
123 |
"target=\"_blank\">Imagick</a> для локальной обработки множества типов файлов."
|
124 |
|
125 |
-
#: admin/class-admin.php:
|
126 |
msgid ""
|
127 |
"Your server is not configured to run <a href=\"http://www.php.net/manual/en/"
|
128 |
"book.imagick.php\" target=\"_blank\">Imagick</a>."
|
@@ -130,7 +117,7 @@ msgstr ""
|
|
130 |
"Ваш сервер не настроен для использования <a href=\"http://www.php.net/manual/"
|
131 |
"ru/book.imagick.php\" target=\"_blank\">Imagick</a>."
|
132 |
|
133 |
-
#: admin/class-admin.php:
|
134 |
msgid ""
|
135 |
"Use <a href=\"https://drive.google.com/viewer\" target=\"_blank\">Google "
|
136 |
"Drive Viewer</a> to generate thumbnails for MS Office files and many other "
|
@@ -140,79 +127,19 @@ msgstr ""
|
|
140 |
"\">Google Drive Viewer</a> для создания миниатюр файлов MS Office и многих "
|
141 |
"других типов файлов удалённо."
|
142 |
|
143 |
-
#: admin/class-admin.php:
|
144 |
msgid "Your server does not allow remote HTTP access."
|
145 |
msgstr "Ваш сервер не разрешает удаленные HTTP обращения."
|
146 |
|
147 |
-
#: admin/class-admin.php:
|
148 |
-
msgid "The max width and height (in pixels) that thumbnails will be generated."
|
149 |
-
msgstr ""
|
150 |
-
"Максимальная ширина и высота (в пикселях) с которыми будут создаваться "
|
151 |
-
"миниатюры."
|
152 |
-
|
153 |
-
#: admin/class-admin.php:336
|
154 |
-
msgid "Advanced Thumbnail Generation"
|
155 |
-
msgstr "Создание миниатюр"
|
156 |
-
|
157 |
-
#: admin/class-admin.php:348
|
158 |
-
msgid "Whether to log debug and error information related to Document Gallery."
|
159 |
-
msgstr ""
|
160 |
-
"Вести ли журнал отладки и информации об ошибках имеющих отношение к Document "
|
161 |
-
"Gallery."
|
162 |
-
|
163 |
-
#: admin/class-admin.php:360
|
164 |
-
msgid ""
|
165 |
-
"Whether option structure should be validated before save. This is not "
|
166 |
-
"generally necessary."
|
167 |
-
msgstr ""
|
168 |
-
"Проверять ли структуру выбранных настроек при сохранении. Как правило в этом "
|
169 |
-
"нет необходимости."
|
170 |
-
|
171 |
-
#: admin/class-admin.php:373
|
172 |
-
msgid ""
|
173 |
-
"Max number of seconds to wait for thumbnail generation before defaulting to "
|
174 |
-
"filetype icons."
|
175 |
-
msgstr ""
|
176 |
-
"Максимальное количество секунд ожидания при создании миниатюры до "
|
177 |
-
"использования иконки по умолчанию."
|
178 |
-
|
179 |
-
#: admin/class-admin.php:374
|
180 |
-
msgid ""
|
181 |
-
"Note that generation will continue where timeout happened next time the "
|
182 |
-
"gallery is loaded."
|
183 |
-
msgstr ""
|
184 |
-
"Обратите внимание, что создание продолжится с того места, где оно было "
|
185 |
-
"приостановлено, при следующем обращении к галереи."
|
186 |
-
|
187 |
-
#: admin/class-admin.php:386
|
188 |
msgid "Successfully auto-detected the location of Ghostscript."
|
189 |
msgstr "Успешно автоматически определено местонахождение Ghostscript."
|
190 |
|
191 |
-
#: admin/class-admin.php:
|
192 |
msgid "Failed to auto-detect the location of Ghostscript."
|
193 |
msgstr "Не удалось автоматически определить местонахождение Ghostscript."
|
194 |
|
195 |
-
#: admin/class-admin.php:
|
196 |
-
msgid "Options Array Dump"
|
197 |
-
msgstr "Дамп массива установленных настроек"
|
198 |
-
|
199 |
-
#: admin/class-admin.php:438
|
200 |
-
msgid "Invalid width given: "
|
201 |
-
msgstr "Задана неверная ширина: "
|
202 |
-
|
203 |
-
#: admin/class-admin.php:451
|
204 |
-
msgid "Invalid height given: "
|
205 |
-
msgstr "Задана неверная высота: "
|
206 |
-
|
207 |
-
#: admin/class-admin.php:562
|
208 |
-
msgid "Invalid Ghostscript path given: "
|
209 |
-
msgstr "Задан неверный путь Ghostscript: "
|
210 |
-
|
211 |
-
#: admin/class-admin.php:573
|
212 |
-
msgid "Invalid timeout given: "
|
213 |
-
msgstr "Задано неверное время ожидания: "
|
214 |
-
|
215 |
-
#: admin/class-admin.php:604
|
216 |
msgid ""
|
217 |
"The following values will be used by default in the shortcode. You can still "
|
218 |
"manually set each of these values in each individual shortcode."
|
@@ -221,12 +148,11 @@ msgstr ""
|
|
221 |
"этом вручную можно установить любые из этих значений в каждом конкретном "
|
222 |
"экземпляре шорткода."
|
223 |
|
224 |
-
#: admin/class-admin.php:
|
225 |
msgid "Select which tools to use when generating thumbnails."
|
226 |
msgstr "Выберите, какие инструменты использовать для создании миниатюр."
|
227 |
|
228 |
-
#: admin/class-admin.php:
|
229 |
-
#, c-format
|
230 |
msgid ""
|
231 |
"Enter custom CSS styling for use with document galleries. To see which ids "
|
232 |
"and classes you can style, take a look at <a href=\"%s\" target=\"_blank"
|
@@ -236,7 +162,7 @@ msgstr ""
|
|
236 |
"Чтобы увидеть, какие селекторы стоит использовать, посмотрите на <a href=\"%s"
|
237 |
"\" target=\"_blank\">style.css</a>."
|
238 |
|
239 |
-
#: admin/class-admin.php:
|
240 |
msgid ""
|
241 |
"Unless you <em>really</em> know what you're doing, you should not touch "
|
242 |
"these values."
|
@@ -244,120 +170,43 @@ msgstr ""
|
|
244 |
"Не стоит менять этих значений, за исключением случаев когда Вы "
|
245 |
"<em>действительно</em> знаете что делаете."
|
246 |
|
247 |
-
#: admin/class-admin.php:
|
248 |
msgid ""
|
249 |
"NOTE: <code>exec()</code> is not accessible. Ghostscript will not function."
|
250 |
msgstr ""
|
251 |
"ВНИМАНИЕ: <code>exec()</code> недоступный. Ghostscript не будет работать."
|
252 |
|
253 |
-
#: admin/class-admin.php:
|
254 |
-
msgid ""
|
255 |
-
"
|
256 |
-
"\"http://wordpress.org/support/plugin/document-gallery\" target=\"_blank"
|
257 |
-
"\">reporting a bug</a>:"
|
258 |
-
msgstr ""
|
259 |
-
"Нижеследующий <em>доступный только для чтения текст</em> должен быть "
|
260 |
-
"предоставлен при <a href=\"http://wordpress.org/support/plugin/document-"
|
261 |
-
"gallery\" target=\"_blank\">сообщении об ошибке</a>:"
|
262 |
-
|
263 |
-
#: admin/class-admin.php:755
|
264 |
-
msgid "Select All"
|
265 |
-
msgstr "Выбрать всё"
|
266 |
-
|
267 |
-
#: admin/class-admin.php:758
|
268 |
-
msgid "Thumbnail"
|
269 |
-
msgstr "Миниатюра"
|
270 |
-
|
271 |
-
#: admin/class-admin.php:759
|
272 |
-
msgid "File name"
|
273 |
-
msgstr "Имя файла"
|
274 |
-
|
275 |
-
#: admin/class-admin.php:760
|
276 |
-
msgid "Date"
|
277 |
-
msgstr "Дата"
|
278 |
-
|
279 |
-
#: admin/class-admin.php:763
|
280 |
-
msgid "Delete Selected"
|
281 |
-
msgstr "Удалить выбранные"
|
282 |
-
|
283 |
-
#: admin/class-admin.php:765
|
284 |
-
msgid "item"
|
285 |
-
msgid_plural "items"
|
286 |
-
msgstr[0] "запись"
|
287 |
-
msgstr[1] "записи"
|
288 |
-
msgstr[2] "записей"
|
289 |
-
|
290 |
-
#: admin/class-admin.php:768
|
291 |
-
msgid "Go to the first page"
|
292 |
-
msgstr "Перейти к первой странице"
|
293 |
-
|
294 |
-
#: admin/class-admin.php:769
|
295 |
-
msgid "Go to the previous page"
|
296 |
-
msgstr "Перейти к предыдущей странице"
|
297 |
-
|
298 |
-
#: admin/class-admin.php:771
|
299 |
-
msgid "Current page"
|
300 |
-
msgstr "Текущая страница"
|
301 |
-
|
302 |
-
#: admin/class-admin.php:771
|
303 |
-
msgid "of"
|
304 |
-
msgstr "из"
|
305 |
-
|
306 |
-
#: admin/class-admin.php:772
|
307 |
-
msgid "Go to the next page"
|
308 |
-
msgstr "Перейти к следующей странице"
|
309 |
-
|
310 |
-
#: admin/class-admin.php:773
|
311 |
-
msgid "Go to the last page"
|
312 |
-
msgstr "Перейти к последней странице"
|
313 |
-
|
314 |
-
#: admin/class-admin.php:775
|
315 |
-
msgid "items per page"
|
316 |
-
msgstr "записей на странице"
|
317 |
-
|
318 |
-
#: admin/class-admin.php:808
|
319 |
-
msgid "View"
|
320 |
-
msgstr "Посмотреть страницу вложения"
|
321 |
-
|
322 |
-
#: admin/class-admin.php:809
|
323 |
-
msgid "attachment page"
|
324 |
-
msgstr ""
|
325 |
-
|
326 |
-
#: admin/class-admin.php:809
|
327 |
-
msgid "Attachment not found"
|
328 |
-
msgstr "Вложение не найдено"
|
329 |
|
330 |
-
#: inc/class-gallery.php:
|
331 |
msgid "Generated using Document Gallery. Get yours here: "
|
332 |
msgstr ""
|
333 |
"Сгенерировано используя Document Gallery. Понравилось? Получите Вашу копию "
|
334 |
"здесь: "
|
335 |
|
336 |
-
#: inc/class-gallery.php:
|
337 |
msgid "No attachments to display. How boring! :("
|
338 |
msgstr "Ни одного вложения для отображения. Скукотища! :("
|
339 |
|
340 |
-
#: inc/class-gallery.php:
|
341 |
-
#, c-format
|
342 |
msgid "The %s parameter may only be \"%s\" or \"%s.\" You entered \"%s.\""
|
343 |
msgstr ""
|
344 |
"Параметр %s может принимать только значения \"%s\" или \"%s.\" Вы же ввели "
|
345 |
"\"%s.\""
|
346 |
|
347 |
-
#: inc/class-gallery.php:
|
348 |
msgid "The following ID is invalid: "
|
349 |
msgid_plural "The following IDs are invalid: "
|
350 |
msgstr[0] "Следующий идентификатор (ID) недействительный: "
|
351 |
msgstr[1] "Следующие идентификаторы (IDs) недействительны: "
|
352 |
-
msgstr[2] "Следующие идентификаторы (IDs) недействительны: "
|
353 |
|
354 |
-
#: inc/class-gallery.php:
|
355 |
-
#, c-format
|
356 |
msgid "The orderby value entered, \"%s,\" is not valid."
|
357 |
msgstr "Указанное значение параметра orderby, \"%s,\" недопустимо."
|
358 |
|
359 |
-
#: inc/class-gallery.php:
|
360 |
-
#, c-format
|
361 |
msgid "%s is not a valid term name in %s."
|
362 |
msgstr "Определение %s не является допустимым значением параметра %s."
|
363 |
|
@@ -365,49 +214,36 @@ msgstr "Определение %s не является допустимым з
|
|
365 |
msgid "Failed to set Imagick page number"
|
366 |
msgstr "Не удалось установить номер страницы в Imagick"
|
367 |
|
368 |
-
#: inc/class-thumber.php:
|
369 |
-
#, c-format
|
370 |
-
msgid "Attempting to generate thumbnail for attachment #%d with '%s'"
|
371 |
-
msgstr "Попытка создания миниатюры для вложения №%d с помощью '%s'"
|
372 |
-
|
373 |
-
#: inc/class-thumber.php:138
|
374 |
msgid "Could not open file: "
|
375 |
msgstr "Не удалось открыть файл: "
|
376 |
|
377 |
-
#: inc/class-thumber.php:
|
378 |
msgid "Could not write file: "
|
379 |
msgstr "Не удалось записать файл: "
|
380 |
|
381 |
-
#: inc/class-thumber.php:
|
382 |
msgid "Failed to open file in Imagick: "
|
383 |
msgstr "Не удалось открыть файл в Imagick: "
|
384 |
|
385 |
-
#: inc/class-thumber.php:
|
386 |
msgid "Failed to save image in Imagick: "
|
387 |
msgstr "Не удалось сохранить изображение в Imagick: "
|
388 |
|
389 |
-
#: inc/class-thumber.php:
|
390 |
msgid "Ghostscript failed: "
|
391 |
msgstr "Сбой в Ghostscript: "
|
392 |
|
393 |
-
#: inc/class-thumber.php:
|
394 |
msgid "Failed to retrieve thumbnail from Google: "
|
395 |
msgstr "Не удалось получить от Google миниатюру: "
|
396 |
|
397 |
-
#: inc/class-thumber.php:
|
398 |
-
msgid "Thumbnail Generators: "
|
399 |
-
msgstr "Генераторы миниатюр: "
|
400 |
-
|
401 |
-
#: inc/class-thumber.php:636
|
402 |
-
msgid "No thumbnail generators enabled."
|
403 |
-
msgstr "Отсутствуют включенные генераторы миниатюр."
|
404 |
-
|
405 |
-
#: inc/class-thumber.php:679
|
406 |
msgid "Failed to get image editor: "
|
407 |
msgstr ""
|
408 |
"Сбой при попытке использовании графического редактора (WP_Image_Editor): "
|
409 |
|
410 |
-
#: inc/class-thumber.php:
|
411 |
msgid "Failed to save image: "
|
412 |
msgstr "Не удалось сохранить изображение: "
|
413 |
|
2 |
# This file is distributed under the same license as the Document Gallery package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Document Gallery 2.0.9\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/document-gallery\n"
|
7 |
+
"POT-Creation-Date: 2014-04-21 02:57:10+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2014-04-21 17:59-0600\n"
|
12 |
"Last-Translator: Dan Rossiter <dan.rossiters@gmail.com>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
+
"X-Generator: Poedit 1.6.4\n"
|
15 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
+
"Language: ru\n"
|
|
|
17 |
|
18 |
+
#: admin/class-admin.php:27
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
msgid "Settings"
|
20 |
msgstr "Настройки"
|
21 |
|
22 |
+
#: admin/class-admin.php:37
|
23 |
msgid "Document Gallery Settings"
|
24 |
msgstr "Настройки Document Gallery"
|
25 |
|
26 |
#. Plugin Name of the plugin/theme
|
27 |
+
#: admin/class-admin.php:38
|
28 |
msgid "Document Gallery"
|
29 |
msgstr "Document Gallery"
|
30 |
|
31 |
+
#: admin/class-admin.php:58
|
32 |
msgid "Default Settings"
|
33 |
+
msgstr "Настройки По Умолчанию"
|
34 |
|
35 |
+
#: admin/class-admin.php:62
|
36 |
msgid "Thumbnail Generation"
|
37 |
+
msgstr "Создание Миниатюр"
|
38 |
|
39 |
+
#: admin/class-admin.php:66
|
40 |
msgid "Custom CSS"
|
41 |
msgstr "Индивидуальные CSS"
|
42 |
|
43 |
+
#: admin/class-admin.php:70
|
44 |
+
msgid "Advanced Thumbnail Generation"
|
45 |
+
msgstr "Настройки Создания Миниатюр для Опытных Пользователей"
|
46 |
+
|
47 |
+
#: admin/class-admin.php:82
|
48 |
msgid "Link to attachment page rather than to file"
|
49 |
msgstr "Ссылка на страницу вложения, а не на сам файл"
|
50 |
|
51 |
+
#: admin/class-admin.php:94
|
52 |
msgid "Include document descriptions"
|
53 |
msgstr "Включать описания документов"
|
54 |
|
55 |
+
#: admin/class-admin.php:106
|
56 |
msgid "Use auto-generated document thumbnails"
|
57 |
msgstr "Использовать автоматически создаваемые миниатюры документов"
|
58 |
|
59 |
+
#: admin/class-admin.php:118
|
60 |
msgid "Include image attachments in gallery"
|
61 |
msgstr "Включать прикрепленные к посту картинки в галерею"
|
62 |
|
63 |
+
#: admin/class-admin.php:130
|
64 |
msgid "Only look for attachments in post where [dg] is used"
|
65 |
msgstr "Искать вложения только в постах, где используется [dg]"
|
66 |
|
67 |
+
#: admin/class-admin.php:143
|
68 |
msgid "Ascending or descending sorting of documents"
|
69 |
msgstr "Сортировка документов по возрастанию или по убыванию"
|
70 |
|
71 |
+
#: admin/class-admin.php:156
|
72 |
msgid "Which field to order documents by"
|
73 |
msgstr "По какому полю сортировать документы"
|
74 |
|
75 |
+
#: admin/class-admin.php:169
|
76 |
msgid ""
|
77 |
"Whether matched documents must have all taxa_names (AND) or at least one (OR)"
|
78 |
msgstr ""
|
79 |
"Искать документы, принадлежащие всем категориям (AND) перечисленным в "
|
80 |
+
"параметре category, также возмозжно использование taxon_name, или хотя бы "
|
81 |
"одной (OR)"
|
82 |
|
83 |
+
#: admin/class-admin.php:181
|
84 |
msgid "Locally generate thumbnails for audio & video files."
|
85 |
msgstr "Локально создавать миниатюры для аудио и видео файлов."
|
86 |
|
87 |
+
#: admin/class-admin.php:194
|
88 |
msgid ""
|
89 |
"Use <a href=\"http://www.ghostscript.com/\" target=\"_blank\">Ghostscript</"
|
90 |
"a> for faster local PDF processing (compared to Imagick)."
|
93 |
"\">Ghostscript</a> для более быстрой локальной обработки PDF (в сравнении с "
|
94 |
"Imagick)."
|
95 |
|
96 |
+
#: admin/class-admin.php:195
|
97 |
msgid ""
|
98 |
"Your server is not configured to run <a href=\"http://www.ghostscript.com/\" "
|
99 |
"target=\"_blank\">Ghostscript</a>."
|
101 |
"Ваш сервер не настроен для использования <a href=\"http://www.ghostscript."
|
102 |
"com/\" target=\"_blank\">Ghostscript</a>."
|
103 |
|
104 |
+
#: admin/class-admin.php:209
|
105 |
msgid ""
|
106 |
"Use <a href=\"http://www.php.net/manual/en/book.imagick.php\" target=\"_blank"
|
107 |
"\">Imagick</a> to handle lots of filetypes locally."
|
109 |
"Использовать <a href=\"http://www.php.net/manual/ru/book.imagick.php\" "
|
110 |
"target=\"_blank\">Imagick</a> для локальной обработки множества типов файлов."
|
111 |
|
112 |
+
#: admin/class-admin.php:210
|
113 |
msgid ""
|
114 |
"Your server is not configured to run <a href=\"http://www.php.net/manual/en/"
|
115 |
"book.imagick.php\" target=\"_blank\">Imagick</a>."
|
117 |
"Ваш сервер не настроен для использования <a href=\"http://www.php.net/manual/"
|
118 |
"ru/book.imagick.php\" target=\"_blank\">Imagick</a>."
|
119 |
|
120 |
+
#: admin/class-admin.php:224
|
121 |
msgid ""
|
122 |
"Use <a href=\"https://drive.google.com/viewer\" target=\"_blank\">Google "
|
123 |
"Drive Viewer</a> to generate thumbnails for MS Office files and many other "
|
127 |
"\">Google Drive Viewer</a> для создания миниатюр файлов MS Office и многих "
|
128 |
"других типов файлов удалённо."
|
129 |
|
130 |
+
#: admin/class-admin.php:225
|
131 |
msgid "Your server does not allow remote HTTP access."
|
132 |
msgstr "Ваш сервер не разрешает удаленные HTTP обращения."
|
133 |
|
134 |
+
#: admin/class-admin.php:239
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
msgid "Successfully auto-detected the location of Ghostscript."
|
136 |
msgstr "Успешно автоматически определено местонахождение Ghostscript."
|
137 |
|
138 |
+
#: admin/class-admin.php:240
|
139 |
msgid "Failed to auto-detect the location of Ghostscript."
|
140 |
msgstr "Не удалось автоматически определить местонахождение Ghostscript."
|
141 |
|
142 |
+
#: admin/class-admin.php:248
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
msgid ""
|
144 |
"The following values will be used by default in the shortcode. You can still "
|
145 |
"manually set each of these values in each individual shortcode."
|
148 |
"этом вручную можно установить любые из этих значений в каждом конкретном "
|
149 |
"экземпляре шорткода."
|
150 |
|
151 |
+
#: admin/class-admin.php:255
|
152 |
msgid "Select which tools to use when generating thumbnails."
|
153 |
msgstr "Выберите, какие инструменты использовать для создании миниатюр."
|
154 |
|
155 |
+
#: admin/class-admin.php:261
|
|
|
156 |
msgid ""
|
157 |
"Enter custom CSS styling for use with document galleries. To see which ids "
|
158 |
"and classes you can style, take a look at <a href=\"%s\" target=\"_blank"
|
162 |
"Чтобы увидеть, какие селекторы стоит использовать, посмотрите на <a href=\"%s"
|
163 |
"\" target=\"_blank\">style.css</a>."
|
164 |
|
165 |
+
#: admin/class-admin.php:279
|
166 |
msgid ""
|
167 |
"Unless you <em>really</em> know what you're doing, you should not touch "
|
168 |
"these values."
|
170 |
"Не стоит менять этих значений, за исключением случаев когда Вы "
|
171 |
"<em>действительно</em> знаете что делаете."
|
172 |
|
173 |
+
#: admin/class-admin.php:281
|
174 |
msgid ""
|
175 |
"NOTE: <code>exec()</code> is not accessible. Ghostscript will not function."
|
176 |
msgstr ""
|
177 |
"ВНИМАНИЕ: <code>exec()</code> недоступный. Ghostscript не будет работать."
|
178 |
|
179 |
+
#: admin/class-admin.php:388
|
180 |
+
msgid "Invalid Ghostscript path given: "
|
181 |
+
msgstr "Задан неверный путь Ghostscript: "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
|
183 |
+
#: inc/class-gallery.php:92
|
184 |
msgid "Generated using Document Gallery. Get yours here: "
|
185 |
msgstr ""
|
186 |
"Сгенерировано используя Document Gallery. Понравилось? Получите Вашу копию "
|
187 |
"здесь: "
|
188 |
|
189 |
+
#: inc/class-gallery.php:95
|
190 |
msgid "No attachments to display. How boring! :("
|
191 |
msgstr "Ни одного вложения для отображения. Скукотища! :("
|
192 |
|
193 |
+
#: inc/class-gallery.php:96
|
|
|
194 |
msgid "The %s parameter may only be \"%s\" or \"%s.\" You entered \"%s.\""
|
195 |
msgstr ""
|
196 |
"Параметр %s может принимать только значения \"%s\" или \"%s.\" Вы же ввели "
|
197 |
"\"%s.\""
|
198 |
|
199 |
+
#: inc/class-gallery.php:267
|
200 |
msgid "The following ID is invalid: "
|
201 |
msgid_plural "The following IDs are invalid: "
|
202 |
msgstr[0] "Следующий идентификатор (ID) недействительный: "
|
203 |
msgstr[1] "Следующие идентификаторы (IDs) недействительны: "
|
|
|
204 |
|
205 |
+
#: inc/class-gallery.php:333
|
|
|
206 |
msgid "The orderby value entered, \"%s,\" is not valid."
|
207 |
msgstr "Указанное значение параметра orderby, \"%s,\" недопустимо."
|
208 |
|
209 |
+
#: inc/class-gallery.php:475
|
|
|
210 |
msgid "%s is not a valid term name in %s."
|
211 |
msgstr "Определение %s не является допустимым значением параметра %s."
|
212 |
|
214 |
msgid "Failed to set Imagick page number"
|
215 |
msgstr "Не удалось установить номер страницы в Imagick"
|
216 |
|
217 |
+
#: inc/class-thumber.php:125
|
|
|
|
|
|
|
|
|
|
|
218 |
msgid "Could not open file: "
|
219 |
msgstr "Не удалось открыть файл: "
|
220 |
|
221 |
+
#: inc/class-thumber.php:130
|
222 |
msgid "Could not write file: "
|
223 |
msgstr "Не удалось записать файл: "
|
224 |
|
225 |
+
#: inc/class-thumber.php:166
|
226 |
msgid "Failed to open file in Imagick: "
|
227 |
msgstr "Не удалось открыть файл в Imagick: "
|
228 |
|
229 |
+
#: inc/class-thumber.php:176
|
230 |
msgid "Failed to save image in Imagick: "
|
231 |
msgstr "Не удалось сохранить изображение в Imagick: "
|
232 |
|
233 |
+
#: inc/class-thumber.php:234
|
234 |
msgid "Ghostscript failed: "
|
235 |
msgstr "Сбой в Ghostscript: "
|
236 |
|
237 |
+
#: inc/class-thumber.php:364
|
238 |
msgid "Failed to retrieve thumbnail from Google: "
|
239 |
msgstr "Не удалось получить от Google миниатюру: "
|
240 |
|
241 |
+
#: inc/class-thumber.php:644
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
msgid "Failed to get image editor: "
|
243 |
msgstr ""
|
244 |
"Сбой при попытке использовании графического редактора (WP_Image_Editor): "
|
245 |
|
246 |
+
#: inc/class-thumber.php:655
|
247 |
msgid "Failed to save image: "
|
248 |
msgstr "Не удалось сохранить изображение: "
|
249 |
|
languages/document-gallery-sv_SE.mo
CHANGED
Binary file
|
languages/document-gallery-sv_SE.po
CHANGED
@@ -2,99 +2,87 @@
|
|
2 |
# This file is distributed under the same license as the Document Gallery package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Document Gallery 2.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/document-gallery\n"
|
7 |
-
"POT-Creation-Date: 2014-
|
8 |
-
"PO-Revision-Date: 2014-10-13 16:57+0100\n"
|
9 |
-
"Last-Translator: P. E.\n"
|
10 |
-
"Language-Team: P. E.\n"
|
11 |
-
"Language: sv_SE\n"
|
12 |
"MIME-Version: 1.0\n"
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
|
|
|
|
|
|
15 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
|
16 |
"X-Generator: Poedit 1.6.9\n"
|
17 |
|
18 |
-
#: admin/class-admin.php:
|
19 |
-
msgid "General"
|
20 |
-
msgstr "Generellt"
|
21 |
-
|
22 |
-
#: admin/class-admin.php:29
|
23 |
-
msgid "Thumbnail Management"
|
24 |
-
msgstr "Miniatyrhantering"
|
25 |
-
|
26 |
-
#: admin/class-admin.php:30 admin/class-admin.php:904
|
27 |
-
msgid "Logging"
|
28 |
-
msgstr "Loggning"
|
29 |
-
|
30 |
-
#: admin/class-admin.php:31
|
31 |
-
msgid "Advanced"
|
32 |
-
msgstr "Avancerat"
|
33 |
-
|
34 |
-
#: admin/class-admin.php:68
|
35 |
msgid "Settings"
|
36 |
msgstr "Inställningar"
|
37 |
|
38 |
-
#: admin/class-admin.php:
|
39 |
msgid "Document Gallery Settings"
|
40 |
msgstr "Document Gallery Inställningar"
|
41 |
|
42 |
#. Plugin Name of the plugin/theme
|
43 |
-
#: admin/class-admin.php:
|
44 |
msgid "Document Gallery"
|
45 |
msgstr "Document Gallery"
|
46 |
|
47 |
-
#: admin/class-admin.php:
|
48 |
msgid "Default Settings"
|
49 |
msgstr "Standardinställningar"
|
50 |
|
51 |
-
#: admin/class-admin.php:
|
52 |
msgid "Thumbnail Generation"
|
53 |
msgstr "Miniatyrgenerering"
|
54 |
|
55 |
-
#: admin/class-admin.php:
|
56 |
msgid "Custom CSS"
|
57 |
msgstr "Anpassad CSS"
|
58 |
|
59 |
-
#: admin/class-admin.php:
|
|
|
|
|
|
|
|
|
60 |
msgid "Link to attachment page rather than to file"
|
61 |
-
msgstr "Länka till
|
62 |
|
63 |
-
#: admin/class-admin.php:
|
64 |
msgid "Include document descriptions"
|
65 |
-
msgstr "Ta med
|
66 |
|
67 |
-
#: admin/class-admin.php:
|
68 |
msgid "Use auto-generated document thumbnails"
|
69 |
msgstr "Använd autogenererade dokumentminiatyrer"
|
70 |
|
71 |
-
#: admin/class-admin.php:
|
72 |
msgid "Include image attachments in gallery"
|
73 |
msgstr "Ta med bildbilagor i galleriet"
|
74 |
|
75 |
-
#: admin/class-admin.php:
|
76 |
msgid "Only look for attachments in post where [dg] is used"
|
77 |
msgstr "Sök endast efter bilagor i inlägg där kortkoden [dg] har använts"
|
78 |
|
79 |
-
#: admin/class-admin.php:
|
80 |
msgid "Ascending or descending sorting of documents"
|
81 |
-
msgstr "Stigande eller fallande
|
82 |
|
83 |
-
#: admin/class-admin.php:
|
84 |
msgid "Which field to order documents by"
|
85 |
-
msgstr "
|
86 |
|
87 |
-
#: admin/class-admin.php:
|
88 |
msgid ""
|
89 |
"Whether matched documents must have all taxa_names (AND) or at least one (OR)"
|
90 |
msgstr ""
|
91 |
"Ifall matchade dokument måste ha alla taxa_names (AND) eller minst ett (OR)"
|
92 |
|
93 |
-
#: admin/class-admin.php:
|
94 |
msgid "Locally generate thumbnails for audio & video files."
|
95 |
-
msgstr "Generera miniatyrer för audio-
|
96 |
|
97 |
-
#: admin/class-admin.php:
|
98 |
msgid ""
|
99 |
"Use <a href=\"http://www.ghostscript.com/\" target=\"_blank\">Ghostscript</"
|
100 |
"a> for faster local PDF processing (compared to Imagick)."
|
@@ -102,23 +90,23 @@ msgstr ""
|
|
102 |
"Använd <a href=\"http://www.ghostscript.com/\" target=\"_blank"
|
103 |
"\">Ghostscript</a> för snabbare lokal PDF-behandling (jämfört med Imagick)."
|
104 |
|
105 |
-
#: admin/class-admin.php:
|
106 |
msgid ""
|
107 |
"Your server is not configured to run <a href=\"http://www.ghostscript.com/\" "
|
108 |
"target=\"_blank\">Ghostscript</a>."
|
109 |
msgstr ""
|
110 |
-
"Din server är inte konfigurerad att köra <a href=\"http://www.
|
111 |
-
"com/\" target=\"_blank\">Ghostscript</a>."
|
112 |
|
113 |
-
#: admin/class-admin.php:
|
114 |
msgid ""
|
115 |
"Use <a href=\"http://www.php.net/manual/en/book.imagick.php\" target=\"_blank"
|
116 |
"\">Imagick</a> to handle lots of filetypes locally."
|
117 |
msgstr ""
|
118 |
-
"
|
119 |
"\"_blank\">Imagick</a> för att hantera mängder av filtyper lokalt."
|
120 |
|
121 |
-
#: admin/class-admin.php:
|
122 |
msgid ""
|
123 |
"Your server is not configured to run <a href=\"http://www.php.net/manual/en/"
|
124 |
"book.imagick.php\" target=\"_blank\">Imagick</a>."
|
@@ -126,305 +114,136 @@ msgstr ""
|
|
126 |
"Din server är inte konfigurerad att köra <a href=\"http://www.php.net/manual/"
|
127 |
"en/book.imagick.php\" target=\"_blank\">Imagick</a>."
|
128 |
|
129 |
-
#: admin/class-admin.php:
|
130 |
msgid ""
|
131 |
"Use <a href=\"https://drive.google.com/viewer\" target=\"_blank\">Google "
|
132 |
"Drive Viewer</a> to generate thumbnails for MS Office files and many other "
|
133 |
"file types remotely."
|
134 |
msgstr ""
|
135 |
"Använd <a href=\"https://drive.google.com/viewer\" target=\"_blank\">Google "
|
136 |
-
"Drive Viewer</a> för att generera miniatyrer för
|
137 |
"många andra filtyper externt."
|
138 |
|
139 |
-
#: admin/class-admin.php:
|
140 |
msgid "Your server does not allow remote HTTP access."
|
141 |
msgstr "Din server tillåter inte externt HTTP-tillträde."
|
142 |
|
143 |
-
#: admin/class-admin.php:
|
144 |
-
msgid "The max width and height (in pixels) that thumbnails will be generated."
|
145 |
-
msgstr "Max bredd och höjd (i pixlar) för genererade miniatyrer."
|
146 |
-
|
147 |
-
#: admin/class-admin.php:338
|
148 |
-
msgid "Advanced Thumbnail Generation"
|
149 |
-
msgstr "Avancerad Miniatyrgenerering"
|
150 |
-
|
151 |
-
#: admin/class-admin.php:350
|
152 |
-
msgid "Whether to log debug and error information related to Document Gallery."
|
153 |
-
msgstr ""
|
154 |
-
"Ifall debug- och felinformation relaterat till Document Gallery skall loggas."
|
155 |
-
|
156 |
-
#: admin/class-admin.php:362
|
157 |
-
msgid ""
|
158 |
-
"Whether option structure should be validated before save. This is not "
|
159 |
-
"generally necessary."
|
160 |
-
msgstr ""
|
161 |
-
"Ifall alternativstruktur skall valideras innan nedsparning. Detta är "
|
162 |
-
"generellt ej nödvändigt."
|
163 |
-
|
164 |
-
#: admin/class-admin.php:375
|
165 |
-
msgid ""
|
166 |
-
"Max number of seconds to wait for thumbnail generation before defaulting to "
|
167 |
-
"filetype icons."
|
168 |
-
msgstr ""
|
169 |
-
"Max antal sekunder att vänta på miniatyrgenerering innan standard "
|
170 |
-
"filtypsikoner används."
|
171 |
-
|
172 |
-
#: admin/class-admin.php:376
|
173 |
-
msgid ""
|
174 |
-
"Note that generation will continue where timeout happened next time the "
|
175 |
-
"gallery is loaded."
|
176 |
-
msgstr ""
|
177 |
-
"Notera att genereringen kommer att fortsätta därifrån den avbröts av "
|
178 |
-
"tidsgränsen nästa gång galleriet laddas."
|
179 |
-
|
180 |
-
#: admin/class-admin.php:388
|
181 |
msgid "Successfully auto-detected the location of Ghostscript."
|
182 |
msgstr "Hittade platsen för Ghostscript automatiskt."
|
183 |
|
184 |
-
#: admin/class-admin.php:
|
185 |
msgid "Failed to auto-detect the location of Ghostscript."
|
186 |
-
msgstr "Kunde inte hitta platsen för Ghostscript
|
187 |
-
|
188 |
-
#: admin/class-admin.php:393
|
189 |
-
msgid "Options Array Dump"
|
190 |
-
msgstr "Dumpning av Alternativmatris"
|
191 |
-
|
192 |
-
#: admin/class-admin.php:440
|
193 |
-
msgid "Invalid width given: "
|
194 |
-
msgstr "Ogiltig bredd angiven:"
|
195 |
-
|
196 |
-
#: admin/class-admin.php:453
|
197 |
-
msgid "Invalid height given: "
|
198 |
-
msgstr "Ogiltig höjd angiven:"
|
199 |
|
200 |
-
#: admin/class-admin.php:
|
201 |
-
msgid "Invalid Ghostscript path given: "
|
202 |
-
msgstr "Ogiltig sökväg till Ghostscript angiven:"
|
203 |
-
|
204 |
-
#: admin/class-admin.php:577
|
205 |
-
msgid "Invalid timeout given: "
|
206 |
-
msgstr "Ogiltig tidsgräns angiven:"
|
207 |
-
|
208 |
-
#: admin/class-admin.php:608
|
209 |
msgid ""
|
210 |
"The following values will be used by default in the shortcode. You can still "
|
211 |
"manually set each of these values in each individual shortcode."
|
212 |
msgstr ""
|
213 |
"Följande värden kommer att användas som standard i kortkoden. Du kan "
|
214 |
-
"fortfarande sätta
|
215 |
|
216 |
-
#: admin/class-admin.php:
|
217 |
msgid "Select which tools to use when generating thumbnails."
|
218 |
-
msgstr "Välj
|
219 |
|
220 |
-
#: admin/class-admin.php:
|
221 |
msgid ""
|
222 |
"Enter custom CSS styling for use with document galleries. To see which ids "
|
223 |
"and classes you can style, take a look at <a href=\"%s\" target=\"_blank"
|
224 |
"\">style.css</a>."
|
225 |
msgstr ""
|
226 |
-
"Ange anpassad CSS
|
227 |
-
"
|
228 |
"\">style.css</a>."
|
229 |
|
230 |
-
#: admin/class-admin.php:
|
231 |
msgid ""
|
232 |
"Unless you <em>really</em> know what you're doing, you should not touch "
|
233 |
"these values."
|
234 |
msgstr ""
|
235 |
-
"Om du inte <em>verkligen</em> vet vad du gör så
|
236 |
-
"
|
237 |
|
238 |
-
#: admin/class-admin.php:
|
239 |
msgid ""
|
240 |
"NOTE: <code>exec()</code> is not accessible. Ghostscript will not function."
|
241 |
msgstr ""
|
242 |
-
"NOTERA: <code>exec()</code> är
|
243 |
"fungera."
|
244 |
|
245 |
-
#: admin/class-admin.php:
|
246 |
-
msgid ""
|
247 |
-
"
|
248 |
-
"\"http://wordpress.org/support/plugin/document-gallery\" target=\"_blank"
|
249 |
-
"\">reporting a bug</a>:"
|
250 |
-
msgstr ""
|
251 |
-
"Följande <em>skrivskyddade text</em> skall skickas med vid <a href=\"http://"
|
252 |
-
"wordpress.org/support/plugin/document-gallery\" target=\"_blank"
|
253 |
-
"\">buggrapportering</a>:"
|
254 |
-
|
255 |
-
#: admin/class-admin.php:759
|
256 |
-
msgid "Select All"
|
257 |
-
msgstr "Välj Alla"
|
258 |
-
|
259 |
-
#: admin/class-admin.php:762
|
260 |
-
msgid "Thumbnail"
|
261 |
-
msgstr "Miniatyr"
|
262 |
-
|
263 |
-
#: admin/class-admin.php:763
|
264 |
-
msgid "File name"
|
265 |
-
msgstr "Filnamn"
|
266 |
-
|
267 |
-
#: admin/class-admin.php:764 admin/class-admin.php:839
|
268 |
-
msgid "Date"
|
269 |
-
msgstr "Datum"
|
270 |
-
|
271 |
-
#: admin/class-admin.php:767
|
272 |
-
msgid "Delete Selected"
|
273 |
-
msgstr "Ta Bort Valda"
|
274 |
-
|
275 |
-
#: admin/class-admin.php:769
|
276 |
-
msgid "item"
|
277 |
-
msgid_plural "items"
|
278 |
-
msgstr[0] "objekt"
|
279 |
-
msgstr[1] "objekt"
|
280 |
-
|
281 |
-
#: admin/class-admin.php:772
|
282 |
-
msgid "Go to the first page"
|
283 |
-
msgstr "Gå till första sidan"
|
284 |
-
|
285 |
-
#: admin/class-admin.php:773
|
286 |
-
msgid "Go to the previous page"
|
287 |
-
msgstr "Gå till föregående sida"
|
288 |
-
|
289 |
-
#: admin/class-admin.php:775
|
290 |
-
msgid "Current page"
|
291 |
-
msgstr "Aktuell sida"
|
292 |
-
|
293 |
-
#: admin/class-admin.php:775
|
294 |
-
msgid "of"
|
295 |
-
msgstr "av"
|
296 |
-
|
297 |
-
#: admin/class-admin.php:776
|
298 |
-
msgid "Go to the next page"
|
299 |
-
msgstr "Gå till nästa sida"
|
300 |
-
|
301 |
-
#: admin/class-admin.php:777
|
302 |
-
msgid "Go to the last page"
|
303 |
-
msgstr "Gå till sista sidan"
|
304 |
-
|
305 |
-
#: admin/class-admin.php:779
|
306 |
-
msgid "items per page"
|
307 |
-
msgstr "objekt per sida"
|
308 |
-
|
309 |
-
#: admin/class-admin.php:818
|
310 |
-
msgid "View"
|
311 |
-
msgstr "Visa"
|
312 |
-
|
313 |
-
#: admin/class-admin.php:819
|
314 |
-
msgid "attachment page"
|
315 |
-
msgstr "sida för bilaga"
|
316 |
-
|
317 |
-
#: admin/class-admin.php:819
|
318 |
-
msgid "Attachment not found"
|
319 |
-
msgstr "Bilaga hittades ej"
|
320 |
-
|
321 |
-
#: admin/class-admin.php:840
|
322 |
-
msgid "Level"
|
323 |
-
msgstr "Nivå"
|
324 |
-
|
325 |
-
#: admin/class-admin.php:841
|
326 |
-
msgid "Message"
|
327 |
-
msgstr "Meddelande"
|
328 |
-
|
329 |
-
#: admin/class-admin.php:850
|
330 |
-
msgid "Expand All"
|
331 |
-
msgstr "Expandera Alla"
|
332 |
-
|
333 |
-
#: admin/class-admin.php:853
|
334 |
-
msgid "Collapse All"
|
335 |
-
msgstr "Fäll ihop Alla"
|
336 |
-
|
337 |
-
#: admin/class-admin.php:897
|
338 |
-
msgid "Clear Log"
|
339 |
-
msgstr "Rensa Logg"
|
340 |
-
|
341 |
-
#: admin/class-admin.php:904
|
342 |
-
msgid "There are no log entries at this time."
|
343 |
-
msgstr "Det finns för närvarande inga loggposter."
|
344 |
-
|
345 |
-
#: admin/class-admin.php:904
|
346 |
-
msgid "For Your information:"
|
347 |
-
msgstr "För Din vetskap:"
|
348 |
-
|
349 |
-
#: admin/class-admin.php:904
|
350 |
-
msgid "is turned ON"
|
351 |
-
msgstr "är PÅSLAGEN"
|
352 |
-
|
353 |
-
#: admin/class-admin.php:904
|
354 |
-
msgid "is turned OFF"
|
355 |
-
msgstr "är AVSTÄNGD"
|
356 |
|
357 |
-
#: inc/class-gallery.php:
|
358 |
msgid "Generated using Document Gallery. Get yours here: "
|
359 |
msgstr "Genererat med Document Gallery. Skaffa det här: "
|
360 |
|
361 |
-
#: inc/class-gallery.php:
|
362 |
msgid "No attachments to display. How boring! :("
|
363 |
msgstr "Inga bilagor att visa. Så tråkigt! :("
|
364 |
|
365 |
-
#: inc/class-gallery.php:
|
366 |
msgid "The %s parameter may only be \"%s\" or \"%s.\" You entered \"%s.\""
|
367 |
-
msgstr "
|
368 |
|
369 |
-
#: inc/class-gallery.php:
|
370 |
msgid "The following ID is invalid: "
|
371 |
msgid_plural "The following IDs are invalid: "
|
372 |
-
msgstr[0] "Följande ID är ogiltigt:"
|
373 |
-
msgstr[1] "Följande ID:n är ogiltiga:"
|
374 |
|
375 |
-
#: inc/class-gallery.php:
|
376 |
msgid "The orderby value entered, \"%s,\" is not valid."
|
377 |
-
msgstr "
|
378 |
|
379 |
-
#: inc/class-gallery.php:
|
380 |
msgid "%s is not a valid term name in %s."
|
381 |
-
msgstr "%s är
|
382 |
|
383 |
#: inc/class-image-editor-imagick.php:37
|
384 |
msgid "Failed to set Imagick page number"
|
385 |
msgstr "Kunde inte sätta Imagick sidnummer"
|
386 |
|
387 |
-
#: inc/class-thumber.php:
|
388 |
-
msgid "Attempting to generate thumbnail for attachment #%d with (%s)"
|
389 |
-
msgstr "Försöker generera miniatyr för bilagan #%d med (%s)"
|
390 |
-
|
391 |
-
#: inc/class-thumber.php:138
|
392 |
msgid "Could not open file: "
|
393 |
msgstr "Kunde inte öppna fil:"
|
394 |
|
395 |
-
#: inc/class-thumber.php:
|
396 |
msgid "Could not write file: "
|
397 |
msgstr "Kunde inte skriva till fil:"
|
398 |
|
399 |
-
#: inc/class-thumber.php:
|
400 |
msgid "Failed to open file in Imagick: "
|
401 |
msgstr "Kunde inte öppna fil i Imagick:"
|
402 |
|
403 |
-
#: inc/class-thumber.php:
|
404 |
msgid "Failed to save image in Imagick: "
|
405 |
msgstr "Kunde inte spara bild i Imagick:"
|
406 |
|
407 |
-
#: inc/class-thumber.php:
|
408 |
msgid "Ghostscript failed: "
|
409 |
msgstr "Ghostscript misslyckades:"
|
410 |
|
411 |
-
#: inc/class-thumber.php:
|
412 |
msgid "Failed to retrieve thumbnail from Google: "
|
413 |
msgstr "Kunde inte hämta miniatyr från Google:"
|
414 |
|
415 |
-
#: inc/class-thumber.php:
|
416 |
msgid "Thumbnail Generators: "
|
417 |
msgstr "Miniatyrgeneratorer:"
|
418 |
|
419 |
-
#: inc/class-thumber.php:
|
420 |
msgid "No thumbnail generators enabled."
|
421 |
msgstr "Inga miniatyrgeneratorer aktiverade."
|
422 |
|
423 |
-
#: inc/class-thumber.php:
|
424 |
msgid "Failed to get image editor: "
|
425 |
msgstr "Kunde inte hämta bildredigerare:"
|
426 |
|
427 |
-
#: inc/class-thumber.php:
|
428 |
msgid "Failed to save image: "
|
429 |
msgstr "Kunde inte spara bild:"
|
430 |
|
@@ -437,8 +256,8 @@ msgid ""
|
|
437 |
"Display non-images (and images) in gallery format on a page or post with the "
|
438 |
"[dg] shortcode."
|
439 |
msgstr ""
|
440 |
-
"Visa dokument (och bilder) i galleriformat på en sida eller i ett inlägg
|
441 |
-
"kortkoden [dg]."
|
442 |
|
443 |
#. Author of the plugin/theme
|
444 |
msgid "Dan Rossiter"
|
2 |
# This file is distributed under the same license as the Document Gallery package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Document Gallery 2.1\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/document-gallery\n"
|
7 |
+
"POT-Creation-Date: 2014-05-26 15:34:24+00:00\n"
|
|
|
|
|
|
|
|
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2014-09-03 18:03+0100\n"
|
12 |
+
"Last-Translator: P. E.\n"
|
13 |
+
"Language-Team: P. E.\n"
|
14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
+
"Language: sv\n"
|
16 |
"X-Generator: Poedit 1.6.9\n"
|
17 |
|
18 |
+
#: admin/class-admin.php:27
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
msgid "Settings"
|
20 |
msgstr "Inställningar"
|
21 |
|
22 |
+
#: admin/class-admin.php:37
|
23 |
msgid "Document Gallery Settings"
|
24 |
msgstr "Document Gallery Inställningar"
|
25 |
|
26 |
#. Plugin Name of the plugin/theme
|
27 |
+
#: admin/class-admin.php:38
|
28 |
msgid "Document Gallery"
|
29 |
msgstr "Document Gallery"
|
30 |
|
31 |
+
#: admin/class-admin.php:58
|
32 |
msgid "Default Settings"
|
33 |
msgstr "Standardinställningar"
|
34 |
|
35 |
+
#: admin/class-admin.php:62
|
36 |
msgid "Thumbnail Generation"
|
37 |
msgstr "Miniatyrgenerering"
|
38 |
|
39 |
+
#: admin/class-admin.php:66
|
40 |
msgid "Custom CSS"
|
41 |
msgstr "Anpassad CSS"
|
42 |
|
43 |
+
#: admin/class-admin.php:70
|
44 |
+
msgid "Advanced Thumbnail Generation"
|
45 |
+
msgstr "Avancerad Miniatyrgenerering"
|
46 |
+
|
47 |
+
#: admin/class-admin.php:82
|
48 |
msgid "Link to attachment page rather than to file"
|
49 |
+
msgstr "Länka till Sida för bilaga istället för direkt till filen"
|
50 |
|
51 |
+
#: admin/class-admin.php:94
|
52 |
msgid "Include document descriptions"
|
53 |
+
msgstr "Ta med dokumentbeskrivning"
|
54 |
|
55 |
+
#: admin/class-admin.php:106
|
56 |
msgid "Use auto-generated document thumbnails"
|
57 |
msgstr "Använd autogenererade dokumentminiatyrer"
|
58 |
|
59 |
+
#: admin/class-admin.php:118
|
60 |
msgid "Include image attachments in gallery"
|
61 |
msgstr "Ta med bildbilagor i galleriet"
|
62 |
|
63 |
+
#: admin/class-admin.php:130
|
64 |
msgid "Only look for attachments in post where [dg] is used"
|
65 |
msgstr "Sök endast efter bilagor i inlägg där kortkoden [dg] har använts"
|
66 |
|
67 |
+
#: admin/class-admin.php:143
|
68 |
msgid "Ascending or descending sorting of documents"
|
69 |
+
msgstr "Stigande eller fallande sortering av dokument"
|
70 |
|
71 |
+
#: admin/class-admin.php:156
|
72 |
msgid "Which field to order documents by"
|
73 |
+
msgstr "Fältet som dokumenten skall sorteras efter"
|
74 |
|
75 |
+
#: admin/class-admin.php:169
|
76 |
msgid ""
|
77 |
"Whether matched documents must have all taxa_names (AND) or at least one (OR)"
|
78 |
msgstr ""
|
79 |
"Ifall matchade dokument måste ha alla taxa_names (AND) eller minst ett (OR)"
|
80 |
|
81 |
+
#: admin/class-admin.php:181
|
82 |
msgid "Locally generate thumbnails for audio & video files."
|
83 |
+
msgstr "Generera miniatyrer lokalt för audio- och videofiler."
|
84 |
|
85 |
+
#: admin/class-admin.php:194
|
86 |
msgid ""
|
87 |
"Use <a href=\"http://www.ghostscript.com/\" target=\"_blank\">Ghostscript</"
|
88 |
"a> for faster local PDF processing (compared to Imagick)."
|
90 |
"Använd <a href=\"http://www.ghostscript.com/\" target=\"_blank"
|
91 |
"\">Ghostscript</a> för snabbare lokal PDF-behandling (jämfört med Imagick)."
|
92 |
|
93 |
+
#: admin/class-admin.php:195
|
94 |
msgid ""
|
95 |
"Your server is not configured to run <a href=\"http://www.ghostscript.com/\" "
|
96 |
"target=\"_blank\">Ghostscript</a>."
|
97 |
msgstr ""
|
98 |
+
"Din server är inte konfigurerad för att köra <a href=\"http://www."
|
99 |
+
"ghostscript.com/\" target=\"_blank\">Ghostscript</a>."
|
100 |
|
101 |
+
#: admin/class-admin.php:209
|
102 |
msgid ""
|
103 |
"Use <a href=\"http://www.php.net/manual/en/book.imagick.php\" target=\"_blank"
|
104 |
"\">Imagick</a> to handle lots of filetypes locally."
|
105 |
msgstr ""
|
106 |
+
"Använd <a href=\"http://www.php.net/manual/en/book.imagick.php\" target="
|
107 |
"\"_blank\">Imagick</a> för att hantera mängder av filtyper lokalt."
|
108 |
|
109 |
+
#: admin/class-admin.php:210
|
110 |
msgid ""
|
111 |
"Your server is not configured to run <a href=\"http://www.php.net/manual/en/"
|
112 |
"book.imagick.php\" target=\"_blank\">Imagick</a>."
|
114 |
"Din server är inte konfigurerad att köra <a href=\"http://www.php.net/manual/"
|
115 |
"en/book.imagick.php\" target=\"_blank\">Imagick</a>."
|
116 |
|
117 |
+
#: admin/class-admin.php:224
|
118 |
msgid ""
|
119 |
"Use <a href=\"https://drive.google.com/viewer\" target=\"_blank\">Google "
|
120 |
"Drive Viewer</a> to generate thumbnails for MS Office files and many other "
|
121 |
"file types remotely."
|
122 |
msgstr ""
|
123 |
"Använd <a href=\"https://drive.google.com/viewer\" target=\"_blank\">Google "
|
124 |
+
"Drive Viewer</a> för att generera miniatyrer för Microsoft Office-filer samt "
|
125 |
"många andra filtyper externt."
|
126 |
|
127 |
+
#: admin/class-admin.php:225
|
128 |
msgid "Your server does not allow remote HTTP access."
|
129 |
msgstr "Din server tillåter inte externt HTTP-tillträde."
|
130 |
|
131 |
+
#: admin/class-admin.php:239
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
msgid "Successfully auto-detected the location of Ghostscript."
|
133 |
msgstr "Hittade platsen för Ghostscript automatiskt."
|
134 |
|
135 |
+
#: admin/class-admin.php:240
|
136 |
msgid "Failed to auto-detect the location of Ghostscript."
|
137 |
+
msgstr "Kunde inte automatiskt hitta platsen för Ghostscript."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
|
139 |
+
#: admin/class-admin.php:262
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
msgid ""
|
141 |
"The following values will be used by default in the shortcode. You can still "
|
142 |
"manually set each of these values in each individual shortcode."
|
143 |
msgstr ""
|
144 |
"Följande värden kommer att användas som standard i kortkoden. Du kan "
|
145 |
+
"fortfarande sätta värdena manuellt för varje individuell kortkod."
|
146 |
|
147 |
+
#: admin/class-admin.php:269
|
148 |
msgid "Select which tools to use when generating thumbnails."
|
149 |
+
msgstr "Välj vilket verktyg som skall användas för att generera miniatyrer."
|
150 |
|
151 |
+
#: admin/class-admin.php:275
|
152 |
msgid ""
|
153 |
"Enter custom CSS styling for use with document galleries. To see which ids "
|
154 |
"and classes you can style, take a look at <a href=\"%s\" target=\"_blank"
|
155 |
"\">style.css</a>."
|
156 |
msgstr ""
|
157 |
+
"Ange anpassad CSS att använda i dokumentgallerier. För att se vilka id:n och "
|
158 |
+
"klasser du kan ange stil för, ta en titt på <a href=\"%s\" target=\"_blank"
|
159 |
"\">style.css</a>."
|
160 |
|
161 |
+
#: admin/class-admin.php:293
|
162 |
msgid ""
|
163 |
"Unless you <em>really</em> know what you're doing, you should not touch "
|
164 |
"these values."
|
165 |
msgstr ""
|
166 |
+
"Om du inte <em>verkligen</em> vet vad du gör så skall du inte ändra dessa "
|
167 |
+
"värden."
|
168 |
|
169 |
+
#: admin/class-admin.php:295
|
170 |
msgid ""
|
171 |
"NOTE: <code>exec()</code> is not accessible. Ghostscript will not function."
|
172 |
msgstr ""
|
173 |
+
"NOTERA: <code>exec()</code> är inte tillgänglig. Ghostscript kommer inte att "
|
174 |
"fungera."
|
175 |
|
176 |
+
#: admin/class-admin.php:407
|
177 |
+
msgid "Invalid Ghostscript path given: "
|
178 |
+
msgstr "Ogiltig sökväg till Ghostscript angiven: "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
|
180 |
+
#: inc/class-gallery.php:92
|
181 |
msgid "Generated using Document Gallery. Get yours here: "
|
182 |
msgstr "Genererat med Document Gallery. Skaffa det här: "
|
183 |
|
184 |
+
#: inc/class-gallery.php:95
|
185 |
msgid "No attachments to display. How boring! :("
|
186 |
msgstr "Inga bilagor att visa. Så tråkigt! :("
|
187 |
|
188 |
+
#: inc/class-gallery.php:96
|
189 |
msgid "The %s parameter may only be \"%s\" or \"%s.\" You entered \"%s.\""
|
190 |
+
msgstr "%s parametern får endast vara \"%s\" eller \"%s.\" Du angav \"%s.\""
|
191 |
|
192 |
+
#: inc/class-gallery.php:267
|
193 |
msgid "The following ID is invalid: "
|
194 |
msgid_plural "The following IDs are invalid: "
|
195 |
+
msgstr[0] "Följande ID är ogiltigt: "
|
196 |
+
msgstr[1] "Följande ID:n är ogiltiga: "
|
197 |
|
198 |
+
#: inc/class-gallery.php:333
|
199 |
msgid "The orderby value entered, \"%s,\" is not valid."
|
200 |
+
msgstr "Vardet att sortera efter, \"%s,\" är ogiltigt."
|
201 |
|
202 |
+
#: inc/class-gallery.php:475
|
203 |
msgid "%s is not a valid term name in %s."
|
204 |
+
msgstr "%s är inte ett giltigt termnamn i %s."
|
205 |
|
206 |
#: inc/class-image-editor-imagick.php:37
|
207 |
msgid "Failed to set Imagick page number"
|
208 |
msgstr "Kunde inte sätta Imagick sidnummer"
|
209 |
|
210 |
+
#: inc/class-thumber.php:125
|
|
|
|
|
|
|
|
|
211 |
msgid "Could not open file: "
|
212 |
msgstr "Kunde inte öppna fil:"
|
213 |
|
214 |
+
#: inc/class-thumber.php:130
|
215 |
msgid "Could not write file: "
|
216 |
msgstr "Kunde inte skriva till fil:"
|
217 |
|
218 |
+
#: inc/class-thumber.php:166
|
219 |
msgid "Failed to open file in Imagick: "
|
220 |
msgstr "Kunde inte öppna fil i Imagick:"
|
221 |
|
222 |
+
#: inc/class-thumber.php:176
|
223 |
msgid "Failed to save image in Imagick: "
|
224 |
msgstr "Kunde inte spara bild i Imagick:"
|
225 |
|
226 |
+
#: inc/class-thumber.php:234
|
227 |
msgid "Ghostscript failed: "
|
228 |
msgstr "Ghostscript misslyckades:"
|
229 |
|
230 |
+
#: inc/class-thumber.php:372
|
231 |
msgid "Failed to retrieve thumbnail from Google: "
|
232 |
msgstr "Kunde inte hämta miniatyr från Google:"
|
233 |
|
234 |
+
#: inc/class-thumber.php:616
|
235 |
msgid "Thumbnail Generators: "
|
236 |
msgstr "Miniatyrgeneratorer:"
|
237 |
|
238 |
+
#: inc/class-thumber.php:621
|
239 |
msgid "No thumbnail generators enabled."
|
240 |
msgstr "Inga miniatyrgeneratorer aktiverade."
|
241 |
|
242 |
+
#: inc/class-thumber.php:663
|
243 |
msgid "Failed to get image editor: "
|
244 |
msgstr "Kunde inte hämta bildredigerare:"
|
245 |
|
246 |
+
#: inc/class-thumber.php:674
|
247 |
msgid "Failed to save image: "
|
248 |
msgstr "Kunde inte spara bild:"
|
249 |
|
256 |
"Display non-images (and images) in gallery format on a page or post with the "
|
257 |
"[dg] shortcode."
|
258 |
msgstr ""
|
259 |
+
"Visa dokument (och bilder) i ett galleriformat på en sida eller i ett inlägg "
|
260 |
+
"genom att använda kortkoden [dg]."
|
261 |
|
262 |
#. Author of the plugin/theme
|
263 |
msgid "Dan Rossiter"
|
languages/document-gallery-uk_UA.mo
CHANGED
Binary file
|
languages/document-gallery-uk_UA.po
CHANGED
@@ -2,90 +2,77 @@
|
|
2 |
# This file is distributed under the same license as the Document Gallery package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Document Gallery 2.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/document-gallery\n"
|
7 |
-
"POT-Creation-Date: 2014-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"PO-Revision-Date: 2014-
|
12 |
"Last-Translator: Dan Rossiter <dan.rossiters@gmail.com>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
-
"X-Generator: Poedit 1.6.
|
15 |
-
"Plural-Forms: nplurals=
|
16 |
-
"
|
17 |
-
"Language: uk_UA\n"
|
18 |
|
19 |
-
#: admin/class-admin.php:
|
20 |
-
msgid "General"
|
21 |
-
msgstr "Загальні"
|
22 |
-
|
23 |
-
#: admin/class-admin.php:29
|
24 |
-
msgid "Thumbnail Management"
|
25 |
-
msgstr "Керування мініатюрами"
|
26 |
-
|
27 |
-
#: admin/class-admin.php:30
|
28 |
-
msgid "Logging"
|
29 |
-
msgstr "Журнал подій"
|
30 |
-
|
31 |
-
#: admin/class-admin.php:31
|
32 |
-
msgid "Advanced"
|
33 |
-
msgstr "Для досвідчених користувачів"
|
34 |
-
|
35 |
-
#: admin/class-admin.php:68
|
36 |
msgid "Settings"
|
37 |
msgstr "Параметри"
|
38 |
|
39 |
-
#: admin/class-admin.php:
|
40 |
msgid "Document Gallery Settings"
|
41 |
msgstr "Параметри Document Gallery"
|
42 |
|
43 |
#. Plugin Name of the plugin/theme
|
44 |
-
#: admin/class-admin.php:
|
45 |
msgid "Document Gallery"
|
46 |
msgstr "Document Gallery"
|
47 |
|
48 |
-
#: admin/class-admin.php:
|
49 |
msgid "Default Settings"
|
50 |
-
msgstr "Типові
|
51 |
|
52 |
-
#: admin/class-admin.php:
|
53 |
msgid "Thumbnail Generation"
|
54 |
-
msgstr "Утворення
|
55 |
|
56 |
-
#: admin/class-admin.php:
|
57 |
msgid "Custom CSS"
|
58 |
msgstr "Особисті CSS"
|
59 |
|
60 |
-
#: admin/class-admin.php:
|
|
|
|
|
|
|
|
|
61 |
msgid "Link to attachment page rather than to file"
|
62 |
msgstr "Посилання на сторінку прикріпленого до запису файла, а не на сам файл"
|
63 |
|
64 |
-
#: admin/class-admin.php:
|
65 |
msgid "Include document descriptions"
|
66 |
msgstr "Додавати описи документів"
|
67 |
|
68 |
-
#: admin/class-admin.php:
|
69 |
msgid "Use auto-generated document thumbnails"
|
70 |
msgstr "Використовувати автоматично згенеровані мініатюри документів"
|
71 |
|
72 |
-
#: admin/class-admin.php:
|
73 |
msgid "Include image attachments in gallery"
|
74 |
msgstr "Включати прикріплені до посту зображення в галерею"
|
75 |
|
76 |
-
#: admin/class-admin.php:
|
77 |
msgid "Only look for attachments in post where [dg] is used"
|
78 |
msgstr "Шукати прикріплені файли лише у записах, де використовується [dg]"
|
79 |
|
80 |
-
#: admin/class-admin.php:
|
81 |
msgid "Ascending or descending sorting of documents"
|
82 |
msgstr "Сортування документів за зростанням або за спаданням"
|
83 |
|
84 |
-
#: admin/class-admin.php:
|
85 |
msgid "Which field to order documents by"
|
86 |
msgstr "За яким полем сортувати документи"
|
87 |
|
88 |
-
#: admin/class-admin.php:
|
89 |
msgid ""
|
90 |
"Whether matched documents must have all taxa_names (AND) or at least one (OR)"
|
91 |
msgstr ""
|
@@ -93,11 +80,11 @@ msgstr ""
|
|
93 |
"параметрі category, також можливе використання taxon_name, або хоча б однієї "
|
94 |
"(OR)"
|
95 |
|
96 |
-
#: admin/class-admin.php:
|
97 |
msgid "Locally generate thumbnails for audio & video files."
|
98 |
msgstr "Локально утворювати мініатюри для аудіо та відео файлів."
|
99 |
|
100 |
-
#: admin/class-admin.php:
|
101 |
msgid ""
|
102 |
"Use <a href=\"http://www.ghostscript.com/\" target=\"_blank\">Ghostscript</"
|
103 |
"a> for faster local PDF processing (compared to Imagick)."
|
@@ -106,7 +93,7 @@ msgstr ""
|
|
106 |
"\">Ghostscript</a> для більш швидкої локальної обробки PDF (порівняно з "
|
107 |
"Imagick)."
|
108 |
|
109 |
-
#: admin/class-admin.php:
|
110 |
msgid ""
|
111 |
"Your server is not configured to run <a href=\"http://www.ghostscript.com/\" "
|
112 |
"target=\"_blank\">Ghostscript</a>."
|
@@ -114,7 +101,7 @@ msgstr ""
|
|
114 |
"Ваш сервер не налаштований для використання <a href=\"http://www.ghostscript."
|
115 |
"com/\" target=\"_blank\">Ghostscript</a>."
|
116 |
|
117 |
-
#: admin/class-admin.php:
|
118 |
msgid ""
|
119 |
"Use <a href=\"http://www.php.net/manual/en/book.imagick.php\" target=\"_blank"
|
120 |
"\">Imagick</a> to handle lots of filetypes locally."
|
@@ -123,7 +110,7 @@ msgstr ""
|
|
123 |
"target=\"_blank\">Imagick</a> для локальної обробки великої кількості типів "
|
124 |
"файлів."
|
125 |
|
126 |
-
#: admin/class-admin.php:
|
127 |
msgid ""
|
128 |
"Your server is not configured to run <a href=\"http://www.php.net/manual/en/"
|
129 |
"book.imagick.php\" target=\"_blank\">Imagick</a>."
|
@@ -131,7 +118,7 @@ msgstr ""
|
|
131 |
"Ваш сервер не налаштований для використання <a href=\"http://www.php.net/"
|
132 |
"manual/en/book.imagick.php\" target=\"_blank\">Imagick</a>."
|
133 |
|
134 |
-
#: admin/class-admin.php:
|
135 |
msgid ""
|
136 |
"Use <a href=\"https://drive.google.com/viewer\" target=\"_blank\">Google "
|
137 |
"Drive Viewer</a> to generate thumbnails for MS Office files and many other "
|
@@ -141,79 +128,19 @@ msgstr ""
|
|
141 |
"\">Google Drive Viewer</a> для утворення мініатюр файлів MS Office та "
|
142 |
"багатьох інших типів файлів віддалено."
|
143 |
|
144 |
-
#: admin/class-admin.php:
|
145 |
msgid "Your server does not allow remote HTTP access."
|
146 |
msgstr "Ваш сервер не дозволяє віддалені HTTP запити."
|
147 |
|
148 |
-
#: admin/class-admin.php:
|
149 |
-
msgid "The max width and height (in pixels) that thumbnails will be generated."
|
150 |
-
msgstr ""
|
151 |
-
"Максимальна ширина і висота (у пікселях) з якими будуть утворюватися "
|
152 |
-
"мініатюри."
|
153 |
-
|
154 |
-
#: admin/class-admin.php:336
|
155 |
-
msgid "Advanced Thumbnail Generation"
|
156 |
-
msgstr "Утворення мініатюр"
|
157 |
-
|
158 |
-
#: admin/class-admin.php:348
|
159 |
-
msgid "Whether to log debug and error information related to Document Gallery."
|
160 |
-
msgstr ""
|
161 |
-
"Чи вести журнал налагоджування та інформації щодо помилок які мають "
|
162 |
-
"відношення до Document Gallery."
|
163 |
-
|
164 |
-
#: admin/class-admin.php:360
|
165 |
-
msgid ""
|
166 |
-
"Whether option structure should be validated before save. This is not "
|
167 |
-
"generally necessary."
|
168 |
-
msgstr ""
|
169 |
-
"Чи перевіряти структуру обраних налаштувань при збереженні. Як правило в "
|
170 |
-
"цьому нема потреби."
|
171 |
-
|
172 |
-
#: admin/class-admin.php:373
|
173 |
-
msgid ""
|
174 |
-
"Max number of seconds to wait for thumbnail generation before defaulting to "
|
175 |
-
"filetype icons."
|
176 |
-
msgstr ""
|
177 |
-
"Максимальна кількість секунд очікування при утворенні мініатюри до "
|
178 |
-
"використання іконки за замовчуванням."
|
179 |
-
|
180 |
-
#: admin/class-admin.php:374
|
181 |
-
msgid ""
|
182 |
-
"Note that generation will continue where timeout happened next time the "
|
183 |
-
"gallery is loaded."
|
184 |
-
msgstr ""
|
185 |
-
"Зверніть увагу, що утворення продовжиться з того місця, де воно було "
|
186 |
-
"призупинене, при наступному зверненні до галереї."
|
187 |
-
|
188 |
-
#: admin/class-admin.php:386
|
189 |
msgid "Successfully auto-detected the location of Ghostscript."
|
190 |
msgstr "Успішно автоматично визначено місцезнаходження Ghostscript."
|
191 |
|
192 |
-
#: admin/class-admin.php:
|
193 |
msgid "Failed to auto-detect the location of Ghostscript."
|
194 |
msgstr "Не вдалося автоматично визначити місцезнаходження Ghostscript."
|
195 |
|
196 |
-
#: admin/class-admin.php:
|
197 |
-
msgid "Options Array Dump"
|
198 |
-
msgstr "Дамп масиву обраних налаштувань"
|
199 |
-
|
200 |
-
#: admin/class-admin.php:438
|
201 |
-
msgid "Invalid width given: "
|
202 |
-
msgstr "Задана невірна ширина: "
|
203 |
-
|
204 |
-
#: admin/class-admin.php:451
|
205 |
-
msgid "Invalid height given: "
|
206 |
-
msgstr "Задана невірна висота: "
|
207 |
-
|
208 |
-
#: admin/class-admin.php:562
|
209 |
-
msgid "Invalid Ghostscript path given: "
|
210 |
-
msgstr "Задано невірний шлях Ghostscript: "
|
211 |
-
|
212 |
-
#: admin/class-admin.php:573
|
213 |
-
msgid "Invalid timeout given: "
|
214 |
-
msgstr "Задано невірний час очікування: "
|
215 |
-
|
216 |
-
#: admin/class-admin.php:604
|
217 |
msgid ""
|
218 |
"The following values will be used by default in the shortcode. You can still "
|
219 |
"manually set each of these values in each individual shortcode."
|
@@ -222,12 +149,11 @@ msgstr ""
|
|
222 |
"цьому вручну можна встановити будь-які з цих значень в кожному конкретному "
|
223 |
"екземплярі шорткоду."
|
224 |
|
225 |
-
#: admin/class-admin.php:
|
226 |
msgid "Select which tools to use when generating thumbnails."
|
227 |
msgstr "Оберіть, які інструменти використовувати для утворення мініатюр."
|
228 |
|
229 |
-
#: admin/class-admin.php:
|
230 |
-
#, c-format
|
231 |
msgid ""
|
232 |
"Enter custom CSS styling for use with document galleries. To see which ids "
|
233 |
"and classes you can style, take a look at <a href=\"%s\" target=\"_blank"
|
@@ -237,7 +163,7 @@ msgstr ""
|
|
237 |
"побачити, які селектори варто використовувати, зверніть увагу на <a href=\"%s"
|
238 |
"\" target=\"_blank\">style.css</a>."
|
239 |
|
240 |
-
#: admin/class-admin.php:
|
241 |
msgid ""
|
242 |
"Unless you <em>really</em> know what you're doing, you should not touch "
|
243 |
"these values."
|
@@ -245,119 +171,42 @@ msgstr ""
|
|
245 |
"Не варто міняти цих значень, за винятком випадків коли Ви <em>насправді</em> "
|
246 |
"знаєте що робите."
|
247 |
|
248 |
-
#: admin/class-admin.php:
|
249 |
msgid ""
|
250 |
"NOTE: <code>exec()</code> is not accessible. Ghostscript will not function."
|
251 |
msgstr "УВАГА: <code>exec()</code> недосяжний. Ghostscript не працюватиме."
|
252 |
|
253 |
-
#: admin/class-admin.php:
|
254 |
-
msgid ""
|
255 |
-
"
|
256 |
-
"\"http://wordpress.org/support/plugin/document-gallery\" target=\"_blank"
|
257 |
-
"\">reporting a bug</a>:"
|
258 |
-
msgstr ""
|
259 |
-
"Наведений нижче <em>доступний тільки для читання текст</em> має бути наданий "
|
260 |
-
"при <a href=\"http://wordpress.org/support/plugin/document-gallery\" target="
|
261 |
-
"\"_blank\">повідомленні про помилку</a>:"
|
262 |
-
|
263 |
-
#: admin/class-admin.php:755
|
264 |
-
msgid "Select All"
|
265 |
-
msgstr "Вибрати всі"
|
266 |
-
|
267 |
-
#: admin/class-admin.php:758
|
268 |
-
msgid "Thumbnail"
|
269 |
-
msgstr "Мініатюра"
|
270 |
-
|
271 |
-
#: admin/class-admin.php:759
|
272 |
-
msgid "File name"
|
273 |
-
msgstr "Назва файла"
|
274 |
-
|
275 |
-
#: admin/class-admin.php:760
|
276 |
-
msgid "Date"
|
277 |
-
msgstr "Дата"
|
278 |
-
|
279 |
-
#: admin/class-admin.php:763
|
280 |
-
msgid "Delete Selected"
|
281 |
-
msgstr "Вилучити вибрані"
|
282 |
-
|
283 |
-
#: admin/class-admin.php:765
|
284 |
-
msgid "item"
|
285 |
-
msgid_plural "items"
|
286 |
-
msgstr[0] "елемент"
|
287 |
-
msgstr[1] "елемента"
|
288 |
-
msgstr[2] "елементів"
|
289 |
-
|
290 |
-
#: admin/class-admin.php:768
|
291 |
-
msgid "Go to the first page"
|
292 |
-
msgstr "Перейти до першої сторінки"
|
293 |
-
|
294 |
-
#: admin/class-admin.php:769
|
295 |
-
msgid "Go to the previous page"
|
296 |
-
msgstr "Перейти до попередньої сторінки"
|
297 |
-
|
298 |
-
#: admin/class-admin.php:771
|
299 |
-
msgid "Current page"
|
300 |
-
msgstr "Поточна сторінка"
|
301 |
-
|
302 |
-
#: admin/class-admin.php:771
|
303 |
-
msgid "of"
|
304 |
-
msgstr "з"
|
305 |
-
|
306 |
-
#: admin/class-admin.php:772
|
307 |
-
msgid "Go to the next page"
|
308 |
-
msgstr "Перейти до наступної сторінки"
|
309 |
-
|
310 |
-
#: admin/class-admin.php:773
|
311 |
-
msgid "Go to the last page"
|
312 |
-
msgstr "Перейти до останньої сторінки"
|
313 |
-
|
314 |
-
#: admin/class-admin.php:775
|
315 |
-
msgid "items per page"
|
316 |
-
msgstr "елементів на сторінці"
|
317 |
-
|
318 |
-
#: admin/class-admin.php:808
|
319 |
-
msgid "View"
|
320 |
-
msgstr "Переглянути сторінку вкладення"
|
321 |
-
|
322 |
-
#: admin/class-admin.php:809
|
323 |
-
msgid "attachment page"
|
324 |
-
msgstr ""
|
325 |
-
|
326 |
-
#: admin/class-admin.php:809
|
327 |
-
msgid "Attachment not found"
|
328 |
-
msgstr "Вкладення не знайдено"
|
329 |
|
330 |
-
#: inc/class-gallery.php:
|
331 |
msgid "Generated using Document Gallery. Get yours here: "
|
332 |
msgstr ""
|
333 |
"Згенеровано використовуючи Document Gallery. Сподобалось? Отримайте Вашу "
|
334 |
"копію тут: "
|
335 |
|
336 |
-
#: inc/class-gallery.php:
|
337 |
msgid "No attachments to display. How boring! :("
|
338 |
msgstr "Жодного вкладення для відображення. Нудьга! :("
|
339 |
|
340 |
-
#: inc/class-gallery.php:
|
341 |
-
#, c-format
|
342 |
msgid "The %s parameter may only be \"%s\" or \"%s.\" You entered \"%s.\""
|
343 |
msgstr ""
|
344 |
"Параметр %s може приймати тільки значення \"%s\" або \"%s.\" Ви ж ввели \"%s."
|
345 |
"\""
|
346 |
|
347 |
-
#: inc/class-gallery.php:
|
348 |
msgid "The following ID is invalid: "
|
349 |
msgid_plural "The following IDs are invalid: "
|
350 |
msgstr[0] "Наступний ідентифікатор (ID) недійсний: "
|
351 |
msgstr[1] "Наступні ідентифікатори (IDs) недійсні: "
|
352 |
-
msgstr[2] "Наступні ідентифікатори (IDs) недійсні: "
|
353 |
|
354 |
-
#: inc/class-gallery.php:
|
355 |
-
#, c-format
|
356 |
msgid "The orderby value entered, \"%s,\" is not valid."
|
357 |
msgstr "Задане значення параметра orderby, \"%s,\" неприпустиме."
|
358 |
|
359 |
-
#: inc/class-gallery.php:
|
360 |
-
#, c-format
|
361 |
msgid "%s is not a valid term name in %s."
|
362 |
msgstr "%s не є припустимим значенням параметра %s."
|
363 |
|
@@ -365,49 +214,36 @@ msgstr "%s не є припустимим значенням параметра
|
|
365 |
msgid "Failed to set Imagick page number"
|
366 |
msgstr "Не вдалося встановити номер сторінки в Imagick"
|
367 |
|
368 |
-
#: inc/class-thumber.php:
|
369 |
-
#, c-format
|
370 |
-
msgid "Attempting to generate thumbnail for attachment #%d with '%s'"
|
371 |
-
msgstr "Спроба утворення мініатюри для вкладення №%d за допомоги '%s'"
|
372 |
-
|
373 |
-
#: inc/class-thumber.php:138
|
374 |
msgid "Could not open file: "
|
375 |
msgstr "Не вдалося відкрити файл: "
|
376 |
|
377 |
-
#: inc/class-thumber.php:
|
378 |
msgid "Could not write file: "
|
379 |
msgstr "Не вдалося записати файл: "
|
380 |
|
381 |
-
#: inc/class-thumber.php:
|
382 |
msgid "Failed to open file in Imagick: "
|
383 |
msgstr "Не вдалося відкрити файл в Imagick: "
|
384 |
|
385 |
-
#: inc/class-thumber.php:
|
386 |
msgid "Failed to save image in Imagick: "
|
387 |
msgstr "Не вдалося зберегти зображення в Imagick: "
|
388 |
|
389 |
-
#: inc/class-thumber.php:
|
390 |
msgid "Ghostscript failed: "
|
391 |
-
msgstr "Ghostscript
|
392 |
|
393 |
-
#: inc/class-thumber.php:
|
394 |
msgid "Failed to retrieve thumbnail from Google: "
|
395 |
msgstr "Не вдалося отримати від Google мініатюру: "
|
396 |
|
397 |
-
#: inc/class-thumber.php:
|
398 |
-
msgid "Thumbnail Generators: "
|
399 |
-
msgstr "Генератори мініатюр: "
|
400 |
-
|
401 |
-
#: inc/class-thumber.php:636
|
402 |
-
msgid "No thumbnail generators enabled."
|
403 |
-
msgstr "Відсутні підключені генератори мініатюр."
|
404 |
-
|
405 |
-
#: inc/class-thumber.php:679
|
406 |
msgid "Failed to get image editor: "
|
407 |
msgstr ""
|
408 |
"Невдача при спробі використання графічного редактора (WP_Image_Editor): "
|
409 |
|
410 |
-
#: inc/class-thumber.php:
|
411 |
msgid "Failed to save image: "
|
412 |
msgstr "Не вдалося зберегти зображення: "
|
413 |
|
2 |
# This file is distributed under the same license as the Document Gallery package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Document Gallery 2.0.9\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/document-gallery\n"
|
7 |
+
"POT-Creation-Date: 2014-04-21 02:57:10+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2014-04-21 17:57-0600\n"
|
12 |
"Last-Translator: Dan Rossiter <dan.rossiters@gmail.com>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
+
"X-Generator: Poedit 1.6.4\n"
|
15 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
+
"Language: uk\n"
|
|
|
17 |
|
18 |
+
#: admin/class-admin.php:27
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
msgid "Settings"
|
20 |
msgstr "Параметри"
|
21 |
|
22 |
+
#: admin/class-admin.php:37
|
23 |
msgid "Document Gallery Settings"
|
24 |
msgstr "Параметри Document Gallery"
|
25 |
|
26 |
#. Plugin Name of the plugin/theme
|
27 |
+
#: admin/class-admin.php:38
|
28 |
msgid "Document Gallery"
|
29 |
msgstr "Document Gallery"
|
30 |
|
31 |
+
#: admin/class-admin.php:58
|
32 |
msgid "Default Settings"
|
33 |
+
msgstr "Типові Параметри"
|
34 |
|
35 |
+
#: admin/class-admin.php:62
|
36 |
msgid "Thumbnail Generation"
|
37 |
+
msgstr "Утворення Мініатюр"
|
38 |
|
39 |
+
#: admin/class-admin.php:66
|
40 |
msgid "Custom CSS"
|
41 |
msgstr "Особисті CSS"
|
42 |
|
43 |
+
#: admin/class-admin.php:70
|
44 |
+
msgid "Advanced Thumbnail Generation"
|
45 |
+
msgstr "Параметри Утворення Мініатюр для Досвідчених Користувачів"
|
46 |
+
|
47 |
+
#: admin/class-admin.php:82
|
48 |
msgid "Link to attachment page rather than to file"
|
49 |
msgstr "Посилання на сторінку прикріпленого до запису файла, а не на сам файл"
|
50 |
|
51 |
+
#: admin/class-admin.php:94
|
52 |
msgid "Include document descriptions"
|
53 |
msgstr "Додавати описи документів"
|
54 |
|
55 |
+
#: admin/class-admin.php:106
|
56 |
msgid "Use auto-generated document thumbnails"
|
57 |
msgstr "Використовувати автоматично згенеровані мініатюри документів"
|
58 |
|
59 |
+
#: admin/class-admin.php:118
|
60 |
msgid "Include image attachments in gallery"
|
61 |
msgstr "Включати прикріплені до посту зображення в галерею"
|
62 |
|
63 |
+
#: admin/class-admin.php:130
|
64 |
msgid "Only look for attachments in post where [dg] is used"
|
65 |
msgstr "Шукати прикріплені файли лише у записах, де використовується [dg]"
|
66 |
|
67 |
+
#: admin/class-admin.php:143
|
68 |
msgid "Ascending or descending sorting of documents"
|
69 |
msgstr "Сортування документів за зростанням або за спаданням"
|
70 |
|
71 |
+
#: admin/class-admin.php:156
|
72 |
msgid "Which field to order documents by"
|
73 |
msgstr "За яким полем сортувати документи"
|
74 |
|
75 |
+
#: admin/class-admin.php:169
|
76 |
msgid ""
|
77 |
"Whether matched documents must have all taxa_names (AND) or at least one (OR)"
|
78 |
msgstr ""
|
80 |
"параметрі category, також можливе використання taxon_name, або хоча б однієї "
|
81 |
"(OR)"
|
82 |
|
83 |
+
#: admin/class-admin.php:181
|
84 |
msgid "Locally generate thumbnails for audio & video files."
|
85 |
msgstr "Локально утворювати мініатюри для аудіо та відео файлів."
|
86 |
|
87 |
+
#: admin/class-admin.php:194
|
88 |
msgid ""
|
89 |
"Use <a href=\"http://www.ghostscript.com/\" target=\"_blank\">Ghostscript</"
|
90 |
"a> for faster local PDF processing (compared to Imagick)."
|
93 |
"\">Ghostscript</a> для більш швидкої локальної обробки PDF (порівняно з "
|
94 |
"Imagick)."
|
95 |
|
96 |
+
#: admin/class-admin.php:195
|
97 |
msgid ""
|
98 |
"Your server is not configured to run <a href=\"http://www.ghostscript.com/\" "
|
99 |
"target=\"_blank\">Ghostscript</a>."
|
101 |
"Ваш сервер не налаштований для використання <a href=\"http://www.ghostscript."
|
102 |
"com/\" target=\"_blank\">Ghostscript</a>."
|
103 |
|
104 |
+
#: admin/class-admin.php:209
|
105 |
msgid ""
|
106 |
"Use <a href=\"http://www.php.net/manual/en/book.imagick.php\" target=\"_blank"
|
107 |
"\">Imagick</a> to handle lots of filetypes locally."
|
110 |
"target=\"_blank\">Imagick</a> для локальної обробки великої кількості типів "
|
111 |
"файлів."
|
112 |
|
113 |
+
#: admin/class-admin.php:210
|
114 |
msgid ""
|
115 |
"Your server is not configured to run <a href=\"http://www.php.net/manual/en/"
|
116 |
"book.imagick.php\" target=\"_blank\">Imagick</a>."
|
118 |
"Ваш сервер не налаштований для використання <a href=\"http://www.php.net/"
|
119 |
"manual/en/book.imagick.php\" target=\"_blank\">Imagick</a>."
|
120 |
|
121 |
+
#: admin/class-admin.php:224
|
122 |
msgid ""
|
123 |
"Use <a href=\"https://drive.google.com/viewer\" target=\"_blank\">Google "
|
124 |
"Drive Viewer</a> to generate thumbnails for MS Office files and many other "
|
128 |
"\">Google Drive Viewer</a> для утворення мініатюр файлів MS Office та "
|
129 |
"багатьох інших типів файлів віддалено."
|
130 |
|
131 |
+
#: admin/class-admin.php:225
|
132 |
msgid "Your server does not allow remote HTTP access."
|
133 |
msgstr "Ваш сервер не дозволяє віддалені HTTP запити."
|
134 |
|
135 |
+
#: admin/class-admin.php:239
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
msgid "Successfully auto-detected the location of Ghostscript."
|
137 |
msgstr "Успішно автоматично визначено місцезнаходження Ghostscript."
|
138 |
|
139 |
+
#: admin/class-admin.php:240
|
140 |
msgid "Failed to auto-detect the location of Ghostscript."
|
141 |
msgstr "Не вдалося автоматично визначити місцезнаходження Ghostscript."
|
142 |
|
143 |
+
#: admin/class-admin.php:248
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
msgid ""
|
145 |
"The following values will be used by default in the shortcode. You can still "
|
146 |
"manually set each of these values in each individual shortcode."
|
149 |
"цьому вручну можна встановити будь-які з цих значень в кожному конкретному "
|
150 |
"екземплярі шорткоду."
|
151 |
|
152 |
+
#: admin/class-admin.php:255
|
153 |
msgid "Select which tools to use when generating thumbnails."
|
154 |
msgstr "Оберіть, які інструменти використовувати для утворення мініатюр."
|
155 |
|
156 |
+
#: admin/class-admin.php:261
|
|
|
157 |
msgid ""
|
158 |
"Enter custom CSS styling for use with document galleries. To see which ids "
|
159 |
"and classes you can style, take a look at <a href=\"%s\" target=\"_blank"
|
163 |
"побачити, які селектори варто використовувати, зверніть увагу на <a href=\"%s"
|
164 |
"\" target=\"_blank\">style.css</a>."
|
165 |
|
166 |
+
#: admin/class-admin.php:279
|
167 |
msgid ""
|
168 |
"Unless you <em>really</em> know what you're doing, you should not touch "
|
169 |
"these values."
|
171 |
"Не варто міняти цих значень, за винятком випадків коли Ви <em>насправді</em> "
|
172 |
"знаєте що робите."
|
173 |
|
174 |
+
#: admin/class-admin.php:281
|
175 |
msgid ""
|
176 |
"NOTE: <code>exec()</code> is not accessible. Ghostscript will not function."
|
177 |
msgstr "УВАГА: <code>exec()</code> недосяжний. Ghostscript не працюватиме."
|
178 |
|
179 |
+
#: admin/class-admin.php:388
|
180 |
+
msgid "Invalid Ghostscript path given: "
|
181 |
+
msgstr "Задано невірний шлях Ghostscript: "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
|
183 |
+
#: inc/class-gallery.php:92
|
184 |
msgid "Generated using Document Gallery. Get yours here: "
|
185 |
msgstr ""
|
186 |
"Згенеровано використовуючи Document Gallery. Сподобалось? Отримайте Вашу "
|
187 |
"копію тут: "
|
188 |
|
189 |
+
#: inc/class-gallery.php:95
|
190 |
msgid "No attachments to display. How boring! :("
|
191 |
msgstr "Жодного вкладення для відображення. Нудьга! :("
|
192 |
|
193 |
+
#: inc/class-gallery.php:96
|
|
|
194 |
msgid "The %s parameter may only be \"%s\" or \"%s.\" You entered \"%s.\""
|
195 |
msgstr ""
|
196 |
"Параметр %s може приймати тільки значення \"%s\" або \"%s.\" Ви ж ввели \"%s."
|
197 |
"\""
|
198 |
|
199 |
+
#: inc/class-gallery.php:267
|
200 |
msgid "The following ID is invalid: "
|
201 |
msgid_plural "The following IDs are invalid: "
|
202 |
msgstr[0] "Наступний ідентифікатор (ID) недійсний: "
|
203 |
msgstr[1] "Наступні ідентифікатори (IDs) недійсні: "
|
|
|
204 |
|
205 |
+
#: inc/class-gallery.php:333
|
|
|
206 |
msgid "The orderby value entered, \"%s,\" is not valid."
|
207 |
msgstr "Задане значення параметра orderby, \"%s,\" неприпустиме."
|
208 |
|
209 |
+
#: inc/class-gallery.php:475
|
|
|
210 |
msgid "%s is not a valid term name in %s."
|
211 |
msgstr "%s не є припустимим значенням параметра %s."
|
212 |
|
214 |
msgid "Failed to set Imagick page number"
|
215 |
msgstr "Не вдалося встановити номер сторінки в Imagick"
|
216 |
|
217 |
+
#: inc/class-thumber.php:125
|
|
|
|
|
|
|
|
|
|
|
218 |
msgid "Could not open file: "
|
219 |
msgstr "Не вдалося відкрити файл: "
|
220 |
|
221 |
+
#: inc/class-thumber.php:130
|
222 |
msgid "Could not write file: "
|
223 |
msgstr "Не вдалося записати файл: "
|
224 |
|
225 |
+
#: inc/class-thumber.php:166
|
226 |
msgid "Failed to open file in Imagick: "
|
227 |
msgstr "Не вдалося відкрити файл в Imagick: "
|
228 |
|
229 |
+
#: inc/class-thumber.php:176
|
230 |
msgid "Failed to save image in Imagick: "
|
231 |
msgstr "Не вдалося зберегти зображення в Imagick: "
|
232 |
|
233 |
+
#: inc/class-thumber.php:234
|
234 |
msgid "Ghostscript failed: "
|
235 |
+
msgstr "Ghostscript вийшов із ладу: "
|
236 |
|
237 |
+
#: inc/class-thumber.php:364
|
238 |
msgid "Failed to retrieve thumbnail from Google: "
|
239 |
msgstr "Не вдалося отримати від Google мініатюру: "
|
240 |
|
241 |
+
#: inc/class-thumber.php:644
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
msgid "Failed to get image editor: "
|
243 |
msgstr ""
|
244 |
"Невдача при спробі використання графічного редактора (WP_Image_Editor): "
|
245 |
|
246 |
+
#: inc/class-thumber.php:655
|
247 |
msgid "Failed to save image: "
|
248 |
msgstr "Не вдалося зберегти зображення: "
|
249 |
|
languages/document-gallery.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the Document Gallery package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Document Gallery 2.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/document-gallery\n"
|
7 |
-
"POT-Creation-Date: 2014-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -12,338 +12,171 @@ msgstr ""
|
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
-
#: admin/class-admin.php:
|
16 |
-
msgid "General"
|
17 |
-
msgstr ""
|
18 |
-
|
19 |
-
#: admin/class-admin.php:29
|
20 |
-
msgid "Thumbnail Management"
|
21 |
-
msgstr ""
|
22 |
-
|
23 |
-
#: admin/class-admin.php:30 admin/class-admin.php:898
|
24 |
-
msgid "Logging"
|
25 |
-
msgstr ""
|
26 |
-
|
27 |
-
#: admin/class-admin.php:31
|
28 |
-
msgid "Advanced"
|
29 |
-
msgstr ""
|
30 |
-
|
31 |
-
#: admin/class-admin.php:68
|
32 |
msgid "Settings"
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: admin/class-admin.php:
|
36 |
msgid "Document Gallery Settings"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#. #-#-#-#-# plugin.pot (Document Gallery 2.
|
40 |
#. Plugin Name of the plugin/theme
|
41 |
-
#: admin/class-admin.php:
|
42 |
msgid "Document Gallery"
|
43 |
msgstr ""
|
44 |
|
45 |
-
#: admin/class-admin.php:
|
46 |
msgid "Default Settings"
|
47 |
msgstr ""
|
48 |
|
49 |
-
#: admin/class-admin.php:
|
50 |
msgid "Thumbnail Generation"
|
51 |
msgstr ""
|
52 |
|
53 |
-
#: admin/class-admin.php:
|
54 |
msgid "Custom CSS"
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: admin/class-admin.php:
|
|
|
|
|
|
|
|
|
58 |
msgid "Link to attachment page rather than to file"
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: admin/class-admin.php:
|
62 |
msgid "Include document descriptions"
|
63 |
msgstr ""
|
64 |
|
65 |
-
#: admin/class-admin.php:
|
66 |
msgid "Use auto-generated document thumbnails"
|
67 |
msgstr ""
|
68 |
|
69 |
-
#: admin/class-admin.php:
|
70 |
msgid "Include image attachments in gallery"
|
71 |
msgstr ""
|
72 |
|
73 |
-
#: admin/class-admin.php:
|
74 |
msgid "Only look for attachments in post where [dg] is used"
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: admin/class-admin.php:
|
78 |
msgid "Ascending or descending sorting of documents"
|
79 |
msgstr ""
|
80 |
|
81 |
-
#: admin/class-admin.php:
|
82 |
msgid "Which field to order documents by"
|
83 |
msgstr ""
|
84 |
|
85 |
-
#: admin/class-admin.php:
|
86 |
msgid ""
|
87 |
"Whether matched documents must have all taxa_names (AND) or at least one (OR)"
|
88 |
msgstr ""
|
89 |
|
90 |
-
#: admin/class-admin.php:
|
91 |
msgid "Locally generate thumbnails for audio & video files."
|
92 |
msgstr ""
|
93 |
|
94 |
-
#: admin/class-admin.php:
|
95 |
msgid ""
|
96 |
"Use <a href=\"http://www.ghostscript.com/\" target=\"_blank\">Ghostscript</"
|
97 |
"a> for faster local PDF processing (compared to Imagick)."
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: admin/class-admin.php:
|
101 |
msgid ""
|
102 |
"Your server is not configured to run <a href=\"http://www.ghostscript.com/\" "
|
103 |
"target=\"_blank\">Ghostscript</a>."
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: admin/class-admin.php:
|
107 |
msgid ""
|
108 |
"Use <a href=\"http://www.php.net/manual/en/book.imagick.php\" target=\"_blank"
|
109 |
"\">Imagick</a> to handle lots of filetypes locally."
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: admin/class-admin.php:
|
113 |
msgid ""
|
114 |
"Your server is not configured to run <a href=\"http://www.php.net/manual/en/"
|
115 |
"book.imagick.php\" target=\"_blank\">Imagick</a>."
|
116 |
msgstr ""
|
117 |
|
118 |
-
#: admin/class-admin.php:
|
119 |
msgid ""
|
120 |
"Use <a href=\"https://drive.google.com/viewer\" target=\"_blank\">Google "
|
121 |
"Drive Viewer</a> to generate thumbnails for MS Office files and many other "
|
122 |
"file types remotely."
|
123 |
msgstr ""
|
124 |
|
125 |
-
#: admin/class-admin.php:
|
126 |
msgid "Your server does not allow remote HTTP access."
|
127 |
msgstr ""
|
128 |
|
129 |
-
#: admin/class-admin.php:
|
130 |
-
msgid "The max width and height (in pixels) that thumbnails will be generated."
|
131 |
-
msgstr ""
|
132 |
-
|
133 |
-
#: admin/class-admin.php:338
|
134 |
-
msgid "Advanced Thumbnail Generation"
|
135 |
-
msgstr ""
|
136 |
-
|
137 |
-
#: admin/class-admin.php:350
|
138 |
-
msgid "Whether to log debug and error information related to Document Gallery."
|
139 |
-
msgstr ""
|
140 |
-
|
141 |
-
#: admin/class-admin.php:362
|
142 |
-
msgid ""
|
143 |
-
"Whether option structure should be validated before save. This is not "
|
144 |
-
"generally necessary."
|
145 |
-
msgstr ""
|
146 |
-
|
147 |
-
#: admin/class-admin.php:375
|
148 |
-
msgid ""
|
149 |
-
"Max number of seconds to wait for thumbnail generation before defaulting to "
|
150 |
-
"filetype icons."
|
151 |
-
msgstr ""
|
152 |
-
|
153 |
-
#: admin/class-admin.php:376
|
154 |
-
msgid ""
|
155 |
-
"Note that generation will continue where timeout happened next time the "
|
156 |
-
"gallery is loaded."
|
157 |
-
msgstr ""
|
158 |
-
|
159 |
-
#: admin/class-admin.php:388
|
160 |
msgid "Successfully auto-detected the location of Ghostscript."
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: admin/class-admin.php:
|
164 |
msgid "Failed to auto-detect the location of Ghostscript."
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: admin/class-admin.php:
|
168 |
-
msgid "Options Array Dump"
|
169 |
-
msgstr ""
|
170 |
-
|
171 |
-
#: admin/class-admin.php:440
|
172 |
-
msgid "Invalid width given: "
|
173 |
-
msgstr ""
|
174 |
-
|
175 |
-
#: admin/class-admin.php:453
|
176 |
-
msgid "Invalid height given: "
|
177 |
-
msgstr ""
|
178 |
-
|
179 |
-
#: admin/class-admin.php:566
|
180 |
-
msgid "Invalid Ghostscript path given: "
|
181 |
-
msgstr ""
|
182 |
-
|
183 |
-
#: admin/class-admin.php:577
|
184 |
-
msgid "Invalid timeout given: "
|
185 |
-
msgstr ""
|
186 |
-
|
187 |
-
#: admin/class-admin.php:608
|
188 |
msgid ""
|
189 |
"The following values will be used by default in the shortcode. You can still "
|
190 |
"manually set each of these values in each individual shortcode."
|
191 |
msgstr ""
|
192 |
|
193 |
-
#: admin/class-admin.php:
|
194 |
msgid "Select which tools to use when generating thumbnails."
|
195 |
msgstr ""
|
196 |
|
197 |
-
#: admin/class-admin.php:
|
198 |
msgid ""
|
199 |
"Enter custom CSS styling for use with document galleries. To see which ids "
|
200 |
"and classes you can style, take a look at <a href=\"%s\" target=\"_blank"
|
201 |
"\">style.css</a>."
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: admin/class-admin.php:
|
205 |
msgid ""
|
206 |
"Unless you <em>really</em> know what you're doing, you should not touch "
|
207 |
"these values."
|
208 |
msgstr ""
|
209 |
|
210 |
-
#: admin/class-admin.php:
|
211 |
msgid ""
|
212 |
"NOTE: <code>exec()</code> is not accessible. Ghostscript will not function."
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: admin/class-admin.php:
|
216 |
-
msgid ""
|
217 |
-
"The following <em>readonly text</em> should be provided when <a href="
|
218 |
-
"\"http://wordpress.org/support/plugin/document-gallery\" target=\"_blank"
|
219 |
-
"\">reporting a bug</a>:"
|
220 |
-
msgstr ""
|
221 |
-
|
222 |
-
#: admin/class-admin.php:757
|
223 |
-
msgid "Select All"
|
224 |
-
msgstr ""
|
225 |
-
|
226 |
-
#: admin/class-admin.php:760
|
227 |
-
msgid "Thumbnail"
|
228 |
-
msgstr ""
|
229 |
-
|
230 |
-
#: admin/class-admin.php:761
|
231 |
-
msgid "File name"
|
232 |
-
msgstr ""
|
233 |
-
|
234 |
-
#: admin/class-admin.php:762 admin/class-admin.php:834
|
235 |
-
msgid "Date"
|
236 |
-
msgstr ""
|
237 |
-
|
238 |
-
#: admin/class-admin.php:765
|
239 |
-
msgid "Delete Selected"
|
240 |
-
msgstr ""
|
241 |
-
|
242 |
-
#: admin/class-admin.php:767
|
243 |
-
msgid "item"
|
244 |
-
msgid_plural "items"
|
245 |
-
msgstr[0] ""
|
246 |
-
msgstr[1] ""
|
247 |
-
|
248 |
-
#: admin/class-admin.php:770
|
249 |
-
msgid "Go to the first page"
|
250 |
-
msgstr ""
|
251 |
-
|
252 |
-
#: admin/class-admin.php:771
|
253 |
-
msgid "Go to the previous page"
|
254 |
-
msgstr ""
|
255 |
-
|
256 |
-
#: admin/class-admin.php:773
|
257 |
-
msgid "Current page"
|
258 |
-
msgstr ""
|
259 |
-
|
260 |
-
#: admin/class-admin.php:773
|
261 |
-
msgid "of"
|
262 |
-
msgstr ""
|
263 |
-
|
264 |
-
#: admin/class-admin.php:774
|
265 |
-
msgid "Go to the next page"
|
266 |
-
msgstr ""
|
267 |
-
|
268 |
-
#: admin/class-admin.php:775
|
269 |
-
msgid "Go to the last page"
|
270 |
-
msgstr ""
|
271 |
-
|
272 |
-
#: admin/class-admin.php:777
|
273 |
-
msgid "items per page"
|
274 |
-
msgstr ""
|
275 |
-
|
276 |
-
#: admin/class-admin.php:815
|
277 |
-
msgid "View"
|
278 |
-
msgstr ""
|
279 |
-
|
280 |
-
#: admin/class-admin.php:816
|
281 |
-
msgid "attachment page"
|
282 |
-
msgstr ""
|
283 |
-
|
284 |
-
#: admin/class-admin.php:816
|
285 |
-
msgid "Attachment not found"
|
286 |
-
msgstr ""
|
287 |
-
|
288 |
-
#: admin/class-admin.php:835
|
289 |
-
msgid "Level"
|
290 |
-
msgstr ""
|
291 |
-
|
292 |
-
#: admin/class-admin.php:836
|
293 |
-
msgid "Message"
|
294 |
-
msgstr ""
|
295 |
-
|
296 |
-
#: admin/class-admin.php:845
|
297 |
-
msgid "Expand All"
|
298 |
-
msgstr ""
|
299 |
-
|
300 |
-
#: admin/class-admin.php:848
|
301 |
-
msgid "Collapse All"
|
302 |
-
msgstr ""
|
303 |
-
|
304 |
-
#: admin/class-admin.php:891
|
305 |
-
msgid "Clear Log"
|
306 |
-
msgstr ""
|
307 |
-
|
308 |
-
#: admin/class-admin.php:898
|
309 |
-
msgid "There are no log entries at this time."
|
310 |
-
msgstr ""
|
311 |
-
|
312 |
-
#: admin/class-admin.php:898
|
313 |
-
msgid "For Your information:"
|
314 |
-
msgstr ""
|
315 |
-
|
316 |
-
#: admin/class-admin.php:898
|
317 |
-
msgid "is turned ON"
|
318 |
-
msgstr ""
|
319 |
-
|
320 |
-
#: admin/class-admin.php:898
|
321 |
-
msgid "is turned OFF"
|
322 |
msgstr ""
|
323 |
|
324 |
-
#: inc/class-gallery.php:
|
325 |
msgid "Generated using Document Gallery. Get yours here: "
|
326 |
msgstr ""
|
327 |
|
328 |
-
#: inc/class-gallery.php:
|
329 |
msgid "No attachments to display. How boring! :("
|
330 |
msgstr ""
|
331 |
|
332 |
-
#: inc/class-gallery.php:
|
333 |
msgid "The %s parameter may only be \"%s\" or \"%s.\" You entered \"%s.\""
|
334 |
msgstr ""
|
335 |
|
336 |
-
#: inc/class-gallery.php:
|
337 |
msgid "The following ID is invalid: "
|
338 |
msgid_plural "The following IDs are invalid: "
|
339 |
msgstr[0] ""
|
340 |
msgstr[1] ""
|
341 |
|
342 |
-
#: inc/class-gallery.php:
|
343 |
msgid "The orderby value entered, \"%s,\" is not valid."
|
344 |
msgstr ""
|
345 |
|
346 |
-
#: inc/class-gallery.php:
|
347 |
msgid "%s is not a valid term name in %s."
|
348 |
msgstr ""
|
349 |
|
@@ -351,47 +184,43 @@ msgstr ""
|
|
351 |
msgid "Failed to set Imagick page number"
|
352 |
msgstr ""
|
353 |
|
354 |
-
#: inc/class-thumber.php:
|
355 |
-
msgid "Attempting to generate thumbnail for attachment #%d with (%s)"
|
356 |
-
msgstr ""
|
357 |
-
|
358 |
-
#: inc/class-thumber.php:138
|
359 |
msgid "Could not open file: "
|
360 |
msgstr ""
|
361 |
|
362 |
-
#: inc/class-thumber.php:
|
363 |
msgid "Could not write file: "
|
364 |
msgstr ""
|
365 |
|
366 |
-
#: inc/class-thumber.php:
|
367 |
msgid "Failed to open file in Imagick: "
|
368 |
msgstr ""
|
369 |
|
370 |
-
#: inc/class-thumber.php:
|
371 |
msgid "Failed to save image in Imagick: "
|
372 |
msgstr ""
|
373 |
|
374 |
-
#: inc/class-thumber.php:
|
375 |
msgid "Ghostscript failed: "
|
376 |
msgstr ""
|
377 |
|
378 |
-
#: inc/class-thumber.php:
|
379 |
msgid "Failed to retrieve thumbnail from Google: "
|
380 |
msgstr ""
|
381 |
|
382 |
-
#: inc/class-thumber.php:
|
383 |
msgid "Thumbnail Generators: "
|
384 |
msgstr ""
|
385 |
|
386 |
-
#: inc/class-thumber.php:
|
387 |
msgid "No thumbnail generators enabled."
|
388 |
msgstr ""
|
389 |
|
390 |
-
#: inc/class-thumber.php:
|
391 |
msgid "Failed to get image editor: "
|
392 |
msgstr ""
|
393 |
|
394 |
-
#: inc/class-thumber.php:
|
395 |
msgid "Failed to save image: "
|
396 |
msgstr ""
|
397 |
|
2 |
# This file is distributed under the same license as the Document Gallery package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Document Gallery 2.1\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/document-gallery\n"
|
7 |
+
"POT-Creation-Date: 2014-05-26 15:34:24+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
+
#: admin/class-admin.php:27
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
msgid "Settings"
|
17 |
msgstr ""
|
18 |
|
19 |
+
#: admin/class-admin.php:37
|
20 |
msgid "Document Gallery Settings"
|
21 |
msgstr ""
|
22 |
|
23 |
+
#. #-#-#-#-# plugin.pot (Document Gallery 2.1) #-#-#-#-#
|
24 |
#. Plugin Name of the plugin/theme
|
25 |
+
#: admin/class-admin.php:38
|
26 |
msgid "Document Gallery"
|
27 |
msgstr ""
|
28 |
|
29 |
+
#: admin/class-admin.php:58
|
30 |
msgid "Default Settings"
|
31 |
msgstr ""
|
32 |
|
33 |
+
#: admin/class-admin.php:62
|
34 |
msgid "Thumbnail Generation"
|
35 |
msgstr ""
|
36 |
|
37 |
+
#: admin/class-admin.php:66
|
38 |
msgid "Custom CSS"
|
39 |
msgstr ""
|
40 |
|
41 |
+
#: admin/class-admin.php:70
|
42 |
+
msgid "Advanced Thumbnail Generation"
|
43 |
+
msgstr ""
|
44 |
+
|
45 |
+
#: admin/class-admin.php:82
|
46 |
msgid "Link to attachment page rather than to file"
|
47 |
msgstr ""
|
48 |
|
49 |
+
#: admin/class-admin.php:94
|
50 |
msgid "Include document descriptions"
|
51 |
msgstr ""
|
52 |
|
53 |
+
#: admin/class-admin.php:106
|
54 |
msgid "Use auto-generated document thumbnails"
|
55 |
msgstr ""
|
56 |
|
57 |
+
#: admin/class-admin.php:118
|
58 |
msgid "Include image attachments in gallery"
|
59 |
msgstr ""
|
60 |
|
61 |
+
#: admin/class-admin.php:130
|
62 |
msgid "Only look for attachments in post where [dg] is used"
|
63 |
msgstr ""
|
64 |
|
65 |
+
#: admin/class-admin.php:143
|
66 |
msgid "Ascending or descending sorting of documents"
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: admin/class-admin.php:156
|
70 |
msgid "Which field to order documents by"
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: admin/class-admin.php:169
|
74 |
msgid ""
|
75 |
"Whether matched documents must have all taxa_names (AND) or at least one (OR)"
|
76 |
msgstr ""
|
77 |
|
78 |
+
#: admin/class-admin.php:181
|
79 |
msgid "Locally generate thumbnails for audio & video files."
|
80 |
msgstr ""
|
81 |
|
82 |
+
#: admin/class-admin.php:194
|
83 |
msgid ""
|
84 |
"Use <a href=\"http://www.ghostscript.com/\" target=\"_blank\">Ghostscript</"
|
85 |
"a> for faster local PDF processing (compared to Imagick)."
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: admin/class-admin.php:195
|
89 |
msgid ""
|
90 |
"Your server is not configured to run <a href=\"http://www.ghostscript.com/\" "
|
91 |
"target=\"_blank\">Ghostscript</a>."
|
92 |
msgstr ""
|
93 |
|
94 |
+
#: admin/class-admin.php:209
|
95 |
msgid ""
|
96 |
"Use <a href=\"http://www.php.net/manual/en/book.imagick.php\" target=\"_blank"
|
97 |
"\">Imagick</a> to handle lots of filetypes locally."
|
98 |
msgstr ""
|
99 |
|
100 |
+
#: admin/class-admin.php:210
|
101 |
msgid ""
|
102 |
"Your server is not configured to run <a href=\"http://www.php.net/manual/en/"
|
103 |
"book.imagick.php\" target=\"_blank\">Imagick</a>."
|
104 |
msgstr ""
|
105 |
|
106 |
+
#: admin/class-admin.php:224
|
107 |
msgid ""
|
108 |
"Use <a href=\"https://drive.google.com/viewer\" target=\"_blank\">Google "
|
109 |
"Drive Viewer</a> to generate thumbnails for MS Office files and many other "
|
110 |
"file types remotely."
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: admin/class-admin.php:225
|
114 |
msgid "Your server does not allow remote HTTP access."
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: admin/class-admin.php:239
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
msgid "Successfully auto-detected the location of Ghostscript."
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: admin/class-admin.php:240
|
122 |
msgid "Failed to auto-detect the location of Ghostscript."
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: admin/class-admin.php:262
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
msgid ""
|
127 |
"The following values will be used by default in the shortcode. You can still "
|
128 |
"manually set each of these values in each individual shortcode."
|
129 |
msgstr ""
|
130 |
|
131 |
+
#: admin/class-admin.php:269
|
132 |
msgid "Select which tools to use when generating thumbnails."
|
133 |
msgstr ""
|
134 |
|
135 |
+
#: admin/class-admin.php:275
|
136 |
msgid ""
|
137 |
"Enter custom CSS styling for use with document galleries. To see which ids "
|
138 |
"and classes you can style, take a look at <a href=\"%s\" target=\"_blank"
|
139 |
"\">style.css</a>."
|
140 |
msgstr ""
|
141 |
|
142 |
+
#: admin/class-admin.php:293
|
143 |
msgid ""
|
144 |
"Unless you <em>really</em> know what you're doing, you should not touch "
|
145 |
"these values."
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: admin/class-admin.php:295
|
149 |
msgid ""
|
150 |
"NOTE: <code>exec()</code> is not accessible. Ghostscript will not function."
|
151 |
msgstr ""
|
152 |
|
153 |
+
#: admin/class-admin.php:407
|
154 |
+
msgid "Invalid Ghostscript path given: "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: inc/class-gallery.php:92
|
158 |
msgid "Generated using Document Gallery. Get yours here: "
|
159 |
msgstr ""
|
160 |
|
161 |
+
#: inc/class-gallery.php:95
|
162 |
msgid "No attachments to display. How boring! :("
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: inc/class-gallery.php:96
|
166 |
msgid "The %s parameter may only be \"%s\" or \"%s.\" You entered \"%s.\""
|
167 |
msgstr ""
|
168 |
|
169 |
+
#: inc/class-gallery.php:267
|
170 |
msgid "The following ID is invalid: "
|
171 |
msgid_plural "The following IDs are invalid: "
|
172 |
msgstr[0] ""
|
173 |
msgstr[1] ""
|
174 |
|
175 |
+
#: inc/class-gallery.php:333
|
176 |
msgid "The orderby value entered, \"%s,\" is not valid."
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: inc/class-gallery.php:475
|
180 |
msgid "%s is not a valid term name in %s."
|
181 |
msgstr ""
|
182 |
|
184 |
msgid "Failed to set Imagick page number"
|
185 |
msgstr ""
|
186 |
|
187 |
+
#: inc/class-thumber.php:125
|
|
|
|
|
|
|
|
|
188 |
msgid "Could not open file: "
|
189 |
msgstr ""
|
190 |
|
191 |
+
#: inc/class-thumber.php:130
|
192 |
msgid "Could not write file: "
|
193 |
msgstr ""
|
194 |
|
195 |
+
#: inc/class-thumber.php:166
|
196 |
msgid "Failed to open file in Imagick: "
|
197 |
msgstr ""
|
198 |
|
199 |
+
#: inc/class-thumber.php:176
|
200 |
msgid "Failed to save image in Imagick: "
|
201 |
msgstr ""
|
202 |
|
203 |
+
#: inc/class-thumber.php:234
|
204 |
msgid "Ghostscript failed: "
|
205 |
msgstr ""
|
206 |
|
207 |
+
#: inc/class-thumber.php:372
|
208 |
msgid "Failed to retrieve thumbnail from Google: "
|
209 |
msgstr ""
|
210 |
|
211 |
+
#: inc/class-thumber.php:616
|
212 |
msgid "Thumbnail Generators: "
|
213 |
msgstr ""
|
214 |
|
215 |
+
#: inc/class-thumber.php:621
|
216 |
msgid "No thumbnail generators enabled."
|
217 |
msgstr ""
|
218 |
|
219 |
+
#: inc/class-thumber.php:663
|
220 |
msgid "Failed to get image editor: "
|
221 |
msgstr ""
|
222 |
|
223 |
+
#: inc/class-thumber.php:674
|
224 |
msgid "Failed to save image: "
|
225 |
msgstr ""
|
226 |
|
log/.htaccess
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
<FilesMatch "\.(htaccess|log)$">
|
2 |
-
Order Allow,Deny
|
3 |
-
Deny from all
|
4 |
-
</FilesMatch>
|
|
|
|
|
|
|
|