Posts:
4,179
Registered:
4-Aug-2006
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
24 Nov 17, 12:37
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.
I have updated my code to deal with a no theme case but I think the core could make things easier still. When jAlbum creates the theme image and the user removes one then the core could delete the orphaned file in the output folder. This step is still needed when using the postdir.bsh method.
|
|
|
Posts:
4,130
Registered:
18-Oct-2002
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
24 Nov 17, 13:08
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.
I have updated my code to deal with a no theme case but I think the core could make things easier still. When jAlbum creates the theme image and the user removes one then the core could delete the orphaned file in the output folder. This step is still needed when using the postdir.bsh method.
I admit we currently make no attempts to clean up orphaned theme images. Currently, the best way to clean up an album is to delete it and generate it again.
|
|
|
Posts:
2,213
Registered:
14-Dec-2007
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
25 Nov 17, 16:28
in response to: davidekholm
|
|
|
Just do a core update to get 15.0.2 and try out this functionality!
Yes that works perfect!
Thanks David.
Up to the next extension !!
|
|
|
Posts:
2,213
Registered:
14-Dec-2007
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
25 Nov 17, 16:31
in response to: davidekholm
|
|
|
I admit we currently make no attempts to clean up orphaned theme images. Currently, the best way to clean up an album is to delete it and generate it again.
That is not a big problem for an album with folders: I just do a search for 'folderimage.jpg' with the Windows Explorer and delete all the results.
|
|
|
Posts:
4,130
Registered:
18-Oct-2002
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
25 Nov 17, 16:32
in response to: AndreWolff
|
|
|
Just do a core update to get 15.0.2 and try out this functionality!
Yes that works perfect!
Thanks David.
You're welcome
|
|
|
Posts:
8,142
Registered:
31-Jan-2006
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
25 Nov 17, 16:37
in response to: davidekholm
|
|
|
I admit we currently make no attempts to clean up orphaned theme images.
That would be a nice enhancement, but I suspect this isn't going to come up very often. And it's only single images, so the overhead for storing them is pretty low.
It gets even trickier with some skins. My upcoming releases include the options of using a theme image at the top level only, or of using the top-level theme image for all folders (i.e., one image for the entire album). But of course, jAlbum generates one theme image for each folder, unless the user has explicitly excluded it. The skin probably needs to run a little cleanup script in finally.bsh - jAlbum can't possibly know about the skin setting in this case.
|
|
|
Posts:
4,130
Registered:
18-Oct-2002
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
25 Nov 17, 16:39
in response to: JeffTucker
|
|
|
I admit we currently make no attempts to clean up orphaned theme images.
That would be a nice enhancement, but I suspect this isn't going to come up very often. And it's only single images, so the overhead for storing them is pretty low.
It gets even trickier with some skins. My upcoming releases include the options of using a theme image at the top level only, or of using the top-level theme image for all folders (i.e., one image for the entire album). But of course, jAlbum generates one theme image for each folder, unless the user has explicitly excluded it. The skin probably needs to run a little cleanup script in finally.bsh - jAlbum can't possibly know about the skin setting in this case.
Oh you don't need to run cleanup scripts. It's better if you instead use a variant of the code I use in the ThemeImageProcessor class to only generate theme images where YOUR skin wants them. The underlying APIs I've made should take care of the hardest coding (like figuring out if the image needs reprocessing or not)
|
|
|
Posts:
8,142
Registered:
31-Jan-2006
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
25 Nov 17, 16:43
in response to: davidekholm
|
|
|
I'd have to see what that looks like.
But what if the user initially takes the default (folder-specific theme images), then changes his mind? Now we're back to orphaned images at the folder level.
|
|
|
Posts:
4,130
Registered:
18-Oct-2002
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
25 Nov 17, 16:47
in response to: JeffTucker
|
|
|
I'd have to see what that looks like.
But what if the user initially takes the default (folder-specific theme images), then changes his mind? Now we're back to orphaned images at the folder level.
I will be able to design a more clever cleanup code for folder images later: Each folder image is tagged with an embedded xmp snipped that we can detect. Now that we know it's a generated theme image, it's safe to delete it in case the skin doesn't support it.
|
|
|
Posts:
8,142
Registered:
31-Jan-2006
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
25 Nov 17, 16:51
in response to: davidekholm
|
|
|
A good thing to do, but lower on the priority list, IMO. There are a least a couple of other things (having nothing to do with theme images) that I'd rather have for Xmas. 
|
|
|
Posts:
4,130
Registered:
18-Oct-2002
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
25 Nov 17, 16:53
in response to: JeffTucker
|
|
|
A good thing to do, but lower on the priority list, IMO. There are a least a couple of other things (having nothing to do with theme images) that I'd rather have for Xmas. 
Please tell. BTW, here's the documentation for how to control theme image generation yourself: https://jalbum.net/help/en/Sample_scripts#Theme_images
|
|
|
Posts:
8,142
Registered:
31-Jan-2006
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
25 Nov 17, 17:05
in response to: davidekholm
|
|
|
A good thing to do, but lower on the priority list, IMO. There are a least a couple of other things (having nothing to do with theme images) that I'd rather have for Xmas. 
Please tell.
Haven't posted my updated wish list (up to my neck in other coding issues for the new skin at the moment, along with theme image changes for the other two), but the top two are:
- relative URL's for webLocations (when working on the jGromit website, having absolutes is a huge pain, since when I test changes locally, the links keep taking me to the existing online pages)
- the ability to save default settings for individual skins, instead of the current "save as default." So if I load Matrix, I get my favorite settings for Matrix. If I load Gromit, I get my favorite settings for Gromit. Don't know what the UI would look like.
That's pretty much what I'm already doing, but that generates a theme image for every folder. I don't see how that can be altered to produce a theme image only at the root level.
|
|
|
Posts:
2,213
Registered:
14-Dec-2007
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
25 Nov 17, 18:41
in response to: JeffTucker
|
|
|
That's pretty much what I'm already doing, but that generates a theme image for every folder. I don't see how that can be altered to produce a theme image only at the root level.
Simple, just use the new ‘Remove’ menu item to remove the theme image from all folders where you don’t like to see a theme image.
|
|
|
Posts:
8,142
Registered:
31-Jan-2006
|
|
|
Re: Theme Images: option to suppress them for subfolders
Posted:
25 Nov 17, 19:00
in response to: AndreWolff
|
|
|
That's pretty much what I'm already doing, but that generates a theme image for every folder. I don't see how that can be altered to produce a theme image only at the root level.
Simple, just use the new ‘Remove’ menu item to remove the theme image from all folders where you don’t like to see a theme image.
You're kidding, right? You think that's a reasonable solution? So, a user who wants to use the theme image only at the top level has to go through every folder and subfolder in his entire album and remove the theme image on each one? Gee, great idea. That's so much better than making a single choice in the skin settings. 
|
|
|
|
Legend
|
|
Forum admins
|
|
Helpful Answer
|
|
Correct Answer
|
|