Learn about DokuWiki
Learn about DokuWiki
The plugin is under development and syntax and documentation are subjected to changes without notice.
Development state: 85%
This plugin draws heavy inspiration (read cut&paste) from the gallery plugin. It basically tries to solve the same problem with the following features in mind:
The PhotoGallery plugin lightbox mode is based on the following included libraries:
See the plugin in action here.
A basic gallery can be added to a page by selecting a namespace like this:
---- photogallery show ---- namespace : .:your_namespace title : My best shots ----
Note: media files should be uploaded to the relevant namespace before PhotoGallery is used.
A basic index of galleries can be added by linking other pages like this:
==== My galleries ==== ---- photogallery link ---- pg : .:sample_page_1 ---- ---- photogallery link ---- pg : .:sample_page_2 ----
If you have troubles with the server setup, you can use the info page to verify if PhotoGallery requirements are met.
---- photogallery info ---- ----
A gallery can be added to a page by selecting a namespace like this:
---- photogallery show ---- namespace : .:my_best_shots title : My best shots description: Photos from my life - Compact cameras only. copyright : © 2017 by Marco Nolletti posterimg : img_1196.jpg ----
All image files in the selected namespace will be added to the image gallery. Don't forget the “:” in front of the namespace. You can use relative or absolute paths.
posterimg is the name of the image to be used as poster for the whole gallery. The image is moved in the first position of the sort order.
The poster image alignment can be set by using the keyword
posteralign followed by
right. (The default is
... posteralign:right ...
Instead of a namespace, you can also give an HTTP(s) URL to any Media RSS or ATOM feed with enclosures (as produced by most photo sharing sites like Flickr). The images will then be pulled from that feed instead:
---- photogallery show ---- namespace : https://www.nasa.gov/rss/dyn/lg_image_of_the_day.rss ----
Note: to have thumbnail creation correctly working you need to set fetchsize big enough to get the remote images downloaded.
By default all images are resized to fit in a viewport of the size specified in the plugin configuration (
viewport_width x viewport_height).
Note: if you try to download or zoom the image with the lightbox button you will get the resized image, not the original one.
You can override this behaviour either by using the parameter
fullsize in the gallery definition or by appending the suffix
_fullsize_ to the filename (For example
If the image aspect ratio is greater than the configuration parameters, the image is handled as panorama. This means that the thumbnail shows different and the image is resized against the
panorama_width x panorama_height parameters.
This allows you to set a bigger box for stretched images and give to the user the option to use the zoom feature (icon click or double click over the image) to inspect the image.
All parameters can be set using the gallery definition syntax. Each parameter needs to be on a different text line.
Defaults for all parameters can be set in the config manager. If a parameter is enabled by default it can be disabled in the syntax by prefixing it with the symbol
! (vertical bar). E.g. the parameter
showinfo is usually enabled and can be disabled using the keyword
!showinfo. Below is a list of all recognized parameters
| ||enabled||Automatically start the photogallery slideshow|
| ||Title of the photogallery (rendered as level 2)|
| ||Description of the photogallery|
| ||Copyright text|
| ||Comma separated list of users or @groups authorized to view the photogallery (ACLs are always honoured)|
| ||Filename of the image to be used as poster image; if omitted the first sorted image is used|
| || || ||Alignment of the poster image|
| ||Filename of a zip archive “automagically” created in the same images folder and linked for download|
| || || ||Sort images by filename|
| ||Sort images randomly.|
| ||Sort images by file modification date|
| ||Sort images by EXIF date|
| ||Sort images by EXIF title|
| ||0||Limit the number of elements to the specified number|
| ||0||Shows elements starting from the specified number|
| ||disabled||Make the images exact given viewport size big, cropping when needed.|
| ||disabled||Reverse the order of the displayed images|
| ||disabled||Find images in the given namespace and all sub namespaces|
| ||enabled|| Show the EXIF tag
| ||enabled||Show some EXIF techical information below images|
| ||disabled||Show filename below thumbnails|
| ||disabled||If enabled all images are not resized in the lightbox mode|
This mode will open the clicked picture inside the current browser window without leaving the current page.
You can close the picture view by clicking the X button in the upper right corner. You can move to the next or previous image by using the arrow buttons in the lower bar. You can also use the keyboard shortcuts listed below for navigation and closing. Mobile users can swipe to navigate and use the back button to close the gallery.
The following keys can be used to navigate:
| ||next image|
| ||previous image|
| ||close the image view|
If you want to show a title below the image using the parameter
showtitle it may appear that the title shown is not as you expected (e.g.
einstein.jpg instead of
If you want to adapt the image's subtitle shown in the gallery, you have to manipulate the EXIF Tag called
Headline. This can be done with the fullscreen media manager. Alternatives include ExifTool for which even a Windows GUI exists to adapt the EXIF data to your needs. On Windows, the small picture viewer IrfanView can also be used to change only IPTC values.
Note that the EXIF-tags used for display can be changed. See EXIF and IPTC metadata for details. By default, the following tags are used:
IPTC:Headlinefor the title
IPTC:Caption-Abstractfor the description below the picture in lightbox-mode
IPTC:By-linefor the photographer name
IPTC:CopyrightNoticefor the copyright
IPTC:Keywordsfor keyword list
[also CSS style tips]
Uploading images is beyond the scope of this plugin. Do not request any features regarding this.
data/mediadirectory. Keep in mind that image names need to be valid pagenames, all lowercase, no spaces or special chars!
The gallery output is cached by default. When you add pictures later, they may not show up in the gallery: add
&purge=true to the end of the URL to clear the cache. See caching for details.
Problems with accessing EXIF or IPTC data in the images, should be reported as DokuWiki bugs and not for this plugin. All EXIF handling is in DokuWiki core. Currently EXIF Data is expected in UTF-8 encoding.
Here are a few user provided examples of the gallery plugin in use:
There are different reasons why thumbnails are not created:
When no images from your feed are shown, be sure you don't have a question mark in your URL. Use an URL shortener as suggested above. Also be sure your feed URL (before shortening) starts with http:// or https:// and not with feed://. The latter is just a renamed HTTP link - simply rename it back.
As written above, you need to increase the fetchsize config option. Also make sure LibGD or ImageMagick are installed.
This appens if DokuWiki cannot find LibGD; check if the gdlib config option is valid.
[discussions should ideally be deleted and turned into FAQ entries along the way] Be sure to read the Known Limitations and Caveats section first. Bugs and feature wishes should be reported in the issue tracker. Any comments/discussions on this page will be removed.
Thank you and thumbs up for this plug-in. Very nice already but good luck in developing it.
Getting this error after installing your plugin (latest version as of 3/16/2017.. I downloaded the phpThumb folder directory from the github repo just to be sure) “PhotoGallery error: pgImg.php is not executable”