--- imceimage.module	2011-12-07 09:16:12.000000000 -0800
+++ imceimage.module	2012-02-28 22:19:56.000000000 -0800
@@ -29,7 +29,7 @@
 
   if (($info = image_get_info($file_path)) == FALSE ) {
     $info = array();
-    $info['validimage'] = FALSE;
+    $info['validimage'] = TRUE; //CHANGED TO TRUE TO BYPASS INITIAL VALIDATION 20120228
   } else {
     $info['validimage'] = TRUE;
   }
@@ -97,7 +97,7 @@
           $error_field = $field['field_name'].']['.$delta.'][value';
           if ($item['imceimage_path'] != '') {
             //check the file for a valid image..
-            $file_path = _imceimage_image_to_filepath($item['imceimage_path']);
+            $file_path = $_SERVER['DOCUMENT_ROOT'] . parse_url($item['imceimage_path'], PHP_URL_PATH);
             if(image_get_info($file_path) == FALSE) {
               form_set_error($error_field,
                 t('%name is not a valid image or has been deleted (url: %url)', array('%name' => t($field['widget']['label']), '%file' => $file_path, '%url' => $item['imceimage_path'])));
@@ -277,7 +277,7 @@
   static $inc_js = FALSE;
   if (!$inc_js) {
     drupal_add_js(drupal_get_path('module','imceimage'). '/js/imceimage.js');
-    drupal_add_js(array('imceimage' => array('url' => url('imceimage/verify'))),'setting');
+    drupal_add_js(array('imceimage' => array('url' => url('imceimage/verify/'))),'setting');
     $inc_js = TRUE;
   }
 
@@ -297,17 +297,17 @@
 }
 
 
-function _imceimage_image_html($item, $id) {
+function _imceimage_image_html($item, $class) {
   return theme_imceimage_image($item['imceimage_path'], $item['imceimage_width'],
     $item['imceimage_height'], $item['imceimage_alt'], $item['imceimage_title'],
-    $id);
+    $class);
 }
 
 
 /**
  * Theme an image
  */
-function theme_imceimage_image($path, $width = '', $height = '', $alt = '', $title = '', $id = '') {
+function theme_imceimage_image($path, $width = '', $height = '', $alt = '', $title = '', $class = '') {
 
   //if is a blank image - deliver a blank image
   if ($path == '' || empty($path)) {
@@ -315,7 +315,7 @@
   }
 
   //make sure that this is a valid image..
-  $file_path = _imceimage_image_to_filepath($path);
+  $file_path = $_SERVER['DOCUMENT_ROOT'] . parse_url($path, PHP_URL_PATH);
 
   if(($info = image_get_info($file_path)) == false ) {
     $path = base_path() . drupal_get_path('module', 'imceimage') . '/images/warning.png';
@@ -327,10 +327,10 @@
   $path = 'src="' . $path . '" ';
   $alt = 'alt="' . $alt . '" ';
   $title = 'title="' . $title . '"';
-  $id = !empty($id) ? 'id="' . $id . '" ' : '';
+  $class = !empty($class) ? 'class="' . $class . '" ' : '';
   $width = !empty($width) ? 'width="' . $width . '" ' : '';
   $height = !empty($height) ? 'height="' . $height . '" ' : '';
-  return '<img '. $path . $alt . $title . $width . $height . $id . '/>';
+  return '<img '. $path . $alt . $title . $width . $height . $class . '/>';
 }
 
 
@@ -358,9 +358,9 @@
   $item = $element['#item'];
   $field = $element['#field_name'];
   $delta = $element['#delta'];
-  $id = "imceimage-$field-thumb";
+  $class = "imceimage-$field-thumb";
   $thumb = _imceimage_get_thumb($item);
-  return _imceimage_image_html($thumb, $id);
+  return _imceimage_image_html($thumb, $class);
 }
 
 
@@ -403,9 +403,9 @@
   $item = $element['#item'];
   $field = $element['#field_name'];
   $delta = $element['#delta'];
-  $id = "imceimage-" . $field;
+  $class = "imceimage-" . $field;
   if ($item['imceimage_path']) {
-    return _imceimage_image_html($item, $id);
+    return _imceimage_image_html($item, $class);
   }
   else {
     return '';
@@ -420,9 +420,9 @@
   $item = $element['#item'];
   $field = $element['#field_name'];
   $delta = $element['#delta'];
-  $id = "imceimage-". $field;
+  $class = "imceimage-". $field;
   if ($item['imceimage_path']) {
-    $image = _imceimage_image_html($item, $id);
+    $image = _imceimage_image_html($item, $class);
     $caption = $item['imceimage_alt'];
     return '<div class="image-with-caption"><div class="image">' . $image . '</div><div class="caption">' . $caption . '</div></div>';
   }
