| 1 |
<?php |
<?php |
| 2 |
// $Id: image_filter.module,v 1.24 2007/10/15 01:28:18 davidhull Exp $ |
// $Id: image_filter.module,v 1.25 2007/10/15 04:41:29 davidhull Exp $ |
| 3 |
|
|
| 4 |
function image_filter_short_tip_translated() { |
function image_filter_short_tip_translated() { |
| 5 |
return t( |
return t( |
| 185 |
$img->link = $args['nolink'] |
$img->link = $args['nolink'] |
| 186 |
? NULL |
? NULL |
| 187 |
: ($linkid ? "node/$linkid" : "node/$img->nid"); |
: ($linkid ? "node/$linkid" : "node/$img->nid"); |
| 188 |
|
$img->caption = isset($args['caption']) |
| 189 |
|
? image_filter_attr_value($args['caption'], IMAGE_FILTER_STRING) |
| 190 |
|
: NULL; |
| 191 |
|
|
| 192 |
$img_tag = theme("image_inline_img", $img); |
$img_tag = theme("image_inline_img", $img); |
| 193 |
$text = str_replace($match[0], $img_tag, $text); |
$text = str_replace($match[0], $img_tag, $text); |
| 202 |
* Displays a thumbnail with a link to the image. |
* Displays a thumbnail with a link to the image. |
| 203 |
*/ |
*/ |
| 204 |
function theme_image_inline_img($img) { |
function theme_image_inline_img($img) { |
| 205 |
|
drupal_add_css(drupal_get_path('module', 'image_filter') .'/image_filter.css'); |
| 206 |
|
|
| 207 |
$imgtag = "<img src=\"$img->fileurl\"" . |
$imgtag = "<img src=\"$img->fileurl\"" . |
| 208 |
($img->width ? " width=\"$img->width\"" : '') . |
($img->width ? " width=\"$img->width\"" : '') . |
| 209 |
($img->height ? " height=\"$img->height\"" : '') . |
($img->height ? " height=\"$img->height\"" : '') . |
| 215 |
" title=\"$img->title\"" . |
" title=\"$img->title\"" . |
| 216 |
($img->class ? " class=\"$img->class\"" : '') . |
($img->class ? " class=\"$img->class\"" : '') . |
| 217 |
($img->style ? " style=\"$img->style\"" : '') . " />"; |
($img->style ? " style=\"$img->style\"" : '') . " />"; |
| 218 |
return ($img->link |
if ($img->link) { |
| 219 |
? l($imgtag, $img->link, array(), NULL, NULL, TRUE, TRUE) |
$imgtag = l($imgtag, $img->link, array(), NULL, NULL, TRUE, TRUE); |
| 220 |
: $imgtag); |
} |
| 221 |
|
if (isset($img->caption)) { |
| 222 |
|
$imgtag = "<div class=\"image_filter\">$imgtag<br />" . |
| 223 |
|
"<div class=\"if_caption\">$img->caption</div></div>"; |
| 224 |
|
} |
| 225 |
|
return $imgtag; |
| 226 |
} |
} |
| 227 |
|
|
| 228 |
// Local Variables: |
// Local Variables: |