--- /home/eric/Desktop/contrib/img_assist-4.7.0/img_assist/img_assist.module 2006-05-04 18:01:38.000000000 -0700 +++ /home/eric/demonlime/modules/contrib/img_assist/img_assist.module 2006-06-01 18:45:35.000000000 -0700 @@ -1242,9 +1242,14 @@ function img_assist_render_image($attrib $width = $attributes['width'] ? $attributes['width'] : $image->width; $height = $attributes['height'] ? $attributes['height'] : $image->height; - $src = file_create_url($image->filepath); + $src = file_create_url($attributes['thumb'] ? $image->thumbpath : $image->filepath); $class = $attributes['class'] ? $attributes['class'] : 'image'; + if ($attributes['thumb']) { + $width = $image->thumbwidth; + $height = $image->thumbheight; + } + $img_template = theme('img_assist_legacy'); $img_template = strtr($img_template, array('%caption' => $attributes['caption'], '%node-link' => url("node/$image->nid"), '%nid' => $image->nid, '%img-link' => $image->filepath, '%alt' => check_plain($attributes['alt']), '%width' => $width, '%height' => $height, '%src' => $src, '%image-class' => $class)); @@ -1525,6 +1530,7 @@ function img_assist_load_images($tid = n $result = db_query(db_rewrite_sql("SELECT n.nid, n.title, r.teaser, f.* FROM {node} n INNER JOIN {node_revisions} r ON r.nid = n.nid AND r.vid = n.nid INNER JOIN {files} f ON n.nid = f.nid AND n.type = 'image' ". $where ." ORDER BY n.changed DESC")); while ($node = db_fetch_object($result)) { $node->filepath = file_create_path($node->filepath); + _img_assist_get_thumbnail($node); $dim = getimagesize($node->filepath, $info); $node->width = $dim[0]; $node->height = $dim[1]; @@ -1548,6 +1554,7 @@ function img_assist_load_images($tid = n $result = db_query(db_rewrite_sql("SELECT n.nid, n.title, r.teaser, f.* FROM {files} f, {node} n INNER JOIN {node_revisions} r ON r.nid = n.nid AND r.vid = n.nid WHERE f.nid = n.nid AND f.filemime LIKE 'image/%%' AND n.nid NOT IN (". implode(array_keys($image), ', ') .") ". $where ." ORDER BY n.changed DESC")); while ($node = db_fetch_object($result)) { $node->filepath = file_create_path($node->filepath); + _img_assist_get_thumbnail($node); $dim = getimagesize($node->filepath, $info); $node->width = $dim[0]; $node->height = $dim[1]; @@ -1579,6 +1586,7 @@ function img_assist_load_image($id, $der //$node = db_fetch_object(db_query(db_rewrite_sql('SELECT n.nid, n.title, r.teaser, f.* FROM {files} f, {node} n INNER JOIN {node_revisions} r ON r.nid = n.nid AND r.vid = n.nid WHERE f.nid = n.nid AND f.fid = %d'), $id)); $node = db_fetch_object(db_query(db_rewrite_sql('SELECT n.nid, n.title, f.* FROM {files} f, {node} n WHERE f.nid = n.nid AND f.fid = %d'), $id)); $node->filepath = file_create_path($node->filepath); + _img_assist_get_thumbnail($node); if (!$derivatives) { $dim = getimagesize($node->filepath, $info);