회원 아이콘 크기 정보
회원 아이콘 크기본문
안녕하세요 . 회원 아이콘 크기를 제한하지말고 자유자제로 나타내게 하고싶은데요
어떻게하면되죠 ㅠㅠ 팁(tip) 에 유디 님께서 올리주신 팁은 ...에러만나서요 ㅠㅠ
많은 조언부탁드립니다 . 꾸벅
댓글 전체
수정전
if (file_exists($dest_path))
{
$size = getimagesize($dest_path);
// 이미지의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 이미지 삭제
if ($size[0] > $config[cf_member_photo_width] || $size[1] > $config[cf_member_photo_height])
@unlink($dest_path);
}
수정후
if (file_exists($dest_path))
{
$size = getimagesize($dest_path);
// 이미지의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 이미지 리사이즈
if ($size[0] > $config[cf_member_photo_width] || $size[1] > $config[cf_member_photo_height]) {
$width = $config[cf_member_photo_width];
$height = $config[cf_member_photo_height];
$cfile = imagecreatefromjpeg($dest_path);
$dest = imagecreatetruecolor($width, $height);
imagecopyresampled($dest, $cfile, 0, 0, 0, 0, $width, $height, $size[0], $size[1]);
imagejpeg($dest, $dest_path, 90); }
}
====================================================================
ㅇ이거요... 이걸 적용해봣는데 에러가 나요 ㅠㅠ .
if (file_exists($dest_path))
{
$size = getimagesize($dest_path);
// 이미지의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 이미지 삭제
if ($size[0] > $config[cf_member_photo_width] || $size[1] > $config[cf_member_photo_height])
@unlink($dest_path);
}
수정후
if (file_exists($dest_path))
{
$size = getimagesize($dest_path);
// 이미지의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 이미지 리사이즈
if ($size[0] > $config[cf_member_photo_width] || $size[1] > $config[cf_member_photo_height]) {
$width = $config[cf_member_photo_width];
$height = $config[cf_member_photo_height];
$cfile = imagecreatefromjpeg($dest_path);
$dest = imagecreatetruecolor($width, $height);
imagecopyresampled($dest, $cfile, 0, 0, 0, 0, $width, $height, $size[0], $size[1]);
imagejpeg($dest, $dest_path, 90); }
}
====================================================================
ㅇ이거요... 이걸 적용해봣는데 에러가 나요 ㅠㅠ .
lib/common.php 852~854라인
수정 전
$width = $config['cf_member_icon_width'];
$height = $config['cf_member_icon_height'];
$tmp_name = "<img src='$icon_file' width='$width' height='$height' align='absmiddle' border='0'>";
수정 후
//$width = $config['cf_member_icon_width'];
//$height = $config['cf_member_icon_height'];
$tmp_name = "<img src='$icon_file' align='absmiddle' border='0'>";
참고한 내용
- 회원사진 추가하기 2 (http://www.morssola.com/bbs/tb.php/1021_g4web/20)
수정 전
$width = $config['cf_member_icon_width'];
$height = $config['cf_member_icon_height'];
$tmp_name = "<img src='$icon_file' width='$width' height='$height' align='absmiddle' border='0'>";
수정 후
//$width = $config['cf_member_icon_width'];
//$height = $config['cf_member_icon_height'];
$tmp_name = "<img src='$icon_file' align='absmiddle' border='0'>";
참고한 내용
- 회원사진 추가하기 2 (http://www.morssola.com/bbs/tb.php/1021_g4web/20)
깜찍한악마 님 우선 답변 감사합니다 ^^* 꾸벅
그리고 저위에 유디님 팁적용하고 그걸 적용해야 되나요 ?
아님 그것만?
그리고 저위에 유디님 팁적용하고 그걸 적용해야 되나요 ?
아님 그것만?
깜찍한악마님 감 사합니다 ^^* 잘이용하고잇습니다.