Project:Image filter
Version:master
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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

#1

Status:active» fixed

Thanks 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.

#2

Status:fixed» closed (fixed)