Love this module. Do captions work for it though? Don't see a field to enter captions (one per image). Thanks for you help.

Comments

AdrianB’s picture

I think it uses the title attribute of the image. The one you can activate when you set up the imagefield.

EclipseGc’s picture

Assigned: Unassigned » EclipseGc
Status: Active » Closed (fixed)

jboeger,

That depends on what you have in mind. Adrian is quite right, I had intended for most "captions" to be in the lightbox itself, however, that's certainly not required. You could always build your own version of the major theme function to show text under the images (before being lightboxed). If you've ever done any of your own theme function writing, then this should be a snap for you.

Eclipse

bcobin’s picture

I have the same problem - I went through an adventure trying to get captions to display a few months ago and the client finally asked for it today. I'm getting better at theming, but I have no idea how to write a theme function, so any help would be great!

Another suggestion (from the client) - a way to reorder the images once they're posted. Perhaps a "weight" function would do.

You can see the live site at www.aliceborodkin.com - go the the Media Center.

Thanks again for a great module!

EclipseGc’s picture

bcobin,

sadly, re-ordering is actually not within my domain, but rather within imagefield's domain.

you're looking for a function called theme_imagefield_gallery_lightbox2 I believe. You can copy it into your own template.php for the theme you're using and then change the copy (in your template.php) to be function theme_name_imagefield_gallery_lightbox2 and then rewrite it to output whatever you'd like. That's how theme function work in drupal. If you check around for some basic tutorials on that, it should be pretty straight forward once you wrap your mind around the concept. And it'll be useful info for any other drupal work you do. :-)

Hope that helps.

Eclipse

bcobin’s picture

OK - forget about reordering. I'd be happy just to be able to show captions/titles - that was the original thrust of this thread. Any ideas? I'm still lost... thanks!

EclipseGc’s picture

bcobin

You HAVE to learn to use theme functions. My previous post indicates which function you'll be making use of and even gives some minor guidance on what you're looking to do. Please read up on the theme functions in drupal 5 and that will help you a TON. :-)

Eclipse

bcobin’s picture

Status: Closed (fixed) » Active

I see how theme functions work - pretty cool to be able to override modules from template.php... If only I knew what I was doing! I've been trying now for hours and I just get parsing errors. This is, sadly, beyond my abilities. Just to be clear, I'm talking about captions underneath the thumbnails - you can see the page here.

Somebody came up with a patch for this, but it's for Drupal 6 - hosed my installation before I noticed that.

Imagefield Gallery looks great - the ability to have captions is pretty major, and even legally required in some cases, I would think. If anybody has any ideas, that would be great - don't want to fall back to the Image Gallery (which poses another set of issues with lightbox 2...) Thanks!