Closed (fixed)
Project:
Image filter
Version:
master
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Jan 2007 at 03:05 UTC
Updated:
20 Feb 2007 at 06:03 UTC
Using image_filter.module,v 1.21 2006/06/20 (HEAD) on PHP 5.1.6, Drupal 4.7 I found that images displayed via image_filter were always being wrapped in a link. $args['nolink'] was returning true irrespective of nolink=1 or nolink=0 in the image_filter macro text.
I fixed it with the following code.
image_filter.module (working copy)
@@ -184,10 +184,11 @@
$img->class = image_filter_attr_value($args['class'], IMAGE_FILTER_WORD);
$img->style = image_filter_attr_value($args['style'], IMAGE_FILTER_STRING);
$linkid = image_filter_attr_value($args['node'], IMAGE_FILTER_INTEGER);
- $img->link = $args['nolink'] ? NULL :
- $linkid ? "node/$linkid" :
- "node/$img->nid";
-
+ if ($args['nolink']) {
+ $img->link = NULL;
+ } else {
+ $img->link = $linkid ? "node/$linkid" : "node/$img->nid";
+ }
$img_tag = theme("image_inline_img", $img);
$text = str_replace($match[0], $img_tag, $text);
}
Is this module still being maintained?
Comments
Comment #1
David Hull commentedThanks for the fix. It has been applied in the HEAD and will be published soon.
I've been maintaining image_filter for year or so, but it's a very low priority for me and I don't check the Drupal web site often. Sorry about that.
Comment #2
(not verified) commented