Photoswipe Doesn't Run

Find help with FlatPress plugins, report a plugin bug, request or present new plugins.
Post Reply
NorfolkGreg
Posts: 26
Joined: Wed Dec 30, 2020 9:58 pm

Photoswipe Doesn't Run

Post by NorfolkGreg » Tue Jun 15, 2021 9:48 am

I have downloaded photoswipe1.0.4.zip and uploaded its contents to my fp-plugins folder.

I have a number of images uploaded and created a gallery "grounds" and copied various images into it.

I have added the following code into a page:

[photoswipeimage=”images/130225lake.jpg”]
[photoswipegallery=”images/grounds”]

and that is what appears on the entry when previewed or published. :-(

The page already includes the code:
[img=images/130225cottages.jpg width=200 float=left]
[img=images/130225lake.jpg popup=true]
and both of these display as expected, but I did wonder if there might be some conflict with the Lightbox code.

I also wondered if photoswipe documentation was wrong and tried removing the quotes from the code, but that didn't work. Nor did removing the two [img] tags.

What am I likely to be doing wrong?

(Incidentally, it seems that adding the "float" and/or the "width" parameters to an [img] tag invokes the Lightbox plugin, but that doesn't seem to be documented.)

NorfolkGreg
Posts: 26
Joined: Wed Dec 30, 2020 9:58 pm

Re: Photoswipe Doesn't Run

Post by NorfolkGreg » Thu Jun 17, 2021 5:22 am

Oops!

Turns out it's a naive new user issue.

I had assumed a newly installed plug-in was automatically enabled.

Enabling the plug-in solved the issue.

NorfolkGreg
Posts: 26
Joined: Wed Dec 30, 2020 9:58 pm

Re: Photoswipe Doesn't Run

Post by NorfolkGreg » Thu Jun 17, 2021 9:13 am

Turns out there are some surprises. Not sure whether this is all intended/expected behaviour. My first test page is in this format:

Code: Select all

[img=images/130225cottages.jpg width=200 float=left]A paragraph of text.
[more]

Another paragraph of text.

[img=images/130225lake.jpg popup=true]


[photoswipeimage="images/130225lake.jpg"]

[photoswipegallery="images/grounds"]

FInal paragraph of text.
The first thing I discovered before inserting the photoswipe code was that when you add a "width" parameter to an IMG tag it activates the "Lightbox2" plugin (Contrary to the Standard Plugins page the original "Lightbox" plugin does not seem to be included in the FlatPress 1.2 release) To get the ability to expand the second image I had to add the "popup=true" argument.

Once I'd enabled the Photoswipe plugin and uploaded three further images to the "images/grounds" folder I see various changes. For a start all images now have dotted lines associated with them. The first (floated) shows a single line below the image. The second a double line below. The repeated photoswipe image shows a double line below but with a wider separation between them as do each of the thumbnails from the three gallery images. All these lines turn solid on hover!

I've discovered that the underlines are related to the "Misty-Look" theme which also adds a "frame and shadow effect to the images.

My fallback theme for testing, Leggero, shows the single [Photoswipe] image much smaller than its [img] equivalent, which has me intrigued as all my images files are 800x600px. Clearly there's some tweaking of the "Misty-look" theme to be done, if I am to keep it!

I'm guessing that the double lines (single in the case of the floated image) are something to do with a facility for showing captions and something in the CSS makes the spacing is different for [img] and [photoswipe] inserted images. (I hope to report later!)

So far I have not added a texte.conf file. Is there some undocumented feature of Photoswipe that allows you to remove the filename or will I need to create one with blank captions to remove the file names?

Also, as seen at https://fahrrad.arvidzimmermann.de/ , all images displayed on a page via the [photoswipe] tag will show in a continual cycle. If you want to show a single image in needs to be displayed via a [img] tag.

Is there a [photoswipe] way to stop captions from displaying under the image or gallery thumbnail on the main page, so that it will only display after being clicked/tapped.

User avatar
Arvid
FlatPress Coder
Posts: 233
Joined: Sat Jan 26, 2019 7:40 pm
Contact:

Re: Photoswipe Doesn't Run

Post by Arvid » Sat Jun 19, 2021 10:44 am

Hi,

thanks for the thorough testing.
NorfolkGreg wrote: Thu Jun 17, 2021 9:13 am Contrary to the Standard Plugins page the original "Lightbox" plugin does not seem to be included in the FlatPress 1.2 release
This wiki page is on the list for being reworked for a long time now... You're right, Lightbox isn't included any more, I removed it from the page.

The popup and width parameters of the img tag will trigger the Lightbox2 plugin, if enabled, this is correct. (The BBCode doc on our wiki doesn't point that out clearly.)

As you found out, all the border, underline and mouseover behaviour depends on your theme. If you want your PhotoSwipe images to be displayed differently than the normal images, add your own CSS to the theme, for example:

Code: Select all

div.img-gallery figure img { border: 2px solid red !important; }
To find out where an element on your page is getting its CSS definitions from, I recommend using your browser's development console (to open it, I just press F12 in the browsers I use).

NorfolkGreg wrote: Thu Jun 17, 2021 9:13 amSo far I have not added a texte.conf file. Is there some undocumented feature of Photoswipe that allows you to remove the filename or will I need to create one with blank captions to remove the file names?
The simplest way would just be to hide the captions :)

Code: Select all

div.img-gallery figcaption { display:none; }
All CSS codes untested, please let me know if they work for you :)

All the best,
Arvid

NorfolkGreg
Posts: 26
Joined: Wed Dec 30, 2020 9:58 pm

Re: Photoswipe Doesn't Run

Post by NorfolkGreg » Tue Jun 29, 2021 9:21 pm

Arvid wrote: Sat Jun 19, 2021 10:44 amThe popup and width parameters of the img tag will trigger the Lightbox2 plugin, if enabled, this is correct. (The BBCode doc on our wiki doesn't point that out clearly.)
I've made an attempt to clarify how the scale, width and height parameters interact with the popup argument and the lightBox2 and thumbs plug-ins. Hope it makes more sense.

NorfolkGreg
Posts: 26
Joined: Wed Dec 30, 2020 9:58 pm

Re: Photoswipe Doesn't Run

Post by NorfolkGreg » Wed Jun 30, 2021 8:34 am

NorfolkGreg wrote: Thu Jun 17, 2021 9:13 amAlso, as seen at https://fahrrad.arvidzimmermann.de/ , all images displayed on a page via the [photoswipe] tag will show in a continual cycle. If you want to show a single image in needs to be displayed via a [img] tag.
I have now added a note on Multiple Usage to the Wiki to indicate this.

User avatar
Arvid
FlatPress Coder
Posts: 233
Joined: Sat Jan 26, 2019 7:40 pm
Contact:

Re: Photoswipe Doesn't Run

Post by Arvid » Sat Jul 10, 2021 12:22 pm

Thank you very much for both additions to the wiki!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest