그림장수님의 <웹버스 멀티게시판 기본형 A1.0 [EUC-KR] >스킨- 설치오류 정보
그림장수님의 <웹버스 멀티게시판 기본형 A1.0 [EUC-KR] >스킨- 설치오류관련링크
본문
http://www.paradisefarm.co.kr/bbs/board.php?bo_table=boad3
그림장수님의 <웹버스 멀티게시판 기본형 A1.0 [EUC-KR] >스킨을 다운받아 utf_8로
바꾸어서 게시판에 적용하니까 Fatal error: Cannot redeclare thumbnail() in /home/hosting_users/nakwon0325/www/skin/board/basic2011multitap/lib/skin.lib.php on line 60 이 나옵니다. 어떻게 해야 하나요?
꼭 도움 주세요. 여기저기 족지 보내도 답이 없어 그러서 고수님들의 도움을 요청합니다..
그림장수님의 <웹버스 멀티게시판 기본형 A1.0 [EUC-KR] >스킨을 다운받아 utf_8로
바꾸어서 게시판에 적용하니까 Fatal error: Cannot redeclare thumbnail() in /home/hosting_users/nakwon0325/www/skin/board/basic2011multitap/lib/skin.lib.php on line 60 이 나옵니다. 어떻게 해야 하나요?
꼭 도움 주세요. 여기저기 족지 보내도 답이 없어 그러서 고수님들의 도움을 요청합니다..
댓글 전체
thumbnail
생성코드가 있는거 같은데 실행을 못하고 있습니다..
skin.lib.php이것을 확인해 보시기 바랍니다.
생성코드가 있는거 같은데 실행을 못하고 있습니다..
skin.lib.php이것을 확인해 보시기 바랍니다.
60라인에는 아래와같은 코드중에 무엇을 손봐야하는지 모르겠습니다. 도움 부탁드립니다.
function thumbnail($exist, $creat, $width, $height, $fail = null)
{
if(is_file($exist) == true && in_array(strtolower(end(explode('.', $exist))), array('gif', 'jpg', 'jpeg', 'png')) == true)
{
if(file_exists($creat) == false)
{
list($img['width'], $img['height'], $img['type']) = getimagesize($exist);
if($img['width'] > $width || $img['height'] > $height)
{
if($img['width'] > $img['height'])
{
$dst['width'] = $width;
$dst['height'] = ceil(($width / $img['width']) * $img['height']);
}
else if($img['height'] > $img['width'])
{
$dst['width'] = ceil(($height / $img['height']) * $img['width']);
$dst['height'] = $height;
}
else
{
$dst['width'] = $width;
$dst['height'] = $height;
}
}
else
{
$dst['width'] = $img['width'];
$dst['height'] = $img['height'];
}
$dst['width'] = $width;
$dst['height'] = $height;
if($width > $dst['width'])
{
$dst['x'] = ceil(($width - $dst['width']) / 2);
}
else
{
$dst['x'] = 0;
}
if($height > $dst['height'])
{
$dst['y'] = ceil(($height - $dst['height']) / 2);
}
else
{
$dst['y'] = 0;
}
switch($img['type'])
{
case '1' :
$src['image'] = imagecreatefromgif($exist);
$dst['image'] = imagecreate($width, $height);
break;
case '2' :
$src['image'] = imagecreatefromjpeg($exist);
$dst['image'] = imagecreatetruecolor($width, $height);
break;
case '3' :
$src['image'] = imagecreatefrompng($exist);
$dst['image'] = imagecreatetruecolor($width, $height);
break;
}
$src['width'] = imagesx($src['image']);
$src['height'] = imagesy($src['image']);
$dst['color'] = imagecolorallocate($dst['image'], 255, 255, 255);
imagefilledrectangle($dst['image'], 0, 0, $width, $height, $dst['color']);
imagecopyresampled($dst['image'], $src['image'], $dst['x'], $dst['y'], 0, 0, $dst['width'], $dst['height'], $src['width'], $src['height']);
switch($img['type'])
{
case '1' :
imagegif($dst['image'], $creat);
break;
case '2' :
imagejpeg($dst['image'], $creat, 100);
break;
case '3' :
imagepng($dst['image'], $creat, 100);
break;
}
imagedestroy($src['image']);
imagedestroy($dst['image']);
}
$return = "<img src=\"{$creat}\" alt=\"\" />";
}
else
{
$return = $fail;
}
return $return;
}
function thumbnail($exist, $creat, $width, $height, $fail = null)
{
if(is_file($exist) == true && in_array(strtolower(end(explode('.', $exist))), array('gif', 'jpg', 'jpeg', 'png')) == true)
{
if(file_exists($creat) == false)
{
list($img['width'], $img['height'], $img['type']) = getimagesize($exist);
if($img['width'] > $width || $img['height'] > $height)
{
if($img['width'] > $img['height'])
{
$dst['width'] = $width;
$dst['height'] = ceil(($width / $img['width']) * $img['height']);
}
else if($img['height'] > $img['width'])
{
$dst['width'] = ceil(($height / $img['height']) * $img['width']);
$dst['height'] = $height;
}
else
{
$dst['width'] = $width;
$dst['height'] = $height;
}
}
else
{
$dst['width'] = $img['width'];
$dst['height'] = $img['height'];
}
$dst['width'] = $width;
$dst['height'] = $height;
if($width > $dst['width'])
{
$dst['x'] = ceil(($width - $dst['width']) / 2);
}
else
{
$dst['x'] = 0;
}
if($height > $dst['height'])
{
$dst['y'] = ceil(($height - $dst['height']) / 2);
}
else
{
$dst['y'] = 0;
}
switch($img['type'])
{
case '1' :
$src['image'] = imagecreatefromgif($exist);
$dst['image'] = imagecreate($width, $height);
break;
case '2' :
$src['image'] = imagecreatefromjpeg($exist);
$dst['image'] = imagecreatetruecolor($width, $height);
break;
case '3' :
$src['image'] = imagecreatefrompng($exist);
$dst['image'] = imagecreatetruecolor($width, $height);
break;
}
$src['width'] = imagesx($src['image']);
$src['height'] = imagesy($src['image']);
$dst['color'] = imagecolorallocate($dst['image'], 255, 255, 255);
imagefilledrectangle($dst['image'], 0, 0, $width, $height, $dst['color']);
imagecopyresampled($dst['image'], $src['image'], $dst['x'], $dst['y'], 0, 0, $dst['width'], $dst['height'], $src['width'], $src['height']);
switch($img['type'])
{
case '1' :
imagegif($dst['image'], $creat);
break;
case '2' :
imagejpeg($dst['image'], $creat, 100);
break;
case '3' :
imagepng($dst['image'], $creat, 100);
break;
}
imagedestroy($src['image']);
imagedestroy($dst['image']);
}
$return = "<img src=\"{$creat}\" alt=\"\" />";
}
else
{
$return = $fail;
}
return $return;
}
게시판관리자 환경설정방법
1. 여분필드 1 : 기본목록(처음 보여지는 목록형태), list / news / photo 중 선택, 미입력시 list
이거 하셧나요?
1. 여분필드 1 : 기본목록(처음 보여지는 목록형태), list / news / photo 중 선택, 미입력시 list
이거 하셧나요?
미입력이면 list라 안했는데 해도 그대로네요.
썸네일 생성 문제인데 썸을 바꿔보시죠..
감사합니다. 해결은 못헸지만 고마워서 답변 채택합니다.
저는 별도의 head파일을 만들어서 해결해야겠네요. 저는 완전 초보여서 소스만 보고 해결을 못해서요.
질답 44816도 한번 봐 주십시요.
저는 별도의 head파일을 만들어서 해결해야겠네요. 저는 완전 초보여서 소스만 보고 해결을 못해서요.
질답 44816도 한번 봐 주십시요.