Index: image_filter.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/image_filter/image_filter.module,v
retrieving revision 1.3
diff -u -r1.3 image_filter.module
--- image_filter.module 12 Nov 2004 00:59:24 -0000 1.3
+++ image_filter.module 15 Nov 2004 11:05:32 -0000
@@ -94,7 +94,7 @@
}
- // *** New syntax: [image:node_id (left|right|top|middle|bottom|absmiddle|texttop|baseline) hspace=n vspace=n border=n width=n height=n]
+ // *** New syntax: [image:node_id (left|right|top|middle|bottom|absmiddle|texttop|baseline) hspace=n vspace=n border=n width=n height=n class=x]
if (preg_match_all('/\[image:(\d+)\w?(.*?)?\]/i', $text, $match)) {
@@ -121,6 +121,8 @@
$img->width = $m[1];
preg_match("/height=\"?(\d+)\"?/i", $match[2][$n], $m);
$img->height = $m[1];
+ preg_match("/class=\"?(\w+)\"?/i", $match[2][$n], $m);
+ $img->class = $m[1];
$match[10][$n] = theme("image_inline_img", $img);
}
@@ -147,7 +149,7 @@
* Displays a thumbnail with a link to the image.
*/
function theme_image_inline_img($img) {
- return l('
nid", 'res=' . $img->width . "x$img->height") : url("$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");
+ return l('
nid", 'res=' . $img->width . "x$img->height") : url("$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\"" . ($img->class ? " class=\"$img->class\"" : '') . " />", "node/$img->nid");
}
?>