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


Permlink Replies: 5 - Pages: 1 - Last Post: 24 Oct 25, 22:29 Last Post By: JeffTucker Threads: [ Previous | Next ]
JeffTucker

Posts: 8,058
Registered: 31-Jan-2006
Any bright ideas?
Posted: 23 Sep 25, 15:18
 
  Click to reply to this thread Reply
OK, at first I thought this was a bug, but it isn't, really. It's a weird side-effect of something I do in just one of my skins, to wit, Jupiter (which I'm in the midst of heavily revising). It only crops up if you're doing the following:

  • Using a skin that supports multiple index pages on one level.
  • Using a skin that keeps folders separate from other objects.
  • Using a skin that creates separate slide pages, rather than a lightbox.

Here's the setup: a project with two folders (doesn't matter what's inside them) and 20 images, all at the top level. You tell the skin to limit each index page to, say, 6 objects. The skin programmatically set rows/cols to 6/1 (the actual page layout doesn't rely on this, of course - we just need to have the core keep the counter).

Now, to keep folders separate, the skin does a <ja:fileiterator dirs>, then does a <ja:fileiterator nodirs>. Since each iterator invocation resets the counter, index.html ends up with 2 folders and 6 images, index2.html has 6 images, etc. A bit odd, but I could live with that.

But this is where it gets more interesting. If you're sitting on index.html, and you click the image 6 thumbnail, you get the image 6 slide page. But if you then go "up," you land on index2.html. The internal variable, indexPage, is not in sync with what's really happening. It thinks that image 6 is the eighth object, so it must be on index2.html.

I suppose I could keep my own counters, but that's a lot of mucking about for not much.

The skin could, instead, check to see if folders and other objects are ever mixed - if the user wants to have multiple index pages, that kind of structure would not be allowed. Each folder would have to contain only folders, or only ordinary objects (which would be the normal situation, anyway). I'm inclined to do this.

Jupiter, BTW, seems to be the only skin that would ever run into this. The other "multiple index page" skins, like Minimal, just mingle the folders with the other objects, in whatever sequence they appear in the Explore view.

And Lizard does something even stranger. If you set it to 5 cols, 4 rows, you get 5 columns, but there's no limit on rows - you get only one index page, no matter how many objects there are.
RobM

Posts: 3,891
Registered: 4-Aug-2006
Re: Any bright ideas?
Posted: 23 Sep 25, 18:42   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Have you tried adding the start and count attributes?
JeffTucker

Posts: 8,058
Registered: 31-Jan-2006
Re: Any bright ideas?
Posted: 23 Sep 25, 19:21   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
I'll do some fiddling with that, but I get the feeling that it will just collide with the core's notion of cols/rows. In effect, the iterator is already taking care of start and count on its own. But maybe if I keep track of how many folders it has processed, then adjust the count....
JeffTucker

Posts: 8,058
Registered: 31-Jan-2006
Re: Any bright ideas?
Posted: 23 Sep 25, 20:26   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Some experimenting reveals that if the skin starts meddling with the count, it also has to keep track of the correct start parameter. I haven't taken it to the next step, but I suspect the skin would also have to keep track of which index page number it's on. In short, once you've interfered with any one element of the classic cols/rows mechanism, you're on your own!

I'm sure I could get it to work, but it raises the age-old question: if a bug has been in there for years, and no one has ever reported it, is the effort to fix it justified? Easier to check for the "forbidden" structure, i.e., mixed content in any folder, and abort the build with a message. A multi-index-page album with mixed folders and images at any level is a bit of design and usability mess, anyway.
RobM

Posts: 3,891
Registered: 4-Aug-2006
Re: Any bright ideas?
Posted: 23 Sep 25, 20:42   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
JeffTucker

Posts: 8,058
Registered: 31-Jan-2006
Re: Any bright ideas?
Posted: 24 Oct 25, 22:29   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
JeffTucker wrote:
Easier to check for the "forbidden" structure, i.e., mixed content in any folder, and abort the build with a message. A multi-index-page album with mixed folders and images at any level is a bit of design and usability mess, anyway.

That's what I finally decided to do. Any other approach risked pushing the boundaries of "byzantine."
Legend
Forum admins
Helpful Answer
Correct Answer

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