테스트 사이트 - 개발 중인 베타 버전입니다

이미지 최근게시물에서 세번째 이미지가 보이도록

이미지 최근게시물에서 대부분의 스킨에서는
[file][0] 을 [file][1] 이나 [file][2] 로 바꾸면 첫번째 이미지가 아닌
두번째나 세번째 이미지가 가능했는데, 아래 스킨은 어디서 조정하는지 모르겠네요~.

http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=109595

첫번째 이미지가 아니고, 세번째 이미지가 최근게시물로 나타나게 하려면
어딜 수정해야 하나요?

if (!file_exists($thumb)) {
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];

이 부분을 [file][2] 로 바꿔바도 안되네요~.
꼭 좀 알려주세요~.


=====================아래가 latest.skin.php소스 전문 입니다.========================

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$img_width = '300'; //썸네일 가로길이
$img_height = '220'; //썸네일 세로길이
$img_quality = '90'; //퀼리티 100이하로 설정

if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");

$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb_nivo'; //썸네일 이미지 생성 디렉토리

@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<link rel="stylesheet" href="<?=$latest_skin_path?>/css/nivo-slider.css" type="text/css">
<script type="text/javascript" src="<?=$latest_skin_path?>/js/jquery.nivo.slider.pack.js"></script>
<div id="slider">
<? for ($i=0; $i<count($list); $i++) {

$img = "<img src='$latest_skin_path/img/noimage.gif' width='$img_width' height='$img_height' title='이미지 없음' />";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
if (!file_exists($thumb)) {
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
// 업로드된 파일이 이미지라면
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file)) {
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
break;

$rate = $img_width / $size[0];
$height = (int)($size[1] * $rate);

// 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
if ($height < $img_height)
// 계산된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $height);
else
// 설정된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $img_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}

if (file_exists($thumb)){
$img = "<a href='{$list[$i][href]}'><img src='$thumb' width='$img_width' height='$img_height' }\" /></a>";
}

echo $img;
} ?>
</div>
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider({
effect:'random', //Specify sets like: 'fold,fade,sliceDown, random sliceDown sliceDownLeft sliceUpDown sliceUpLeft sliceUpfade'
slices:5,
animSpeed:500,
pauseTime:3000,
startSlide:0, //Set starting Slide (0 index)
directionNav:true, //Next & Prev
directionNavHide:true, //Only show on hover
controlNav:true, //1,2,3...
controlNavThumbs:false, //Use thumbnails for Control Nav
controlNavThumbsFromRel:false, //Use image rel for thumbs
controlNavThumbsSearch: '.jpg', //Replace this with...
controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
keyboardNav:false, //Use left & right arrows
pauseOnHover:true, //Stop animation while hovering
manualAdvance:false, //Force manual transitions
captionOpacity:0.8, //Universal caption opacity
beforeChange: function(){},
afterChange: function(){},
slideshowEnd: function(){} //Triggers after all slides have been shown
});
});
</script>

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 2개

$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];

이 부분을 바꾸시면 될것같네요

$file = $list[$i][file][2][path] .'/'. $list[$i][file][2][file];
답변감사 합니다.
그런데 위의 질문글에도 나왔듯이 그 부분을 바꿔도 안되서 질문을 드렸습니다.

다른 방법이 없을까요?

게시글 목록

번호 제목
284508
284499
284492
284490
284484
284481
284478
284476
284474
284472
284470
284458
284457
284454
284453
284447
284446
284444
284441
284440