[PG/X_treme Theme] photo-resize width problem?

William Ray

Joined: 2005-11-17
Posts: 6
Posted: Thu, 2009-05-21 18:27

I'm pretty sure this is an X_treme theme bug/limitation.

If I create a resize version for photos that is wider than 800 pixels, the on-photo-page displayed resized version is cropped at 800px. I'm betting this is due to either a table or CSS image width specification that is locking the width of that element to 800, rather than allowing wider images to force the page width to expand.

I'm posting this only because I don't see it mentioned elsewhere, and if I just dig around under the hood in my own install, that won't help the next guy who bumps into this one.

As usual, thanks for the beautiful theme,
Will Ray


Gallery URL = http://chrisandyungui.megapode.org/g2/main.php
Module / Theme name & version: X_treme 1.0
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.6 cgi-fcgi
Webserver = Apache/2.2.11 (Unix) PHP/5.2.6 mod_ssl/2.2.11 OpenSSL/0.9.8c mod_fastcgi/2.4.6 Phusion_Passenger/2.1.2 DAV/2 SVN/1.4.2
Database = mysqli 5.0.67-log, lock.system=flock
Toolkits = ArchiveUpload, Exif, Ffmpeg, Getid3, jpegtran, LinkItemToolkit, NetPBM, Thumbnail, Gd
Acceleration = none, none
Operating system = Linux lansky 2.6.24.5-serf-xeon-c6.1-grsec #1 SMP Tue Oct 7 06:18:04 PDT 2008 x86_64
Browser = Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_5_7; en-us) AppleWebKit/525.28.3 (KHTML, like Gecko) Version/3.2.3 Safari/525.28.3

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22888
Posted: Thu, 2009-05-21 22:13

The one album I looked in only had images 800 so ...
Please create a test album with the behavior you see and post a url to that album.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
William Ray

Joined: 2005-11-17
Posts: 6
Posted: Fri, 2009-05-22 00:12

Ah, silly me. I turned the resolution down to a max of 800px to avoid the problem, so that I could show the gallery off to its eventual owners.

I've upped the resolution on the following album to a max of 1024px. Clearly the underlying software thinks its dealing with images of the appropriate resolution, they're just not displaying that way.

http://chrisandyungui.megapode.org/g2/v/Wedding/Photographers/joray/

All fun!
Will Ray

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22888
Posted: Fri, 2009-05-22 02:43

Man what a complex theme!

Never tired but in photo.tpl near the top you have:

    {assign var='imagewidth' value=$theme.imageViews[$theme.imageViewsIndex].width}
    {assign var='imageheight' value=$theme.imageViews[$theme.imageViewsIndex].height}

see if this works:

    {assign var='imagewidth' value=$image.width}
    {assign var='imageheight' value=$image.height}

Really just guessing.

The image is in a <div> as a background image to attempt to stop theft I suspect but is a waste.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Wabin

Joined: 2009-07-04
Posts: 44
Posted: Sun, 2009-07-05 21:15

I'm having the same problem, and it didn't work. :(

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22888
Posted: Sun, 2009-07-05 21:38

Seems to have worked for William Ray as it works on the url he provided.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Wabin

Joined: 2009-07-04
Posts: 44
Posted: Sun, 2009-07-05 21:52

http://www.herringimages.com/gallerytest/v/katmai_bears/ is what my site looks like. If you select the 1024 or the 1600 version of images, you see a cropped image.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22888
Posted: Mon, 2009-07-06 02:58

Now I see. This theme is complex and don't have time to debug, but it looks like this bit of code in photo.tpl

{assign var='image' value=$theme.imageViews[$theme.imageViewsIndex]}
  {if !empty($theme.panoramaItem)}
    {assign var='imagewidth' value=$theme.panoramaWidth}
    {assign var='imageheight' value=$theme.imageViews[$theme.imageViewsIndex].height+17}
  {else}
    {assign var='imagewidth' value=$theme.imageViews[$theme.imageViewsIndex].width}
    {assign var='imageheight' value=$theme.imageViews[$theme.imageViewsIndex].height}
  {/if}
{/if}

the not empty check for panorama seems to be true all the time and the rest always returns 800,
That should get you started in debugging this overly complex theme.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
William Ray

Joined: 2005-11-17
Posts: 6
Posted: Mon, 2009-07-06 03:46

Ah, sorry for not getting back on this.

Yes, it appears that it's a bug somewhere in the interaction between the panorama module and the normal album module. My quick fix was to simply disable the panorama module, since I don't anticipate the users of the site I was hacking together will have much use for it (and the panorama module overall seems to be at least partly broken, failing to provide pano displays on most images that should use them anyway).

Another pseudo-fix is to change the pano display width to something as large as your largest normal picture display width.

Will

 
Wabin

Joined: 2009-07-04
Posts: 44
Posted: Tue, 2009-07-07 20:37

I just disabled the panorama module. It works fine now. Thanks for that tip! I hadn't tried to use the panorama module yet, and the site works fine without it.