Closed (fixed)
Project:
Acidfree Albums
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 May 2007 at 21:01 UTC
Updated:
5 Mar 2008 at 05:39 UTC
Jump to comment: Most recent file
Comments
Comment #1
vhmauery commentedWhat can you tell me about the thumbs that get messed up? Are they always the same picture? Does that album have a set thumbnail or is it random? Are you using drupal to serve the image files or not? Is it always the same thumbnail image? Is it always the same album? Does it happen often? Can you look at the html source and compare the broken thumb to a good thumb?
I think that should give us a good start on this one.
Comment #2
vhmauery commentedWhat can you tell me about the thumbs that get messed up? Are they always the same picture? Does that album have a set thumbnail or is it random? Are you using drupal to serve the image files or not? Is it always the same thumbnail image? Is it always the same album? Does it happen often? Can you look at the html source and compare the broken thumb to a good thumb?
I think that should give us a good start on this one.
Comment #3
vhmauery commentedoops. That got posted twice because the first time I got a 500 internal server error. :-) Silly server.
Comment #4
nancydru>What can you tell me about the thumbs that get messed up? Are they always the same picture?
No, and it's not always the same album either, although it is usually either that one or the one to its left.
>Does that album have a set thumbnail or is it random?
Random
>Are you using drupal to serve the image files or not?
What are my choices? I just installed the module and am using it the way it comes, other than setting pictures per page to 10 and the padding to 15.
>Is it always the same thumbnail image? Is it always the same album?
No, no.
>Does it happen often?
Yes, usually when I first enter the albums.
>Can you look at the html source and compare the broken thumb to a good thumb?
They look okay to me. This time it's the one to the left ("September 2006"), and the thumbnail is square.
An additional possible symptom, where the album thumbnail overlaps: http://nanwich.info/acidfree_album_overlap.jpg
but this depends on the thumbnail being displayed (portrait vs landscape). The sample HTML includes this problem too ("November 2004").
Comment #5
nancydruOOPS, it's the "September 2005"album that's messed up
Comment #6
nancydruAlso, FF2, Garland theme
Comment #7
nancydruHaving now played with 3 different settings for "Amount of padding/border on each side of thumbnail image." I have a strong suspicion that this setting is involved. BTW, things definitely do mess up when it is anything other than the "out of the box" 12.
Comment #8
jaredwiltshire commentedYes that setting is what is causing your problems.
That setting doesn't actually change the padding around the image it compensates for it if you change the border/padding in your themes css.
The default css that comes with the module has 12px of border and padding around the image and thus the setting defaults to 12px.
I think we might need to change the description for this setting to make it more clear.
Comment #9
nancydruI see, thank you for the explanation. So I can increase the extra padding to help avoid this problem, but need to specify that in the settings as well?
Comment #10
vhmauery commented@jaredwiltshire
Since you wrote this fancy theme (which I do like) could you confirm that we don't even really need this setting? It is my opinion, that while causing confusion on the settings page, it is highly dependent of the default acidfree theme and therefore unnecessary for others to be messing with. If they want to write a new theme, that is fine, but does this setting affect them?
That said, this means that we may have to find some other way to inject some of the drupal_set_html_head calls into the page.
Comment #11
nancydruI think the problems I'm seeing are a result of my font size and amount of caption in concert with the orientation of the randomly chosen image.
I realize I should be doing a bit more investigation, but it's sometimes easier to ask, which style(s) should I change to make the whole thumbnail set larger?
Comment #12
jaredwiltshire commentedOK I think these rough diagrams might help with the explanation.
Acidfree-cell
Img-thumbnail
Firstly more about the "Amount of padding/border on each side of thumbnail image" setting, what it does and is it needed.
Basically we needed to set the width & height of acidfree-thumbnail to the width and height of the actual thumbnail dimensions + the amount of padding and border around it (see img.thumbnail.jpg). In acidfree.css the padding is set to 5px and the border 1px giving our default setting of 12px.
If someone decides to change the amount of border/padding around img.thumbnail in their themes css (eg to remove the printed photo with a border look) they would have to change this setting. If this setting wasnt provided the theme would look stuffed up.
@vhmauery
Why do we have to change the drupal_set_html_head() calls?
@nancyw
I'm not sure what is causing the problem seen in acidfree_album_messed_up.jpg assuming you have "the setting" set to 12 and havent modified any css.
The problem seen in acidfree_album_overlap.jpg however is easily fixed.
div.acidfree-cell has to have a fixed height and width which by default is calculated by php and set in an internal style sheet in the head. Because you have a tall image and a long caption you need to manually set the height of div.acidfree-cell to a larger value in your themes css.
So something like:
div.acidfree-cell {
height: 180px;
}
Comment #13
vhmauery commented@jaredwiltshire
My only concern was adding css that was not necessary if somebody was using a different theme. If they wrote garland_acidfree_print_thumb_* then their new theme will likely not need the CSS that is injected using the call to drupal_set_html_head().
Comment #14
nancydruChanging the height seemed to have absolutely no effect. I still get the bottom of the cell cut off on tall images on the second (bottom) row. However, changing the width and font size so that the caption doesn't go into two rows seemed to solve that problem for now. It may return if someone creates an album with a long caption.
Comment #15
jaredwiltshire commentedHmm.. Changing the height should (theoretically) work...
@vhmauery
Are there any other options?
The css inserted in the head can be easily overridden, but are you more worried about resources and cleanness?
Comment #16
nancydruActually, I guess I need to clarify that a bit. I display 10 albums per page. That comes out to two rows of 5. The top row did seem to create more space on the bottom. But the bottom row did not, albums with longer titles that went to two lines would have the bottom border cut off. This might very well be a rendering problem. I wonder if inserting a clear block (and maybe a blank line) after the cells are created might solve this problem.
Comment #17
nancydruWell, I downloaded to refresh my code. Unfortunately that wiped out my CSS changes. But I went back and tried to reapply them and it isn't working. I have thumbnails overlapping (even with height: 180px) and the bottom row is being cut off when the thumbnail is portrait orientation. See http://nanwich.info/acidfree_overlap.jpg
It looks like you're including a STYLE tag in the HTML and CSS won't override that.
Comment #18
jaredwiltshire commentedDownloading and installing a new version of acidfree should not overwrite changes you make to your themes CSS. Please make sure you are editing your themes style.css file and not directly editing the acidfree css file.
I assume you are referring to this tag:
<style type="text/css" media="all">.acidfree-cell{width:126px;}.acidfree .acidfree-cell{height:145px;}</style>These widths and heights can be overridden in your themes css file. E.g. if you insert
<style type="text/css" media="all">.acidfree-cell{width:150px;}.acidfree .acidfree-cell{height:180px;}</style>into your themes css this will take precedence over the values in the style tag in the HTML.
If you are still having problems, post a link to the gallery so I can have a look at it (or email it to me if you want).
Comment #19
vhmauery commentedclosing old bugs.