| 1 |
=== Document Gallery === |
| 2 |
Contributors: dan.rossiter, demur |
| 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.2.6 |
| 8 |
License: GPLv2 |
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html |
| 10 |
|
| 11 |
This plugin generates thumbnails for documents and displays them in a |
| 12 |
gallery-like format for easy sharing. |
| 13 |
|
| 14 |
== Description == |
| 15 |
|
| 16 |
This plugin allows the user to effortlessly create a gallery of documents and |
| 17 |
other attached media, much like the gallery option already available for image |
| 18 |
attachments. |
| 19 |
|
| 20 |
Watch the following video for a brief demonstration of Document Gallery in action: |
| 21 |
[youtube https://www.youtube.com/watch?v=pCQsx5z-uOU] |
| 22 |
|
| 23 |
Read more in the **Installation** tab! |
| 24 |
|
| 25 |
= Translation = |
| 26 |
|
| 27 |
Document Gallery has to-date been translated into **5** languages, listed below. |
| 28 |
|
| 29 |
1. **French** — *Thanks, Marc Liotard and [Traffic Influence](http://www.trafic-influence.com/)!* |
| 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 |
|
| 37 |
Document Gallery includes features intended to make integration with other plugins |
| 38 |
simple. See the bottom of the **Installation** tab for specific documentation on |
| 39 |
the various features provided. |
| 40 |
|
| 41 |
*If this plugin has helped you, please take a moment to [rate |
| 42 |
it](http://wordpress.org/support/view/plugin-reviews/document-gallery#postform)!* |
| 43 |
|
| 44 |
== Installation == |
| 45 |
|
| 46 |
1. Upload `document-gallery` to the `/wp-content/plugins/` directory |
| 47 |
1. Activate the plugin through the 'Plugins' menu in WordPress |
| 48 |
1. Place `[dg]` in any posts or pages you want a document gallery included. See |
| 49 |
below for additional display options. |
| 50 |
|
| 51 |
= Document Gallery Options = |
| 52 |
|
| 53 |
In order to include all compatible documents from a given page or post, you |
| 54 |
must include the following shortcode in the post: `[dg]`. |
| 55 |
|
| 56 |
In addition to the default behavior, the plugin provides many options to |
| 57 |
customize behavior with various attributes, seen below: |
| 58 |
|
| 59 |
`[dg [fancy=<true/false>] [attachment_pg=<true/false>] |
| 60 |
[category/custom_taxon_name=<**comma-separated list of taxon values**> [relation=<AND/OR>]] |
| 61 |
[descriptions=<true/false>] [ids=<**comma-separated list of ID #s**>] |
| 62 |
[images=<true/false>] [localpost=<true/false>] [order=<ASC/DESC>] [orderby=<**see below**>]]` |
| 63 |
|
| 64 |
Though the shortcode above may seem far from "short," none of the attributes are |
| 65 |
required and most users will find that the plugin meets your needs "out of the box" |
| 66 |
without any added attributes. |
| 67 |
|
| 68 |
**Default Values** |
| 69 |
|
| 70 |
By default, document gallery will use `no descriptions`, `orderby menu_order` |
| 71 |
, `ASC order`, `no attachment_pg links`, and `no images` from the `local post` |
| 72 |
if you do not specify otherwise. These defaults can be configured in your dashboard |
| 73 |
under `Settings -> Document Gallery`. |
| 74 |
|
| 75 |
**Attachment Page Option** *(New in Version 1.1)* |
| 76 |
|
| 77 |
This option determines whether each document icon will link to the actual file |
| 78 |
or to its attachment page. If you want the user to be able to click on the |
| 79 |
icon and directly rective the option to download then use `attachment_pg=false` |
| 80 |
(the default). If you have information on the attachment page that you want the |
| 81 |
link to go to, use `attachment_pg=true`. |
| 82 |
|
| 83 |
**Categories/Custom Taxonomy Option** *(New in Version 1.4)* |
| 84 |
|
| 85 |
With the `categories` option you are able to select attachments based on |
| 86 |
their assigned category or any other |
| 87 |
[custom taxon](http://codex.wordpress.org/Taxonomies). Categories |
| 88 |
or any custom taxon can be referenced simply by including `category=category_value` |
| 89 |
or `taxon_name=taxon_value`. Multiple values for a single taxon may be separated |
| 90 |
by commas. |
| 91 |
|
| 92 |
**Descriptions Option** |
| 93 |
|
| 94 |
If `true`, each document will take its own line with the description displayed |
| 95 |
alongside it. |
| 96 |
|
| 97 |
*Note: this will use the `description` field, **not** the `caption`. Be |
| 98 |
careful when entering your document data.* |
| 99 |
|
| 100 |
**Fancy** *(New in Version 2.0)* |
| 101 |
|
| 102 |
If `true`, we will try to generate a thumbnail for each document in the gallery. |
| 103 |
The success in generating thumbs will depend mostly on what your server supports. |
| 104 |
To fine-tune how thumbnails are generated, visit `Settings -> Document Gallery` |
| 105 |
in your site's dashboard. |
| 106 |
|
| 107 |
*NOTE: By default, the most universally-supported option for generating thumbnails, |
| 108 |
[Google Drive Viewer](https://docs.google.com/viewer) is disabled by default |
| 109 |
in order to protect your privacy, since using it requires sending your documents |
| 110 |
to Google's servers. If you're not working with confidential documents, you are |
| 111 |
encouraged to enable this for optimum performance.* |
| 112 |
|
| 113 |
**Order Option** |
| 114 |
|
| 115 |
This option works alongside the `orderby` option to determine whether the |
| 116 |
documents are displayed in ascending or descending order. |
| 117 |
|
| 118 |
**Orderby Option** |
| 119 |
|
| 120 |
* `menu_order` - This is probably the one you want to use. Menu order is |
| 121 |
the order that icons appear when seen in the Insert / Upload Media Gallery |
| 122 |
dialog. To change this order, you simply drag the icons around until they |
| 123 |
are where you want them. In earlier versions of WordPress, menu_order was |
| 124 |
modified by the integer fields in the Insert / Upload Media Gallery dialog. |
| 125 |
These fields no longer exist in recent releases. |
| 126 |
* `title` - Order by title. |
| 127 |
* `date` - Order by upload date. |
| 128 |
* `modified` - Order by last modified date. |
| 129 |
* `rand` - Random order. |
| 130 |
* `ID` - Order by post id. |
| 131 |
* `author` - Order by author. |
| 132 |
* `name` - Order by attachment slug. |
| 133 |
* `parent` - Order by post/page parent id. |
| 134 |
(Only useful in conjunction with `localpost=false` option.) |
| 135 |
* `comment_count` - Order by number of comments (available with WP >= 2.9). |
| 136 |
* `none` - No order (available with Version 2.8). |
| 137 |
* `post__in` - Preserve post ID order given in the post__in array. |
| 138 |
|
| 139 |
**Images Option** *(New in Version 1.2)* |
| 140 |
|
| 141 |
This option will tell the plugin to include all images attached to to a page or |
| 142 |
post in addition to all documents. |
| 143 |
|
| 144 |
**IDs Option** *(New in Version 1.2)* |
| 145 |
|
| 146 |
This is an advanced option intended for experienced WordPress users. If this |
| 147 |
option is used, the plugin will ignore attached documents, instead including |
| 148 |
all attachments defined by the `ids` attribute (e.g.: `ids=10,2,4,42`). |
| 149 |
|
| 150 |
*Note: If this attribute is used, the `order`, `orderby`, `images` and other |
| 151 |
attributes which generally determine which attachments to include or how to |
| 152 |
order them will be ignored. Order is defined by the order the ids are |
| 153 |
provided.* |
| 154 |
|
| 155 |
**Localpost Option** *(New in Version 1.4)* |
| 156 |
|
| 157 |
By default a document gallery only looks at attachments of the page/post where |
| 158 |
the `[dg]` shortcode is used. If you would like to search beyond that local scope, |
| 159 |
you must set `localpost=false`. |
| 160 |
|
| 161 |
This option would probably be useful especially when querying with the *category |
| 162 |
or taxonomy* option, though it can be used with any options you chose. |
| 163 |
|
| 164 |
**Relation Option** *(New in Version 1.4)* |
| 165 |
|
| 166 |
The relation option should only be used when also using the *category or custom |
| 167 |
taxonomy* option (see above). Additionally, this option is only effective in |
| 168 |
WordPress installs version 3.1 or higher. Older versions cannot use this value |
| 169 |
and will ignore it. |
| 170 |
|
| 171 |
When using multiple taxa, this option allows you to decide whether the attachments |
| 172 |
returned must meet all of the taxa_names specified (AND) or a minimum of one |
| 173 |
match (OR). |
| 174 |
|
| 175 |
= Customize Appearance = |
| 176 |
|
| 177 |
The Default Document gallery will often fit quite well with whatever theme you |
| 178 |
are using. But, if you want to change things, Document Gallery makes that easy. |
| 179 |
Just navigate to `Settings -> Document Gallery` and put any custom CSS in the |
| 180 |
provided text box. |
| 181 |
|
| 182 |
See [`style.css`](http://plugins.svn.wordpress.org/document-gallery/trunk/assets/css/style.css) |
| 183 |
for all of the ids and classes being used in a Document Gallery. |
| 184 |
|
| 185 |
**Example** |
| 186 |
|
| 187 |
Say I would like to include a border for the right and bottom of the document |
| 188 |
icon, but only when descriptions are shown (to delineate the icon from the |
| 189 |
description text). To do this, I would need to use the following CSS: |
| 190 |
|
| 191 |
`.document-icon-wrapper.descriptions .document-icon{ |
| 192 |
border-right: 1px solid #37824A; |
| 193 |
border-bottom: 1px solid #37824A; |
| 194 |
}` |
| 195 |
|
| 196 |
Now, if I wanted to modify that code to instead add the same border to all of |
| 197 |
the document-icons, regardless of whether they have a description or not, I |
| 198 |
would just change the first line, removing the descriptions class like so: |
| 199 |
|
| 200 |
`.document-icon-wrapper .document-icon` |
| 201 |
|
| 202 |
= Developers = |
| 203 |
|
| 204 |
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 HTML Output** |
| 209 |
|
| 210 |
In Documnet Gallery version 2.2, we've released a more powerful HTML |
| 211 |
templating framework, making all generated output filterable, and thus |
| 212 |
configurable, by developers wishing to control the gallery output. Three |
| 213 |
different filters are provided in order to access the various segments |
| 214 |
of a gallery: `dg_gallery_template`, `dg_row_template`, and `dg_icon_template`. |
| 215 |
These filtered templates are used when dynamically generating output for each |
| 216 |
gallery. |
| 217 |
|
| 218 |
*NOTE: The `dg_doc_icon` has been deprecated with the release and is |
| 219 |
scheduled to be removed in a future release. If you are using this |
| 220 |
filter, you are encouraged to replace its usages with `dg_icon_template`.* |
| 221 |
|
| 222 |
Each of the following filters provides an bool argument which indicates |
| 223 |
whither the gallery being generated will display descriptions, which |
| 224 |
allows you to handle galleries with and without descriptions differently. |
| 225 |
|
| 226 |
If you wish to wrap your galleries in some additional content, the |
| 227 |
`dg_gallery_template` is the tool for the job. With it you can include |
| 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 |
* **%rows%**: This tag is replaced by all of the document gallery rows. |
| 233 |
Everything before this string will be rendered before the gallery and |
| 234 |
everything after this string will be rendered following the gallery. |
| 235 |
|
| 236 |
|
| 237 |
If you wish to modify how gallery rows are generated, `dg_row_template`, |
| 238 |
is provided for this purpose. This filter gives you control at the row |
| 239 |
level for how a gallery will be generated. The filter exposes 2 special tags |
| 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 |
|
| 267 |
Document Gallery provides the `dg_thumbers` filter, which allows developers to |
| 268 |
add, remove, or even re-order which methods are used to generate a thumbnail |
| 269 |
for a given attachment. |
| 270 |
|
| 271 |
The value being filtered is an associative array with keys equal to a regular |
| 272 |
expression matching all file extensions supported by the generator and values |
| 273 |
equal to [callables](http://www.php.net/manual/en/language.types.callable.php) |
| 274 |
which take an **attachment ID** and a **file page number** as arguments. |
| 275 |
|
| 276 |
The callable given should return false if thumbnail generation fails or |
| 277 |
a system path to a **temporary** copy of the generated image if generation |
| 278 |
succeeds. The caller will manipulate the file at the returned path so **do not** pass |
| 279 |
in a file path to the original copy of anything as it will be destroyed. Also, do not |
| 280 |
worry about any image resizing or giving the file a sensible name as the caller |
| 281 |
of your method will resize and rename the file before returning. |
| 282 |
|
| 283 |
The following is an example taken from the Document Gallery source (with a few |
| 284 |
modifications for ease of readability), where we add thumbnail generation for |
| 285 |
all Audio/Video filetypes supported by WordPress: |
| 286 |
|
| 287 |
`function dg_filter_thumbers($thumbers) { |
| 288 |
$av_file_types = array_merge(wp_get_audio_extensions(), wp_get_video_extensions()); |
| 289 |
$exts = implode('|', $av_file_types); |
| 290 |
$thumbers[$exts] = 'dg_get_audio_video_thumbnail'; |
| 291 |
} |
| 292 |
add_filter('dg_thumbers', 'dg_filter_thumbers', 10); |
| 293 |
|
| 294 |
function dg_get_audio_video_thumbnail($ID, $pg) { |
| 295 |
include_once ABSPATH . 'wp-admin/includes/media.php'; |
| 296 |
|
| 297 |
$attachment = get_post($ID); |
| 298 |
$doc_path = get_attached_file($ID); |
| 299 |
|
| 300 |
// get the file metadata |
| 301 |
if (preg_match('#^video/#', get_post_mime_type($attachment))) { |
| 302 |
$metadata = wp_read_video_metadata($doc_path); |
| 303 |
} |
| 304 |
elseif (preg_match('#^audio/#', get_post_mime_type($attachment))) { |
| 305 |
$metadata = wp_read_audio_metadata($doc_path); |
| 306 |
} |
| 307 |
|
| 308 |
// unsupported mime type || no embedded image present |
| 309 |
if(!isset($metadata) || empty($metadata['image']['data'])) { |
| 310 |
return false; |
| 311 |
} |
| 312 |
|
| 313 |
$ext = 'jpg'; |
| 314 |
switch ($metadata['image']['mime']) { |
| 315 |
case 'image/gif': |
| 316 |
$ext = 'gif'; |
| 317 |
break; |
| 318 |
case 'image/png': |
| 319 |
$ext = 'png'; |
| 320 |
break; |
| 321 |
} |
| 322 |
|
| 323 |
$tmp_dir = untrailingslashit(get_temp_dir()); |
| 324 |
$temp_file = $tmp_dir . DIRECTORY_SEPARATOR . wp_unique_filename($tmp_dir, md5(time()) . ".$ext"); |
| 325 |
|
| 326 |
if (!$fp = @fopen($temp_file, 'wb')) { |
| 327 |
return false; |
| 328 |
} |
| 329 |
|
| 330 |
if (!@fwrite($fp, $metadata['image']['data'])) { |
| 331 |
fclose($fp); |
| 332 |
return false; |
| 333 |
} |
| 334 |
|
| 335 |
fclose($fp); |
| 336 |
|
| 337 |
return $temp_file; |
| 338 |
}` |
| 339 |
|
| 340 |
== Frequently Asked Questions == |
| 341 |
|
| 342 |
|
| 343 |
= Q: Why is [insert thumbnail generation method] enabled on one of my WordPress installs, but not on another one? = |
| 344 |
|
| 345 |
A: Document Gallery works very hard behind the scenes to ensure that it enables |
| 346 |
as much as is possible for any given server, but some servers just can't do |
| 347 |
some of the things that the plugin supports. Document Gallery detects when a |
| 348 |
server can't do something (run Ghostscript, for example) and disables that option. |
| 349 |
If you later modify your server to handle one of the thumbnail generation methods, |
| 350 |
Document Gallery will notice this and re-enable the option on the settings page, |
| 351 |
though you will need to go in and tell Document Gallery that it should use this |
| 352 |
newly-enabled method. |
| 353 |
|
| 354 |
= Q: Why is Ghostscript so much faster than Imagick? = |
| 355 |
|
| 356 |
A: This comes down to how the two programs work. Imagick actually delegates |
| 357 |
handling of PDFs to Ghostscript behind the scenes, but it doesn't do so |
| 358 |
intelligently. Before passing off the PDF, it first reads the entire contents |
| 359 |
of the PDF into memory. Since we only need a single page to generate the |
| 360 |
thumbnail, this is much more work than is needed. Ghostscript, on the other hand, |
| 361 |
can handle reading only one page into memory, thus doing much less work before |
| 362 |
returning our thumbnail. |
| 363 |
|
| 364 |
= Q: Why isn't Google Drive Viewer enabled by default? = |
| 365 |
|
| 366 |
A: Google Drive Viewer is the most commonly-supported thumbnail generation method, |
| 367 |
alongside the Audio/Video generation, but is disabled by default. The reason |
| 368 |
for this is that in order to use this method, Document Gallery has to send your |
| 369 |
document over to Google's servers, where Google will generate the thumbnail for |
| 370 |
you. For most users, this shouldn't be a big deal, but since some users |
| 371 |
retain sensitive documents on their site, this was made opt-in to avoid |
| 372 |
compromising anyone's security. If you don't have sensitive documents, I |
| 373 |
would recommend enabling it, since it's currently the only way to generate a |
| 374 |
thumbnail for any of the Microsoft Office files, as well as some less common |
| 375 |
file types. |
| 376 |
|
| 377 |
== Screenshots == |
| 378 |
|
| 379 |
1. This is an example of "fancy" thumbnails. The images are a copy of the front |
| 380 |
page for each document. |
| 381 |
2. This is an example of multiple Document Galleries on a single page (using |
| 382 |
the `ids` attribute). It also shows how images will appear in a Document |
| 383 |
Gallery. Note that the description field supports HTML markup, so the |
| 384 |
possibilities are endless! |
| 385 |
3. This is how the Document Gallery looks with `descriptions=false` (default). |
| 386 |
Note that the display inherits styling from your active theme. |
| 387 |
|
| 388 |
== Changelog == |
| 389 |
|
| 390 |
= Features For The Future = |
| 391 |
|
| 392 |
To see a list of features planned for the future as well as to propose your own |
| 393 |
ideas for future Document Gallery development, take a look at our |
| 394 |
[issue tracker](https://github.com/thenadz/document-gallery/issues). |
| 395 |
|
| 396 |
= 2.2.6 = |
| 397 |
* **Enhancement:** Improved how Ghostscript executable is detected. |
| 398 |
|
| 399 |
= 2.2.5 = |
| 400 |
* **Bug Fix:** Resolves a bug where document descriptions were not being displayed |
| 401 |
correctly. |
| 402 |
* **Translation:** Thanks, Marc Liotard and [Traffic Influence](http://www.trafic-influence.com/) |
| 403 |
for updating the French translation to include new phrases throughout the plugin! |
| 404 |
|
| 405 |
= 2.2.4 = |
| 406 |
* **Translation:**: Thanks to [mepmepmep](http://wordpress.org/support/profile/mepmepmep) |
| 407 |
who has just updated the Document Gallery Swedish translation! |
| 408 |
|
| 409 |
= 2.2.3 = |
| 410 |
* **Enhancement:** This will only be relevant to developers. `%descriptions%` tag |
| 411 |
is now available in the `dg_icon_template` filter. |
| 412 |
|
| 413 |
= 2.2.2 = |
| 414 |
* **Bug Fix:** Resolves minor issue in `2.2.1` that resulted in a warning being |
| 415 |
logged while interacting with the new thumbnail management table in the |
| 416 |
Document Gallery settings. |
| 417 |
|
| 418 |
= 2.2.1 = |
| 419 |
* **Bug Fix:** PHP installs older than 5.3 were crashing with version 2.2. This release |
| 420 |
patches the issue. |
| 421 |
|
| 422 |
= 2.2 = |
| 423 |
* **Note:** This release is the first release where development has been done by |
| 424 |
multiple people. I would like to give a massive thank you to |
| 425 |
[demur](http://wordpress.org/support/profile/demur) who has been an equal |
| 426 |
partner throughout the development of this version. Couldn't have done it without you! |
| 427 |
* **Note:** With multiple developing this project, it made sense to setup |
| 428 |
a formal method to track issues and possible future enhancements. With this in mind |
| 429 |
we've begun to maintain an [issue tracker](https://github.com/thenadz/document-gallery/issues). |
| 430 |
Feel free to read through possible future features and even suggest new features |
| 431 |
you would like to see! |
| 432 |
* **Enhancement:** You can now view which thumbnails have been generated and manually |
| 433 |
delete individual thumbnails from the Document Gallery settings page, located at |
| 434 |
Dashboard -> Settings -> Document Gallery. |
| 435 |
* **Enhancement:* The logging for Document Gallery is now **much** more advanced. |
| 436 |
Logging can be configured and viewed directly from the Document Gallery settings |
| 437 |
page. |
| 438 |
* **Enhancement:** Max width and height of generated thumbnails is now configurable. |
| 439 |
* **Enhancement:** We had a couple of reports of the Document Gallery options |
| 440 |
being corrupted in some installs, so we added functionality to force validation |
| 441 |
of option structure on save. This will not be of much use to most users, but |
| 442 |
will help us track down some of the more difficult to reproduce bugs. |
| 443 |
* **Enhancement:** For developers. New filters have been added to support modifying all |
| 444 |
aspects of HTML generated by the plugin. Look at the Installation tab for documentation |
| 445 |
on these new filters. |
| 446 |
|
| 447 |
= 2.1.1 = |
| 448 |
* **Translation:** Thanks to [mepmepmep](http://wordpress.org/support/profile/mepmepmep) |
| 449 |
who has translated Document Gallery into Swedish! |
| 450 |
* **Translation:** Thanks to Marc Liotard who has translated Document Gallery into French! |
| 451 |
* **Note:** If you would like to help translate Document Gallery into another language, |
| 452 |
get started [here](http://wordpress.org/support/topic/seeking-translators)! |
| 453 |
* **Note:** This is an extremely minor release, but big changes are on the |
| 454 |
way in version `2.2`! Stay tuned as it should be going live in the very |
| 455 |
near future. Look for a complete makeover of the admin options including |
| 456 |
lots of new ways to configure DG to best meet your needs! |
| 457 |
|
| 458 |
= 2.1 = |
| 459 |
* **Enhancement:** Document Gallery now supports |
| 460 |
[multisite networks](http://codex.wordpress.org/Create_A_Network). |
| 461 |
|
| 462 |
= 2.0.10 = |
| 463 |
* **Enhancement:** Ghostscript detection should now work correctly on GoDaddy |
| 464 |
and some other hosts that don't properly setup their executables. |
| 465 |
* **Translation:** Thanks *again* to |
| 466 |
[demur](http://wordpress.org/support/profile/demur) who has translated |
| 467 |
Document Gallery into Russian and Ukrainian! If you would like to help |
| 468 |
translate Document Gallery into another language, get started |
| 469 |
[here](http://wordpress.org/support/topic/seeking-translators)! |
| 470 |
|
| 471 |
= 2.0.9 = |
| 472 |
* **Bug Fix:** The `order` attribute was documented and implemented as being `ASC` |
| 473 |
or `DEC`, but the latter should actually have been `DESC`. Documentation and |
| 474 |
implementation for this option has been corrected. Thanks again to |
| 475 |
[demur](http://wordpress.org/support/profile/demur) for catching this! |
| 476 |
|
| 477 |
= 2.0.8 = |
| 478 |
* **Enhancement:** Ghostscript will now handle PS and EPS files if enabled. |
| 479 |
* **Bug Fix:** There were a couple of issues in how the `ids` attribute was being |
| 480 |
handled. Thanks, [demur](http://wordpress.org/support/profile/demur) for catching |
| 481 |
these! |
| 482 |
|
| 483 |
= 2.0.7 = |
| 484 |
* **Bug Fix:** `2.0.6` did not fully resolve the bug described below. This should. |
| 485 |
|
| 486 |
= 2.0.6 = |
| 487 |
* **Bug Fix:** If DG failed to automagically detect the location of the |
| 488 |
Ghostscript binary, manually setting the location did not enable using it. |
| 489 |
Thanks for tracking this bug down, |
| 490 |
[Chris](http://wordpress.org/support/profile/fredd500)! |
| 491 |
* **Minor:** Included various enhancements in handling thumbnail generation |
| 492 |
for image types. |
| 493 |
* **Tested Up To:** Document Gallery has been tested in WP 3.9 (RC 1). |
| 494 |
|
| 495 |
= 2.0.5 = |
| 496 |
* **Bug Fix:** Rolling back part of CSS enhancments in 2.0.4 that were causing |
| 497 |
errors on some servers. May revisit at a later date. |
| 498 |
|
| 499 |
= 2.0.4 = |
| 500 |
* **Enhancement:** Custom CSS is now loaded faster, meaning faster page loads |
| 501 |
for your users. Tests are showing a speedup of around 30% over where it was |
| 502 |
in the last release. |
| 503 |
* **Enhancement:** All of the default icons were sent through |
| 504 |
[Yahoo! Smush.it](http://www.smushit.com/ysmush.it/), giving a few percentage |
| 505 |
points decrease in size. Thanks for the suggestion, |
| 506 |
[wm](http://wordpress.org/support/profile/webbmasterpianise)! |
| 507 |
|
| 508 |
= 2.0.3 = |
| 509 |
* **Enhancement:** Now handles custom user CSS more securely. |
| 510 |
* **Enhancement:** Now handles calling Ghostscript executable more securely. |
| 511 |
* **Enhancement:** Now provides timing information for gallery generation |
| 512 |
when running WordPress in [WP_DEBUG](https://codex.wordpress.org/WP_DEBUG) |
| 513 |
mode. When enabled, DG will log to the PHP error log file. |
| 514 |
* **Info:** Did you know that in tests I performed, Ghostscript (GS) performed |
| 515 |
350% faster than using Imagick (IM)? Try testing with |
| 516 |
[this file](http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf), |
| 517 |
which finished almost instantly using GS, but took multiple minutes when |
| 518 |
using IM on my test server (results may vary). See new FAQ tab to find out why. |
| 519 |
|
| 520 |
= 2.0.2 = |
| 521 |
* **Bug Fix:** Imagick was actually never working... My bad -- it is now! Thanks to |
| 522 |
[kaldimar](http://wordpress.org/support/profile/kaldimar) for reporting this. |
| 523 |
* **Enhancement:** Document Gallery en el Español por Andrew de |
| 524 |
[WebHostingHub](http://www.webhostinghub.com/). (To help translate to another |
| 525 |
language, [see here](http://wordpress.org/support/topic/seeking-translators).) |
| 526 |
|
| 527 |
= 2.0.1 = |
| 528 |
* **Bug Fix:** Resolves issue with `2.0` where DG options were not properly |
| 529 |
initialized when the plugin was updated. This caused the settings page to |
| 530 |
behave oddly and many other things throughout to not work as expected when |
| 531 |
you updated through the dashboard. Thanks to jawhite & rigbypa for |
| 532 |
[reporting this](http://wordpress.org/support/topic/errors-after-updating-to-20)! |
| 533 |
|
| 534 |
= 2.0 = |
| 535 |
* **Enhancement:** This release is a **BIG** deal! We are introducing true |
| 536 |
document thumbnails (rather than the boring static images that were the same |
| 537 |
for every document), meaning that you will be able to generate and display |
| 538 |
thumbnails for most of your documents so your users can see a preview of the |
| 539 |
document before downloading. This has been |
| 540 |
[months in development](http://wordpress.org/support/topic/pdf-thumbnails-instead-of-generic-icon) |
| 541 |
and I really hope that you all enjoy it! |
| 542 |
* **Enhancement:** Document Gallery now has a settings page where you can |
| 543 |
configure the default options for your galleries and chose how thumbnails are |
| 544 |
generated. |
| 545 |
* **Enhancement:** Customizing CSS for your document gallery is now *much easier*. |
| 546 |
If you want to add additional styling, just navigate to `Settings -> Document Gallery` |
| 547 |
in your dashboard and enter valid CSS in the "Custom CSS" textbox. See the changes |
| 548 |
instantly in your galleries! |
| 549 |
* **Enhancement:** Entire plugin is now |
| 550 |
[Internationalization-enabled](https://codex.wordpress.org/I18n_for_WordPress_Developers). |
| 551 |
This means that we can now support users speaking all languages. If you are |
| 552 |
interested in translating Document Gallery into a language that you speak, |
| 553 |
please [let me know](http://wordpress.org/support/topic/seeking-translators)! |
| 554 |
* **Enhancement:** This release saw much of the backend refactored to better |
| 555 |
support future development. Nothing you will notice unless you're digging into |
| 556 |
the code, but it will keep me sane long-term ;) |
| 557 |
* **Note:** The thumbnail generation implementation works very hard to support |
| 558 |
all hosting servers (including Unix and Windows systems). That said, I cannot |
| 559 |
test on all hosts out there, so there is the potential for bugs to appear. |
| 560 |
If you notice something that doesn't look right, please don't hesitate to |
| 561 |
[report the issue](http://wordpress.org/support/plugin/document-gallery) |
| 562 |
so that I can resolve it. Thanks! |
| 563 |
|
| 564 |
= 1.4.3 = |
| 565 |
* **Bug Fix:** Resolves minor bug introduced in version 1.4.2. Thanks, tkokholm! |
| 566 |
|
| 567 |
= 1.4.2 = |
| 568 |
* **Note:** This release includes an increase in the minimum WP version to 3.5. |
| 569 |
If you have not yet upgraded to at least this version, you should consider doing |
| 570 |
so as future releases include a number of *fantastic* new features as well as |
| 571 |
many security improvements. If you chose not to upgrade, you must stay with |
| 572 |
Document Gallery 1.4.1 or lower until you do. Sorry for the inconvenience! |
| 573 |
* **Bug Fix:** Resolved icons being displayed differently depending on which |
| 574 |
user was currently logged in. (Thanks to |
| 575 |
[Sean](http://wordpress.org/support/topic/error-after-update-19?replies=12#post-5041251) |
| 576 |
for reporting the issue.) |
| 577 |
* **Enhancement:** A number of new icons were added (mainly for the iWork suite |
| 578 |
and source code filetypes) and a number of pre-existing icons were removed if |
| 579 |
they were very similar to another icon. |
| 580 |
* **Under The Hood:** Many, many cool things. Stay tuned for a big reveal in the |
| 581 |
coming weeks! |
| 582 |
PS: If you're really curious, there are some clues in the source code ;) |
| 583 |
|
| 584 |
= 1.4.1 = |
| 585 |
* **Bug Fix:** This resolves a bug introduced in `1.4`, which caused a warning |
| 586 |
to be thrown when no attributes were used (i.e.: `[dg]`). (Thanks to |
| 587 |
[wtfbingo](http://wordpress.org/support/topic/error-after-update-19) for |
| 588 |
pointing this out!) |
| 589 |
|
| 590 |
= 1.4 = |
| 591 |
|
| 592 |
* **New Feature:** This release features the addition of *category/taxonomy* support, |
| 593 |
[as suggested by Pyo](http://wordpress.org/support/topic/sorting-documents-by-categorytag-or-other-taxonomy). |
| 594 |
* **Under The Hood:** The plugin was completely rewritten for this release. Logic |
| 595 |
was cleaned up to make maintenance easier and facilitate some *big* changes |
| 596 |
planned for version 2.0 of Document Gallery. |
| 597 |
|
| 598 |
= 1.3.1 = |
| 599 |
|
| 600 |
* **Bug Fix:** This resolves a bug introduced in version `1.3`. (Thanks to JKChad |
| 601 |
for pointing this out!) |
| 602 |
|
| 603 |
= 1.3 = |
| 604 |
|
| 605 |
* **New Feature:** It is now possible to filter the HTML produced to represent |
| 606 |
each individual icon, making it possible to add extra attributes and other |
| 607 |
modifications on the fly as document icons are generated. This will probably |
| 608 |
only be of use to developers and people who don't mind getting their hands |
| 609 |
dirty. *(See bottom **Installation** tab for more details.)* |
| 610 |
* **Enhancement:** There have been a lot of optimizations to the underlying |
| 611 |
plugin code to make it run more efficiently and be easier to read, if you |
| 612 |
are so inclined. |
| 613 |
* **Enhancement:** Changed how images, when included within the gallery, are |
| 614 |
generated so that the format of the icon returned now matches the rest of |
| 615 |
the icons. |
| 616 |
|
| 617 |
= 1.2.1 = |
| 618 |
|
| 619 |
* **Bug Fix:** Resolved issue with the `ids` attribute in `1.2` not working. |
| 620 |
Sorry about that! |
| 621 |
|
| 622 |
= 1.2 = |
| 623 |
|
| 624 |
* **New Feature:** Images can now be included alongside documents in a |
| 625 |
document gallery (using `images=true` attribute). |
| 626 |
(Thanks for the suggestion, Luca!) |
| 627 |
* **New Feature:** Attachment ids can now be explicitly listed, allowing for |
| 628 |
documents not attached to a post or page to be included in a document |
| 629 |
gallery (e.g.: `ids=2,42,57,1`). Note that no spaces should be included. |
| 630 |
* **Enhancement:** The CSS stylesheet has been enhanced for more flexibility |
| 631 |
in sizing icons. |
| 632 |
|
| 633 |
= 1.1 = |
| 634 |
|
| 635 |
* **New Feature:** Included option to link to the attachment page as well as |
| 636 |
to the actual document. |
| 637 |
* **Enhancement:** Added documentation for customizing the appearance of the plugin. |
| 638 |
* **Enhancement:** Many improvements to the backend, including pretty HTML output |
| 639 |
and best practice implementation in calls to WordPress core functions. |
| 640 |
|
| 641 |
= 1.0.4 = |
| 642 |
|
| 643 |
* **Bug Fix:** Removed extra `div` at bottom when number of documents is |
| 644 |
evenly divisible by 4. (Thanks, joero4ri!) |
| 645 |
|
| 646 |
= 1.0.3 = |
| 647 |
|
| 648 |
* **Bug Fix:** Resolved issue with detecting plugin directory. (Thanks, |
| 649 |
Brigitte!) |
| 650 |
* **Enhancement:** Minor improvement to how linking to individual |
| 651 |
documents is handled. |
| 652 |
|
| 653 |
= 1.0.2 = |
| 654 |
|
| 655 |
* **Bug Fix:** Merge for changes in 1.0 did not go through correctly so users |
| 656 |
downloaded the old icon set which broke the plugin. Sorry about that, but |
| 657 |
all is resolved with this release! |
| 658 |
|
| 659 |
= 1.0.1 = |
| 660 |
|
| 661 |
* **Bug Fix:** Resolved issue with long document titles being cut off in some themes. |
| 662 |
|
| 663 |
= 1.0 = |
| 664 |
|
| 665 |
* **New Feature:** Plugin now has **36 icons** representing **72 filetypes**! |
| 666 |
* **Enhancement:** Optimized gallery generation (faster!) |
| 667 |
* **Enhancement:** Added fallback to WordPress default icons if you happen to |
| 668 |
include one of the few filetypes not yet supported. |
| 669 |
* **Enhancement:** Changed shortcode to `[dg]` (`[document gallery]` will still |
| 670 |
work for backward compatibility). |
| 671 |
* **Enhancement:** Gave documentation some **much needed** revisions. |
| 672 |
|
| 673 |
= 0.8.5 = |
| 674 |
|
| 675 |
* **Enhancement:** Added support for |
| 676 |
[OpenDocuments](http://en.wikipedia.org/wiki/OpenDocument). |
| 677 |
|
| 678 |
= 0.8 = |
| 679 |
|
| 680 |
* **Release:** First public release of Document Gallery. |
| 681 |
* **Feature:** Displays PDF, Word, PowerPoint, Excel, and ZIP documents from a |
| 682 |
given page or post. |
| 683 |
* **Feature:** Documents can be ordered by a number of |
| 684 |
different factors. |