Strange behavior of thumbnails
-
- Phoca Member
- Posts: 37
- Joined: 21 Sep 2020, 14:06
Re: Strange behavior of thumbnails
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:
-
- Phoca Hero
- Posts: 2819
- Joined: 28 Nov 2010, 17:20
Re: Strange behavior of thumbnails
Hi,
As I wrote in previous post: To comment out in CSS use: and NOT: //
Try following to your user.css:
It's much better. Don't know, why the width do not have any effect. Just try & we will look further.
Kind regards
Christine
The CSS didn't work, because the // or (other) figures cause ineffectiveness of any codes.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.
As I wrote in previous post: To comment out in CSS use:
Code: Select all
/*here is your code*/
I wrote: delete the // and not the lines.I've deleted the lines I commented out in both user.css and phocagallerycustom.css
Try following to your user.css:
Code: Select all
img.pg-image {
width: 150px;
height: 100px;
}
Kind regards
Christine
-
- Phoca Member
- Posts: 37
- Joined: 21 Sep 2020, 14:06
Re: Strange behavior of thumbnails
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.christine wrote: ↑26 Sep 2020, 10:32 I wrote: delete the // and not the lines.
Try following to your user.css:
It's much better. Don't know, why the width do not have any effect. Just try & we will look further.Code: Select all
img.pg-image { width: 150px; height: 100px; }
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;
}
Code: Select all
img.pg-image {
width: 150px;
height: 100px;
}
Code: Select all
<figure itemprop="associatedMedia" itemscope="" itemtype="http://schema.org/ImageObjects">
-
- Phoca Hero
- Posts: 2819
- Joined: 28 Nov 2010, 17:20
Re: Strange behavior of thumbnails
Hi,
just for test: Change detail View to: Shadow Box (Image Only). Maybe you hv to re-create thumbnails again.
Kind regards
Christine
just for test: Change detail View to: Shadow Box (Image Only). Maybe you hv to re-create thumbnails again.
Kind regards
Christine
-
- Phoca Member
- Posts: 37
- Joined: 21 Sep 2020, 14:06
Re: Strange behavior of thumbnails
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.
-
- Phoca Member
- Posts: 37
- Joined: 21 Sep 2020, 14:06
Re: Strange behavior of thumbnails
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.
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.
Code: Select all
img.pg-image {
// width: 150px;
// height: 100px;
}
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.
-
- Phoca Hero
- Posts: 2819
- Joined: 28 Nov 2010, 17:20
Re: Strange behavior of thumbnails
Hi,
There made some changes again. At the moment, I see, that you have added to Mosaik also Masonry and changed to: Shadow Box
Kind regards
Christine
There made some changes again. At the moment, I see, that you have added to Mosaik also Masonry and changed to: Shadow Box
About cropping: https://www.phoca.cz/documents/2-phoca- ... e-joomla-3Socrates_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.
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).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
Kind regards
Christine
-
- Phoca Member
- Posts: 37
- Joined: 21 Sep 2020, 14:06
Re: Strange behavior of thumbnails
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.
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.
-
- Phoca Hero
- Posts: 2819
- Joined: 28 Nov 2010, 17:20
Re: Strange behavior of thumbnails
Hi,
Kind regards
Christine
What I can see is: In the Category View (Masonry) it's not cropped. So, do you mean the Categories View (Mosaik)?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.
Kind regards
Christine
-
- Phoca Member
- Posts: 37
- Joined: 21 Sep 2020, 14:06