I'm using Drupal 4.3.2, with Image Module 4.3.

By default, the image module is set to shift the thumbnail text to left while it centers the thumbnail images. What this means is that if you only have one or two images in an album, the thumbnail and thumbnail title will be out of alignment -text left, imaged center.

To fix this, open the image.module with a text editor and goto line 1360. Look for - align=\"center\ - and change the "center" to left. This will cause your thumbs to shift to the left, over the text. Things will look tidy again.

By the way:

Line 1388 is for moving the "number of images in album" at the bottom of the page. Default is align=\"center
Line 1397 is for the album page number at the the bottom of the page. Default is align=\"center

Comments

larry’s picture

Hello Ernest,
Thanks for the information...it helped me quite a bit. I saved myself from trolling through the code...although I must admit I have been tinkering with it pretty well. I have a question for you...you said:

"By default, the image module is set to shift the thumbnail text to left while it centers the thumbnail images. What this means is that if you only have one or two images in an album, the thumbnail and thumbnail title will be out of alignment -text left, imaged center."

My question is...where is the code that sets the thumbnail text to the left...I've been looking but can't seem to find it. Any ideas?

Thanks again for your post,
Larry

--There are no Kangaroos in Austria--

madartsfactory’s picture

If you don't want to touch the code, just add some styledefinitions to your theme-stylesheet or to drupal.css. This should be enough.

-------------------
Naur an edraith ammen!
Naur dan i ngaurhoth!

larry’s picture

Hello Omega,
Thanks for your suggestion. Normally I WOULD NOT touch the core code unless I thought it improved the software. I believe this now to be the case. The image.module actually is not as bad as I originally thought...just a bit complicated to learn in comparison with the other modules. It has essentially no documentation which would be alright if it were intuitive...which it is not. However, it is well written and pretty damn powerful...it just takes time. A minor bother in the code is the above mentioned misalignment of text and image. So, in this case I don't mind "hardwiring" it into the core. Additionally, to be honest, I don't know where to begin with CSS...haha. It should not be to hard to figure out but I come from a Lisp, Prolog, and C backround. Learning PHP is fun...CSS...how could I implement that?

Thanks for your help,
Larry

--There are no Kangaroos in Austria--

madartsfactory’s picture

first i deleted all hard-coded things like

valign=\"...\"
or
align=\"...\"

from the image.module file.

then i changed some names of the the identifiers

id=\"...\"

for the div's in the image.module file for a better distinction.

finally, for every own identifier i made an entry in the drupal.css like this one

#image table td {
  vertical-align: top;
  text-align: center;
}

I hope this may help you a bit.

Cheers
Das Omega

-------------------
Naur an edraith ammen!
Naur dan i ngaurhoth!

larry’s picture

I appreciate your explanation and code samples very much. I have no doubt that they will help...and more than just a bit....sorry...just thought of something. Do you by any chance know how to make the non-clickable thumbnails generated by the image module clickable like those in the gallery? I've made numerous attempts in various parts of the code...but no dice. Isn't PHP grand?

Thanks again,
Larry

--There are no Kangaroos in Austria--