--- D:\src\drupal\5.0\modules\inline\inline.module Sat Jul 5 00:20:40 2008 UTC +++ D:\src\htdocs\drupal5\modules\inline\inline.module Thu Jul 24 16:31:13 2008 UTC @@ -316,14 +316,15 @@ /** * Return HTML for an image. */ -function theme_inline_img($file, $field) { +function theme_inline_img($file, $field, $preset = false) { // Prepare link text with inline title, file description or filename. $title = (!empty($file->title) ? $file->title : (!empty($file->description) ? $file->description : $file->filename)); $inline_preset = $field == 'teaser' ? 'inline_teaser_preset' : 'inline_full_preset'; - if (module_exists('imagecache') && variable_get($inline_preset, '') != '') { + $preset = !$preset ? variable_get($inline_preset, '') : $preset; + if (module_exists('imagecache') && $preset != '') { $image = theme('imagecache', - variable_get($inline_preset, ''), + $preset, $file->filepath, $title, $title, @@ -446,7 +447,7 @@ * The processed content of the given node field. */ function _inline_substitute_tags(&$node, $field) { - if (preg_match_all("/\[(inline|file|attachment):([^=\\]]+)=?([^\\]]*)?\]/i", $node->$field, $match)) { + if (preg_match_all("/\[(inline|file|attachment):([^=\\]]+)=?([^\=\\]]*){0,1}=?([^\\]]*)?\]/i", $node->$field, $match)) { $s = $r = array(); foreach ($match[2] as $key => $value) { // Ensure that we deal with a file object. @@ -459,7 +460,7 @@ } // Decide whether to show a link or an image tag. if (_inline_decide_img_tag($file)) { - $replace = theme('inline_img', $file, $field); + $replace = theme('inline_img', $file, $field, $match[4][$key]); } else { $replace = theme('inline_as_link', $file);