|
Replies:
38
-
Pages:
3
[
1
2
3
| Next
]
-
Last Post:
26 Nov 17, 00:29
Last Post By: JeffTucker
|
|
|
Posts:
4,071
Registered:
4-Aug-2006
|
|
|
Theme Images: option to suppress them for subfolders
Posted:
19 Nov 17, 00:44
|
|
|
If a skin allows subfolder theme images to be inherited from the root then a method of preventing theme image generation for subfolders would be nice to have.
Deleting the unwanted images after album build would be effective but not efficient.
Request based on this post and actually having inherited themes working.
|
|
|
Posts:
4,071
Registered:
4-Aug-2006
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
22 Nov 17, 15:23
in response to: RobM
|
|
|
I now have a working solution to prevent theme images for specific folders.
|
|
|
Posts:
4,065
Registered:
18-Oct-2002
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
22 Nov 17, 18:46
in response to: RobM
|
|
|
Cool! I'll soon plan to include a "Remove" item to the context menu of the theme image chooser. If you select it, then you will have to explicitly drop an image onto it to again activate it and the JAlbumUtilities.getThemeObject() API call will return null for such folders.
|
|
|
Posts:
8,023
Registered:
31-Jan-2006
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
22 Nov 17, 19:01
in response to: davidekholm
|
|
|
... JAlbumUtilities.getThemeObject() API call will return null for such folders.
And themePath, as well?
|
|
|
Posts:
4,071
Registered:
4-Aug-2006
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
22 Nov 17, 20:03
in response to: davidekholm
|
|
|
Cool! I'll soon plan to include a "Remove" item to the context menu of the theme image chooser. If you select it, then you will have to explicitly drop an image onto it to again activate it and the JAlbumUtilities.getThemeObject() API call will return null for such folders.
That will require all skins to actually check for a theme image, so presumably Tiger etc. would need an update before it is rolled out.
|
|
|
Posts:
8,023
Registered:
31-Jan-2006
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
22 Nov 17, 20:26
in response to: RobM
|
|
|
That will require all skins to actually check for a theme image, so presumably Tiger etc. would need an update before it is rolled out.
Exactly what I was thinking. My current Gromit beta and unreleased skin would both do ugly things if they encountered a folder with a null theme image. If I have a better idea of what's coming, I can do a little future-proofing.
|
|
|
Posts:
4,065
Registered:
18-Oct-2002
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
22 Nov 17, 20:53
in response to: JeffTucker
|
|
|
Remember that empty folders don't have a theme image either, so skins really should check whether a theme image exists or not.
|
|
|
Posts:
8,023
Registered:
31-Jan-2006
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
22 Nov 17, 21:09
in response to: davidekholm
|
|
|
Remember that empty folders don't have a theme image either, so skins really should check whether a theme image exists or not.
But asking for themePath in an empty folder is currently not returning a void or null. I've change the default - in Gromit, for example, the theme image is always called gr_theme.jpg. In an empty folder, themePath is returning exactly that, even though there's no theme image present.
What I get on the page, of course, is the <div> that contains the theme image, but without a background image, since the file isn't actually there.
|
|
|
Posts:
4,065
Registered:
18-Oct-2002
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
22 Nov 17, 21:38
in response to: JeffTucker
|
|
|
Remember that empty folders don't have a theme image either, so skins really should check whether a theme image exists or not.
But asking for themePath in an empty folder is currently not returning a void or null. I've change the default - in Gromit, for example, the theme image is always called gr_theme.jpg. In an empty folder, themePath is returning exactly that, even though there's no theme image present.
What I get on the page, of course, is the <div> that contains the theme image, but without a background image, since the file isn't actually there.
Ah, so what do you get if you refer to themePath in an empty folder? (tired here, so I figure it's faster to ask than test)
|
|
|
Posts:
8,023
Registered:
31-Jan-2006
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
22 Nov 17, 21:47
in response to: davidekholm
|
|
|
Ah, so what do you get if you refer to themePath in an empty folder? (tired here, so I figure it's faster to ask than test)
I get gr_theme.jpg. The file isn't there. In short, as long as theme images are enabled in a skin, themePath is never null or void.
|
|
|
Posts:
4,065
Registered:
18-Oct-2002
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
23 Nov 17, 12:26
in response to: JeffTucker
|
|
|
Ah, so what do you get if you refer to themePath in an empty folder? (tired here, so I figure it's faster to ask than test)
I get gr_theme.jpg. The file isn't there. In short, as long as theme images are enabled in a skin, themePath is never null or void.
Ah, that's a mistake from my part. Variables shouldn't be generated for missing objects. No "themeWidth" or "themeHeight" is for instance generated. I've fixed this in 15.0.2 now and also added support to explicitly remove a theme image from a folder (right click theme image selector and select "Remove")
|
|
|
Posts:
4,065
Registered:
18-Oct-2002
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
23 Nov 17, 12:30
in response to: davidekholm
|
|
|
Just do a core update to get 15.0.2 and try out this functionality!
|
|
|
Posts:
8,023
Registered:
31-Jan-2006
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
23 Nov 17, 14:01
in response to: davidekholm
|
|
|
Yes, I figured you had simply missed an "if" statement somewhere. Now it's behaving more like what I would expect.
Only one tricky situation I have to head-scratch my way through, and that's where the user has told the skin to use theme images, has told it to use the top-level theme image for all folders (rather than their own theme images), but has then removed the top-level theme image! In init.bsh, there's no current object, so I can't check for a void themePath at that stage.
|
|
|
Posts:
4,065
Registered:
18-Oct-2002
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
23 Nov 17, 14:04
in response to: JeffTucker
|
|
|
You can refer to "rootFolder" in init.
|
|
|
|
Legend
|
|
Forum admins
|
|
Helpful Answer
|
|
Correct Answer
|
|