forum.coppermine-gallery.net

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: tomrock on July 03, 2005, 07:24:29 pm

Title: Thumbnail height determines style coloring
Post by: tomrock on July 03, 2005, 07:24:29 pm
I'm not saying this well with words, but the picture should show what I mean.

The height of the coloring in certain themes (hardwired, igames and fruity, for example) seems to determine the height of the theme coloring.

July snapshot (although this issue was in earlier snapshots, also).

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Ftomrockwell.com%2Fpost%2Fthumb-height-difference.jpg&hash=a777f628c3df739047edc89779b50a27124cfd46)

Thanks,
Tom
Title: Re: Thumbnail height determines style coloring
Post by: donnoman on July 03, 2005, 11:58:58 pm
This has to do with the removal of the height attribute for XHTML validity.

This is the more refined fix that went into core.inc.php

from $template_album_list
Code: [Select]
<!-- BEGIN empty_cell -->
        <td width="{COL_WIDTH}%" valign="top">
        <table width="100%" cellspacing="0" cellpadding="0">
        <tr>
                <td height="1" valign="top" class="tableh2">
                        <b>&nbsp;</b>
                </td>
        </tr>
        <tr>
                <td>
                        <img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />
                </td>
        </tr>
        <tr>
                <td width="100%" valign="top" class="tableb_compact">
                    <div class="thumbnails" style="background-color:transparent"><img src="images/spacer.gif" width="1" height="{SPACER}" border="0" class="image" style="border:0;margin-top:1;margin-bottom:0" alt="" /></div>
                </td>
        </tr>
        </table>
        </td>
<!-- END empty_cell -->
from $template_album_list_cat
Code: [Select]
<!-- BEGIN c_empty_cell -->
        <td width="{COL_WIDTH}%" valign="top">
        <table width="100%" cellspacing="0" cellpadding="0" >
        <tr>
                <td height="1" valign="top" class="tableh2">
                        <b>&nbsp;</b>
                </td>
        </tr>
        <tr>
                <td>
                        <img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />
                </td>
        </tr>
        <tr>
                <td width="100%" valign="top" class="tableb_compact" >
                      <div class="thumbnails" style="background-color:transparent"><img src="images/spacer.gif" width="1" height="{SPACER}" border="0" class="image" style="border:0;margin-top:1;margin-bottom:0" alt="" /></div>
                </td>
        </tr>
        </table>
        </td>
<!-- END c_empty_cell -->

from function theme_display_album_list & theme_display_album_list_cat
Code: [Select]
   $params = array('{COL_WIDTH}' => $column_width,
          '{SPACER}' => $thumb_cell_width
          );
    $empty_cell = template_eval($empty_cell, $params);

Note this was an early dev document, core.inc.php was later changed to themes.inc.php

Are you sure all the theme files were uploaded properly? None of the core themes modify the above sections. It could be your themes are still using their old code.

If the theme.php on your server for hardwired doesn't start out with this, you need to make sure you retransfer all the files.
Code: [Select]
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2005 Coppermine Dev Team
  v1.1 originaly written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  ********************************************
  Coppermine version: 1.4.1
  $Source: /cvsroot/coppermine/devel/themes/hardwired/theme.php,v $
  $Revision: 1.66 $
  $Author: donnoman $
  $Date: 2005/04/12 03:51:57 $
**********************************************/

post a link to your gallery if re-uploading the beta doesn't solve the problem.
Title: Re: Thumbnail height determines style coloring
Post by: tomrock on July 04, 2005, 02:51:57 pm
That is exactly the version of theme.php I have.

I don't have core.inc.php and I do have themes.inc.php.

I even made a new SQL database, a new /cpjuly folder and re-installed completely from scratch just to see what would happen. I didn't change a thing.

Same result with hardwired, fruity, etc.

I'm doing this on a local machine with Apache 1.33 so I can't publish it. Sorry.

