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


Permlink Replies: 18 - Pages: 2 [ 1 2 | Next ] - Last Post: 21 Aug 17, 08:47 Last Post By: Laza Threads: [ Previous | Next ]
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
How are albumHeigth and albumWidth calculated?
Posted: 5 Aug 17, 10:07
 
  Click to reply to this thread Reply
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?
davidekholm

Posts: 3,442
Registered: 18-Oct-2002
Re: How are albumHeigth and albumWidth calculated?
Posted: 5 Aug 17, 10:23   in response to: AndreWolff in response to: AndreWolff
Helpful
  Click to reply to this thread Reply
AndreWolff wrote:
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.
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: How are albumHeigth and albumWidth calculated?
Posted: 5 Aug 17, 10:30   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
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)?
davidekholm

Posts: 3,442
Registered: 18-Oct-2002
Re: How are albumHeigth and albumWidth calculated?
Posted: 5 Aug 17, 10:57   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
They're set to 560x420 respectively by default. Skins can change the default by calling engine.setAlbumWidth and engine.setAlbumHeight
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: How are albumHeigth and albumWidth calculated?
Posted: 5 Aug 17, 11:17   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
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?
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: How are albumHeigth and albumWidth calculated?
Posted: 5 Aug 17, 13:16   in response to: AndreWolff in response to: AndreWolff
Helpful
  Click to reply to this thread Reply
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.
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: How are albumHeigth and albumWidth calculated?
Posted: 5 Aug 17, 15:38   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:
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.
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: How are albumHeigth and albumWidth calculated?
Posted: 5 Aug 17, 16:02   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
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.
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: How are albumHeigth and albumWidth calculated?
Posted: 5 Aug 17, 18:35   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Attachment IMG_1298.JPG (617.6 KB)
jGromit wrote:
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.
RobM

Posts: 3,815
Registered: 4-Aug-2006
Re: How are albumHeigth and albumWidth calculated?
Posted: 5 Aug 17, 18:59   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
On iOS your http://www.andrewolff.nl/TestAlbum/Embedded_PS/indexpage.html slide images do not resize properly in portrait mode - iPad Pro (small).
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: How are albumHeigth and albumWidth calculated?
Posted: 5 Aug 17, 19:07   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
See screenshots. The index page is almost unusable.
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: How are albumHeigth and albumWidth calculated?
Posted: 5 Aug 17, 20:37   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Attachment IMG_6449.PNG (148.2 KB)
Attachment IMG_6448.PNG (156.3 KB)
jGromit wrote:
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.
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: How are albumHeigth and albumWidth calculated?
Posted: 5 Aug 17, 20:43   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Attachment IMG_1299.PNG (1.5 MB)
RobM wrote:
On iOS your http://www.andrewolff.nl/TestAlbum/Embedded_PS/indexpage.html slide images do not resize properly in portrait mode - iPad Pro (small).
It is no problem on my iPad, see enclosed screenshot.
RobM

Posts: 3,815
Registered: 4-Aug-2006
Re: How are albumHeigth and albumWidth calculated?
Posted: 5 Aug 17, 20:45   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
RobM wrote:
On iOS your http://www.andrewolff.nl/TestAlbum/Embedded_PS/indexpage.html slide images do not resize properly in portrait mode - iPad Pro (small).
It is no problem on my iPad, see enclosed screenshot.
Read my post.
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: How are albumHeigth and albumWidth calculated?
Posted: 5 Aug 17, 21:01   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Attachment IMG_6451.PNG (172.1 KB)
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

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