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


Permlink Replies: 38 - Pages: 3 [ Previous | 1 2 3 | Next ] - Last Post: 26-Nov-2017 00:29 Last Post By: jGromit Threads: [ Previous | Next ]
jGromit

Posts: 34,201
Registered: 31-Jan-2006
Re: Theme Images: option to suppress them for subfolders
Posted: 23-Nov-2017 14:16   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Ah, yes. Got it. :)
RobM

Posts: 4,719
Registered: 4-Aug-2006
Re: Theme Images: option to suppress them for subfolders
Posted: 24-Nov-2017 12:37   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.
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.
davidekholm

Posts: 21,874
Registered: 18-Oct-2002
Re: Theme Images: option to suppress them for subfolders
Posted: 24-Nov-2017 13:08   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
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.
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.
AndreWolff

Posts: 2,333
Registered: 14-Dec-2007
Re: Theme Images: option to suppress them for subfolders
Posted: 25-Nov-2017 16:28   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
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 !!
AndreWolff

Posts: 2,333
Registered: 14-Dec-2007
Re: Theme Images: option to suppress them for subfolders
Posted: 25-Nov-2017 16:31   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
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.
davidekholm

Posts: 21,874
Registered: 18-Oct-2002
Re: Theme Images: option to suppress them for subfolders
Posted: 25-Nov-2017 16:32   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
davidekholm wrote:
Just do a core update to get 15.0.2 and try out this functionality!
Yes that works perfect!

Thanks David.


You're welcome
jGromit

Posts: 34,201
Registered: 31-Jan-2006
Re: Theme Images: option to suppress them for subfolders
Posted: 25-Nov-2017 16:37   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
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.
davidekholm

Posts: 21,874
Registered: 18-Oct-2002
Re: Theme Images: option to suppress them for subfolders
Posted: 25-Nov-2017 16:39   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
davidekholm wrote:
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)
jGromit

Posts: 34,201
Registered: 31-Jan-2006
Re: Theme Images: option to suppress them for subfolders
Posted: 25-Nov-2017 16:43   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
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.
davidekholm

Posts: 21,874
Registered: 18-Oct-2002
Re: Theme Images: option to suppress them for subfolders
Posted: 25-Nov-2017 16:47   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
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.
jGromit

Posts: 34,201
Registered: 31-Jan-2006
Re: Theme Images: option to suppress them for subfolders
Posted: 25-Nov-2017 16:51   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
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. ;)
davidekholm

Posts: 21,874
Registered: 18-Oct-2002
Re: Theme Images: option to suppress them for subfolders
Posted: 25-Nov-2017 16:53   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
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
jGromit

Posts: 34,201
Registered: 31-Jan-2006
Re: Theme Images: option to suppress them for subfolders
Posted: 25-Nov-2017 17:05   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
jGromit wrote:
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.

BTW, here's the documentation for how to control theme image generation yourself: https://jalbum.net/help/en/Sample_scripts#Theme_images

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.
AndreWolff

Posts: 2,333
Registered: 14-Dec-2007
Re: Theme Images: option to suppress them for subfolders
Posted: 25-Nov-2017 18:41   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
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.
jGromit

Posts: 34,201
Registered: 31-Jan-2006
Re: Theme Images: option to suppress them for subfolders
Posted: 25-Nov-2017 19:00   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
jGromit wrote:
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

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