If I'm the only one that sees this, that's a good thing. I'll just make sure thumbnails in the same row have the same height. :-)
Title: Re: Thumbnail height determines style coloring
Post by: Joachim Müller on July 31, 2005, 03:32:37 pm
[moderation]
bumping this unresolved thread to the top...
Title: Re: Thumbnail height determines style coloring
Post by: donnoman on August 02, 2005, 03:28:35 am
@tomrock can you post a link to your gallery and also post a deep link to a specific example?
Title: Re: Thumbnail height determines style coloring
Post by: tomrock on August 05, 2005, 12:57:07 pm
I have 1.4.1 installed on a laptop running Apache 1.3, MySQL, etc. so I'm afraid I can't post a link. Sorry.
Title: Re: Thumbnail height determines style coloring
Post by: donnoman on August 06, 2005, 05:12:44 am
Ok, then which themes are you seeing this behavior with?
The the next question is did you modify any of the config options in the "Files and thumbnails settings" section.

If so what are the current values?
Title: Re: Thumbnail height determines style coloring
Post by: tomrock on August 06, 2005, 06:22:09 pm
I see it with hardwired, igames and fruity (but I haven't tried them all).

More importantly (I think), yes I did change a setting -- I changed the thumbnail size from 100 to 120.

BTW -- I'm seeing the same thing with 1.3.2 on Safari on a Mac. You can see it at http://eyelandart.com/gallery I know I'm getting off the 1.4 subject here but I'll bet I see this behavior because of the change in thumbnail size.
Title: Re: Thumbnail height determines style coloring
Post by: donnoman on August 07, 2005, 01:33:38 am
The only way I've been able to reproduce it is by selecting "width" instead of "max aspect", even then I only see the problem with Firefox.

I'll still look into it, suggestions of fixes are welcome.
Title: Re: Thumbnail height determines style coloring
Post by: donnoman on August 08, 2005, 01:52:19 am
Fix comitted. I added class="tableb_compact" to a few of the rows in themes.inc.php.
Title: Re: Thumbnail height determines style coloring
Post by: artistsinhawaii on August 13, 2005, 11:32:14 pm
Hi,

I don't do coding but, isn't this really a CSS style issue?  It looks to me like the background_color for the parent table is darker than the background color for the thumbnail cell?

The thumbnail and thumbnail description cells have to be flexible to accomodate different heights and description lengths while the parent table has to expand around it.  If any of the cells within are shorter than the parent's height, then the background of the parent cell would show through.


Dennis
 
Title: Re: Thumbnail height determines style coloring
Post by: donnoman on August 13, 2005, 11:49:42 pm
The essential problem is that the columns on the left and the columns on the right are tables within a table.

There is no affinity between the tables that naturally balance the table row heights out.  If the vertical height of both images is say 100px, then theres no issue, all looks great. Same if both images are 50px.  But because each side by side table is its own animal when you get one image with a hieght of 50px in one and 100px in the other, your going to see the underlying table in the one that has the least height.

What I did was add a class declaration that almost always has the same color, so that if it shows through it doesn't show up as a different color.

Your more than welcome to look at it yourself and see if you can come up with a different fix.

Title: Re: Thumbnail height determines style coloring
Post by: artistsinhawaii on August 15, 2005, 11:41:58 am
Ah!
Thanks for clarifying it so well.   So what you imposed was a global fix rather than a theme-by-theme fix, which makes a lot of sense to me.

But as you replied to me in another thread regarding the modification of the core theme.inc with a persuasive suggestion that it shouldn't be done to preserve future updating integrity, I suppose I had better copy all the blocks I modified in theme.inc and paste them into each theme that I'm working on, huh?.   I placed the title and caption in the "thumbnails display" block under each thumbnail and in it's own table so that I could have each thumbnail framed with a wide white border like a slide and then have the details below with a background the same as the color surrounding the framed thumbnail.  It makes for a more consistent and professional look especially when images and captions vary in size and orientation.

Dennis

Title: Re: Thumbnail height determines style coloring
Post by: donnoman on August 16, 2005, 04:39:25 am
Checkout this plugin as an example before you start modifying themes.inc.php or adding the same modification to all of your themes.

http://cpg-contrib.org/thumbnails.php?album=2
Title: Re: Thumbnail height determines style coloring
Post by: artistsinhawaii on August 16, 2005, 07:09:30 am
AHA! 
Earlier I did install master template and didn't see any change because I had the vanity option turned off. So I just thought it was a plug-in that didn't work.  I gotta learn to read the fine print...

Thanks!  This is a fabulous feature. 

Dennis