This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 38 - Pages: 3 [ 1 2 3 | Next ] - Last Post: 26 Nov 17, 00:29 Last Post By: JeffTucker
RobM

Posts: 4,071
Registered: 4-Aug-2006
Theme Images: option to suppress them for subfolders
Posted: 19 Nov 17, 00:44
 
  Click to reply to this thread Reply
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.
RobM

Posts: 4,071
Registered: 4-Aug-2006
Re: Theme Images: option to suppress them for subfolders
Posted: 19 Nov 17, 01:00   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Image generation can be stopped, of course, if you create the images in postdir.bsh. For this request I was thinking of the built in theme image generation method. So I guess this is just icing on the cake for me :)
RobM

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 in response to: RobM
 
  Click to reply to this thread Reply
I now have a working solution to prevent theme images for specific folders.
davidekholm

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 in response to: RobM
 
  Click to reply to this thread Reply
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.
JeffTucker

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 in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
... JAlbumUtilities.getThemeObject() API call will return null for such folders.

And themePath, as well?
RobM

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 in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
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.
JeffTucker

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 in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
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.
davidekholm

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 in response to: JeffTucker
 
  Click to reply to this thread Reply
Remember that empty folders don't have a theme image either, so skins really should check whether a theme image exists or not.
JeffTucker

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 in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
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.
davidekholm

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 in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:
davidekholm wrote:
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)
JeffTucker

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 in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
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.
davidekholm

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 in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:
davidekholm wrote:
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")
davidekholm

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 in response to: davidekholm
 
  Click to reply to this thread Reply
Just do a core update to get 15.0.2 and try out this functionality!
JeffTucker

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 in response to: davidekholm
 
  Click to reply to this thread Reply
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.
davidekholm

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 in response to: JeffTucker
 
  Click to reply to this thread Reply
You can refer to "rootFolder" in init.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums