스킨 적용했는데 최신글이 올라오는게 아니라 오래된게 먼저 뜹니다...
본문
스킨 php파일입니다.
아래 스킨이 최근에 올라온 글들을 사진과 제목을 보여주는 슬라이드 스킨입니다.
아주 유용하게 잘 사용하고 있으며 제작자님께 연락드려보아도 연락이 되질 않아 이렇게 질문드립니다.
문제는 최근에 추가된 내용이 있어서 사진을 올리면 최근에께 먼저 뜨는게 아니라
가장 오래된 사진이 먼저 나옵니다.
사진은 그러는데 또 제목은 최근께 적혀있네요...
딱 한바퀴(4장) 돌고 나면 그다음엔 정상적으로 로딩됩니다.
제목은 정상으로 올라오는데 사진이 그렇지 않다면 어떤걸 수정해야하나요?
홈페이지에 가장 위 행사 안내 배너 입니다.
보시면 홈페이지 열었을때 가장 먼저 범퍼개조 라는 이미지가 나와야하는데
REBS의 이미지가 출력이 되고 한바퀴가 돌면 정상으로 올라옵니다..
도움 부탁드립니다
<?
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
$ym = date("ym", $g4[server_time]);
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
//코멘트와 리플글은 제외
$sql = " select * from $tmp_write_table
where wr_comment = '' and wr_reply = ''
order by wr_id DESC LIMIT 0, 1 ";
$result = sql_query($sql);
$last_con = sql_fetch_array($result);
?>
<meta http-equiv="content-type" content="text/html; charset=<?=$g4['charset']?>">
<!-- ----------------------------------------------------------------------------- -->
<link href="<?=$latest_skin_path?>/css/archefoucs.css" rel="stylesheet" />
<script src="<?=$latest_skin_path?>/js/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="<?=$latest_skin_path?>/js/archefoucs.js" type="text/javascript"></script>
<!-- ----------------------------------------------------------------------------- -->
<!-- un tab slides start -->
<div class="header">
<div class="gg" id="gg">
<div class="ggLoading">
<div class="ggLoading2"><em>로딩중입니다....</em></div>
</div>
<div class="ggs">
<div class="ggBox" id="ggBox">
<?
// 별도의 썸네일 생성 없이 원본파일을 그대로 사용했습니다.
for ($i=0; $i<count($list); $i++) {
$slides_img = "$data_path/".urlencode($list[$i][file][0][file]);
$link = $list[$i]['href'];
?>
<a href='<?=$link?>' target="_self" title="" style="z-index: 3; opacity: 4;">
<img src="<?=$slides_img?>" alt="" /></a>
<? }?>
<!-- <a href="#" target="_blank" title="">
<img src="images/2.jpg" alt="" /></a>
<a href="#" target="_blank" title="">
<img src="images/3.jpg" alt="" /></a>
<a href="#"" target="_blank" title="">
<img src="images/4.jpg" alt="" /></a>-->
</div>
</div>
<div class="ggb">
<div class="ggBtns" id="ggBtns">
<?
// 별도의 썸네일 생성 없이 원본파일을 그대로 사용했습니다.
for ($i=0; $i<count($list); $i++) {
$slides_img = "$data_path/".urlencode($list[$i][file][0][file]);
$link = $list[$i]['href'];
?>
<a title="" href='javascript:void(0)' class="<? if ($i == 0) echo "ggOn"; ?>"><em><?=$list[$i][subject]?></em></a>
<? }?>
</div>
</div>
</div>
</div>
<!-- ----------------------------------------- -->
<? if (count($list) == 0) { ?> 이미지가 없습니다. <?}?>
답변 5
이미지가 역순으로 나온다하시면
<?
// 별도의 썸네일 생성 없이 원본파일을 그대로 사용했습니다.
for ($i=0; $i<count($list); $i++) {
$slides_img = "$data_path/".urlencode($list[$i][file][0][file]);
$link = $list[$i]['href'];
?>
부분을
for ($i=count($list)-1; $i>=0; $i--){
...
로 변경해서 사용해보시는건 어떨까요
도초?? 아는 섬인데 홈피 도움이 필요하시면 쪽지주세요??