Oh here is the file I use (the changes are noted with // CHANGED HERE):
--------------------------------------------------------------------
<?
require("global.php");
// Editable variables
$full_path = "/home/httpd/html/pbreview.com/fpics/"; // full path to directory that you want to store the images in - directory must be CHMOD to 777
$filesize = "102400"; // this is the max file size that you'd like uploaded
// Initialize date and time variables
// These are inserted into the image URL to ensure unique names
$date = (date ("mdy")); // format looks like 121700 - Month, Day, Year
$time = (date ("His")); // format looks like 214521 - Hours, Minutes Seconds
// Check that the user has permission to post/upload
if ($bbuserid == 0)
{
eval("echo standarderror(\$bbtitle,\"".gettemplate("error_nop ermission")."\");");
exit;
}
if ($bbusername == "" || (isset($bbusername))==0)
{
$getusername=$DB_site->query_first("SELECT username FROM user WHERE userid=$bbuserid");
$username=$getusername[username];
$bbusername = $username;
}
else
{
$username = $bbusername;
}
// Check file size
if ($userfile_size > $filesize) {
print "<font face=\"arial\" size=\"-1\"><b>Your file is too large. Please <a href=\"javascript
:history.back()\"><font color=\"#FF9900\">click here</font></a> to go back and try again.</b></font>";
exit;
}
// CHANGED HERE
if ($userfile_type == "image/gif" or $userfile_type == "image/pjpeg" or $userfile_type == "image/jpeg") {
// END CHANGED HERE
// Copy the uploaded file to the proper directory
if (copy ($userfile, "$full_path$username$date$time$userfile_name") ) {
// Initialize BBCode tags for use in the Image URL - I know this is a cheap way to do this, but I was rushing :-)
$open_img_tag = "

";
// Remove the temp file from the server
unlink ($userfile);
// Begin User Code Presentation Page
print "<font face=\"arial\" size=\"-1\"><b><p>Copy the following code (from

) and insert it into your post:</p>";
print "<font face=\"arial\" size=\"-1\"><b><p><form><input type=\"text\" size=\"50\" value=\"" . $open_img_tag . "http://www.pbreview.com/fpics/$username$date$time$userfile_name$close_img_tag\"> </form></p>";
print "<font face=\"arial\" size=\"-1\"><b><p><a href=\"javascript
:self.close()\"><font color=\"#FF9900\">Close This Window</font></a></p>";
print "<font face=\"arial\" size=\"-1\"><b><p><a href=\"http://www.pbreview.com/fpics/$username$date$time$userfile_name\" target=\"_blank\"><font color=\"#FF9900\">Click here to preview your image</font></font></a></p>";
}
// CHANGED HERE
} else {
printf("<font face=\"arial\" size=\"-1\"><b>Illegal file type. It has to be a jpg or gif. Please <a href=\"javascript
:history.back()\"><font color=\"#FF9900\">click here</font></a> to go back and try again.");
}
//END CHANGED HERE
?>
------------------------------------------------------------
Also make sure to take out the old statement that checks for file type!