DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:prettyphoto

This is an old revision of the document!


prettyphoto Plugin

Compatible with DokuWiki

Weatherwax

plugin Adds prettyPhoto support for images

Last updated on
2013-05-31
Provides
Render
Repository
Source

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Similar to gallery, lightbox, lightboxv2

Tagged with ajax, gallery, images, javascript, lightbox, media, popup, prettyphoto

The plugin will automatically create 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

Installation

Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. 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 images for further details about image links.

Using '?direct' as 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 = "<your media path>";

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 prettyPhoto documentation for further details on customizing), e.g.

var PRETTYPHOTO_PLUGIN_PARAMS = { social_tools: '' };

for disabling social media integration.

Development

Change Log

Check the commit log.

Known Bugs and Issues

Please post any bugs or issues on the bug tracker

Feature requests

Please post feature requests on the bug tracker

Sorry, but I don't want to subscribe to another one tracker (I use github). So, how to remove social links in image ? No option ? — chtiland 2013/08/05 12:02

plugin/prettyphoto.1375697039.txt.gz · Last modified: 2013-08-05 12:03 by Chtiland

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki