Strange behavior of thumbnails

Phoca Gallery - image gallery extension
Socrates_mx5
Phoca Member
Phoca Member
Posts: 37
Joined: 21 Sep 2020, 14:06

Re: Strange behavior of thumbnails

Post by Socrates_mx5 »

When logged in as a Registered user then those photos that are in restricted categories scale down in two steps below the expected size. I can only see this happening to those photos in the categories that are restricted to Registered users, not in the public ones.

Tags:
christine
Phoca Hero
Phoca Hero
Posts: 2819
Joined: 28 Nov 2010, 17:20

Re: Strange behavior of thumbnails

Post by christine »

Hi,
Socrates_mx5 wrote: 26 Sep 2020, 00:44
I'm aware that comments are written different in CSS then in PHP, but it's my experience that comment out a line with "//" at the beginning works in CSS.
The CSS didn't work, because the // or (other) figures cause ineffectiveness of any codes.

As I wrote in previous post: To comment out in CSS use:

Code: Select all

/*here is your code*/
and NOT: //
I've deleted the lines I commented out in both user.css and phocagallerycustom.css
I wrote: delete the // and not the lines.

Try following to your user.css:

Code: Select all

img.pg-image {
width: 150px;
height: 100px;
}
It's much better. Don't know, why the width do not have any effect. Just try & we will look further.

Kind regards
Christine
Socrates_mx5
Phoca Member
Phoca Member
Posts: 37
Joined: 21 Sep 2020, 14:06

Re: Strange behavior of thumbnails

Post by Socrates_mx5 »

christine wrote: 26 Sep 2020, 10:32 I wrote: delete the // and not the lines.

Try following to your user.css:

Code: Select all

img.pg-image {
width: 150px;
height: 100px;
}
It's much better. Don't know, why the width do not have any effect. Just try & we will look further.
The lines that were commented away, were lines that I've added myself and therefore could be deleted. I've already tried with the css-code that I commented out in different ways to see how it changed the behaviour. By deleting these lines I was hopping to make the css-code more readable and less confusing.

I've allready tried with the following code in pocagallerycustom.css that didn't work:

Code: Select all

img.pg-image {
	width: 150px !important;
	height: 100px !important;
}
Now I've added your suggestion in user.css:

Code: Select all

img.pg-image {
width: 150px;
height: 100px;
}
The thumbnail of the image has now changed to 70 x 100 for those images that have been uploaded in landscape format. Now "div.pg-box3" is 150 x 100. The change to 70 x 100 seems to happen in "figure", which is shown in Firefox Inspector as:

Code: Select all

<figure itemprop="associatedMedia" itemscope="" itemtype="http://schema.org/ImageObjects">
I leave it there so you can see what it looks like, since it doesn't seem to distort anything else.
christine
Phoca Hero
Phoca Hero
Posts: 2819
Joined: 28 Nov 2010, 17:20

Re: Strange behavior of thumbnails

Post by christine »

Hi,

just for test: Change detail View to: Shadow Box (Image Only). Maybe you hv to re-create thumbnails again.

Kind regards
Christine
Socrates_mx5
Phoca Member
Phoca Member
Posts: 37
Joined: 21 Sep 2020, 14:06

Re: Strange behavior of thumbnails

Post by Socrates_mx5 »

christine wrote: 26 Sep 2020, 19:20 just for test: Change detail View to: Shadow Box (Image Only). Maybe you hv to re-create thumbnails again.
After just changing to Shadow Box (Image Only) without recreation of the thumbnails, then thumbnails of the photos are shown in the expected size. I leave it like this for you to have a look. It looks like the problem with the thumbnails is related to which Detail Window being used.

When using Shadow Box, then I realized there is a small problem that the controls of OpenStreet Map (+, -, fullscren, and the textbox: "Leaflet OpenStreetMap") are shown on top of the image when viewed in the Shadow Box, when the image is located in a folder where one has set the GEO-code, e.g. in my .../photo-gallery/category/8-...

Furthermore, regardless of those Viewers I've tried there is a problem viewing images that are in portrait format, but this problem can wait a bit.
Socrates_mx5
Phoca Member
Phoca Member
Posts: 37
Joined: 21 Sep 2020, 14:06

Re: Strange behavior of thumbnails

Post by Socrates_mx5 »

There was a problem with images shown in portrait format became distorted with the width and height set to fixed pixels (150 x 100), so I've commented out the following two lines and then the thumbnail of the image in portrait format is shown without any distortion.

Code: Select all

img.pg-image {
// width: 150px;
// height: 100px;
}
The width and height are then the default auto.

Even if the thumbnail show the image in portrait format, the image can't be opened in the Viewer (Shadow Box - Image Only). It's just stuck in "loading".

If I change the Viewer to Shadow Box, then the portrait image is show, but it's cropped to landscape format. I keep this setting at the moment to see if one can figure out why the portrait image is cropped.
christine
Phoca Hero
Phoca Hero
Posts: 2819
Joined: 28 Nov 2010, 17:20

Re: Strange behavior of thumbnails

Post by christine »

Hi,
There made some changes again. At the moment, I see, that you have added to Mosaik also Masonry and changed to: Shadow Box
Socrates_mx5 wrote: 27 Sep 2020, 11:44 If I change the Viewer to Shadow Box, then the portrait image is show, but it's cropped to landscape format. I keep this setting at the moment to see if one can figure out why the portrait image is cropped.
About cropping: https://www.phoca.cz/documents/2-phoca- ... e-joomla-3
Crop Thumbnails (None | Only large thumbnails | Only medium thumbnails | Only small thumbnails | Large and medium thumbnails | Medium and small thumbnails | Small and large thumbnails | All) Set which thumbnails should be cropped
But I saw for example 1 image: ...//phoca_thumb_l_the-alhambra-granada-spain-3-1230156_web.jpg and it's not cropped (i-frame).

Kind regards
Christine
Socrates_mx5
Phoca Member
Phoca Member
Posts: 37
Joined: 21 Sep 2020, 14:06

Re: Strange behavior of thumbnails

Post by Socrates_mx5 »

Hi again,

Yes, I've change to Shadow Box temporary, because then images in portrait format are shown in the viewer, which is not the case for neither Shadow Box (Image Only) or PhotoSwipe.

Thanks for the link. I'll have to read about cropping.

All images in portrait format become a bit cropped at the top in the Viewer (Shadow Box), but they're not cropped when shown as thumbnails.
christine
Phoca Hero
Phoca Hero
Posts: 2819
Joined: 28 Nov 2010, 17:20

Re: Strange behavior of thumbnails

Post by christine »

Hi,
Socrates_mx5 wrote: 27 Sep 2020, 12:57 All images in portrait format become a bit cropped at the top in the Viewer (Shadow Box), but they're not cropped when shown as thumbnails.
What I can see is: In the Category View (Masonry) it's not cropped. So, do you mean the Categories View (Mosaik)?

Kind regards
Christine
Socrates_mx5
Phoca Member
Phoca Member
Posts: 37
Joined: 21 Sep 2020, 14:06

Re: Strange behavior of thumbnails

Post by Socrates_mx5 »

christine wrote: 27 Sep 2020, 13:08 What I can see is: In the Category View (Masonry) it's not cropped. So, do you mean the Categories View (Mosaik)?
No, I mean the Viewer itself that opens when one clicks on the thumbnail.
Post Reply