#======================================================# # EveryAuction Addon # Upload A Picture Add-On v1.1b #======================================================# # PiTA - Park In The Alley Software (Auction-Script.com) #======================================================# # Author: Splatt 11/20/00 # justguns.com auction-script.com compalley.com #------------------------------------------------------# # Unauthorized redistribution is prohibited!!! # The latest version of my addons can be found at: # www.auction-script.com/addons #======================================================# #======================================================# # INSTALL INSTRUCTIONS #======================================================# #======================================================# # NOTES: # - Give all directories needed full rights. # - The file will be renamed to the category + item number # For example, if the item number was 12345678 # and the category was computers, the final file name # would be computers12345678.gif. # I did this to be able to delete the file when the # auction closed, however that's not implemented yet. # - Put the upload.pl file in the same cgi-bin directory # as your auction.cgi file. #======================================================# #======================================================# #======================================================# # Changes needed to AUCTION.CGI #======================================================# #======================================================# # In your auction.cgi require and use section add the # following section. # (if you do not have that section, put these near the top) #-Image Upload-----------------------------------------# # NOTE: The $imageuploaddir MUST match the $basedir var # in the upload.pl code except for the trailing slash, # it also MUST be under your auctions base directory # otherwise you will get a permission error when trying # to write to it. # # allowupload - You might want to turn it off someday # uploadcharge - If you are using AF you can charge for this # imageuploaddir - Destination directory for storage # imageuploadurl - URL pointing to storage directory #------------------------------------------------------# use File::Copy; # needed for upload add-on $allowupload = 1; # 0 for no 1 for yes $uploadcharge = '0'; # ie -1.00 or set to zero '0' for no charge (for AccountFirst) $imageuploaddir = '/usr/www/auction/uploadedpictures'; $imageuploadurl = "http://www.yourdomain.com/auction/uploadedpictures"; #--Image Upload END------------------------------------# #======================================================# #======================================================# # Now create the $imageuploaddir directory giving full rights #======================================================# #======================================================# #======================================================# # Search for the following line: $ARGV[1] =~ s/\D//g; #======================================================# # Then REPLACE that line with the following section: #--Image Upload----------------------------------------# # $ARGV[1] =~ s/\D//g; #--Image Upload END------------------------------------# #======================================================# # Search for the following line: elsif ($ARGV[2] eq 'n') { &newitem; } #======================================================# # Then REPLACE that line with the following section: #--Image Upload----------------------------------------# # elsif ($ARGV[2] eq 'n') { &newitem; } elsif ($ARGV[2] eq 'n') { &uploadform; } elsif ($form{'picture'}) { &newitem; } elsif ($form{'pictureurl'}) { &newitem; } elsif (lc($ARGV[0]) eq 'uploaddone') { &newitem; } #--Image Upload END------------------------------------# #======================================================# # In your newitem sub search for this line: