Display image node body as image caption

druojajay - May 16, 2008 - 15:40
Project:Lightbox2
Version:5.x-1.1
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Further to this:

http://drupal.org/node/237466

which explains how to change the image caption of the lightbox popup from the alt attribute to the title of the image node...

I want to use the body text from the image node ( $node->content['body']['#value'] ) as the caption in the popup.

I've tried a number of modifications to theme_imagefield_image_imagecache_lightbox2, but nothing seems to work.

How can I do this?

thanks,

dru

#1

stella - May 18, 2008 - 09:43
Status:active» fixed

Upgrade to the latest 5.x-2.x-dev version of the module. Then put the function in the attached file into your theme's template.php file. It should display the body teaser text in the lightbox in addition to the caption. However for long texts, it will scroll off the bottom of the page and will be very narrow for smaller images. I'm not providing any support on this as I plan to implement an alternative solution which will open the node in a lightbox.

Cheers,
Stella

AttachmentSize
lightbox2_5x_259323.patch 2.5 KB

#2

stella - May 17, 2008 - 20:41

The latest dev version now allows you to configure an image node page to be opened in the lightbox when the image is clicked, instead of the image itself.

Cheers,
Stella

#3

druojajay - May 30, 2008 - 17:08

Excellent. Thanks for the speedy response!

dru

#4

stella - May 31, 2008 - 10:34

Oh this was also released in 5.x-2.7 and 6.x-1.7

#5

iantresman - June 1, 2008 - 18:25

I've made an Image module feature requested, and described a hack, that displays an image node's body text, as the image caption (but not in teasers), described here.

#6

limehouse - June 1, 2008 - 18:27

It's great to be able to link to the image node page, but how do you remove the image filename from being displayed in the lightbox?

#7

stella - June 3, 2008 - 15:28

limehouse: if this is unrelated to comments #1 or #5, please open up a separate issue.

Cheers,
Stella

#8

Anonymous (not verified) - June 17, 2008 - 15:35
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.