그룹최신글 적용실패 질문드려요 정보
그룹최신글 적용실패 질문드려요본문
http://sir.co.kr/bbs/tb.php/g4_skin/9295 cunic님이 올려주신 그룹최신글
지금저 홈피를 여는순간 Fatal error: Cannot redeclare mando_image_size() (previously declared in /home/cats/www/extend/image.lib.php:4) in /home/cats/www/lib/latest.lib.php on line 40
나옵니다.
어떤부분을 수정해야하는지 제가 php의 너무초보라 모르겠습니다.
쉽게 설명좀 해주세요.
부탁드립니다.
아래는 저의 latest.lib.php파일 내용입니다.
-------------------------------------------------------------------
<?
if (!defined('_GNUBOARD_')) exit;
if (!defined('_GNUBOARD_')) exit;
// 최신글 추출
function latest($skin_dir="", $bo_table, $rows=10, $subject_len=40, $hit=""){
global $config;
global $g4;
function latest($skin_dir="", $bo_table, $rows=10, $subject_len=40, $hit=""){
global $config;
global $g4;
if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/$config[cf_latest_skin]";
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/$config[cf_latest_skin]";
$list = array();
$sql = " select * from {$g4[board_table]} where bo_table = '$bo_table'";
$board = sql_fetch($sql);
$board = sql_fetch($sql);
$tmp_write_table = $g4[write_prefix] . $bo_table; // 게시판 테이블 전체이름
// 카테고리 이름으로 정렬
if($hit == "yes"){ // 최근 30일이내 가장많이 읽은 순
$sql = " select * from $tmp_write_table where wr_is_comment = 0 and date_sub(curdate(), interval 30 day) <= wr_datetime order by wr_hit desc limit 0, $rows ";
}else{
$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_id desc limit 0, $rows ";
}
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++)
$list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
if($hit == "yes"){ // 최근 30일이내 가장많이 읽은 순
$sql = " select * from $tmp_write_table where wr_is_comment = 0 and date_sub(curdate(), interval 30 day) <= wr_datetime order by wr_hit desc limit 0, $rows ";
}else{
$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_id desc limit 0, $rows ";
}
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++)
$list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
}
// 이미지최신글 스크롤
function mando_image_size($x, $y, $thumbx, $thumby) {
if($x > $thumbx) {
$overx = ($x - $thumbx) / $x;
$x = $thumbx;
$y = intval($y - ($y * $overx));
}
if($y > $thumby) {
$overy = ($y - $thumby) / $y;
$y = $thumby;
$x = intval($x - ($x * $overy));
}
return array('x'=>$x, 'y'=>$y);
}
function mando_image_size($x, $y, $thumbx, $thumby) {
if($x > $thumbx) {
$overx = ($x - $thumbx) / $x;
$x = $thumbx;
$y = intval($y - ($y * $overx));
}
if($y > $thumby) {
$overy = ($y - $thumby) / $y;
$y = $thumby;
$x = intval($x - ($x * $overy));
}
return array('x'=>$x, 'y'=>$y);
}
// 달력 및 일정관리 최신글
function latest_schedule($skin_dir='', $bo_table) {
global $config;
global $g4;
global $year, $month;
function latest_schedule($skin_dir='', $bo_table) {
global $config;
global $g4;
global $year, $month;
// 스킨디렉토리값이 넘어왔다면
if ($skin_dir) {
$latest_skin_path = "./$g4[path]/skin/latest/$skin_dir";
}
if ($skin_dir) {
$latest_skin_path = "./$g4[path]/skin/latest/$skin_dir";
}
$write_table = $g4[write_prefix] . $bo_table;
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
}
?>
--------------------------------------------------------------------------
어디를 수정해야 되는거예요? ㅜ.ㅜ
댓글 전체
mando_image_size() 이 함수가 두번 정의되어서 그런듯 합니다
lib/latest.lib.php 이 파일외에 mando_image_size()가 들어간 파일이있는지 확인하시어 삭제해주세요
아니면
lib/latest.lib.php를 최신버전의 원본으로 바꾸시고 위의 mando_image_size()는 extend쪽에 있는듯 하므로 제거하시고
다음의 달력관련내용은 latest.schedule.lib.php로 따로 만들어 extend 쪽에 넣어주시는것도 좋을듯 합니다
// 달력 및 일정관리 최신글
function latest_schedule($skin_dir='', $bo_table) {
lib/latest.lib.php 이 파일외에 mando_image_size()가 들어간 파일이있는지 확인하시어 삭제해주세요
아니면
lib/latest.lib.php를 최신버전의 원본으로 바꾸시고 위의 mando_image_size()는 extend쪽에 있는듯 하므로 제거하시고
다음의 달력관련내용은 latest.schedule.lib.php로 따로 만들어 extend 쪽에 넣어주시는것도 좋을듯 합니다
// 달력 및 일정관리 최신글
function latest_schedule($skin_dir='', $bo_table) {
여는 홈피가 없긴 하지만
function mando_image_size($x, $y, $thumbx, $thumby) { .. }
이 것이 두 번 나왔다는 거니까
이 파일에서 이 함수 정의를 지워 보세요.
지우시기 꺼림직하면 주석처리하시고요.
/* function mando_image_size($x, $y, $thumbx, $thumby) { .. } */
function mando_image_size($x, $y, $thumbx, $thumby) { .. }
이 것이 두 번 나왔다는 거니까
이 파일에서 이 함수 정의를 지워 보세요.
지우시기 꺼림직하면 주석처리하시고요.
/* function mando_image_size($x, $y, $thumbx, $thumby) { .. } */
루트님 7쟁이님 고맙습니다.
최신글 창과 이미지가 뜨긴했는데 이런문구도 같이 뜨네요.
이건또 멀까요?
아 배우면 배울수록 점점더 어려워지는것 ..
Warning: imagejpeg(): Unable to open './skin/latest/cunic_group/img/no_image.gifThumb' for writing in /home/cats/www/skin/latest/cunic_group/latest.skin.php on line 76
최신글 창과 이미지가 뜨긴했는데 이런문구도 같이 뜨네요.
이건또 멀까요?
아 배우면 배울수록 점점더 어려워지는것 ..
Warning: imagejpeg(): Unable to open './skin/latest/cunic_group/img/no_image.gifThumb' for writing in /home/cats/www/skin/latest/cunic_group/latest.skin.php on line 76
latest.skin.php on line 76
위아래 코드를 보여 주세요.
위아래 코드를 보여 주세요.
rolo님 관심 갖어주셔서 정말 고맙습니다.
참으로 이상하게 뭘건드렷는지 제가 먼가 했는데..(멀했는지 모름)
지금 제대로 나옵니다.
좀더 테스트를 해볼께요...너무 감사드립니다. (__)
참으로 이상하게 뭘건드렷는지 제가 먼가 했는데..(멀했는지 모름)
지금 제대로 나옵니다.
좀더 테스트를 해볼께요...너무 감사드립니다. (__)

이제서야 봤네요..
root님이랑 rolo님이 대답잘해주셨네요.^^;;
root님이랑 rolo님이 대답잘해주셨네요.^^;;
너무 감사드립니다. (__)