썸네일용 이미지 따로 등록하기! 정보
썸네일용 이미지 따로 등록하기!첨부파일
본문
오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.
오류 주소 :
오른쪽에 썸네일이 있어 왼쪽에 큰 이미지가 바뀌는 형식의 게시판인데요.
현재 이미지 한개를 첨부하면 썸네일을 자동 생성해서 불러오는 형식인데
썸네일용 따로 왼쪽 큰 이미지 따로 설정하고 싶습니다.
첨부파일 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}%'> </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파일 첨부합니다~!
고수님들 도움을 주시면 감사합니다.
오류 주소 :
오른쪽에 썸네일이 있어 왼쪽에 큰 이미지가 바뀌는 형식의 게시판인데요.
현재 이미지 한개를 첨부하면 썸네일을 자동 생성해서 불러오는 형식인데
썸네일용 따로 왼쪽 큰 이미지 따로 설정하고 싶습니다.
첨부파일 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}%'> </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파일 첨부합니다~!
고수님들 도움을 주시면 감사합니다.
댓글 전체

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