====== prettyphoto Plugin ====== ---- plugin ---- description: Adds prettyPhoto support for images author : lpaulsen93 (previous author: Marcus von Appen) email : # type : renderer lastupdate : 2020-10-03 compatible : Weatherwax, Detritus, Hogfather depends : conflicts : similar : lightbox, lightboxv2, gallery tags : media, images, ajax, javascript prettyphoto, popup, lightbox, gallery downloadurl: https://github.com/lpaulsen93/dw-plugin-prettyPhoto/archive/master.zip bugtracker : https://github.com/lpaulsen93/dw-plugin-prettyPhoto/issues sourcerepo : https://github.com/lpaulsen93/dw-plugin-prettyPhoto screenshot_img : ---- The plugin will automatically create [[http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/|prettyPhoto]] popup links for all images that are embedded as direct links. You can find a simple showcase at http://sysfault.org/dokuwiki/projects:dwpretty FIXME ===== Installation ===== Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually. ===== Examples/Usage ===== The default configuration of the plugin will provide a overlay box for images that are linked directly into the page: {{fancyimage.jpg?direct&100|}} The plugin is comes with an own renderer that automatically replaces internal image media links, which refer to the details page of the images, with direct links to the images. This is a convenience mechanism to save you typing "?direct" for each and every image link. See [[doku>images]] for further details about image links. Using '?direct' as [[doku>images|image]] parameter will cause the plugin to create lightbox-like overlays. {{:projects:pumpkins.jpg?direct&100|}} {{:projects:cupcakes_shelf.jpg?direct&100|}} '?nolink' will not cause the plugin to create any overlay. The default behaviour is preserved. {{:projects:pumpkins.jpg?nolink&100|}} {{:projects:cupcakes_shelf.jpg?nolink&100|}} '?linkonly' will not cause the plugin to create any overlay. The default behaviour is preserved. {{:projects:pumpkins.jpg?linkonly&100|}} {{:projects:cupcakes_shelf.jpg?linkonly&100|}} If you do not want to rework all your image links, you can also enable the custom renderer that ships with the plugin. It will pick all images that do not use the 'nolink' or 'linkonly' parameter and create an overlay. {{:projects:pumpkins.jpg?100|}} {{:projects:cupcakes_shelf.jpg?100|}} ===== Customization ===== The main magic happens within ''script.js'', which will pull in a configuration file ''prettyphoto.conf.js'', located in DokuWiki's ''conf/'' folder. Two javascript variables will be tested within the configuration file, var PRETTYPHOTO_PLUGIN_MEDIAPATH which defines the media item link for the DokuWiki installation. By default, DokuWiki uses ''lib/exe/fetch.php?media='', your installation however might use different links, changed by rewrite rules. If this is the case, you should set var PRETTYPHOTO_PLUGIN_MEDIAPATH = ""; within ''prettyphoto.conf.js''. To customize the behaviour of the prettyPhoto overlay, you can use var PRETTYPHOTO_PLUGIN_PARAMS which contains the prettyPhoto configuration to be used (see the [[http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/documentation|prettyPhoto documentation]] for further details on customizing), e.g. var PRETTYPHOTO_PLUGIN_PARAMS = { social_tools: '' }; for disabling social media integration. ===== Development ===== Starting from 4th of October 2020 the plugin is maintained by [[user>lpaulsen93|lpaulsen93]]. It is based on a fork from [[user>s.sahara|s.sahara]] who fixed the Hogfather incompatibility. === Change Log === Check the [[https://github.com/lpaulsen93/dw-plugin-prettyPhoto/commits/master|commit log]]: {{rss>https://github.com/lpaulsen93/dw-plugin-prettyPhoto/commits/master.atom}} === Known Bugs and Issues === Please post any bugs or issues on the [[https://github.com/lpaulsen93/dw-plugin-prettyPhoto/issues|bug tracker]] === Feature requests === Please post feature requests on the [[https://github.com/lpaulsen93/dw-plugin-prettyPhoto/issues|bug tracker]] ---- :!: Doesn't work with Dokuwiki rewrite mode. FIXME > What execatly does not work? If you're using .htaccess rewriting, just tweak the paths in the .conf.js file. >> Having trouble to get the renderer to work with hrun - had a running installation, copied all content, installed prettyphoto afterwards through plugin manager. using htaccess rewrite and no gallery pluginin. the photo gets no lightbox but is opened alone in the tab --~~ >>> I can confirm that Dokuwiki rewrite crashes this plugin. A working fix ist ready to be pulled, but it seems the author is not updating any more. So you have to merge/update manually with the files from this [[https://bitbucket.org/marcusva/dokuwiki-plugin-prettyphoto/pull-requests|pull-request-link.]] > The [[https://github.com/scaron/prettyphoto|prettyPhoto]] v.3.1.6 had released on May 7, 2015 which covers a XSS Fix. There is [[https://github.com/ssahara/dw-plugin-prettyPhoto|a fork]] of "PrettyPhoto Plugin for DokuWiki" that includes updated prettyPhoto v3.1.6 and a patch I sent as [[https://bitbucket.org/marcusva/dokuwiki-plugin-prettyphoto/pull-requests/1/auto-detection-of/diff|PR]] around 2014 (Auto detection of PRETTYPHOTO_PLUGIN_MEDIAPATH based on ''$conf['userewrite']'' setting). it works with DokuWiki Release 2015-08-10a "Detritus". --- [[user>s.sahara|s.sahara]] //2015-10-15 14:27// Has this been updated to work with DokuWiki Igor?