썸네일용 이미지 따로 등록하기!

· 13년 전 · 1661 · 2
오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.

오류 주소 :

오른쪽에 썸네일이 있어 왼쪽에 큰 이미지가 바뀌는 형식의 게시판인데요.
현재 이미지 한개를 첨부하면 썸네일을 자동 생성해서 불러오는 형식인데
썸네일용 따로 왼쪽 큰 이미지 따로 설정하고 싶습니다.
첨부파일 1번은 왼쪽 큰 이미지 2번은 썸네일
또는
첨부파일 1번이 썸네일 2번이 왼쪽 큰 이미지
헌데 어디 소스를 변경해야할지 감이 잘 안잡히네요 ㅠ.ㅠ


<?
for ($i=0; $i<count($list); $i++) {
if ($i && $i%$mod==0)
echo "</tr><tr>";



if(!$member[mb_id]) {

}

$list_file = sql_fetch("select bf_file from $g4[board_file_table] where bo_table='$bo_table' and bf_no = '0' and wr_id='{$list[$i][wr_id]}'");
if($list_file[bf_file]) {
$list_file_view[$i] = "<img src='./../data/file/$bo_table/$list_file[bf_file]' style='cursor:pointer' border=0 width=$small_width height=$small_height onmouseover=\"document.getElementById('large').src='./../data/file/$bo_table/$list_file[bf_file]'; \">";
$list_lfile_view[$i] = "<img id=large src='./../data/file/$bo_table/$list_file[bf_file]' border=0 width=$large_width height=$large_height>";
}else {
$list_file_view[$i] = "";
$list_lfile_view[$i] = "";
}

$latest_subject = cut_str($list[$i][subject], 12, '...'); // 제목

echo "<td width='51' height='51' align='center' valign='top' style='padding-left:4px; padding-bottom:2px;'>";
echo $list_file_view[$i];
echo "<br>";

if($is_admin) {

echo "<a href='{$list[$i][href]}'>$latest_subject</a>";

}


echo "</td>";

}




// 나머지 td
$cnt = $i%$mod;
if ($cnt)
for ($i=$cnt; $i<$mod; $i++)
echo "<td width='{$td_width}%'>&nbsp;</td>";



?>

썸네일 불러오는 소스인데

$list_file_view[$i] = "<img src='./../data/file/$bo_table/$list_file[bf_file]' style='cursor:pointer' border=0 width=$small_width height=$small_height onmouseover=\"document.getElementById('large').src='./../data/file/$bo_table/$list_file[bf_file]'; \">";
$list_lfile_view[$i] = "<img id=large src='./../data/file/$bo_table/$list_file[bf_file]' border=0 width=$large_width height=$large_height>";

둘 중에 하나만 경로를 고치면 될 것 같은데 경로를 어디로 해줘야할지 모르겠네요!

혹시 몰라 list.php파일 첨부합니다~!
고수님들 도움을 주시면 감사합니다.

첨부파일

list.skin.php (6.7 KB) 3회 2012-10-20 14:04
|

댓글 2개

이건 썸네일을 생성하는게 아니고 사이즈 조절만 해서 크게/작게 출력해주는 소스네요~
이 소스는 무조건 1번만 출력해주는 건가요?
파일첨부 1번 2번 따로따로 출력은 안되는건가요 ㅠ.ㅠ? 흑흑
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
13년 전 조회 1,530
13년 전 조회 1,904
13년 전 조회 1,006
13년 전 조회 1,534
13년 전 조회 918
13년 전 조회 954
13년 전 조회 1,637
13년 전 조회 1,577
13년 전 조회 968
13년 전 조회 1,662
13년 전 조회 1,518
13년 전 조회 970
13년 전 조회 3,023
13년 전 조회 1,962
13년 전 조회 1,300
13년 전 조회 894
13년 전 조회 1,077
13년 전 조회 1,611
13년 전 조회 1,023
13년 전 조회 828
🐛 버그신고