soweit so gut, ich will dass dieser code also dass die bilder resized werden) bei allen categorien des album greift, außer bei der categorie mit der id 15.
wie muss ich des ändern?
Code: Alles auswählen
#
#-----[ OPEN ]-------------------------------------------------------
#
album_upload.php
#
#-----[ FIND ]----------------------------------------
#
// --------------------------------
// Check Pic Approval
// --------------------------------
$pic_approval = ($thiscat['cat_approval'] == 0) ? 1 : 0;
#
#-----[ BEFORE, ADD ]----------------------------------
#
// --------------------------------------
// OK lets resize the original picture
// --------------------------------------
if(($pic_filetype != '.gif') and ($album_config['gd_version'] > 0))
{
$gd_errored = FALSE;
switch ($pic_filetype)
{
case '.jpg':
$read_function = 'imagecreatefromjpeg';
break;
case '.png':
$read_function = 'imagecreatefrompng';
break;
}
$src = @$read_function(ALBUM_UPLOAD_PATH . $pic_filename);
if (!$src)
{
$gd_errored = TRUE;
$pic_resize = '';
}
else if( ($pic_width > $album_config['resize_width']) or ($pic_height > $album_config['resize_height']) )
{
// Resize it
if ( (($pic_width / $pic_height) > ($album_config['resize_width'] / $album_config['resize_height'])) )
{
$resize_width = $album_config['resize_width'];
$resize_height = $album_config['resize_width'] * ($pic_height/$pic_width);
}
else
{
$resize_height = $album_config['resize_height'];
$resize_width = $album_config['resize_height'] * ($pic_width/$pic_height);
}
$resize = ($album_config['gd_version'] == 1) ? @imagecreate($resize_width, $resize_height) : @imagecreatetruecolor($resize_width, $resize_height);
$resize_function = ($album_config['gd_version'] == 1) ? 'imagecopyresized' : 'imagecopyresampled';
@$resize_function($resize, $src, 0, 0, 0, 0, $resize_width, $resize_height, $pic_width, $pic_height);
}
else
{
$resize = $src;
}
if (!$gd_errored)
{
$pic_resize = $pic_filename;
// Write to disk
switch ($pic_filetype)
{
case '.jpg':
@imagejpeg($resize, ALBUM_UPLOAD_PATH . $pic_resize, $album_config['resize_quality']);
break;
case '.png':
@imagepng($resize, ALBUM_UPLOAD_PATH . $pic_resize);
break;
}
@chmod(ALBUM_UPLOAD_PATH . $pic_resize, 0777);
} // End IF $gd_errored
} // End Picture Resize
