Download & Extend

How do you change the caption on a thickbox window to show the "title" of the image node, not the file name?

Project:Thickbox
Version:6.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

As the title says.
Currently the THICKBOX module shows the file name.
How can I change it so it shows the TITLE of the NODE, not the file name of the file attached to the node?

Thank you.

Comments

#1

Version:5.x-2.0» 5.x-1.x-dev
Component:User interface» Code

Please try out the 5-dev version of Thickbox and add this on line 204 in the file thickbox.module.

    // If the title is empty use alt or the node title in that order.
    if (empty($item['data']['title'])) {
      if (!empty($item['alt'])) {
        $item['title'] = $item['alt'];
      }
      else {
        $item['title'] = $node->title;
      }
    }

It is right before this line:

    if (strpos($formatter, 'thickbox][') !== FALSE) {

I have not tested this, it's a quick backport from the 6-dev version.

#2

I'm not sure if it was clear in my OP, I apologize.
I'm using ... Thickbox 5.x-2.0

The only DEV branch I see for 5 is http://drupal.org/node/122466 which is a 5.1 dev...

Is that what you mean?

#3

Yes, that’s the one.

#4

Removed the thick box, put in the dev version.
This did not help.

I'm still seeing the file name, not the node title.

#5

Version:5.x-1.x-dev» 6.x-1.x-dev

I'm having the same issue with Drupal 6.

#6

Status:active» closed (fixed)