Here's a way to do the thumbnails using vB's function for creating the thumbnails in threads... You have to write a temp file for the image function to work from, not a big deal... I used all the vB variables for the temp directory and such.
Code:
if (!empty($_FILES['src']['tmp_name'])) {
require_once('./includes/functions_image.php');
$name = $_FILES['src']['name'];
$data = addslashes(fread(fopen($_FILES['src']['tmp_name'], "r"), filesize($_FILES['src']['tmp_name'])));
$type = $_FILES['src']['type'];
$filename = tempnam(ini_get('upload_tmp_dir'), 'tmpimg');
$fp = @fopen($filename, 'wb');
@fwrite($fp, stripslashes($data));
@fclose($fp);
$attachment[tmp_name] = $filename;
$attachment[name] = $name;
$thumb = addslashes(fetch_thumbnail_from_image($attachment,$imageerror));
@unlink($filename);
// insert into DB table here...
}