Currently, the image filter only provides an option to hyperlink the image to the image node itself (using the "nolink=(0|1)" flag) for viewing the enlarged version of an image.

There are situations where it would be very useful if an image could be linked to any node, rather than just its enlargement.

One example of this is using images as graphical icons to link to content pages.

I propose that a new attribute be added to the [image:x ...] filter tag as follows:

If you specify nolink=1, no link will be created to the image node. The default is to create a link to the image.

Alternatively, if you specify node=id, a link will be created to the node with the given id.

The attached patch (applies cleanly against 4.6.x and CVS HEAD) implements this functionality as described (this is my first drupal patch submission, so be gentle ;-).

CommentFileSizeAuthor
image_filter.module_1.patch3.85 KBscotto

Comments

scotto’s picture

Assigned: scotto » Unassigned

Unassigned this - I don't think I was supposed to assign it to myself...
If anyone has looked at this patch (its a pretty basic few-liner) I would like to know your thoughts.

Also, I'm not sure on the exact protocol for feature submissions around here, but do I need to assign this to "4.6.0" or "CVS" in the Version field? (It applies cleanly to both) Thanks.

bwynants’s picture

+1 nice feature. This way I can link an image to the album containing it!

David Hull’s picture

Assigned: Unassigned » David Hull

Sorry for not responding sooner. This seems like a reasonable feature, and I will integrate it in the near future.

astra’s picture

How to use the image filter to the field_textarea of the flexinode module?

For example, I input [image:5 node=14] to a textarea field(flexinode_8), and try to make a custom theme within node-flexinode-2.tpl.php:

if using

print $content

the image filter works well and the image can be displayed properly.

Instead of that I want to theme the fields separately and use

print $node->flexinode_8

But now I get the the following dispaly without the image filtered:

[image:5 node=14]

Any solution theming to the field level of flexinode with the image filter? Thanks!

veelo’s picture

How to use the image filter to the field_textarea of the flexinode module?

Try

 print check_markup($node->flexinode_8, $node->flexinode_8_format, FALSE);

when running 4.7, otherwise check out check_output.

Bastiaan Veelo.

veelo’s picture

How to use the image filter to the field_textarea of the flexinode module?

Try

 print check_markup($node->flexinode_8, $node->flexinode_8_format, FALSE);

when running 4.7, otherwise check out check_output.

Bastiaan Veelo.

David Hull’s picture

Status: Needs review » Closed (fixed)

Patch applied in revision 1.20.