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

frjo’s picture

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.

alphex’s picture

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?

frjo’s picture

Yes, that’s the one.

alphex’s picture

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

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

jmlavarenne’s picture

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

I'm having the same issue with Drupal 6.

frjo’s picture

Status: Active » Closed (fixed)