This function is completly wrong:
function theme_image_inline_img($img) {
return l('
width || $img->height ? url("image/view/$img->nid", 'res=' . $img->width . "x$img->height") : "$base_url/$img->thumb_path") . '"' . ($img->width ? " width=\"$img->width\"" : '') . ($img->height ? " height=\"$img->height\"" : NULL) . ($img->align ? " align=\"$img->align\"" : '') . ($img->border ? " border=\"$img->border\"" : '') . ($img->hspace ? " hspace=\"$img->hspace\"" : '') . ($img->vspace ? " vspace=\"$img->vspace\"" : '') . " alt=\"$img->title\" />", "node/$img->nid");
}
Please give this a especial attention.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | image_filter.module.diff | 2.51 KB | aries |
Comments
Comment #1
mrowe commentedWould you care to be a little more explicit about exactly how it is wrong, and what should be done to fix it?
Comment #2
aries commentedIt's not the answer of the above, but I think the theme_ function should use CSS tags everywhere it can, because most of the themes using xHTML 1.0 or 1.1 strict, where these attributes like "align" or "vspace" are not present, and of course they are depend on the media type (eg. print, screen, etc.)
Comment #3
aries commentedHere's a patch. This is my first one, so it can be buggy =)
Comment #4
David Hull commentedIf you use the "new"-style image code, you can write
[image:nodeid class="classname"](but there is currently no way to specify an inline style).Comment #5
David Hull commentedChange title from "Thumb theme function error" to better describe what remains to be done.
Comment #6
David Hull commentedI added the ability to write
[image:nodeid style="style data"]to image_filter in CVS.Comment #7
(not verified) commented