At line 665 in the 1.90 revision of image.module, this line appears:

        $match[10][$n] = theme("image_inline_img", $img);

Function image_inline_img() in image.module never gets called and does not exist anywhere else. As a result, an [image:##] link does not get replaced with the appropriate HTML to display the image. Blank is displayed instead.

I'm not familiar enough with the new theme system, but it seems like it is perhaps not being used appropriately here or something. If I hack the code to just call image_inline_img($img) directly instead of through the hook, the page displays correctly.

Comments

TDobes’s picture

Assigned: Unassigned » TDobes

Right you are. I must have missed renaming a couple of functions when I upgraded image.module to CVS. Sorry about that. I've written a patch below, and I will mail it to Bruno as well to be applied to CVS.

...and just FYI: the theme() function now prepends "theme_" (actually, it looks for the current theme name first) on the functions it calls... so theme("myfunction") would call theme_myfunction()... I just missed renaming these themed functions.

Index: image.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/image/image.module,v
retrieving revision 1.90
diff -u -r1.90 image.module
--- image.module 8 Dec 2003 20:18:01 -0000 1.90
+++ image.module 12 Dec 2003 06:18:27 -0000
@@ -1384,12 +1384,12 @@
return $output;
}

-function image_inline_img($img) {
+function theme_image_inline_img($img) {
global $base_url;
return l("Only local images are allowed.thumb_path\" align=\"$img->align\" border=\"$img->border\" hspace=\"$img->hspace\" vspace=\"$img->vspace\" alt=\"$img->teaser\" />", "node/view/$img->nid");
}

-function image_thumb_browser($data) {
+function theme_image_thumb_browser($data) {
if ($data) {
$output = '


bruno’s picture

Patch commited to CVS. Thanks Tom!

Anonymous’s picture