|
Replies:
18
-
Pages:
2
[
1
2
| Next
]
-
Last Post:
21 Aug 17, 08:47
Last Post By: Laza
|
Threads:
[
Previous
|
Next
]
|
|
Posts:
1,289
Registered:
14-Dec-2007
|
|
|
How are albumHeigth and albumWidth calculated?
Posted:
5 Aug 17, 10:07
|
|
|
The Template file variables tabel contains these definitions:
albumWidth Album width in pixels. (Set when embedding album). Since v10
albumURL Album address. Only available when processing "embed.htt". Since v10
I wonder how these variables are calculated:
My PhotoSwipe skin and Slide Show 4 skin are both responsive, so the size of the index page depends on the device and the chosen thumbs configuration.
Could some body give a more extended definition as given in this table?
|
|
|
Posts:
3,442
Registered:
18-Oct-2002
|
|
|
Re: How are albumHeigth and albumWidth calculated?
Posted:
5 Aug 17, 10:23
in response to: AndreWolff
|
|
Helpful |
|
|
The Template file variables tabel contains these definitions:
albumWidth Album width in pixels. (Set when embedding album). Since v10
albumURL Album address. Only available when processing "embed.htt". Since v10
I wonder how these variables are calculated:
My PhotoSwipe skin and Slide Show 4 skin are both responsive, so the size of the index page depends on the device and the chosen thumbs configuration.
Could some body give a more extended definition as given in this table?
Those variables aren't calculated, they are entered by the user when using the embed feature. This by default creates an iframe of that specified width and height. If your album is truly responsive, then just use these values as layout hints.
|
|
|
Posts:
1,289
Registered:
14-Dec-2007
|
|
|
Re: How are albumHeigth and albumWidth calculated?
Posted:
5 Aug 17, 10:30
in response to: davidekholm
|
|
|
Those variables aren't calculated, they are entered by the user when using the embed feature. This by default creates an iframe of that specified width and height. If your album is truly responsive, then just use these values as layout hints.
But how are the defaults for these two text boxes calculated?
Is it possible to get as initial defaults maxImageWidth and maxImageHeight, which are the best values for a slide page (but not for an index page)?
|
|
|
Posts:
3,442
Registered:
18-Oct-2002
|
|
|
Re: How are albumHeigth and albumWidth calculated?
Posted:
5 Aug 17, 10:57
in response to: AndreWolff
|
|
|
They're set to 560x420 respectively by default. Skins can change the default by calling engine.setAlbumWidth and engine.setAlbumHeight
|
|
|
Posts:
1,289
Registered:
14-Dec-2007
|
|
|
Re: How are albumHeigth and albumWidth calculated?
Posted:
5 Aug 17, 11:17
in response to: davidekholm
|
|
|
Skins can change the default by calling engine.setAlbumWidth and engine.setAlbumHeight
Please give more details how to do that.
Should I add:
engine.setAlbumWidth= maxImageWidth;
engine.setAlbumHeight=maxImageHeight;
to init.bsh or to embedd.htt?
|
|
|
Posts:
8,039
Registered:
31-Jan-2006
|
|
|
Re: How are albumHeigth and albumWidth calculated?
Posted:
5 Aug 17, 13:16
in response to: AndreWolff
|
|
Helpful |
|
|
In Matrix, I just set these in init.bsh (it figures out minPageWidth before this): engine.setAlbumWidth(25 + minPageWidth);
engine.setAlbumHeight((int)(0.66 * (25 + minPageWidth)));
Then refer to them in embed.htt: <iframe src="${albumURL}" style="height:${albumHeight}px; width:${albumWidth}px;"></iframe>
BTW, I haven't even looked at this in a few years. Because iframe embedding is such a bad idea for most skins, this whole "embedding" thing is probably best ignored. It's in Matrix, but I never bothered with it in Gromit, the newer skin.
|
|
|
Posts:
1,289
Registered:
14-Dec-2007
|
|
|
Re: How are albumHeigth and albumWidth calculated?
Posted:
5 Aug 17, 15:38
in response to: JeffTucker
|
|
|
IBecause iframe embedding is such a bad idea for most skins, this whole "embedding" thing is probably best ignored. It's in Matrix, but I never bothered with it in Gromit, the newer skin.
Thanks for your reply.
With css you can get these day reasonable responsive iFrames, see here and here for examples.
|
|
|
Posts:
8,039
Registered:
31-Jan-2006
|
|
|
Re: How are albumHeigth and albumWidth calculated?
Posted:
5 Aug 17, 16:02
in response to: AndreWolff
|
|
|
With css you can get these day reasonable responsive iFrames....
Well, Mr. "Mobile First," I have to assume that you've never tried viewing those pages in Chrome on a Android (probably the most common phone/browser combo in the smartphone world). They are, frankly, a bit of a mess.
|
|
|
Posts:
1,289
Registered:
14-Dec-2007
|
|
|
Re: How are albumHeigth and albumWidth calculated?
Posted:
5 Aug 17, 18:35
in response to: JeffTucker
|
|
|
|
Well, Mr. "Mobile First," I have to assume that you've never tried viewing those pages in Chrome on a Android (probably the most common phone/browser combo in the smartphone world). They are, frankly, a bit of a mess.
Well I must admit I am more an iOS fan, so that is my standard mobile platform. But I do test my skins also on an old Android tablet, where this page looks good, see attached screenshot.
|
|
|
Posts:
3,815
Registered:
4-Aug-2006
|
|
|
Posts:
8,039
Registered:
31-Jan-2006
|
|
|
Re: How are albumHeigth and albumWidth calculated?
Posted:
5 Aug 17, 19:07
in response to: AndreWolff
|
|
|
|
See screenshots. The index page is almost unusable.
|
|
|
Posts:
1,289
Registered:
14-Dec-2007
|
|
|
Re: How are albumHeigth and albumWidth calculated?
Posted:
5 Aug 17, 20:37
in response to: JeffTucker
|
|
|
|
See screenshots. The index page is almost unusable.
Well you did test it on the small screen of a mobile Phone.
I have the same type of display on an iPhone, see enclosed ..6448 screenshot.
But if you rotate the Phone over 90 degrees, it is perfect usable, see screenshot ..6449
And it looks also better in portrait mode if I remove the displayed code.
|
|
|
Posts:
1,289
Registered:
14-Dec-2007
|
|
|
Re: How are albumHeigth and albumWidth calculated?
Posted:
5 Aug 17, 20:43
in response to: RobM
|
|
|
|
It is no problem on my iPad, see enclosed screenshot.
|
|
|
Posts:
3,815
Registered:
4-Aug-2006
|
|
|
Re: How are albumHeigth and albumWidth calculated?
Posted:
5 Aug 17, 20:45
in response to: AndreWolff
|
|
|
It is no problem on my iPad, see enclosed screenshot.
Read my post.
|
|
|
Posts:
1,289
Registered:
14-Dec-2007
|
|
|
Re: How are albumHeigth and albumWidth calculated?
Posted:
5 Aug 17, 21:01
in response to: JeffTucker
|
|
|
|
The problem was not caused by the iFrame, but due to a div around the css code. This div had a width of 1200 px, not very good for a small mobile Phone. I did correct that and now it looks Ok even on a Phone in portrait mode, see enclosed screenshot.
|
|
|
|
Legend
|
|
Forum admins
|
|
Helpful Answer
|
|
Correct Answer
|
|