The image attach module does not provide access to the image information in case direct access to the image node is important during theming. Minimally I'd like to request that you add access to the image node

This code works if inserted at line 306 of image_attach.module v5.x-1.7:

   '#iid' => $node->iid,

The above makes it possible to retrieve the image nid during theming using:

   $node->content['image_attach']['#iid']

Ideally you'd also make available more information about the image, such as:

  • src
  • title
  • height
  • width
  • href
  • class

Currently I'm using preg_match() to tease that information out of the #view, but it is very fragile and non-robust code. Unfortunately, for the teaser the #view simply does have have the image nid. Can you at least patch to provide that?

Thanks in advance.

Comments

mikeschinkel’s picture

anyone?

mikeschinkel’s picture

Bump?

Hetta’s picture

New features for image go into 6.x, and from there get backported to 5.x-2.x.
5.x-1.x only gets bugfixes.
So, create a patch for 6.x ...

mikeschinkel’s picture

I'm not using 6.x yet (it doesn't have features working that I need), nor do I yet know how to create patches. :-(

Hetta’s picture

Creating patches is easy: http://drupal.org/patch/create

mikeschinkel’s picture

Maybe I misunderstood you, you said:

5.x-1.x only gets bugfixes.
So, create a patch for 6.x ...

To which I replied:

I'm not using 6.x yet (it doesn't have features working that I need), nor do I yet know how to create patches. :-(

To which you replied:

Creating patches is easy: http://drupal.org/patch/create

Now let's assume that I put the effort into learning how to creating patches. That's well and fine, but your statement "So, create a patch for 6.x ...' is incompatible with my prior statement "I'm not using 6.x", is it not? I don't have an installed v6.x, nor do I have a current project that needs v6.x patched, but I do have a project that needs v5.x patched. Further I don't want to deliver code to my client that is not part of the community-maintained branch as that's just a really bad idea.

So how about this? If I learn to contribute patches and create a patch for 5.x, can it be incorporated into the next version of the community-maintained branch of image_attach?

Hetta’s picture

It has a better chance than an issue without a patch, yes.

mikeschinkel’s picture

Okay, thanks. I worked around this because it went unanswered so long, but I'll try to swing back around to it when I get a breather.

sun’s picture

Status: Active » Needs work

Please submit a proper patch. See http://drupal.org/patch for details.

sun’s picture

Status: Needs work » Closed (duplicate)