TIP JQPhotoSwipeContrib is not installed on Foswiki.org.

JQPhotoSwipeContrib

Modern javascript image gallery

Description

JQPhotoSwipeContrib is a thin wrapper to bring PhotoSwipe to Foswiki. It adds the minimum amount of glue to render an image gallery using this frontend. JQPhotoSwipeContrib is meant to be used together with ImagePlugin or ImageGalleryPlugin to render thumbnails on the backend while PhotoSwipe is used on the frontend.

The easiest way is to wrap a couple of %IMAGE tags with a div element using the jqPhotoSwipe css class.

%JQREQUIRE{"photoswipe"}%

<div class="jqPhotoSwipe">
%IMAGE{"image1.png" size="200"}%
%IMAGE{"image2.png" size="200"}%
%IMAGE{"image3.png" size="200"}%
%IMAGE{"image4.png" size="200"}%
</div>

As with other JQ...Contrib extensions the macro %JQREQUIRE{"photoswipe"}% will load the required javascript assets into the page including an initializer to process any thumbnails wrapped by a jqPhotoSwipe element.

Note that ImageGalleryPlugin detects JQPhotoSwipeContrib being installed automatically and will then switch to this frontend (starting with version 7.10).

Examples

You type:

%IMAGEGALLERY%

You get (if installed):

ImageGalleryPlugin not installed

You type:

%JQREQUIRE{"photoswipe"}%
<div class="jqPhotoSwipe">
%IMAGE{"15008867125_b61960af01_h.jpg" size="95x95" crop="on"}%
%IMAGE{"15008518202_c265dfa55f_h.jpg" size="95x95" crop="on"}%
%IMAGE{"15008465772_d50c8f0531_h.jpg" size="95x95" crop="on"}%
%IMAGE{"14985871946_24f47d4b53_h.jpg" size="95x95" crop="on"}%
%IMAGE{"14985868676_b51baa4071_h.jpg" size="95x95" crop="on"}%
</div>

You get (if installed):

No such plugin photoswipe
15008867125 b61960af01 h.jpg 15008518202 c265dfa55f h.jpg 15008465772 d50c8f0531 h.jpg 14985871946 24f47d4b53 h.jpg 14985868676 b51baa4071 h.jpg

Options

Additional parameter to photoswipe might be specified using HTML5 data attributesm, such as in below example:

<div class="jqPhotoSwipe" data-allow-pan-to-next="false">
...
</div>

See the full documentation of all options.

Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help.

Dependencies

NameVersionDescription
Foswiki::Plugins::ImageGalleryPlugin>=7.10Optional
Foswiki::Plugins::ImagePlugin>=7.20Optional

Change History

02 Sep 2016 fixed Config.spec typo; fixed javascript initializer; better usability navigating images in gallery
30 May 2016 initial release

Topic attachments
I Attachment Action Size Date Who Comment
14985868676_b51baa4071_h.jpgjpg 14985868676_b51baa4071_h.jpg manage 330 K 02 Sep 2016 - 12:54 MichaelDaum Photo: Michael Hull
14985871946_24f47d4b53_h.jpgjpg 14985871946_24f47d4b53_h.jpg manage 388 K 02 Sep 2016 - 12:55 MichaelDaum Photo: Ales Krivec
15008465772_d50c8f0531_h.jpgjpg 15008465772_d50c8f0531_h.jpg manage 384 K 02 Sep 2016 - 12:54 MichaelDaum Photo: Thomas Lefebvre
15008518202_c265dfa55f_h.jpgjpg 15008518202_c265dfa55f_h.jpg manage 679 K 02 Sep 2016 - 12:55 MichaelDaum Photo: Folkert Gorter
15008867125_b61960af01_h.jpgjpg 15008867125_b61960af01_h.jpg manage 593 K 02 Sep 2016 - 12:55 MichaelDaum Photo: Samuel Rohl
JQPhotoSwipeContrib.md5md5 JQPhotoSwipeContrib.md5 manage 180 bytes 02 Sep 2016 - 12:56 MichaelDaum  
JQPhotoSwipeContrib.sha1sha1 JQPhotoSwipeContrib.sha1 manage 204 bytes 02 Sep 2016 - 12:56 MichaelDaum  
JQPhotoSwipeContrib.tgztgz JQPhotoSwipeContrib.tgz manage 2 MB 02 Sep 2016 - 12:56 MichaelDaum  
JQPhotoSwipeContrib.zipzip JQPhotoSwipeContrib.zip manage 2 MB 02 Sep 2016 - 12:55 MichaelDaum  
JQPhotoSwipeContrib_installerEXT JQPhotoSwipeContrib_installer manage 6 K 02 Sep 2016 - 12:56 MichaelDaum  
Topic revision: r2 - 02 Sep 2016, MichaelDaum - This page was cached on 01 Jun 2017 - 05:54.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License