Thumbnail height determines style coloring Thumbnail height determines style coloring
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Thumbnail height determines style coloring

Started by tomrock, July 03, 2005, 07:24:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

tomrock

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://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Ftomrockwell.com%2Fpost%2Fthumb-height-difference.jpg&hash=a777f628c3df739047edc89779b50a27124cfd46)

Thanks,
Tom

donnoman

This has to do with the removal of the height attribute for XHTML validity.

Quote from: donnoman on December 25, 2004, 08:53:38 PM
This is the more refined fix that went into core.inc.php

from $template_album_list

<!-- 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

<!-- 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

   $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.

/*************************
 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.

tomrock

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. :-)

Joachim Müller

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

donnoman

@tomrock can you post a link to your gallery and also post a deep link to a specific example?

tomrock

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.

donnoman

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?

tomrock

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.

donnoman

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.

donnoman

Fix comitted. I added class="tableb_compact" to a few of the rows in themes.inc.php.

artistsinhawaii

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
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

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.


artistsinhawaii

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

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

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

artistsinhawaii

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
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.