Index: modules/inline/inline.theme.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/inline/inline.theme.inc,v
retrieving revision 1.2
diff -u -r1.2 inline.theme.inc
--- modules/inline/inline.theme.inc	17 Aug 2008 14:43:39 -0000	1.2
+++ modules/inline/inline.theme.inc	30 Dec 2008 23:45:57 -0000
@@ -24,13 +24,33 @@
   $title = (!empty($file->title) ? $file->title : (!empty($file->description) ? $file->description : $file->filename));
   $inline_preset = $field == 'teaser' ? 'inline_teaser_preset' : 'inline_full_preset';
 
+        $titleArr = explode('|',$file->title);
+        $file->title = trim(array_shift($titleArr),"\x22\x27");
+        foreach($titleArr as $title) {
+          if (strpos($title,"=")>0) {
+            $pos = strpos($title,"=");
+            $attrkey = trim(substr($title,0,$pos));
+            $attrvalue = trim(substr($title,$pos+1));
+          } else {
+            $attrkey = "class";
+            $attrvalue = $title;
+          }
+          if ($file->attributes[$attrkey]) $file->attributes[$attrkey] .= ' ';
+          $file->attributes[$attrkey] = trim($attrvalue,"\x22\x27"); //trims quotes
+        }
+
+  // adds inline class
+  if ($imgAttributes = $file->attributes && $imgAttributes['class']!="") {
+    $imgAttributes['class'] .= ' inline';
+  } else $imgAttributes['class'] = 'inline';
+
   if (module_exists('imagecache') && variable_get($inline_preset, '') != '') {
     $image = theme('imagecache',
       variable_get($inline_preset, ''),
       $file->filepath,
       $title,
       $title,
-      array('class' => 'inline')
+      $imgAttributes
     );
   }
   else {
@@ -38,7 +58,7 @@
       $file->filepath,
       $title,
       $title,
-      array('class' => 'inline')
+      $imgAttributes
     );
   }
 
