Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
IFireflyl
Topic Author
Posts: 6
Joined: 15 Mar 2020, 05:56

Hyphens and Image Counter

17 Mar 2020, 10:03

Hello. I ended up buying a license as this is virtually the exact thing I was looking for. There are two "issues" (quotes used because it's probably by design and not a bug) that I've come across. I'm not sure if you would be able to, or willing to, assist with these as they're probably minor quibbles that nobody other than myself will care about.

  1. Hyphens - Is there a way to make a change so that when a hyphen is used it actually displays the hyphen instead of replacing it with a space? A space can still be achieved by using an underscore, and there are folders that I have that actually need the hyphen in order for them to make sense.
  2. Image Counter - If I create a folder that contains no images, but has sub-folders with images, the image counter for the folder says 0 images. I feel like the image counter should display the total number of images in the sub-folder, including all sub-folders. At minimum it would be nice to have a setting that says "display sub-folders in image count" with a checkbox next to it. That way people can use it or not, whichever they prefer.
And that's all I've come across so far. Other than that everything is (so far) meeting my expectations. Thanks for your time!
Image
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12093
Joined: 30 Sep 2006, 03:37

Re: Hyphens and Image Counter

18 Mar 2020, 01:48

IFireflyl wrote:Hyphens - Is there a way to make a change so that when a hyphen is used it actually displays the hyphen instead of replacing it with a space? A space can still be achieved by using an underscore, and there are folders that I have that actually need the hyphen in order for them to make sense.
Can you tell me exactly where you are not seeing the hyphens? The main point of using hyphens in folder names is to avoid encoding of empty space to %20 (in url's and folder names). Therefore, it seems logical in most cases to convert "this-is-an-url" into "this is an url" for text that displays on the page. Furthermore, it would only use the folder name for in-page text if the page does not have TITLE or LABEL applied. For example, you can set an explicit label "one-two-three-four", and the hyphens will remain. It will only convert hyphens to space if the text comes from the folder name ... Titles and labels will be respected, if set.
IFireflyl wrote:Image Counter - If I create a folder that contains no images, but has sub-folders with images, the image counter for the folder says 0 images. I feel like the image counter should display the total number of images in the sub-folder, including all sub-folders. At minimum it would be nice to have a setting that says "display sub-folders in image count" with a checkbox next to it. That way people can use it or not, whichever they prefer.
You are probably right. Currently, there are some technical challenges (which should not really concern you): X3 is folder-based, and getting the amount of images for each gallery listed on a page, requires looping through each folder and reading images inside. If that was to go on recursively, it could have a rather negative impact on page-creation time (just to get image-counts) for every page, because reading files inside folders recursively is an "expensive" task. However, this should work nicely if properly implemented, especially since X3 uses "page cache" ... It may have to wait until we re-build the X3 core though, which seems to be likely sooner than later.
 
User avatar
IFireflyl
Topic Author
Posts: 6
Joined: 15 Mar 2020, 05:56

Re: Hyphens and Image Counter

18 Mar 2020, 11:01

mjau-mjau wrote:
IFireflyl wrote:Hyphens - Is there a way to make a change so that when a hyphen is used it actually displays the hyphen instead of replacing it with a space? A space can still be achieved by using an underscore, and there are folders that I have that actually need the hyphen in order for them to make sense.
Can you tell me exactly where you are not seeing the hyphens? The main point of using hyphens in folder names is to avoid encoding of empty space to %20 (in url's and folder names). Therefore, it seems logical in most cases to convert "this-is-an-url" into "this is an url" for text that displays on the page. Furthermore, it would only use the folder name for in-page text if the page does not have TITLE or LABEL applied. For example, you can set an explicit label "one-two-three-four", and the hyphens will remain. It will only convert hyphens to space if the text comes from the folder name ... Titles and labels will be respected, if set.
This was definitely user error! I had uploaded a bunch of folders via FTP, but I never went in and set the titles. I modified them and that's exactly what I was looking for. Thanks!
mjau-mjau wrote:
IFireflyl wrote:Image Counter - If I create a folder that contains no images, but has sub-folders with images, the image counter for the folder says 0 images. I feel like the image counter should display the total number of images in the sub-folder, including all sub-folders. At minimum it would be nice to have a setting that says "display sub-folders in image count" with a checkbox next to it. That way people can use it or not, whichever they prefer.
You are probably right. Currently, there are some technical challenges (which should not really concern you): X3 is folder-based, and getting the amount of images for each gallery listed on a page, requires looping through each folder and reading images inside. If that was to go on recursively, it could have a rather negative impact on page-creation time (just to get image-counts) for every page, because reading files inside folders recursively is an "expensive" task. However, this should work nicely if properly implemented, especially since X3 uses "page cache" ... It may have to wait until we re-build the X3 core though, which seems to be likely sooner than later.
Sounds good. A simpler workaround without a full-blown re-build might be to have that image count not display at all if the image count equals 0. Then at least it wouldn't make it seem like it's an empty folder. Just a thought. Thanks again!
Image
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12093
Joined: 30 Sep 2006, 03:37

Re: Hyphens and Image Counter

18 Mar 2020, 22:10

IFireflyl wrote:Sounds good. A simpler workaround without a full-blown re-build might be to have that image count not display at all if the image count equals 0. Then at least it wouldn't make it seem like it's an empty folder. Just a thought. Thanks again!
Are we speaking of "image count" displaying in a page with galleries (subfolders)? There is a page settings > Folders > Captions, where you can remove the "amount" caption item for the page.

I'm not sure about automatically removing it if there are 0 images. What if there are several folders with images, and one folders without ... It would seem natural to emphasize that this folder contains no images. Else, a visitor might click it assuming there might be images inside. But that would seem like a poor choice from the website-owner ... Maybe you are right ...
 
User avatar
IFireflyl
Topic Author
Posts: 6
Joined: 15 Mar 2020, 05:56

Re: Hyphens and Image Counter

19 Mar 2020, 08:11

mjau-mjau wrote:
IFireflyl wrote:Sounds good. A simpler workaround without a full-blown re-build might be to have that image count not display at all if the image count equals 0. Then at least it wouldn't make it seem like it's an empty folder. Just a thought. Thanks again!
Are we speaking of "image count" displaying in a page with galleries (subfolders)? There is a page settings > Folders > Captions, where you can remove the "amount" caption item for the page.

I'm not sure about automatically removing it if there are 0 images. What if there are several folders with images, and one folders without ... It would seem natural to emphasize that this folder contains no images. Else, a visitor might click it assuming there might be images inside. But that would seem like a poor choice from the website-owner ... Maybe you are right ...
I am referring to the Image Count that displays for each gallery when I hover over the Galleries tab.

Image

As you can see, the middle gallery says 0 images, but there are sub-folders within that gallery that contain images. A casual visitor may see that and elect to not even select the gallery as they would assume it's empty.

Again, none of this is crucial, and I don't think it's worth a major overhaul to fix. But if there's a quick and easy way to fix it that would be nice. And if you're thinking about overhauling X3 then I'd like to submit this idea so that it could potentially be a part of the overhaul. The product itself is exactly what I was looking for. I wanted an image gallery for my own images, so that I can access them anywhere. I also wanted it to look good right out of the box. The latter part is where most products failed to hold up. I had tried Lychee, Piwigo, Coppermine, and Chevereto. The closest thing that worked for me was Chevereto, but they don't currently support sub-folders. This is the first product that has had everything I am looking for. Thanks!
Image
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12093
Joined: 30 Sep 2006, 03:37

Re: Hyphens and Image Counter

20 Mar 2020, 02:51

IFireflyl wrote:As you can see, the middle gallery says 0 images, but there are sub-folders within that gallery that contain images. A casual visitor may see that and elect to not even select the gallery as they would assume it's empty.
Ok got it, and I agree that can be misleading. Would it be an option to replace image count with albums (subfolders) count? I mean, specifically in the case a folder does not contain images, but does contain subfolders.

A challenge is that it would cause misaligned carousel images if we simply removed the image count for the folder without images. We would have to set it to invisible (opacity 0) for now.

If you want to hide the count for the menu item with "0 images", you could add the following to Settings > Custom > Custom CSS. Replace the href with the href of the menu item you want to affect.
Code
.menu [href="/galleries/nature/"] > span {
  opacity: 0;
}
I have already made note of this, and I will look into it for a future release. Similar requests have been made earlier, as it also affects gallery/folders count in page layouts.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12093
Joined: 30 Sep 2006, 03:37

Re: Hyphens and Image Counter

28 Mar 2020, 21:29

This is resolved in latest X3.28.0 release. Carousel menu item without images will now hide text "0 images". This is not 100% optimal, as it will leave an empty space where the text would be, but we cannot shift the layout as it will make the menu unsymmetrical.