Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Thumbnail height determines style coloring  (Read 6614 times)

0 Members and 1 Guest are viewing this topic.

tomrock

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 29
    • My Coppermine Gallery
Thumbnail height determines style coloring
« 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).

(http://tomrockwell.com/post/thumb-height-difference.jpg)

Thanks,
Tom
« Last Edit: August 08, 2005, 08:57:22 am by GauGau »
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Thumbnail height determines style coloring
« Reply #1 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.
Logged

tomrock

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 29
    • My Coppermine Gallery
Re: Thumbnail height determines style coloring
« Reply #2 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. :-)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Thumbnail height determines style coloring
« Reply #3 on: July 31, 2005, 03:32:37 pm »

[moderation]
bumping this unresolved thread to the top...
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Thumbnail height determines style coloring
« Reply #4 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?
Logged

tomrock

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 29
    • My Coppermine Gallery
Re: Thumbnail height determines style coloring
« Reply #5 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.
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Thumbnail height determines style coloring
« Reply #6 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?
Logged

tomrock

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 29
    • My Coppermine Gallery
Re: Thumbnail height determines style coloring
« Reply #7 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.
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Thumbnail height determines style coloring
« Reply #8 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.
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Thumbnail height determines style coloring
« Reply #9 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.
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: Thumbnail height determines style coloring
« Reply #10 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
 
Logged
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Thumbnail height determines style coloring
« Reply #11 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.

Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: Thumbnail height determines style coloring
« Reply #12 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

Logged
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Thumbnail height determines style coloring
« Reply #13 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
Logged

artistsinhawaii

  • VIP
  • Coppermine addict
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 856
    • evj art and photography
Re: Thumbnail height determines style coloring
« Reply #14 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
Logged
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 19 queries.