tampabob
Posts: 7
Sat Nov 24, 2007 9:23 pm
I downloaded this version of NukeC30. The individual that made changes to fix problems left many errors in the code. I fixed all of them except the uploading of images. The 2 sites that originally wrote and patched this code had forums, which they took down because they wanted to charge people for the fixes and the forum was filling up with complaints.
This code in postads.php I had to block just to be able to have the text of the ad post. My php.ini allows upload of images and files max size 32M.
//* if ($UploadImg && ($fileupload != "") && ($fileupload != "none")) {
//* $imageadstype = basename($fileupload_type);
//* $UploadImageType = getImgType();
//* if (!in_array($imageadstype,$UploadImageType)) $errorImageType = 1;
//* if (($imageadstype != "jpeg") && ($imageadstype != "jpg") && ($imageadstype != "pjpeg")) {
//*
//* $ImageUkuran = @getimagesize($fileupload);
//* if ($ImageUkuran) {
//* if ($ImageUkuran[0] > $MaxImgWidth) {
//* $ErrorUkuranImage = 1;
//* $ErrorUkuranImageWidth = 1;
//* }
//* if ($ImageUkuran[1] > $MaxImgHeight) {
//* $ErrorUkuranImage = 1;
//* $ErrorUkuranImageHeight = 1;
//* }
//* } else {
//* $ErrorUkuranImage = 0;
//* }
//* }
//* }
tampabob
Posts: 7
Sun Nov 25, 2007 1:33 am
I fixed it finally!!!!! The code in red is what I added or changed
function SubmitAds($submitteruid,$title, $cdesc, $catgforprocess, $AdsCurr, $price, $website, $email, $city, $state, $country, $postfor, $fileupload, $adslanguage, $fileupload, $fileupload_name, $fileupload_type, $fileupload_size) {
global $nukecprefix,$dbi,$folder_name, $module_name, $multilingual, $currentlang;
global $AdsTitleLength, $AdsContentLength, $MemberRequired, $PostInMainCatg, $cookie, $user, $UploadImg,$Waiting;
global $anonymous;
global $UploadPath,$cookie,$user,$DescLength,$UploadImg, $MaxImgSize, $MaxImgHeight, $MaxImgWidth,$MaxAllowedAds;
[b]$fileupload_size = $fileupload['size'];
$fileupload_type = $fileupload['type'];
$fileupload_name = $fileupload['name'];
$fileupload = $fileupload['tmp_name'];
/* echo "1: "; print_r($fileupload);
echo "2: "; print_r($fileupload_name);
echo "3: "; print_r($fileupload_type);
echo "4: "; print_r($fileupload_size);*/[/b]
if ($submitteruid != 1) {
-----------------------------------------------------------------------------------
if ($UploadImg && ($fileupload != "") && ($fileupload != "none")) {
// $imageadstype = basename($fileupload_type);
$imageadstype = substr( strstr($fileupload_type, "/"), 1);
$UploadImageType = getImgType();
if (!in_array($imageadstype,$UploadImageType)) $errorImageType = 1;
if ( $imageadstype != "jpeg" ) {
$ImageUkuran = @getimagesize($fileupload);
if ($ImageUkuran) {
if ($ImageUkuran[0] > $MaxImgWidth) {
$ErrorUkuranImage = 1;
$ErrorUkuranImageWidth = 1;
}
if ($ImageUkuran[1] > $MaxImgHeight) {
$ErrorUkuranImage = 1;
$ErrorUkuranImageHeight = 1;
}
} else {
$ErrorUkuranImage = 1;
}
}
}
tampabob wrote: |
I downloaded this version of NukeC30. The individual that made changes to fix problems left many errors in the code. I fixed all of them except the uploading of images. The 2 sites that originally wrote and patched this code had forums, which they took down because they wanted to charge people for the fixes and the forum was filling up with complaints.
This code in postads.php I had to block just to be able to have the text of the ad post. My php.ini allows upload of images and files max size 32M.
//* if ($UploadImg && ($fileupload != "") && ($fileupload != "none")) {
//* $imageadstype = basename($fileupload_type);
//* $UploadImageType = getImgType();
//* if (!in_array($imageadstype,$UploadImageType)) $errorImageType = 1;
//* if (($imageadstype != "jpeg") && ($imageadstype != "jpg") && ($imageadstype != "pjpeg")) {
//*
//* $ImageUkuran = @getimagesize($fileupload);
//* if ($ImageUkuran) {
//* if ($ImageUkuran[0] > $MaxImgWidth) {
//* $ErrorUkuranImage = 1;
//* $ErrorUkuranImageWidth = 1;
//* }
//* if ($ImageUkuran[1] > $MaxImgHeight) {
//* $ErrorUkuranImage = 1;
//* $ErrorUkuranImageHeight = 1;
//* }
//* } else {
//* $ErrorUkuranImage = 0;
//* }
//* }
//* } |
Back-Lash
Posts: 3028
Location: Sneads Ferry NC
Sun Nov 25, 2007 8:11 am
I am glad I just speak "Southern English"
_________________
USCG Master Captain
####2016 #1 SKA Division 9 Single Engine ###
####1 SKA Division 9 Senior Angler
### 2015 SKA National Champion
#3 2015 & 2014 SKA Division 9
300 4 stroke Yamaha Powered 23ft Contender
American Heart Association , USCG
Capt_Dave
Posts: 12331
Location: Cape Fear, NC
Mon Nov 26, 2007 2:53 am
NukeC is Buggy as hell. It took me several days to get it to even half way work.
I was off fishing when you posted but I'm glad you got it working.
Dave
_________________
Captain Dave Tilley
910-264-3973
Let\'s go kill something!
Carolina Beach Fishing Charters
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
NukeC30 (3.7) - SaltwaterCentral.Com