This question is answered.


Permlink Replies: 35 - Pages: 3 [ Previous | 1 2 3 | Next ] - Last Post: 04-Sep-2016 22:32 Last Post By: borisv Threads: [ Previous | Next ]
jGromit

Posts: 33,145
Registered: 31-Jan-2006
Re: Can't make my album after rollong up to 12.7 and 1.7.0
Posted: 30-May-2016 23:27   in response to: borisv in response to: borisv
 
  Click to reply to this thread Reply
Please attach your project file - jalbum-settings.jap - from the project directory.
borisv

Posts: 62
Registered: 24-Oct-2005
Re: Can't make my album after rollong up to 12.7 and 1.7.0
Posted: 31-May-2016 01:42   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Here it is. Thank you.
jGromit

Posts: 33,145
Registered: 31-Jan-2006
Re: Can't make my album after rollong up to 12.7 and 1.7.0
Posted: 31-May-2016 03:14   in response to: borisv in response to: borisv
 
  Click to reply to this thread Reply
No enlightenment there, I'm afraid. If I make an album with those settings, the index pages have all the navigation, as expected.

The only remaining explanation is that you have a damaged skin installation.

Let's see exactly what skin files you've got on your PC. Launch jAlbum, select ExhibitPlus, then choose Tools, Skin developer, Pack as .jaskin file. Attach the resulting file here.
ctwist

Posts: 1,409
Registered: 27-Sep-2003
Re: Can't make my album after rollong up to 12.7 and 1.7.0
Posted: 31-May-2016 03:49   in response to: borisv in response to: borisv
 
  Click to reply to this thread Reply
Another suggestion.
jAlbum looks for skins in more than one location.
Rename the "ExhibitPlus" folder to "ExhibitPlus1", then open your project, select the ExhibitPlus1 skin and make the album.
Depending on whether the album is good, we will then decide on the next step.
borisv

Posts: 62
Registered: 24-Oct-2005
Re: Can't make my album after rollong up to 12.7 and 1.7.0
Posted: 01-Jun-2016 05:01   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
Attachment ExhibitPlus1.jaskin (720,0 KB)
Attachment oldFragment.png (15,6 KB)
Attachment newFragment.png (10,6 KB)
I did that: renamed skin directory to
C:\Users\borisv\AppData\Roaming\jAlbum\skins\ExhibitPlus1
and re-built the album. You can see on the screenshot that index pages navigation isn't there.

oldFragment shows existing album online (jAlbum12.2 and E+ 1.5), and newFragment is with 12.7.2 and 1.7.2

And my current skin files are packed as ExhibitPlus1.jaskin
jGromit

Posts: 33,145
Registered: 31-Jan-2006
Re: Can't make my album after rolling up to 12.7 and 1.7.0
Posted: 01-Jun-2016 07:29   in response to: borisv in response to: borisv
 
  Click to reply to this thread Reply
A-ha!! The problem shows up when there's more than one page's worth of folders, not when there's more than one page's worth of images.

Chris, the skin needs to be using totalIndexes rather than trying to calculate that from totalImages. Just remember that totalIndexes might be void. I would suggest something like this:
totalIndexPagesFixed = totalIndexes==void ? 1 : totalIndexes;
That should work even if directory chaining is used (which produces 1 instead of void when there's only one index page).

I'm not sure why the skin is then checking for totalIndexPagesFixed being greater than zero - is that to account for empty directories?

This same underlying error results in a display of, for example, "1-12 (of 0 found)" because it's counting images, not objects in the directory.
jGromit

Posts: 33,145
Registered: 31-Jan-2006
Re: Can't make my album after rolling up to 12.7 and 1.7.0
Posted: 01-Jun-2016 07:41   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
To get the number of non-hidden, non-excluded objects in the current directory (without having to iterate through them):
JAlbumUtilities.countCategories(currentFolder, false).getTotalCount())
ctwist

Posts: 1,409
Registered: 27-Sep-2003
Re: Can't make my album after rolling up to 12.7 and 1.7.0
Posted: 02-Jun-2016 00:56   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
totalIndexes doesn't work because all the folders are shown on the first index page and then (cols*rows) images are shown underneath it. jAlbum's calculation of the number of index pages is not always correct (e.g. cols = 2, rows = 4, 5 folders, 23 images: jAlbum thinks there are 4 index pages but there are only 3).
If you try E+ 1.5, an index that contains sub-folders and multiple index pages sometimes produces a weird navigation bar.

I did some work on this yesterday evening. I think this works. This also fixes the exception if rows or cols is 0.
In index.bsh, replace
totalIndexPagesFixed = Math.ceil((Double)totalImages / (Double)(cols * rows)).intValue();
if (totalIndexPagesFixed > 0)
with
totalIndexPagesFixed = (totalImages * cols * rows == 0 ? 1 : (int)Math.ceil(((float)totalImages) / (cols * rows)));
if (totalIndexPagesFixed > 1)
jGromit

Posts: 33,145
Registered: 31-Jan-2006
Re: Can't make my album after rolling up to 12.7 and 1.7.0
Posted: 02-Jun-2016 01:06   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
ctwist wrote:
totalIndexes doesn't work because all the folders are shown on the first index page...

Not when I try it (even after your latest edit). If I have a project with 12 folders, and I use 3 rows of 3 columns, I get 9 folders on index.html and 3 folders on index2.html, with no page navigation

Edit: When I use 1.5.3, I get 9 folders on index.html and 3 folders on index2.html, but I also get page navigation.
ctwist

Posts: 1,409
Registered: 27-Sep-2003
Re: Can't make my album after rolling up to 12.7 and 1.7.0
Posted: 02-Jun-2016 01:31   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
I didn't test with that many folders. I haven't iterated with "dirs" and "nodirs" before; I am still getting to understand how it works.
I think I know how to fix this. Watch this space.
jGromit

Posts: 33,145
Registered: 31-Jan-2006
Re: Can't make my album after rolling up to 12.7 and 1.7.0
Posted: 02-Jun-2016 02:07   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
The behavior of the built-in file iterator is perverse enough that I've pretty much abandoned it, choosing to do "my own thing," with something like getChildren(). With that, I don't have to keep referring to a cheat sheet to figure out what it's going to do.

Happy hunting! :)
borisv

Posts: 62
Registered: 24-Oct-2005
Re: Can't make my album after rolling up to 12.7 and 1.7.0
Posted: 02-Jun-2016 02:13   in response to: borisv in response to: borisv
 
  Click to reply to this thread Reply
I wish I have stressed out in my post "Posted: 24-May-2016 23:20" that I have only folders on index pages, 96 of them (4 pages 24 folders each), and nothing else.
jGromit

Posts: 33,145
Registered: 31-Jan-2006
Re: Can't make my album after rolling up to 12.7 and 1.7.0
Posted: 02-Jun-2016 02:16   in response to: borisv in response to: borisv
 
  Click to reply to this thread Reply
Yes, I didn't realize that until I looked carefully at one of your screenshots. Then the light dawned! We're on the right track, now, however. :)
ctwist

Posts: 1,409
Registered: 27-Sep-2003
Re: Can't make my album after rolling up to 12.7 and 1.7.0
Posted: 02-Jun-2016 13:45   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
This should fix it.

In index.bsh, replace
totalIndexPagesFixed = Math.ceil((Double)totalImages / (Double)(cols * rows)).intValue();
if (totalIndexPagesFixed > 0)
with
int totalFolders = JAlbumUtilities.countCategories(currentFolder, false).getCount(Category.folder);
totalIndexPagesFixed = (Math.max(totalImages, totalFolders) * cols * rows == 0
	? 1 : (int)Math.ceil(((float)Math.max(totalImages, totalFolders)) / (cols * rows)));
if (totalIndexPagesFixed > 1)


Edited by: ctwist on 02-Jun-2016 08:11
For compatibility with old versions of jAlbum, the published version will be different.
jGromit

Posts: 33,145
Registered: 31-Jan-2006
Re: Can't make my album after rolling up to 12.7 and 1.7.0
Posted: 02-Jun-2016 13:59   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
Attachment ss001739.png (10,4 KB)
Attachment ss001742.png (77,0 KB)
A quick test indicates that it's behaving much better. Only one oddity - screenshot 1739 shows what you get if there are only folders at the top, and 1742 shows what you get if there are folders plus one image at the top. If there are more images than folders, you get a count of only the images.

I never used E+ even back in its heyday, so I'm not sure how it's supposed to behave. I guess what I'd expect would be a count of objects - images plus folders. But I could argue that either way....
Legend
Forum admins
Helpful Answer
Correct Answer

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